* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg-base: #f6f2ea;
  --bg-fog: #fff8ef;
  --ink: #152021;
  --muted: #495759;
  --surface: rgba(255, 252, 247, 0.8);
  --line: rgba(21, 32, 33, 0.12);
  --accent-a: #007a78;
  --accent-b: #e55f2b;
  --accent-c: #f1b34d;
  --radius-xl: 30px;
  --radius-lg: 20px;
}

body.mode-design {
  --accent-a: #c6492d;
  --accent-b: #1f7da8;
  --accent-c: #ffc670;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 5% 10%, rgba(0, 122, 120, 0.2), transparent 40%),
    radial-gradient(circle at 94% 18%, rgba(229, 95, 43, 0.22), transparent 35%),
    linear-gradient(140deg, var(--bg-base), var(--bg-fog));
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.45;
  z-index: -2;
}

/* NAV */
.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: 0.02em;
}

.brand-rotator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-static {
  line-height: 1;
}

.rotator-window {
  height: 1.2em;
  overflow: hidden;
  display: inline-flex;
  align-items: flex-start;
}

.rotator-track {
  display: flex;
  flex-direction: column;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.rotator-word {
  display: block;
  height: 1.2em;
  line-height: 1.2;
  color: var(--accent-a);
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.availability-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f6a44;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.portfolio-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #10343e;
  border: 1px solid rgba(21, 32, 33, 0.2);
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portfolio-switch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(21, 32, 33, 0.12);
  background: #ffffff;
}

/* HERO */
.hero-editorial {
  width: min(1200px, calc(100% - 40px));
  max-width: 1200px;
  margin: 22px auto 14px;
  padding: 62px 36px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fffbf5, #fff3e6);
  box-shadow: 0 24px 80px rgba(21, 32, 33, 0.14);
  overflow: hidden;
}

.hero-left {
  display: grid;
  gap: 16px;
}

.hero-inline-photo {
  display: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-a);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-intro {
  font-family: "Fraunces", serif;
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1.1;
  color: var(--accent-a);
  font-weight: 700;
}

.hero-left h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.8rem, 7.1vw, 6rem);
  line-height: 0.95;
  max-width: 16ch;
  margin-top: 14px;
  margin-bottom: 14px;
}

.hero-copy {
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: 0;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: -10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta.primary {
  color: #fffcf7;
  background: linear-gradient(125deg, var(--accent-a), #0aa09d);
}

.cta.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(21, 32, 33, 0.14);
}

.hero-metrics {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-metrics div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
}

.hero-metrics strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 0.88rem;
}

.upwork-proof {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #12313a;
  font-size: 0.9rem;
  font-weight: 700;
}

.badge-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f7ea8, #2e99cb);
  color: #fff;
}

.badge-icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.hero-right {
  display: grid;
  justify-items: center;
  align-content: start;
  align-self: start;
  gap: 16px;
  margin-top: 42px;
}

.portrait-card {
  width: min(380px, 100%);
  aspect-ratio: 4 / 5;
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 24%, rgba(229, 95, 43, 0.6), transparent 40%),
    radial-gradient(circle at 82% 84%, rgba(0, 122, 120, 0.65), transparent 45%),
    linear-gradient(160deg, #ffe6ce, #f8bfa2 42%, #d18f73 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 28px 70px rgba(21, 32, 33, 0.18);
}

.hero-contact-card {
  width: min(380px, 100%);
  margin-top: 6px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-proof {
  width: min(380px, 100%);
  margin-top: 4px;
  justify-content: center;
  flex-wrap: nowrap;
}

.hero-proof .proof-badge {
  white-space: nowrap;
}

.hero-proof--laptop {
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: 100%;
}

.hero-proof--right {
  display: none !important;
}

.hero-contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(21, 32, 33, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(21, 32, 33, 0.12);
}

.hero-contact-btn--solid {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero-contact-btn--solid:hover {
  background: var(--accent-a);
  border-color: var(--accent-a);
}

.hero-contact-btn--linkedin {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

.hero-contact-btn--linkedin:hover {
  background: #0057a6;
  border-color: #0057a6;
}

.hero-contact-btn--outline:hover {
  background: #fff;
}

.hero-contact-btn--upwork {
  background: #14a800;
  border-color: #14a800;
  color: #fff;
}

.hero-contact-btn--upwork:hover {
  background: #108a00;
  border-color: #108a00;
}

.portrait-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.03) contrast(1.02);
}

.portrait-image.designer-variant {
  filter: saturate(0.95) contrast(1.06) brightness(0.98);
  object-position: center 24%;
}

.orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  z-index: 2;
}

