/* =========================================================
   Dherendra Rathore — Portfolio
   Plain CSS · No build step · Drop into Hostinger
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --fg: #0a0a0b;
  --muted: #71717a;
  --line: rgba(10, 10, 11, 0.08);
  --ink-100: #f4f4f5;
  --ink-200: #e4e4e7;
  --ink-300: #d4d4d8;
  --ink-400: #a1a1aa;
  --ink-500: #71717a;
  --ink-700: #3f3f46;
  --ink-900: #18181b;
  --ink-950: #0a0a0b;
  --selection: rgba(10, 10, 11, 0.92);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 40px -10px rgba(0, 0, 0, 0.08);
  --shadow-ring: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 30px 80px -30px rgba(0, 0, 0, 0.18);
  --max: 1480px;
  --radius: 20px;
}
[data-theme="dark"] {
  --bg: #0a0a0b;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --line: rgba(250, 250, 250, 0.10);
  --ink-100: #18181b;
  --ink-200: #27272a;
  --ink-300: #3f3f46;
  --ink-400: #71717a;
  --ink-500: #a1a1aa;
  --ink-700: #d4d4d8;
  --ink-900: #f4f4f5;
  --ink-950: #fafafa;
  --selection: rgba(250, 250, 250, 0.92);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
::selection { background: var(--selection); color: var(--bg); }
.serif { font-family: "Instrument Serif", ui-serif, Georgia, serif; font-weight: 400; }
.italic { font-style: italic; }
.strong { font-weight: 500; color: var(--ink-950); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mt-16 { margin-top: 1rem; }
.mt-24 { margin-top: 1.5rem; }
.max-460 { max-width: 460px; }
.center-row { display: flex; justify-content: center; margin-top: 3.5rem; }

/* Scrollbar polish */
html { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.18) transparent; }
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 8px; }
[data-theme="dark"] html::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }

/* Hide native cursor on devices that have the custom one */
@media (pointer: fine) {
  body.cursor-active, body.cursor-active * { cursor: none !important; }
}

