/* ============================================================
   MUHAMMAD ABDULLAH — PORTFOLIO
   Design tokens: deep navy + signal teal, editorial serif x
   geometric sans. Signature: layered 3D "MA" monogram that
   tilts toward the cursor, echoed in nav + section dividers.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, p, a, ul, li, figure, blockquote { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
html { scroll-behavior: smooth; }

/* ---------- Tokens ---------- */
:root {
  /* color */
  --navy-950: #050b16;
  --navy-900: #0a1726;
  --navy-850: #0d1f30;
  --navy-800: #11283c;
  --navy-700: #1b3650;
  --navy-600: #2c4d6c;
  --teal-300: #9bf3e4;
  --teal-400: #4fe0c8;
  --teal-500: #29bfae;
  --teal-glow: rgba(79, 224, 200, 0.18);
  --ink-100: #f3f6fa;
  --ink-300: #b3c2d4;
  --ink-500: #8094ac;
  --ink-700: #4f6178;
  --gold-soft: #d9c08a;

  /* type */
  --font-display: 'Cormorant Garamond', serif;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* layout */
  --container: 1240px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.5s var(--ease-in-out-quart) forwards; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease-in-out-quart) forwards; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Base ---------- */
body {
  background: var(--navy-900);
  color: var(--ink-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

::selection { background: var(--teal-400); color: var(--navy-950); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--navy-950); }
::-webkit-scrollbar-thumb { background: var(--navy-700); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-500); }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal-400);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(5rem, 10vw, 9rem) 0; position: relative; }
.section--tight { padding: clamp(3.5rem, 7vw, 6rem) 0; }

main { display: block; position: relative; }

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  will-change: transform;
}
.ambient__blob--a {
  width: 520px; height: 520px;
  top: -180px; left: -120px;
  background: var(--teal-500);
  animation: drift-a 26s var(--ease-in-out-quart) infinite alternate;
}
.ambient__blob--b {
  width: 620px; height: 620px;
  bottom: -220px; right: -160px;
  background: #1f4f8f;
  opacity: 0.4;
  animation: drift-b 32s var(--ease-in-out-quart) infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, -40px) scale(1.1); }
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-950);
  transition: opacity 0.6s var(--ease-in-out-quart), visibility 0.6s var(--ease-in-out-quart);
}
.loader__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--ink-100);
  opacity: 0;
  letter-spacing: 0.04em;
  animation: loader-mark 1.1s var(--ease-out-expo) forwards;
}
@keyframes loader-mark {
  0% { opacity: 0; transform: translateY(16px) scale(0.96); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
body.is-loaded .loader {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1px solid var(--teal-400);
  border-radius: 50%;
  pointer-events: none;
  z-index: 998;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo),
              background 0.25s var(--ease-out-expo), border-color 0.25s var(--ease-out-expo),
              opacity 0.3s ease;
  mix-blend-mode: difference;
}
.cursor--active {
  width: 56px; height: 56px;
  background: var(--teal-400);
  border-color: transparent;
}
@media (pointer: coarse), (max-width: 860px) {
  .cursor { display: none; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: clamp(1.1rem, 2.5vw, 1.6rem) 0;
  transition: background 0.4s var(--ease-out-quart), border-color 0.4s var(--ease-out-quart),
              padding 0.4s var(--ease-out-quart), backdrop-filter 0.4s var(--ease-out-quart);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 23, 38, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,0.06);
  padding: 0.9rem 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.65rem;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-100);
  transition: color 0.3s var(--ease-out-quart);
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--navy-600);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-850));
  font-size: 1.1rem;
  transition: border-color 0.35s var(--ease-out-quart), transform 0.35s var(--ease-spring), box-shadow .35s var(--ease-out-quart);
}
.brand:hover .brand__mark {
  border-color: var(--teal-400);
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: 0 8px 22px -10px var(--teal-glow);
}
.brand__name { font-size: 1rem; letter-spacing: 0.01em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.6rem, 3vw, 2.8rem);
  font-family: var(--font-head);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.nav__links a {
  position: relative;
  padding: 0.3rem 0.05rem;
  color: var(--ink-300);
  transition: color 0.3s var(--ease-out-quart);
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--teal-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}
.nav__links a:hover { color: var(--ink-100); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--ink-100); }

