/* ==========================================================
   Aiman — UI/UX Designer portfolio
   ========================================================== */
:root {
  --bg: #ffffff;
  --ink: #000000;
  --ink-soft: #3d3d3d;
  --line: #dddddd;
  --yellow: #ffc226;
  --yellow-soft: rgba(255, 194, 38, 0.55);
  --orange: #e55000;
  --green: #2d9e38;
  --green-bg: #e6ffe9;
  --green-line: #b4e7bc;
  --green-ink: #008100;
  --surface: #ffffff;
  --ink-muted: #333333;
  --header-bg: rgba(255, 255, 255, 0.92);
  --yellow-mid: rgba(255, 226, 140, .35);
  --yellow-strong: rgba(255, 210, 90, .65);
  --chip: #e2e2e2;
  --icon-filter: none;
  --surface-2: #f6f6f4;
  --grid-ink: rgba(0, 0, 0, 0.10);
  --grid-glow: rgba(255, 166, 0, 0.95);
  --grid-halo: rgba(255, 194, 38, 0.10);
  --radius: 28px;
  --container: 1008px;
  --gap: 20px;
  --font: "Inter", "Inter Display", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --serif: "Times New Roman", Times, serif;
  color-scheme: light;
}

/* ---------- Dark theme ---------- */
:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --surface: #161616;
  --ink: #f3f3f3;
  --ink-soft: #b4b4b4;
  --ink-muted: #d0d0d0;
  --line: #2b2b2b;
  --yellow-soft: rgba(255, 194, 38, 0.30);
  --yellow-mid: rgba(255, 194, 38, 0.10);
  --yellow-strong: rgba(255, 194, 38, 0.34);
  --header-bg: rgba(13, 13, 13, 0.85);
  --chip: #2c2c2c;
  --green-bg: rgba(45, 158, 56, 0.16);
  --green-line: rgba(45, 158, 56, 0.45);
  --green-ink: #67d873;
  --icon-filter: invert(1);
  --surface-2: #1d1d1d;
  --grid-ink: rgba(255, 255, 255, 0.075);
  --grid-glow: rgba(255, 204, 51, 0.95);
  --grid-halo: rgba(255, 194, 38, 0.07);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }

/* ---------- Background grid + cursor glow ----------
   One SVG tile (80px): minor lines every 16px, a stronger line through the
   middle and a "+" where those cross. It is used as a MASK, so the colour comes
   from the layer's background: faint everywhere, and a yellow radial gradient
   around the cursor, which lights up only the grid lines themselves. */
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  --mx: -999px; --my: -999px;
}
/* Soft halo under the lit grid, so it reads as light (not masked) */
.grid-bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle 280px at var(--mx) var(--my), var(--grid-halo), transparent 100%);
  opacity: 0; transition: opacity .45s ease;
}
.grid-ink, .grid-glow {
  --grid-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23000'%3E%3Cpath stroke-opacity='.4' d='M8.5 0V80M24.5 0V80M56.5 0V80M72.5 0V80M0 8.5H80M0 24.5H80M0 56.5H80M0 72.5H80'/%3E%3Cpath stroke-opacity='.75' d='M40.5 0V80M0 40.5H80'/%3E%3Cpath stroke-width='2' d='M33.5 40.5H47.5M40.5 33.5V47.5'/%3E%3C/g%3E%3C/svg%3E");
  position: absolute; inset: 0;
  -webkit-mask-image: var(--grid-tile); mask-image: var(--grid-tile);
  -webkit-mask-size: 80px 80px; mask-size: 80px 80px;
  -webkit-mask-position: center top; mask-position: center top;
}
.grid-ink { background-color: var(--grid-ink); }
.grid-glow {
  background: radial-gradient(circle 240px at var(--mx) var(--my), var(--grid-glow), transparent 100%);
  opacity: 0; transition: opacity .45s ease;
}
.grid-bg.lit .grid-glow, .grid-bg.lit::before { opacity: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 16px;
  height: 80px;
}
.nav { margin-left: auto; }

/* Theme toggle */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; margin-left: 18px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: transform .3s, background .35s, border-color .35s;
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.05); }
.theme-toggle:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: opacity .3s, transform .4s; }
.theme-toggle .moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: none; }