/* ---------- Layout helpers ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px)  { .container { padding: 0 2.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 4rem; } }
@media (min-width: 1280px) { .container { padding: 0 6rem; } }

.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 2.5rem; }
.align-start { align-items: flex-start; }
.col-4 { grid-column: span 12 / span 12; }
.col-5 { grid-column: span 12 / span 12; }
.col-6 { grid-column: span 12 / span 12; }
.col-7 { grid-column: span 12 / span 12; }
.col-start-6 { }
@media (min-width: 768px) {
  .col-4 { grid-column: span 4 / span 4; }
  .col-5 { grid-column: span 5 / span 5; }
  .col-6 { grid-column: span 6 / span 6; }
  .col-7 { grid-column: span 7 / span 7; }
  .col-start-6 { grid-column-start: 6; }
}

.section { position: relative; padding: 7rem 0; border-top: 1px solid var(--line); scroll-margin-top: 6rem; }
.section--tight { padding: 6rem 0; }
@media (min-width: 768px) { .section { padding: 10rem 0; } }

.section__lede { max-width: 36rem; font-size: 1.05rem; margin-top: 1.5rem; line-height: 1.7; }

/* ---------- Typography ---------- */
.h-display {
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: clamp(2.25rem, 5vw, 5rem);
  margin: 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--ink-500);
}
.eyebrow--right { margin-left: auto; }
.hairline-x { display: inline-block; width: 2rem; height: 1px; background: currentColor; opacity: 0.4; }
.idx { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; color: var(--ink-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid transparent; white-space: nowrap;
}
.btn--primary { background: var(--ink-950); color: var(--bg); }
.btn--primary:hover { background: var(--ink-900); transform: translateY(-1px); }
[data-theme="dark"] .btn--primary { background: var(--fg); color: var(--bg); }
.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { border-color: rgba(10,10,11,0.4); transform: translateY(-1px); }
[data-theme="dark"] .btn--ghost:hover { border-color: rgba(250,250,250,0.4); }

/* ---------- Underline hover for links ---------- */
.link-underline { position: relative; display: inline-block; }
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: currentColor;
  transform-origin: right; transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.link-underline:hover::after { transform-origin: left; transform: scaleX(1); }

/* ---------- Glass surface ---------- */
.glass {
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border: 1px solid var(--line);
}

/* ---------- Grain overlay ---------- */
.grain-overlay {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .grain-overlay { opacity: 0.07; mix-blend-mode: screen; }

.grain { position: relative; isolation: isolate; }
.grain::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .grain::before { opacity: 0.08; mix-blend-mode: screen; }

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); color: var(--fg);
  display: grid; place-items: center;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.6s ease;
}
.loader.is-done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.loader__inner { text-align: center; display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
.loader__title-wrap { overflow: hidden; }
.loader__title {
  margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(2rem, 5vw, 4rem);
  transform: translateY(110%);
  animation: lift 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}
@keyframes lift { to { transform: translateY(0); } }
.loader__bar {
  position: relative; width: 12rem; height: 1px; overflow: hidden;
  background: var(--ink-200);
}
.loader__bar span {
  position: absolute; inset: 0; width: 0; background: var(--ink-950);
  animation: fill 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.5s forwards;
}
[data-theme="dark"] .loader__bar { background: var(--ink-300); }
[data-theme="dark"] .loader__bar span { background: var(--fg); }
@keyframes fill { to { width: 100%; } }

/* ---------- Custom cursor (fine pointer only) ---------- */
.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none;
  z-index: 90; transform: translate(-50%, -50%);
  mix-blend-mode: difference; display: none;
}
@media (pointer: fine) {
  .cursor { display: flex; }
}
.cursor--dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: #fff;
}
.cursor--ring {
  width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.6);
  align-items: center; justify-content: center;
  transition: width 0.3s ease, height 0.3s ease;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em;
  color: #fff;
}
.cursor--ring.is-hover { width: 72px; height: 72px; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.nav__brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.nav__logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--ink-950); color: var(--bg);
  font-weight: 600;
}
[data-theme="dark"] .nav__logo { background: var(--fg); color: var(--bg); }
.nav__name { display: none; font-size: 0.9rem; font-weight: 500; letter-spacing: -0.01em; }
@media (min-width: 640px) { .nav__name { display: inline-block; } }
.nav__links { display: none; align-items: center; gap: 2rem; }
.nav__links a { font-size: 0.9rem; color: var(--ink-700); }
[data-theme="dark"] .nav__links a { color: var(--ink-300); }
@media (min-width: 768px) { .nav__links { display: flex; } }
.nav__actions { display: flex; align-items: center; gap: 0.5rem; }
.nav__cta { display: none; }
@media (min-width: 768px) { .nav__cta { display: inline-flex; } }

.theme-toggle {
  position: relative; width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}
.theme-toggle:hover { transform: scale(1.05); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle {
  display: inline-flex; flex-direction: column; gap: 4px;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--line); align-items: center; justify-content: center;
}
.menu-toggle span { width: 14px; height: 1px; background: currentColor; transition: transform 0.3s ease; }
.menu-toggle.is-open span:first-child { transform: translateY(2.5px) rotate(45deg); }
.menu-toggle.is-open span:last-child { transform: translateY(-2.5px) rotate(-45deg); }
@media (min-width: 768px) { .menu-toggle { display: none; } }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6rem 1.5rem 3rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer ul { display: flex; flex-direction: column; gap: 1.25rem; }
.drawer ul a {
  font-size: clamp(2rem, 8vw, 3rem); font-weight: 500; letter-spacing: -0.03em;
}

/* ---------- HERO ---------- */
.hero { position: relative; padding: 8rem 0 6rem; overflow: hidden; }
@media (min-width: 768px) { .hero { padding: 10rem 0 8rem; } }