.nav__cta {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  color: var(--ink-100);
  transition: border-color 0.3s var(--ease-out-quart), background 0.3s var(--ease-out-quart), transform 0.25s var(--ease-spring);
  white-space: nowrap;
}
.nav__cta:hover {
  border-color: var(--teal-400);
  background: rgba(79,224,200,0.08);
  transform: translateY(-2px);
}

/* mobile nav toggle */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--navy-600);
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
}
.nav__toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1px;
  background: var(--ink-100);
  transition: transform 0.35s var(--ease-spring), opacity 0.25s ease, top 0.35s var(--ease-spring);
}
.nav__toggle span:nth-child(1) { top: 16px; }
.nav__toggle span:nth-child(2) { top: 22px; }
.nav__toggle span:nth-child(3) { top: 28px; }
.nav__toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.nav__mobile {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--navy-950);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.4rem;
  padding: 0 var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease-in-out-quart);
}
.nav__mobile.is-open { transform: translateY(0); }
.nav__mobile a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  color: var(--ink-300);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out-quart), transform 0.5s var(--ease-out-quart), color 0.3s;
}
.nav__mobile.is-open a {
  opacity: 1;
  transform: translateY(0);
}
.nav__mobile.is-open a:nth-child(1) { transition-delay: 0.08s; }
.nav__mobile.is-open a:nth-child(2) { transition-delay: 0.15s; }
.nav__mobile.is-open a:nth-child(3) { transition-delay: 0.22s; }
.nav__mobile.is-open a:nth-child(4) { transition-delay: 0.29s; }
.nav__mobile a:hover { color: var(--teal-400); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out-quart), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--teal-400);
  color: var(--navy-950);
  border: 1px solid var(--teal-400);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -14px var(--teal-glow);
  background: var(--teal-300);
}
.btn--ghost {
  border: 1px solid var(--navy-600);
  color: var(--ink-100);
}
.btn--ghost:hover {
  border-color: var(--teal-400);
  transform: translateY(-3px);
  background: rgba(79,224,200,0.06);
}
.btn svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease-spring); }
.btn:hover svg { transform: translate(3px, -3px); }

/* ---------- Eyebrow / heading system ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 1.2rem;
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 0 var(--teal-glow);
  animation: pulse-dot 2.4s var(--ease-in-out-quart) infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(79,224,200,0.45); }
  70% { box-shadow: 0 0 0 9px rgba(79,224,200,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,224,200,0); }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; }
.h-display {
  font-size: clamp(3rem, 8.5vw, 6.4rem);
  font-style: italic;
  font-weight: 300;
}
.h-section {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-style: italic;
}
.h-section--upright { font-style: normal; font-weight: 500; }
.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-300);
  max-width: 46ch;
  line-height: 1.7;
}

/* ---------- Signature 3D monogram ---------- */
.signature {
  width: clamp(200px, 26vw, 320px);
  aspect-ratio: 1;
  perspective: 900px;
  flex-shrink: 0;
}
.signature__inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease-out-quart);
}
.signature__layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3.5rem, 8vw, 6rem);
}
.signature__layer--1 {
  background: linear-gradient(150deg, var(--navy-800), var(--navy-850) 60%, var(--navy-900));
  border: 1px solid var(--navy-600);
  color: var(--ink-100);
  transform: translateZ(36px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7);
}
.signature__layer--2 {
  border: 1px solid var(--teal-500);
  color: transparent;
  transform: translateZ(0px);
  opacity: 0.55;
}
.signature__layer--3 {
  border: 1px solid var(--navy-700);
  color: transparent;
  transform: translateZ(-36px);
  opacity: 0.3;
}
.signature__glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 50% 50%, var(--teal-glow), transparent 65%);
  transform: translateZ(-80px);
  filter: blur(10px);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out-quart), transform 0.8s var(--ease-out-quart);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--scale { transform: translateY(28px) scale(0.97); }