.orbit-a {
  width: 56%;
  aspect-ratio: 1;
  left: -5%;
  top: -8%;
  animation: spinOrbit 16s linear infinite;
}

.orbit-b {
  width: 50%;
  aspect-ratio: 1;
  right: -10%;
  bottom: -4%;
  animation: spinOrbit 13s linear infinite reverse;
}

/* CONTENT */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.content-section + .content-section {
  margin-top: 56px;
}

.section-intro {
  margin-bottom: 22px;
}

.section-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-a);
  font-size: 0.78rem;
  font-weight: 700;
}

.section-intro h3 {
  margin-top: 8px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.section-actions {
  margin-top: 14px;
}

.graphic-design-section {
  display: grid;
  gap: 28px;
}

.graphic-design-section > .section-intro .section-kicker {
  font-size: 0.92rem;
  letter-spacing: 0.12em;
}

.art-group {
  display: grid;
  gap: 12px;
}

.art-group-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.hire-strip {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(140deg, rgba(255, 251, 245, 0.92), rgba(255, 246, 236, 0.86));
  box-shadow: 0 18px 46px rgba(21, 32, 33, 0.1);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  margin-bottom: 56px;
}

.hire-strip-main {
  display: grid;
  gap: 10px;
}

.hire-strip-main h3 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.18;
  max-width: 22ch;
}

.hire-strip-main p {
  color: var(--muted);
  max-width: 54ch;
  line-height: 1.65;
}

.hire-points {
  display: grid;
  gap: 10px;
}

.hire-point {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  gap: 4px;
}

.hire-point strong {
  font-size: 0.95rem;
}

.hire-point span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* SKILLS */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.stack-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #fffdfb;
  box-shadow: 0 20px 38px rgba(21, 32, 33, 0.2);
}