/* Black icons flip to white in dark mode */
.arrow-btn img, .icon-link img, .tool-dark { filter: var(--icon-filter); }
.project > .arrow-btn img { filter: none; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; }
.brand-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: #ffcb00; flex: none;
}
.brand b { font-weight: 600; }
.brand-text > span { font-weight: 300; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; margin-left: 10px;
  font-size: 11px; font-weight: 600; color: var(--green-ink);
  background: var(--green-bg);
  border: 1px solid var(--green-line);
  border-radius: 999px; white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(45, 158, 56, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 158, 56, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(45, 158, 56, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 158, 56, 0); }
}
.nav { display: flex; gap: 42px; font-size: 19px; }
.nav a { transition: opacity .2s; }
.nav a:hover { opacity: .6; }
.nav a.active { font-weight: 600; }

.menu-btn {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 32px; position: relative;
}
.menu-btn span {
  position: absolute; left: 0; right: 0; height: 7px; border-radius: 4px;
  background: var(--ink); transition: transform .3s, top .3s, opacity .3s;
}
.menu-btn span:nth-child(1) { top: 4px; }
.menu-btn span:nth-child(2) { top: 20px; }
.menu-open .menu-btn span:nth-child(1) { top: 13px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 13px; transform: rotate(-45deg); }

.mobile-badge { display: none; }

/* ---------- Layout ---------- */
main { padding: 24px 0 0; }
.stack > * + * { margin-top: var(--gap); }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: background .35s ease, border-color .35s ease;
}
/* Signature soft yellow gradients */
.g-bl { background: radial-gradient(120% 140% at 0% 100%, var(--yellow-soft) 0%, var(--yellow-mid) 35%, var(--surface) 75%); }
.g-br { background: radial-gradient(120% 140% at 100% 100%, var(--yellow-soft) 0%, var(--yellow-mid) 35%, var(--surface) 75%); }
.g-tl { background: radial-gradient(120% 140% at 0% 0%, var(--yellow-soft) 0%, var(--yellow-mid) 35%, var(--surface) 75%); }
.g-tr { background: radial-gradient(120% 140% at 100% 0%, var(--yellow-soft) 0%, var(--yellow-mid) 35%, var(--surface) 75%); }
.g-b  { background: linear-gradient(180deg, var(--surface) 30%, var(--yellow-strong) 100%); }