.reveal--scale.is-visible { transform: translateY(0) scale(1); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--navy-700);
  padding: clamp(3rem, 7vw, 5rem) 0 2.4rem;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--navy-800);
}
.footer__lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 18ch;
}
.footer__links {
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
  flex-wrap: wrap;
}
.footer__col h4 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 0.9rem;
  font-style: normal;
}
.footer__col a, .footer__col span {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--ink-300);
  padding: 0.25rem 0;
  transition: color 0.3s, transform 0.3s var(--ease-out-quart);
}
.footer__col a:hover { color: var(--teal-400); transform: translateX(3px); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--ink-700);
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .signature__inner { transform: none !important; }
}

/* ============================================================
   PAGE-LEVEL COMPONENTS
   ============================================================ */

/* ---------- Hero (home) ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero__title {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}
.hero__title span { display: block; }
.hero__title .accent { color: var(--teal-400); }
.hero__role {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 1.6rem 0 1.2rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}
.hero__signature-wrap { display: flex; justify-content: center; }

.scroll-cue {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 3rem);
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.scroll-cue__line {
  width: 1px; height: 38px;
  background: linear-gradient(to bottom, var(--teal-400), transparent);
  animation: scroll-line 2.4s var(--ease-in-out-quart) infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.4; }
}

/* ---------- Section heading row ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* ---------- Tilt project cards ---------- */
.work-grid {
  display: grid;
  gap: 1.6rem;
}
.tilt-card {
  perspective: 1000px;
  border-radius: 22px;
}
.tilt-card__inner {
  position: relative;
  border: 1px solid var(--navy-700);
  border-radius: 22px;
  background: linear-gradient(165deg, var(--navy-850), var(--navy-900));
  overflow: hidden;
  transition: transform 0.35s var(--ease-out-quart), border-color 0.35s var(--ease-out-quart), box-shadow 0.35s var(--ease-out-quart);
  transform-style: preserve-3d;
  height: 100%;
}
.tilt-card:hover .tilt-card__inner {
  border-color: var(--teal-500);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6), 0 0 40px -10px var(--teal-glow);
}
.tilt-card__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tilt-card__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.9;
}
.tilt-card__frame--saams::before { background: linear-gradient(135deg, #2c4d6c, #1b3650 45%, #d9c08a); }
.tilt-card__frame--ash::before { background: linear-gradient(135deg, #3a1f33, #5e3450 45%, #f3b8d3); }
.tilt-card__frame--repair::before { background: linear-gradient(135deg, #102338, #1b3650 50%, #4fe0c8); }

.tilt-card__chrome {
  position: relative;
  z-index: 1;
  width: 84%;
  border-radius: 10px;
  background: rgba(10, 23, 38, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  overflow: hidden;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.55);
  transform: translateZ(30px);
}
.tilt-card__chrome-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.75rem;
  background: rgba(255,255,255,0.06);
}
.tilt-card__chrome-bar span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.tilt-card__chrome-body {
  padding: 1.6rem 1.2rem 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: rgba(255,255,255,0.92);
}
.tilt-card__body {
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.tilt-card__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tilt-card__tags span {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-300);
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}
.tilt-card__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
}
.tilt-card__desc { color: var(--ink-300); font-size: 0.95rem; max-width: 56ch; }
.tilt-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-100);
}
.tilt-card__link svg { width: 15px; height: 15px; transition: transform 0.35s var(--ease-spring); }
.tilt-card:hover .tilt-card__link svg { transform: translate(3px, -3px); }
.tilt-card__link::after {
  content: '';
  display: block;
  height: 1px; flex: 0 0 28px;
  background: var(--teal-400);
}

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--navy-700);
  border: 1px solid var(--navy-700);
  border-radius: 18px;
  overflow: hidden;
}
.service-card {
  background: var(--navy-900);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  transition: background 0.35s var(--ease-out-quart);
}
.service-card:hover { background: var(--navy-850); }
.service-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--navy-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
  color: var(--teal-400);
  transition: transform 0.35s var(--ease-spring), border-color 0.35s;
}
.service-card:hover .service-card__icon { transform: translateY(-3px) rotate(-4deg); border-color: var(--teal-400); }
.service-card__icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-style: italic; margin-bottom: 0.6rem; }
.service-card p { color: var(--ink-300); font-size: 0.95rem; max-width: 38ch; }