.stack-card.frontend {
  background: linear-gradient(140deg, #006b69, #0ba8a5);
}

.stack-card.backend {
  background: linear-gradient(140deg, #d45522, #ee8a56);
}

.stack-card.product {
  background: linear-gradient(140deg, #1f6f9b, #3f9bc8);
}

.stack-card ul {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f0f0f0;
  border: 1px solid #f0f0f0;
  color: #1a1a1a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 14px 7px 10px;
  border-radius: 100px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.tech-pill:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

.tech-pill img,
.tech-pill-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.stack-card h4 {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
}

/* PORTFOLIO */
/* ── Pixel Art Instagram Gallery ── */
.pixel-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  background: transparent;
  padding: 4px;
}

.pixel-item {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(21, 32, 33, 0.07);
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.28s ease;
  position: relative;
}

.pixel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 30%), rgba(255,255,255,0.22) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.pixel-item:hover::after {
  opacity: 1;
}

.pixel-item.span-2 {
  grid-column: span 2;
  aspect-ratio: 1;
}

.pixel-item.span-2.wide {
  aspect-ratio: 16/9;
}

.pixel-item.span-4 {
  grid-column: span 4;
  aspect-ratio: auto;
}

.pixel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  border-radius: var(--radius-lg);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

.pixel-item.span-4 img {
  object-fit: contain;
  background: var(--surface);
}

.digital-gallery .pixel-item img {
  object-fit: cover;
  image-rendering: auto;
}

.digital-gallery .pixel-item.span-4 {
  background: #111a1b;
}

.digital-gallery .pixel-item.span-4 img {
  object-fit: contain;
  background: #111a1b;
}

.art-gallery .pixel-item img {
  image-rendering: auto;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card--featured {
  grid-column: span 2;
  border-color: rgba(0, 122, 120, 0.22);
  box-shadow: 0 22px 48px rgba(21, 32, 33, 0.16);
}

.project-card--featured .project-thumb {
  aspect-ratio: 16/8.5;
}

.featured-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 2px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-a);
  background: rgba(0, 122, 120, 0.08);
  border: 1px solid rgba(0, 122, 120, 0.12);
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 34px rgba(21, 32, 33, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card--coming-soon {
  border-style: dashed;
  border-width: 2px;
  border-color: rgba(21, 32, 33, 0.22);
  background:
    radial-gradient(circle at top right, rgba(0, 122, 120, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.9));
  box-shadow: none;
}

.project-card--coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.project-meta--coming-soon {
  min-height: 100%;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 24px;
}

.project-card--coming-soon h4 {
  font-size: 1.85rem;
}

.project-card--coming-soon p {
  max-width: 22ch;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--line);
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb--placeholder {
  background: linear-gradient(135deg, rgba(0,122,120,0.08), rgba(0,122,120,0.03));
}

.project-meta {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-status {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-done {
  background: rgba(21, 32, 33, 0.07);
  color: var(--muted);
}

.status-wip {
  background: rgba(198, 73, 45, 0.1);
  color: var(--accent-b);
}

.status-live {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse-dot 1.8s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  align-self: flex-start;
  transition: background 0.22s ease, transform 0.2s ease;
}

.project-link:hover {
  background: var(--accent-a);
  transform: translateY(-2px);
}

.project-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.project-skills span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-base);
  border: 1px solid var(--line);
  color: var(--ink);
  letter-spacing: 0.03em;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px rgba(21, 32, 33, 0.18);
}

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-a);
  background: rgba(0, 122, 120, 0.12);
}

.project-card h4 {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
}

.project-card p {
  color: var(--muted);
  line-height: 1.6;
}

/* FOOTER */
footer {
  padding: 40px 36px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  transition: background 0.22s ease, color 0.22s ease, transform 0.2s ease;
}

.footer-btn:hover {
  background: var(--accent-a);
  border-color: var(--accent-a);
  transform: translateY(-2px);
}

.footer-btn--outline {
  background: transparent;
  color: var(--ink);
}

.footer-btn--outline:hover {
  background: var(--accent-a);
  color: #fff;
  border-color: var(--accent-a);
}

.footer-btn--linkedin {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

.footer-btn--linkedin:hover {
  background: #0057a6;
  border-color: #0057a6;
}

@media (max-width: 1200px) and (min-width: 901px) {
  .hero-editorial {
    align-items: start;
    padding: 42px 30px 34px;
  }

  .hero-right {
    margin-top: 0;
  }

  .hero-proof--laptop {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .hero-proof--right {
    display: block;
  }

  .hero-proof--right .proof-badge {
    display: none;
  }

  .hero-proof--right::before {
    content: "100% Job Success \2022 Top Rated on Upwork";
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #12313a;
    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
  }
}

.hero-left > * {
  animation: riseIn 700ms ease both;
}

.hero-left > *:nth-child(2) {
  animation-delay: 90ms;
}

.hero-left > *:nth-child(3) {
  animation-delay: 160ms;
}

.hero-left > *:nth-child(4) {
  animation-delay: 230ms;
}

.hero-left > *:nth-child(5) {
  animation-delay: 300ms;
}

.stack-grid .stack-card,
.card-grid .project-card {
  animation: riseIn 560ms ease both;
}

.stack-grid > *:nth-child(2),
.card-grid > *:nth-child(2) {
  animation-delay: 70ms;
}

.stack-grid > *:nth-child(3),
.card-grid > *:nth-child(3) {
  animation-delay: 140ms;
}

/* ── Project Drawer ── */
#projectDrawerOverlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(21, 32, 33, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#projectDrawerOverlay.open {
  opacity: 1;
  pointer-events: auto;
}

#projectDrawer {
  position: fixed;
  inset: 0;
  z-index: 901;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#projectDrawer.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.drawer-inner {
  background: var(--bg-base);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: 0 32px 80px rgba(21, 32, 33, 0.28);
  width: min(1280px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  position: relative;
}

#drawerClose {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10;
}

#drawerClose:hover {
  background: var(--line);
}