.hero__blob {
  position: absolute; border-radius: 999px; filter: blur(80px);
  pointer-events: none; z-index: 0;
}
.hero__blob--a {
  width: 420px; height: 420px; left: -120px; top: 6rem;
  background: radial-gradient(circle, rgba(212,212,216,0.6), transparent 70%);
  animation: blob 18s ease-in-out infinite;
}
.hero__blob--b {
  width: 360px; height: 360px; right: -100px; top: 33%;
  background: radial-gradient(circle, rgba(254,215,170,0.4), rgba(254,205,211,0.2) 50%, transparent 75%);
  animation: blob 22s ease-in-out -6s infinite;
}
[data-theme="dark"] .hero__blob--a { background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 70%); }
[data-theme="dark"] .hero__blob--b { background: radial-gradient(circle, rgba(251,191,36,0.08), rgba(244,114,182,0.05) 50%, transparent 75%); }
@keyframes blob {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.1); }
  66% { transform: translate(-30px,20px) scale(0.95); }
}

.hero__topline { position: relative; display: flex; align-items: center; gap: 1rem; z-index: 2; }
.pulse { position: relative; display: inline-flex; width: 8px; height: 8px; }
.pulse::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: rgba(16, 185, 129, 0.6); animation: ping 1.6s ease-out infinite;
}
.pulse span { position: relative; width: 8px; height: 8px; border-radius: 999px; background: rgb(16, 185, 129); }
@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.hero__title {
  position: relative; z-index: 2;
  margin: 2.5rem 0 0; font-weight: 500; letter-spacing: -0.04em; line-height: 0.95;
  font-size: clamp(3rem, 9vw, 9rem);
}
.word-wrap { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: 0.75rem; }
@media (min-width: 768px) { .word-wrap { margin-right: 1.25rem; } }
.word { display: inline-block; transform: translateY(110%); opacity: 0; }
.reveal-word.is-in {
  animation: word-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes word-up { to { transform: translateY(0); opacity: 1; } }

.hero__grid {
  position: relative; z-index: 2;
  margin-top: 3.5rem;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem;
}
.hero__copy { grid-column: span 12 / span 12; display: flex; flex-direction: column; gap: 2rem; }
.hero__portrait { grid-column: span 12 / span 12; }
@media (min-width: 768px) {
  .hero__copy { grid-column: span 7 / span 7; }
  .hero__portrait { grid-column: span 5 / span 5; }
}
.hero__lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.7; color: var(--ink-700); max-width: 36rem; text-wrap: balance; margin: 0; }
[data-theme="dark"] .hero__lede { color: var(--ink-300); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__meta {
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
@media (min-width: 640px) { .hero__meta { grid-template-columns: repeat(3, 1fr); } }
.meta-k { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-500); }
.meta-v { display: block; margin-top: 0.25rem; }

/* Portrait */
.portrait {
  position: relative; overflow: hidden; border-radius: 28px;
  border: 1px solid var(--line); background: var(--ink-100);
  box-shadow: var(--shadow-ring); aspect-ratio: 4 / 5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.portrait:hover img { transform: scale(1.05); }
.portrait__chip {
  position: absolute; left: 1.25rem; bottom: 1.25rem;
  background: rgba(0,0,0,0.3); color: #fff; padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sticker {
  position: absolute; right: 1.25rem; top: 1.25rem;
  width: 6rem; height: 6rem; border-radius: 999px;
  background: var(--ink-950); color: #fff;
  display: grid; place-items: center;
}
[data-theme="dark"] .sticker { background: var(--fg); color: var(--ink-950); }
.sticker__text { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticker__char { font-size: 1.5rem; }

/* Marquee */
.marquee {
  position: relative; margin-top: 5rem; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}
.marquee--mask {
  -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; width: max-content; animation: marquee 35s linear infinite; }
.marquee__group {
  display: flex; align-items: center; gap: 3rem; padding-right: 3rem;
  white-space: nowrap;
  font-weight: 500; letter-spacing: -0.02em;
  font-size: 1.75rem; color: var(--ink-400);
}
@media (min-width: 768px) { .marquee__group { font-size: 3rem; } }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- ABOUT ---------- */
.prose { display: flex; flex-direction: column; gap: 1.5rem; }
.prose p { margin: 0; font-size: clamp(1.1rem, 1.5vw, 1.5rem); line-height: 1.6; text-wrap: balance; color: var(--ink-700); }
[data-theme="dark"] .prose p { color: var(--ink-300); }
.prose__lead { color: var(--ink-700); }
[data-theme="dark"] .prose__lead { color: var(--ink-300); }
.prose .muted { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.25rem); }
.facts {
  margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
  display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts__v { display: block; font-weight: 500; letter-spacing: -0.03em; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.facts__k { display: block; margin-top: 0.25rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-500); }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; margin-top: 5rem; display: flex; flex-direction: column; gap: 3.5rem; }
@media (min-width: 768px) { .timeline { margin-top: 6rem; gap: 6rem; } }

.timeline__rail, .timeline__fill {
  position: absolute; top: 0; left: 1rem; width: 1px; height: 100%; display: none;
}
@media (min-width: 768px) {
  .timeline__rail, .timeline__fill { display: block; left: 50%; transform: translateX(-50%); }
}
.timeline__rail { background: var(--line); }
.timeline__fill { background: var(--ink-950); transform-origin: top; transform: translateX(-50%) scaleY(0); transition: transform 0.1s linear; }
[data-theme="dark"] .timeline__fill { background: var(--fg); }
@media (min-width: 768px) { .timeline__fill { left: 50%; } }

.timeline__item { position: relative; }
@media (min-width: 768px) { .timeline__item { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; } }

.timeline__dot {
  position: absolute; left: calc(1rem - 6px); top: 0.75rem; z-index: 2;
  width: 12px; height: 12px; border-radius: 999px;
  background: var(--ink-950); box-shadow: 0 0 0 4px var(--bg);
}
[data-theme="dark"] .timeline__dot { background: var(--fg); }
@media (min-width: 768px) { .timeline__dot { left: 50%; transform: translateX(-50%); } }

.timeline__card {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  background: var(--bg); border-radius: 16px; padding: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  margin-left: 2.5rem;
}
.timeline__card:hover { transform: translateY(-4px); border-color: rgba(10,10,11,0.3); box-shadow: var(--shadow-soft); }
[data-theme="dark"] .timeline__card:hover { border-color: rgba(250,250,250,0.3); }
@media (min-width: 768px) {
  .timeline__card { padding: 2rem; margin-left: 0; }
  .timeline__card--left { grid-column: 1; margin-right: 3rem; text-align: right; }
  .timeline__card--right { grid-column: 2; margin-left: 3rem; }
}
.timeline__meta { display: flex; align-items: baseline; gap: 0.75rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-500); }
.timeline__card--left .timeline__meta { justify-content: flex-end; }
.timeline__company { margin: 0.75rem 0 0; font-weight: 500; letter-spacing: -0.025em; font-size: clamp(1.5rem, 2vw, 1.875rem); }
.timeline__role { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--ink-700); }
[data-theme="dark"] .timeline__role { color: var(--ink-300); }
.timeline__bullets { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-700); }
[data-theme="dark"] .timeline__bullets { color: var(--ink-300); }
.timeline__card--left .timeline__bullets li,
.timeline__card--left .tags { justify-content: flex-end; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.tags span {
  border: 1px solid var(--line); padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: 0.72rem; color: var(--ink-700);
}
[data-theme="dark"] .tags span { color: var(--ink-300); }

/* ---------- SKILLS ---------- */
.skills__grid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 640px) { .skills__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .skills__grid { margin-top: 0; } }