/* ---------- CTA banner ---------- */
.cta-banner {
  border: 1px solid var(--navy-700);
  border-radius: 24px;
  padding: clamp(2.5rem, 7vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, var(--navy-850), var(--navy-900));
}
.cta-banner::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--teal-glow), transparent 65%);
  top: -180px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.cta-banner__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1.6rem;
  position: relative;
}
.cta-banner .btn { position: relative; }

/* ---------- Page header (about / work / contact) ---------- */
.page-header {
  padding-top: clamp(8rem, 16vw, 11rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.page-header__eyebrow { margin-bottom: 1.4rem; }

/* ---------- About: bio layout ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.bio-grid__visual { position: sticky; top: 7rem; }
.bio-grid p + p { margin-top: 1.3rem; }
.bio-grid p { color: var(--ink-300); font-size: clamp(1rem, 1.4vw, 1.1rem); max-width: 58ch; }

/* ---------- Tool chips ---------- */
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.chip {
  font-family: var(--font-head);
  font-size: 0.85rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  color: var(--ink-300);
  transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease-spring);
}
.chip:hover { border-color: var(--teal-400); color: var(--ink-100); transform: translateY(-2px); }

/* ---------- Process steps (sequential, numbering justified) ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.process__step {
  border: 1px solid var(--navy-700);
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: border-color 0.35s, transform 0.35s var(--ease-out-quart);
}
.process__step:hover { border-color: var(--teal-500); transform: translateY(-4px); }
.process__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.2rem;
  color: var(--teal-400);
  margin-bottom: 0.8rem;
}
.process__step h3 { font-size: 1.25rem; margin-bottom: 0.5rem; font-style: italic; }
.process__step p { color: var(--ink-300); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 6rem;
}
.contact-link {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 5.4rem);
  display: inline-block;
  position: relative;
  margin: 0.4rem 0;
  background: linear-gradient(90deg, var(--ink-100) 50%, var(--teal-400) 50%);
  background-size: 200% 100%;
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.6s var(--ease-out-expo);
}
.contact-link:hover { background-position: -100% 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-top: 3rem;
}
.contact-card {
  border: 1px solid var(--navy-700);
  border-radius: 18px;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  transition: border-color 0.35s, transform 0.35s var(--ease-out-quart);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.contact-card:hover { border-color: var(--teal-500); transform: translateY(-4px); }
.contact-card h4 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.contact-card a, .contact-card span { font-family: var(--font-head); font-size: 1.1rem; }
.contact-card a { transition: color 0.3s; }
.contact-card a:hover { color: var(--teal-400); }

/* ---------- Responsive overrides for page components ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__signature-wrap { justify-content: flex-start; }
  .bio-grid { grid-template-columns: 1fr; }
  .bio-grid__visual { position: static; display: flex; justify-content: center; margin-bottom: 1rem; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .process { grid-template-columns: 1fr; }
  .footer__top { flex-direction: column; }
}

/* ---------- Work page: case-study rows ---------- */
.work-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--navy-800);
}
.work-row:last-child { border-bottom: none; }
.work-row--reverse { direction: rtl; }
.work-row--reverse > * { direction: ltr; }
.work-row__visual {
  perspective: 1000px;
}
.work-row__visual .tilt-card__inner { border-radius: 22px; }
.work-row__meta {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 1rem;
}
.work-row__title { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1.1rem; }
.work-row__desc { color: var(--ink-300); max-width: 50ch; margin-bottom: 1.2rem; }
.work-row__tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.work-row__tags span {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-300);
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

@media (max-width: 860px) {
  .work-row, .work-row--reverse { grid-template-columns: 1fr; direction: ltr; }
}