.drawer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  min-height: 560px;
  max-height: calc(100vh - 48px);
}

.drawer-col-left {
  position: relative;
  background: #0d1a1a;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.drawer-col-right {
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 32px 40px;
}

.drawer-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: var(--surface);
  overflow: hidden;
  flex: 1;
}

.drawer-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  cursor: default;
}

.drawer-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.drawer-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(21,32,33,0.55);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.drawer-carousel-btn:hover {
  background: rgba(21,32,33,0.85);
  transform: translateY(-50%) scale(1.08);
}

.drawer-carousel-btn.prev { left: 14px; }
.drawer-carousel-btn.next { right: 14px; }

.drawer-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 16px;
  background: #0d1a1a;
  flex-shrink: 0;
}

.drawer-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.drawer-carousel-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.drawer-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#drawerTitle {
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--ink);
}

.drawer-desc {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.drawer-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
}

#drawerSkills.project-skills {
  padding: 0;
}
/* ── Back to Top ── */
#backToTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent-a);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0, 122, 120, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.25s ease, background 0.25s ease;
}

#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:hover {
  background: var(--ink);
  box-shadow: 0 10px 32px rgba(21, 32, 33, 0.3);
  transform: translateY(-3px);
}

/* MOBILE */
@media (max-width: 900px) {
  .nav {
    padding: 24px 20px 10px;
  }

  .hire-strip {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
    margin-bottom: 48px;
  }

  .hero-editorial {
    margin: 18px 20px 12px;
    padding: 44px 28px;
    gap: 24px;
    grid-template-columns: 1fr;
  }

  .hero-left {
    display: block;
  }

  .hero-inline-photo {
    display: block;
    float: right;
    width: min(34vw, 270px);
    aspect-ratio: 4 / 5;
    margin: 2px 0 14px 18px;
    border-radius: 24px;
    overflow: hidden;
    background:
      radial-gradient(circle at 20% 24%, rgba(229, 95, 43, 0.45), transparent 40%),
      radial-gradient(circle at 82% 84%, rgba(0, 122, 120, 0.5), transparent 45%),
      linear-gradient(160deg, #ffe6ce, #f8bfa2 42%, #d18f73 100%);
    box-shadow: 0 18px 36px rgba(21, 32, 33, 0.16);
  }

  .hero-inline-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  .hero-left h1 {
    max-width: 15ch;
  }

  .hero-copy {
    margin-top: 12px;
  }

  .cta-row {
    clear: both;
    margin-top: 18px;
  }

  .hero-right {
    margin-top: 8px;
    justify-items: flex-start;
    gap: 12px;
  }

  .portrait-card {
    display: none;
  }

  .hero-contact-card,
  .hero-proof {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .hero-contact-actions {
    justify-content: flex-start;
  }

  .hero-proof {
    flex-wrap: wrap;
  }

  main {
    padding: 24px 20px 72px;
  }

  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card--featured {
    grid-column: span 2;
  }

  .pixel-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .pixel-item.span-4 {
    grid-column: span 2;
  }

  .drawer-inner {
    width: min(100%, 980px);
  }

  .drawer-cols {
    grid-template-columns: 1fr;
    min-height: unset;
    max-height: calc(100vh - 48px);
  }

  .drawer-col-left {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    min-height: 340px;
  }

  .drawer-col-right {
    padding: 28px 24px 28px;
  }

  .drawer-gallery {
    min-height: 340px;
  }

  footer {
    padding: 32px 20px 40px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .hero-editorial {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 36px 24px;
  }

  .hero-inline-photo {
    display: block;
    float: right;
    width: min(32vw, 160px);
    aspect-ratio: 1 / 1;
    margin: 12px 0 12px 14px;
    border-radius: 50%;
    shape-outside: circle(50%);
    clip-path: circle(50%);
    overflow: hidden;
  }

  .hero-inline-photo img {
    transform: scale(1.28);
    transform-origin: center 34%;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cta-row {
    flex-wrap: wrap;
  }

  .cta.ghost .cta-label-download {
    display: none;
  }

  .hero-right {
    margin-top: 10px;
    justify-items: center;
  }

  .hero-contact-card {
    width: min(360px, 100%);
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-column: span 1;
  }

  .project-card--featured .project-thumb {
    aspect-ratio: 16/9;
  }

  .project-card--coming-soon p {
    max-width: none;
  }

  .drawer-inner {
    max-height: calc(100vh - 28px);
  }

  .drawer-col-left {
    min-height: 300px;
  }

  .drawer-gallery {
    min-height: 300px;
  }

  #backToTop {
    display: none !important;
  }
}

@media (max-width: 600px) {
  body::before {
    background-size: 34px 34px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 22px 16px 10px;
  }

  .nav-cta {
    width: 100%;
    justify-content: flex-start;
  }

  .availability-pill {
    font-size: 0.66rem;
    padding: 7px 9px;
  }

  .portfolio-switch-btn {
    font-size: 0.64rem;
    padding: 7px 10px;
  }

  .brand-rotator {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .hero-editorial {
    width: auto;
    margin-top: 14px;
    margin-left: 16px;
    margin-right: 16px;
    padding: 28px 18px;
    border-radius: 24px;
  }

  .hero-left h1 {
    max-width: 12ch;
    font-size: clamp(1.65rem, 3.2vw, 2.2rem);
    line-height: 1.04;
    text-wrap: balance;
  }

  .hero-left {
    display: block;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .hero-inline-photo {
    display: block;
    float: right;
    width: min(34vw, 140px);
    aspect-ratio: 1 / 1;
    margin: 10px 0 10px 12px;
    border-radius: 50%;
    shape-outside: circle(50%);
    clip-path: circle(50%);
    overflow: hidden;
    background:
      radial-gradient(circle at 20% 24%, rgba(229, 95, 43, 0.45), transparent 40%),
      radial-gradient(circle at 82% 84%, rgba(0, 122, 120, 0.5), transparent 45%),
      linear-gradient(160deg, #ffe6ce, #f8bfa2 42%, #d18f73 100%);
    box-shadow: 0 16px 32px rgba(21, 32, 33, 0.16);
  }

  .hero-inline-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  .hero-copy {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-top: 12px;
  }

  .cta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
    clear: none;
  }

  .cta {
    width: auto;
    justify-content: center;
    white-space: nowrap;
  }

  .hero-metrics div {
    padding: 14px 12px;
  }

  .hero-metrics strong {
    font-size: 1.15rem;
  }

  .hero-metrics span {
    font-size: 0.84rem;
  }

  .portrait-card,
  .hero-contact-card {
    width: 100%;
  }

  .portrait-card {
    display: none;
  }

  .hero-contact-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-contact-btn {
    width: auto;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 0.86rem;
    justify-content: center;
  }

  .hero-proof {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-proof--laptop {
    display: block;
    position: relative;
  }

  .hero-proof--laptop .proof-badge {
    display: none !important;
  }

  .hero-proof--laptop::before {
    content: "100% Job Success and Top Rated on Upwork";
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 9px 12px 9px 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #12313a;
    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
  }

  .hero-proof--laptop::after {
    content: "★";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f8f34, #14a800);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
  }

  .hero-proof--right {
    display: none !important;
  }

  .hero-proof .proof-badge {
    min-width: 0;
    width: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    text-align: center;
    font-size: 0.81rem;
    padding: 8px 8px;
    overflow: hidden;
  }

  .hero-proof .badge-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  .hero-proof .proof-badge span {
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  main {
    padding: 22px 16px 72px;
  }

  .hire-strip {
    border-radius: 22px;
    padding: 20px 16px;
    margin-bottom: 42px;
  }

  .hire-strip-main h3 {
    max-width: none;
  }

  .pixel-gallery {
    gap: 8px;
    padding: 0;
  }

  .pixel-item.span-2,
  .pixel-item.span-2.wide,
  .pixel-item.span-4 {
    grid-column: span 2;
  }

  .project-meta {
    padding: 16px 16px 18px;
  }

  .project-meta-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-card h4 {
    font-size: 1.28rem;
    line-height: 1.35;
  }

  .project-card--coming-soon h4 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  #projectDrawer {
    padding: 14px 10px;
  }

  .drawer-inner {
    border-radius: 22px;
    max-height: calc(100vh - 20px);
  }

  .drawer-col-left {
    min-height: 240px;
    border-radius: 22px 22px 0 0;
  }

  .drawer-gallery {
    min-height: 240px;
  }

  .drawer-col-right {
    gap: 14px;
    padding: 20px 16px 20px;
  }

  #drawerTitle {
    font-size: 1.55rem;
    line-height: 1.3;
  }

  .drawer-desc {
    font-size: 0.93rem;
    line-height: 1.68;
  }

  .drawer-carousel-btn {
    width: 38px;
    height: 38px;
  }

  #backToTop {
    right: 12px;
    bottom: 20px;
    height: 42px;
    padding: 0 16px 0 14px;
    font-size: 0.8rem;
  }

  footer {
    padding: 28px 16px 28px;
  }

  .footer-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .footer-btn {
    min-width: 0;
    padding: 9px 8px;
    font-size: 0.8rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 18px 14px 8px;
    gap: 8px;
  }

  .availability-pill {
    font-size: 0.62rem;
    letter-spacing: 0.07em;
  }

  .portfolio-switch-btn {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    padding: 6px 9px;
  }

  .brand-rotator {
    font-size: 1.15rem;
  }

  .hero-editorial {
    width: auto;
    margin-left: 12px;
    margin-right: 12px;
    padding: 24px 14px;
    border-radius: 20px;
  }

  .hero-left h1 {
    font-size: clamp(1.55rem, 3vw, 1.9rem);
    max-width: none;
  }

  .hero-inline-photo {
    float: right;
    width: min(36vw, 128px);
    margin: 10px 0 10px 10px;
    border-radius: 50%;
    shape-outside: circle(50%);
    clip-path: circle(50%);
  }

  .hero-inline-photo img {
    transform: scale(1.34);
    transform-origin: center 36%;
  }

  .hero-metrics div {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  .cta {
    padding: 11px 10px;
    font-size: 0.9rem;
  }

  .hero-contact-btn {
    padding: 9px 8px;
    font-size: 0.8rem;
  }

  .hero-proof .proof-badge {
    font-size: 0.75rem;
    padding: 7px 6px;
  }

  .hero-proof--laptop::before {
    content: "100% Job Success and\A Top Rated on Upwork";
    white-space: pre-line;
    font-size: 0.75rem;
    padding: 8px 10px 8px 34px;
  }

  .hero-proof--laptop::after {
    left: 10px;
    width: 16px;
    height: 16px;
    font-size: 10px;
  }

  .hero-proof .badge-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
  }

  main {
    padding: 18px 12px 68px;
  }

  .hire-strip {
    border-radius: 20px;
    padding: 18px 12px;
  }

  .project-card h4 {
    font-size: 1.2rem;
  }

  .project-meta {
    padding: 14px 14px 16px;
  }

  .pixel-gallery {
    gap: 6px;
  }

  .pixel-item.span-2,
  .pixel-item.span-2.wide,
  .pixel-item.span-4 {
    grid-column: span 2;
  }

  #projectDrawer {
    padding: 12px 8px;
  }

  .drawer-inner {
    border-radius: 20px;
  }

  .drawer-col-left {
    min-height: 220px;
    border-radius: 20px 20px 0 0;
  }

  .drawer-gallery {
    min-height: 220px;
  }

  .drawer-col-right {
    gap: 12px;
    padding: 18px 14px 18px;
  }

  #drawerTitle {
    font-size: 1.45rem;
    line-height: 1.28;
  }

  .drawer-desc {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .drawer-carousel-btn {
    width: 36px;
    height: 36px;
  }

  .drawer-carousel-dots {
    gap: 4px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }

  #backToTop {
    right: 10px;
    bottom: 18px;
    height: 40px;
    padding: 0 12px 0 11px;
    font-size: 0.77rem;
  }

  footer {
    padding: 24px 12px 24px;
  }

  .footer-links {
    gap: 6px;
  }

  .footer-btn {
    min-width: 0;
    font-size: 0.74rem;
    padding: 8px 6px;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