.skill {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem;
  background: var(--bg); color: inherit;
  display: flex; gap: 1rem; align-items: flex-start;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
  isolation: isolate;
}
.skill:hover { transform: translateY(-4px); border-color: rgba(10,10,11,0.3); }
[data-theme="dark"] .skill:hover { border-color: rgba(250,250,250,0.3); }
.skill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink-950);
  transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="dark"] .skill::before { background: var(--fg); }
.skill:hover::before { transform: translateY(0); }
.skill:hover { color: var(--bg); }
.skill:hover .skill__icon { border-color: rgba(255,255,255,0.4); }
.skill:hover .skill__n { color: rgba(255,255,255,0.7); }
[data-theme="dark"] .skill:hover { color: var(--ink-950); }
[data-theme="dark"] .skill:hover .skill__icon { border-color: rgba(10,10,11,0.4); }
[data-theme="dark"] .skill:hover .skill__n { color: rgba(10,10,11,0.7); }
.skill__icon {
  flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 12px;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: border-color 0.4s ease;
}
.skill__icon svg { width: 18px; height: 18px; }
.skill__t { font-weight: 500; letter-spacing: -0.01em; }
.skill__n { margin-top: 0.25rem; font-size: 0.9rem; color: var(--muted); transition: color 0.4s ease; }