/* ---------- Hero ---------- */
.hero { display: grid; gap: var(--gap); grid-template-columns: 1fr 276px; }
.hero.reverse { grid-template-columns: 276px 1fr; }
.hero-text { padding: 34px 38px 32px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hello { display: flex; align-items: center; gap: 14px; }
.hello-avatar { position: relative; flex: none; width: 46px; height: 46px; }
.hello-avatar::before {
  /* Centred on the figure itself (the avatar sits slightly low in its image) */
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 38px; height: 38px; border-radius: 50%; background: #ffcb00;
}
.hello-avatar img { position: relative; width: 46px; height: 46px; }
.hello h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.hello p { font-size: 13px; color: var(--ink-soft); }
.hero-actions { display: flex; align-items: center; gap: 14px; }
.icon-link img { width: 30px; height: 30px; transition: transform .2s; }
.icon-link:hover img { transform: scale(1.08); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 14px; font-size: 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
.pill b { margin-left: 4px; }

.hero h1 {
  margin-top: 22px;
  font-size: 32px; line-height: 1.22; font-weight: 600; letter-spacing: -0.02em;
}
.hero h1 .serif { font-size: 1.08em; }
.typed {
  background: linear-gradient(90deg, var(--yellow) 0%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.typed-wrap::after {
  content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 3px;
  background: var(--orange); vertical-align: -0.08em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { margin-top: 16px; font-size: 15px; line-height: 1.3; color: var(--ink); max-width: 560px; }
.hero-photo { display: flex; align-items: flex-end; justify-content: center; min-height: 266px; }
.hero-photo img { width: 100%; max-width: 300px; transform-origin: bottom center; transition: transform .4s; }
.hero-photo:hover img { transform: scale(1.04) rotate(-2deg); }

/* Waving avatar: the hand reaches outside the card.
   One copy sits inside the card (clipped by it); a second copy on top shows
   only the part past the card's right edge, stopping above the rounded corner. */
.wave-wrap { position: relative; min-height: 266px; --wave-w: 320px; --wave-out: 50px; }
.wave-wrap > .card { position: absolute; inset: 0; }
.wave-wrap img {
  position: absolute; bottom: 0; right: calc(-1 * var(--wave-out));
  width: var(--wave-w); max-width: none;
}
.wave-wrap .wave-pop {
  right: calc(1px - var(--wave-out)); bottom: 1px; z-index: 3; pointer-events: none;
  clip-path: inset(0 0 28px calc(var(--wave-w) - var(--wave-out) - 2px));
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 34px; width: max-content;
  animation: scroll 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee.reverse .marquee-track { animation-direction: reverse; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee-track .word { font-size: 24px; font-weight: 600; color: var(--ink-muted); letter-spacing: -0.01em; white-space: nowrap; }
.marquee-track .star { font-size: 22px; color: var(--ink-muted); }
.marquee-track img { width: 48px; height: 48px; object-fit: contain; }

/* ---------- About strip ---------- */
.diff {
  display: grid; grid-template-columns: 320px 1fr; align-items: end;
  min-height: 266px;
}
.diff-photo { align-self: end; padding: 24px 0 0 30px; }
.diff-photo img { width: 100%; max-width: 300px; }
.diff-text { padding: 52px 70px 48px 24px; }
.diff h2, .about-body h2 {
  font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15;
}
.diff h2 .serif, .about-body h2 .serif { font-size: 1.15em; }
.diff p { margin-top: 18px; font-size: 15px; line-height: 1.25; }
.cta-row { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.cta-row .pill { padding: 4px 26px; }

.arrow-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .25s;
}
.arrow-btn img { width: 60%; transform: rotate(-45deg); }
.arrow-btn:hover, a:hover > .arrow-btn { transform: rotate(45deg); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.project {
  display: block; aspect-ratio: 1 / 1; border: 0;
}
.project img.shot {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.22);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.project:hover img.shot, .project:focus-visible img.shot { transform: scale(1.28); }
div.project { cursor: default; }

/* Dark shade that fades in on hover */
.project-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(200deg, rgba(20, 14, 0, .78) 0%, rgba(40, 30, 10, .55) 40%, rgba(0, 0, 0, .25) 100%);
  opacity: 0; transition: opacity .45s ease;
}
/* Arrow: outlined ↗ at rest, grey filled → on hover */
.project > .arrow-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border: 1.5px solid #000; background: transparent;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), background .3s, border-color .3s;
}
.project > .arrow-btn img { width: 55%; }
/* Title sits left of the arrow, then drops below it on hover */
.project-title {
  position: absolute; top: 21px; right: 66px; z-index: 2;
  font-size: 16px; letter-spacing: .01em; white-space: nowrap; color: #000;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), color .3s, font-size .3s;
}
.project-title b { font-weight: 600; }
.project-desc {
  position: absolute; top: 92px; right: 14px; z-index: 2; width: min(300px, 70%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  color: #fff; font-size: 15px; line-height: 1.3; text-align: right; letter-spacing: .01em;
  opacity: 0; transform: translateY(10px);
  transition: opacity .45s ease .05s, transform .45s cubic-bezier(.2, .7, .2, 1) .05s;
}
.badge.soon { margin: 0; font-size: 13px; padding: 5px 12px; }

.project:hover .project-shade, .project:focus-visible .project-shade { opacity: 1; }
.project:hover > .arrow-btn, .project:focus-visible > .arrow-btn {
  transform: rotate(45deg); background: rgba(255, 255, 255, .7); border-color: rgba(0, 0, 0, .55);
}
.project:hover .project-title, .project:focus-visible .project-title {
  transform: translate(54px, 42px); color: #fff; font-size: 19px;
}
.project:hover .project-desc, .project:focus-visible .project-desc { opacity: 1; transform: none; }

/* ---------- Project detail (case study) ---------- */
.case { padding-top: 8px; }
.case-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 6px; border-bottom: 1.5px solid #9a9a9a;
}
.case-head h1 { font-size: 40px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.case-head h1 b { font-weight: 700; }
.case-date { font-size: 21px; padding-right: 6px; }
.case-date b { font-weight: 600; }
.case-tools { display: flex; justify-content: flex-end; gap: 14px; padding: 10px 30px 0 0; }
.case-tools img { width: 26px; height: 26px; object-fit: contain; }
.case-text { margin-top: 26px; }
.case-text p { font-size: 19px; line-height: 1.3; text-align: justify; }
.case-text p + p { margin-top: 24px; }
.case-tags { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; margin-top: 40px; }
.case-tags .pill { padding: 6px 10px; font-size: 16px; border-radius: 10px; }
.case-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 52px; }
.case-gallery .card, .case-hero { border: 0; }
.case-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.case-hero { margin-top: var(--gap); }
.case-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- About body ---------- */
.about-body {
  display: grid; grid-template-columns: 1fr 340px; align-items: end;
}
.about-copy { padding: 44px 0 50px 60px; max-width: 650px; }
.about-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.about-copy p { margin-top: 18px; font-size: 15px; line-height: 1.28; text-align: justify; }
.about-copy p:first-of-type { margin-top: 36px; }
.about-photo { align-self: end; padding-right: 26px; }
.about-photo img { width: 100%; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Work with me ---------- */
/* Slim banner (About, Project, PetPal pages) */
.work-strip {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px 16px 22px; border-radius: 999px;
}
.work-strip .badge { margin: 0; font-size: 12px; }
.work-strip p { flex: 1; min-width: 220px; font-size: 16px; }
.work-strip p b { font-weight: 600; }
.work-strip .cta-row { margin: 0; }
/* Full section (Home) */
.work { padding: 44px 48px 40px; }
.work-head { max-width: 640px; }
.work-head .badge { margin: 0 0 16px; font-size: 12px; }
.work h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.work h2 .serif { font-size: 1.15em; }
.work-head p { margin-top: 12px; font-size: 16px; line-height: 1.35; color: var(--ink-soft); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.work-item {
  padding: 22px; border: 1px solid transparent; border-radius: 18px;
  background: var(--surface-2); transition: border-color .25s;
}
.work-item:hover { border-color: var(--yellow); }
.work-icon {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: #ffcb00; color: #000;
}
.work-icon svg { width: 21px; height: 21px; }
.work-item h3 { margin-top: 14px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.work-item p { margin-top: 6px; font-size: 14.5px; line-height: 1.35; color: var(--ink-soft); }
.work .cta-row { margin-top: 28px; }
.work .cta-row .pill { padding: 6px 22px; }
.pill.solid { background: #ffcb00; border-color: #ffcb00; color: #000; }
/* WhatsApp brand green */
.pill.wa { gap: 8px; background: #25d366; border-color: #25d366; color: #fff; font-weight: 500; }
.pill.wa:hover { background: #1ebe5b; border-color: #1ebe5b; }
.pill.wa b { margin-left: 0; }
.pill.wa svg { width: 18px; height: 18px; flex: none; }

/* ---------- Contact CTA ---------- */
.contact {
  display: grid; grid-template-columns: 340px 1fr; align-items: center;
  min-height: 234px;
}
.contact-photo { align-self: end; padding: 12px 0 0 46px; }
.contact-photo img { width: 100%; max-width: 230px; }
.contact-text h3 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.contact-text h3 .serif { font-size: 1.15em; }
.contact-text h2 {
  display: flex; align-items: center; gap: 14px; margin-top: 4px;
  font-size: 48px; font-weight: 600; letter-spacing: -0.03em;
}
.contact-text h2 .arrow-btn { width: 38px; height: 38px; background: var(--chip); border: 0; }
.contact:hover h2 .arrow-btn { transform: rotate(45deg); }

/* ---------- Footer ---------- */
.site-footer { padding: 26px 0 40px; text-align: center; font-size: 15px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .about-photo img, .badge::before, .typed-wrap::after { animation: none; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .nav { gap: 28px; font-size: 17px; }
}

/* Narrower screens have less side margin, so the hand reaches out less */
@media (max-width: 1110px) {
  .wave-wrap { --wave-out: 14px; }
}

/* Tablet: keep the title on one line by dropping the badge and tightening the menu */
@media (min-width: 761px) and (max-width: 1000px) {
  .brand-text { white-space: nowrap; }
  .site-header .badge { display: none; }
  .nav { gap: 22px; font-size: 16px; }
  .theme-toggle { margin-left: 8px; }
}

@media (max-width: 900px) {
  .hero, .hero.reverse { grid-template-columns: 1fr 230px; }
  .hero.reverse { grid-template-columns: 230px 1fr; }
  .hero h1 { font-size: 27px; }
  .wave-wrap { --wave-w: 290px; --wave-out: 14px; }
  .diff { grid-template-columns: 270px 1fr; }
  .diff-text { padding: 40px 40px 40px 16px; }
  .about-body { grid-template-columns: 1fr 260px; }
  .about-copy { padding: 40px 0 40px 36px; }
  .contact { grid-template-columns: 260px 1fr; }
  .contact-text h2 { font-size: 38px; }
}

@media (max-width: 760px) {
  :root { --radius: 26px; }
  .site-header .container { height: 86px; }
  .brand { font-size: 16px; line-height: 1.25; }
  .brand-text { display: flex; flex-direction: column; }
  .site-header .badge { display: none; }
  .menu-btn { display: block; }
  .theme-toggle { margin-left: auto; }
  .nav {
    position: fixed; inset: 86px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; font-size: 22px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav a { padding: 12px 8px; }
  .menu-open .nav { opacity: 1; transform: none; pointer-events: auto; }

  .mobile-badge { display: flex; align-items: center; justify-content: center; gap: 10px; }
  .mobile-badge img { width: 36px; }
  .mobile-badge .badge { margin: 0; font-size: 12px; }

  .container { width: min(var(--container), calc(100% - 32px)); }
  main .container.narrow { width: min(320px, calc(100% - 32px)); }

  /* Hero becomes stacked: photo, intro, headline card */
  .hero, .hero.reverse { grid-template-columns: 1fr; }
  .hero-photo { order: -1; aspect-ratio: 1 / 1; min-height: 0; }
  .wave-wrap { order: -1; aspect-ratio: 1 / 1; min-height: 0; }
  .wave-wrap > .card img { left: 0; right: 0; margin: 0 auto; width: 100%; max-width: 340px; }
  .wave-wrap .wave-pop { display: none; }
  .hero-text { border: 0; background: none; padding: 0; text-align: center; }
  .hero-top { flex-direction: column; }
  .hello { justify-content: center; }
  .hero-actions { display: none; }
  .hero-desc { font-size: 16px; }
  .hero h1 { display: none; }
  .headline-card {
    display: block !important; padding: 40px 24px 40px; text-align: center;
  }
  .headline-card h1 { display: block; margin: 0; font-size: 36px; line-height: 1.07; }
  .headline-card .hero-actions { display: flex; justify-content: center; margin-top: 18px; flex-direction: row-reverse; }

  .marquee-track .word { font-size: 22px; }

  .diff, .about-body, .contact { grid-template-columns: 1fr; }
  .diff-photo, .about-photo { display: none; }
  .diff { border: 0; background: none; min-height: 0; }
  .diff-text { padding: 0; text-align: center; }
  .diff h2 { font-size: 32px; padding: 0 12px; }
  .diff-box { margin-top: 20px; padding: 40px 24px 26px; border: 1px solid var(--line); border-radius: var(--radius);
    background: radial-gradient(120% 140% at 0% 100%, var(--yellow-soft) 0%, var(--yellow-mid) 35%, var(--surface) 75%); }
  .diff p { margin-top: 0; font-size: 16px; }
  .cta-row { justify-content: center; }
  .cta-row .pill { flex: 1; max-width: 180px; }

  .projects { grid-template-columns: 1fr; }
  .project-title { font-size: 15px; }
  .project:hover .project-title { font-size: 17px; }
  .project-desc { font-size: 14px; width: 86%; }

  .case-head h1 { font-size: 30px; }
  .case-date { font-size: 16px; }
  .case-tools { padding-right: 0; }
  .case-text p { font-size: 16px; text-align: left; }
  .case-tags { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 28px; }
  .case-tags .pill:last-child { grid-column: 1 / -1; }
  .case-gallery { grid-template-columns: 1fr; margin-top: 32px; }

  .about-copy { padding: 34px 24px; }
  .about-copy p { text-align: left; }
  .about-head { justify-content: center; text-align: center; }

  .work-strip { border-radius: var(--radius); flex-direction: column; align-items: flex-start; padding: 20px; }
  .work { padding: 32px 22px 28px; text-align: center; }
  .work-head { margin: 0 auto; }
  .work h2 { font-size: 28px; }
  .work-grid { grid-template-columns: 1fr; text-align: left; }
  .work .cta-row { justify-content: center; }
  .work .cta-row .arrow-btn { display: none; }

  .contact { background: none; border: 0; min-height: 0; text-align: center; }
  .contact-text h3 { font-size: 32px; line-height: 1.2; padding: 0 30px; }
  .contact-text > h2 { display: none; }
  .contact-photo { display: none; }
  .contact-mobile {
    display: block !important; position: relative; aspect-ratio: 1 / 1; margin-top: 20px; text-align: left;
  }
  .contact-mobile h2 {
    position: absolute; top: 18px; left: 22px; right: 22px; z-index: 1;
    font-size: 34px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em;
  }
  .contact-mobile h2 .arrow-btn { width: 38px; height: 38px; background: var(--chip); border: 0; vertical-align: middle; margin-left: 6px; }
  .contact-mobile > img { position: absolute; right: -16px; bottom: 0; width: 82%; }
}

.headline-card, .contact-mobile { display: none; }