/* Tools strip */
.tools {
  display: flex; flex-direction: column; gap: 1.5rem;
  border-top: 1px solid var(--line); padding-top: 2.5rem; margin-top: 5rem;
}
@media (min-width: 768px) { .tools { flex-direction: row; align-items: center; justify-content: space-between; } }
.tools__list { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.tools__list span {
  font-weight: 500; letter-spacing: -0.025em; color: var(--ink-700);
  font-size: clamp(1.25rem, 2.5vw, 1.875rem); transition: color 0.3s ease;
}
.tools__list span:hover { color: var(--ink-950); }
[data-theme="dark"] .tools__list span { color: var(--ink-700); }
[data-theme="dark"] .tools__list span:hover { color: var(--fg); }
.tools__list i { color: var(--ink-300); font-style: normal; }
[data-theme="dark"] .tools__list i { color: var(--ink-300); }

/* ---------- WORK GRID ---------- */
.work__head { display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 768px) { .work__head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.75rem; font-size: 0.72rem; color: var(--ink-700); white-space: nowrap;
}
[data-theme="dark"] .chip { color: var(--ink-300); }
.chip--active { background: var(--ink-950); color: var(--bg); border-color: var(--ink-950); }
[data-theme="dark"] .chip--active { background: var(--fg); color: var(--ink-950); border-color: var(--fg); }
.chip--solid { background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(10px); }

.work__grid {
  margin-top: 4rem;
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .work__grid { grid-template-columns: repeat(12, 1fr); gap: 1.5rem; } }
.card { position: relative; display: block; }
@media (min-width: 768px) {
  .card--5 { grid-column: span 5 / span 5; }
  .card--6 { grid-column: span 6 / span 6; }
  .card--7 { grid-column: span 7 / span 7; }
}
.card__media {
  position: relative; overflow: hidden; border-radius: 24px;
  border: 1px solid var(--line); background: var(--ink-100);
}
.ar-4-3 { aspect-ratio: 4 / 3; }
.ar-tall { aspect-ratio: 4 / 4.4; }
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .card__media img { transform: scale(1.06); }
.card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  opacity: 0.9; transition: opacity 0.4s ease;
}
.card:hover .card__media::after { opacity: 1; }
.card__media::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(255,255,255,0.6); transform-origin: left; transform: scaleX(0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); pointer-events: none; z-index: 2;
}
.card:hover .card__media::before { transform: scaleX(1); }

.card__meta { position: absolute; inset: 1.25rem; pointer-events: none; z-index: 3; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.card__meta .chip--solid { align-self: flex-start; }
.card__title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.card__title { margin: 0; font-weight: 500; letter-spacing: -0.025em; font-size: clamp(1.1rem, 1.5vw, 1.5rem); }
.card__year { margin-top: 0.25rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.7); }
.card__arrow {
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  display: grid; place-items: center; transition: transform 0.5s ease, background 0.3s ease, color 0.3s ease;
}
.card__arrow svg { width: 16px; height: 16px; }
.card:hover .card__arrow { transform: rotate(45deg); background: #fff; color: var(--ink-950); }

/* ---------- AWARDS ---------- */
.awards { margin-top: 4rem; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .awards { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.award {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 24px;
  padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  isolation: isolate;
}
.award:hover { transform: translateY(-4px); border-color: rgba(10,10,11,0.3); box-shadow: var(--shadow-soft); }
[data-theme="dark"] .award:hover { border-color: rgba(250,250,250,0.3); }
.award::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 80% 100%, rgba(254,243,199,0.6), transparent 60%);
  opacity: 0; transition: opacity 0.5s ease;
}
[data-theme="dark"] .award::before { background: radial-gradient(circle at 80% 100%, rgba(252,211,77,0.1), transparent 60%); }
.award:hover::before { opacity: 1; }
.award__top { display: flex; align-items: flex-start; justify-content: space-between; }
.award__icon {
  width: 3rem; height: 3rem; border-radius: 16px; border: 1px solid var(--line);
  display: grid; place-items: center;
}
.award__icon svg { width: 20px; height: 20px; }
.award__title { margin: 0; font-weight: 500; letter-spacing: -0.025em; font-size: clamp(1.5rem, 2vw, 1.875rem); }
.award__org { margin-top: 0.25rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-500); }
.award__note { margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* ---------- STATS ---------- */
.stats {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); border-top: 0; } }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .stat { padding: 0 2rem; border-bottom: 0; border-right: 1px solid var(--line); } }
.stat:last-child { border: 0; }
.stat__num { display: inline-block; font-weight: 500; letter-spacing: -0.035em; font-size: clamp(2.75rem, 7vw, 7rem); line-height: 1; }
.stat__num span { font-family: "Instrument Serif", serif; font-style: italic; color: var(--ink-400); }
.stat__l { margin-top: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.stat__n { margin-top: 0.25rem; font-size: 0.9rem; }

/* ---------- CONTACT ---------- */
.contact-lines { margin-top: 2.5rem; display: flex; flex-direction: column; }
.contact-line {
  display: flex; align-items: center; gap: 1rem;
  border-top: 1px solid var(--line); padding: 1rem 0;
  transition: padding 0.3s ease;
}
.contact-line:hover { padding-left: 0.5rem; }
.contact-line__icon {
  width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid var(--line);
  display: grid; place-items: center; flex-shrink: 0;
}
.contact-line__icon svg { width: 16px; height: 16px; }
.contact-line__k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-500); }
.contact-line__v { font-size: 1rem; }
.contact-line__arrow { margin-left: auto; font-size: 1.1rem; transition: transform 0.5s ease; }
.contact-line:hover .contact-line__arrow { transform: rotate(45deg); }

.socials { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.social {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 1rem; font-size: 0.85rem;
  transition: border-color 0.3s ease;
}
.social:hover { border-color: rgba(10,10,11,0.4); }
[data-theme="dark"] .social:hover { border-color: rgba(250,250,250,0.4); }

.contact-form { border-radius: 24px; padding: 1.5rem; margin-top: 2rem; }
@media (min-width: 768px) { .contact-form { padding: 2.5rem; margin-top: 0; } }
.form-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.field { display: block; }
.field__l { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-500); }
.field input, .field textarea {
  width: 100%; margin-top: 0.5rem; padding: 0.75rem 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  outline: none; resize: none; font-size: 1rem;
  transition: border-color 0.3s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-400); }
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink-950); }
[data-theme="dark"] .field input:focus, [data-theme="dark"] .field textarea:focus { border-bottom-color: var(--fg); }
.form-footer {
  margin-top: 2rem;
  display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
}
@media (min-width: 640px) { .form-footer { flex-direction: row; justify-content: space-between; align-items: center; } }

/* ---------- FOOTER ---------- */
.footer { position: relative; border-top: 1px solid var(--line); padding: 4rem 0 2rem; }
.footer__mark {
  margin: 0;
  font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(3rem, 12vw, 12rem);
}
.footer__row {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start;
}
@media (min-width: 768px) { .footer__row { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.footer__links .dot { color: var(--ink-300); display: none; }
@media (min-width: 768px) { .footer__links .dot { display: inline; } }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rd, 0s);
}
.reveal.is-in { opacity: 1; transform: translate3d(0, 0, 0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .word { opacity: 1; transform: none; }
}
