/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0f;
  --bg-2: #111116;
  --surface: #16161d;
  --surface-2: #1c1c25;
  --glass: rgba(22, 22, 29, .82);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #ececf1;
  --muted: #9a9aa8;
  --accent: #7c8cf8;
  --accent-2: #c9d1ff;
  --accent-soft: rgba(124, 140, 248, .16);
  --green: #5fe3a1;
  --accent-strong: #4e64f6; /* accent fill that carries white text: >=4.5:1 (accent itself is 3:1 in dark) */
  --pink: #f78fb3;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 6vw, 96px);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f5f5f8;
  --bg-2: #ededf2;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --glass: rgba(255, 255, 255, .82);
  --line: rgba(10, 10, 20, .08);
  --line-strong: rgba(10, 10, 20, .2);
  --text: #101014;
  --muted: #5d5d6e;
  --accent: #4d5ee6;
  --accent-2: #3b4bd0;
  --accent-soft: rgba(77, 94, 230, .12);
  --green: #1fa866;
  --accent-strong: #4d5ee6;
  --pink: #f1407e; /* gradient end: >=3:1 on the light bg */
  --shadow: 0 30px 80px -30px rgba(20, 20, 60, .25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped, html:has(.case[open]) { overflow: hidden; } /* :has(): same lock without Lenis (reduced motion) */

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s, color .4s;
}
body.is-loading, html.menu-open { overflow: hidden; }

::selection { background: var(--accent-strong); color: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 500; }
em { font-family: var(--serif); font-style: italic; color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 20000; padding: 10px 16px; background: var(--accent); color: #fff; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 16px; }

/* noise overlay */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="light"] body::after { opacity: .03; }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 10000; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.preloader__inner { display: flex; align-items: baseline; gap: 24px; font-family: var(--serif); font-size: clamp(32px, 6vw, 72px); line-height: 1; }
.preloader__name { overflow: hidden; display: inline-block; }
.preloader__name span { display: inline-block; transform: translateY(110%); }
.preloader__count { font-family: var(--sans); font-size: 14px; color: var(--muted); letter-spacing: .1em; }
.preloader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- Progress + cursor ---------- */
/* native scrollbar hidden; a small floating pill on the right replaces it */
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.scrollbar { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); width: 4px; height: min(200px, 28vh); border-radius: 999px; background: var(--line-strong); z-index: 1100; opacity: .55; transition: opacity .4s, width .3s var(--ease); cursor: pointer; }
.scrollbar.is-active, .scrollbar:hover { opacity: 1; width: 6px; }
.scrollbar::before { content: ""; position: absolute; inset: -10px -12px; } /* bigger hit area */
.scrollbar__thumb { position: absolute; left: 0; top: 0; width: 100%; height: 28px; border-radius: 999px; background: var(--accent); will-change: transform; touch-action: none; transition: background .3s; }
.scrollbar__thumb::before { content: ""; position: absolute; inset: -8px -12px; }
.scrollbar__thumb:hover, body.is-dragging .scrollbar__thumb { background: var(--accent-2); }
body.is-dragging { user-select: none; -webkit-user-select: none; }
body.is-dragging .scrollbar { opacity: 1; width: 6px; }
.cursor, .cursor-ring { display: none; }
@media (pointer: fine) {
  body.cursor-on, body.cursor-on a, body.cursor-on button, body.cursor-on .tilt, body.cursor-on .project { cursor: none; }
  .cursor, .cursor-ring { display: flex; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); opacity: 0; }
  body.cursor-on .cursor, body.cursor-on .cursor-ring { opacity: 1; }
  .cursor { width: 8px; height: 8px; background: var(--accent); }
  .cursor-ring {
    width: 36px; height: 36px; border: 1px solid var(--accent);
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff;
    transition: width .35s var(--ease), height .35s var(--ease), background .3s, border-color .3s;
  }
  body.cursor-hover .cursor-ring { width: 64px; height: 64px; background: var(--accent-soft); border-color: transparent; }
  body.cursor-view .cursor-ring { width: 88px; height: 88px; background: var(--accent-strong); border-color: transparent; }
  body.cursor-view .cursor { opacity: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid var(--line-strong); isolation: isolate;
  transition: transform .3s var(--ease), color .3s, border-color .3s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent-strong); transform: translateY(101%); transition: transform .45s var(--ease); border-radius: inherit; }
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: #fff; border-color: var(--accent); }
.btn--small { padding: 10px 18px; font-size: 13px; }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn__arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--gutter);
  transition: padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
/* Tint + blur live on a pseudo-element, NOT on .nav: backdrop-filter turns its element into the containing block for
   fixed descendants, which collapsed the fixed mobile overlay (.nav__links) to the header's height once scrolled. */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -2; transition: background .4s; }
.nav.is-scrolled { padding: 12px var(--gutter); border-color: var(--line); }
.nav.is-scrolled::before { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav__logo { font-family: var(--serif); font-size: 30px; line-height: 1; display: inline-block; }
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; gap: 30px; }
.nav__links a { font-size: 14px; font-weight: 500; color: var(--muted); position: relative; transition: color .3s; padding: 4px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.lang__btn { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); transition: background .3s, color .3s; }
.lang__btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.theme { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--text); transition: border-color .3s, transform .3s; }
.theme:hover { border-color: var(--accent); }
.theme svg { grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
.theme__sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
html[data-theme="light"] .theme__sun { opacity: 1; transform: none; }
html[data-theme="light"] .theme__moon { opacity: 0; transform: rotate(90deg) scale(.5); }
.nav__burger { display: none; width: 40px; height: 40px; position: relative; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav__burger span:first-child { top: 15px; }
.nav__burger span:last-child { top: 23px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 140px var(--gutter) 80px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; will-change: transform; }
html[data-theme="light"] .blob { mix-blend-mode: multiply; opacity: .35; }
.blob--1 { width: 55vw; height: 55vw; max-width: 760px; max-height: 760px; right: -12vw; top: -14vw; background: radial-gradient(circle, rgba(124, 140, 248, .55), transparent 62%); animation: drift1 18s ease-in-out infinite; }
.blob--2 { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; left: -12vw; bottom: -10vw; background: radial-gradient(circle, rgba(95, 227, 161, .28), transparent 62%); animation: drift2 22s ease-in-out infinite; }
.blob--3 { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; left: 40vw; top: 30%; background: radial-gradient(circle, rgba(247, 143, 179, .22), transparent 62%); animation: drift3 26s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(-8%, 10%) scale(1.1); } }
@keyframes drift2 { 50% { transform: translate(12%, -8%) scale(.9); } }
@keyframes drift3 { 33% { transform: translate(-10%, -12%); } 66% { transform: translate(8%, 6%); } }
.hero__lines {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 28px; }
.roles { display: inline-block; height: 1.3em; overflow: hidden; vertical-align: bottom; }
.roles > span { display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(95, 227, 161, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(95, 227, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 227, 161, 0); } }
.hero__title { font-size: clamp(42px, 6vw, 92px); line-height: .98; letter-spacing: -.03em; font-weight: 600; margin-bottom: 32px; }
html[lang="id"] .hero__title { font-size: clamp(38px, 5.2vw, 78px); }
/* Instrument Serif italic ink overhangs its .98 line box (measured: ~.13em left on the A swash, ~.18em right on italic I, ~.09em below on g).
   Pad the reveal mask AND the gradient box for it, then cancel with negative margins so metrics/wrapping stay identical. */
.hero__title .word { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .2em .12em .16em; margin: -.08em -.2em -.12em -.16em; }
.hero__title .word > span { display: inline-block; transform: translateY(120%); } /* 120%: keeps ink below the padded mask before reveal */
/* Gradient stays on the transformed span itself: Chrome drops composited (transformed) descendants from a parent's background-clip:text mask. Same pad/cancel so its gradient box covers the ink. */
.hero__title em .word > span { padding: .08em .2em .12em .16em; margin: -.08em -.2em -.12em -.16em; }
.no-anim .hero__title em { padding-inline: .16em .2em; margin-inline: -.16em -.2em; }
.hero__title em .word > span, .no-anim .hero__title em { background: linear-gradient(100deg, var(--accent-2), var(--accent) 45%, var(--pink) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hero__sub { font-size: clamp(16px, 1.25vw, 18px); color: var(--muted); max-width: 60ch; margin: 0 0 40px; }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, auto); gap: 40px; justify-content: start; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--serif); font-size: clamp(34px, 3.2vw, 48px); line-height: 1; font-weight: 400; }
.hero__stats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

.hero__visual { position: relative; justify-self: center; width: min(100%, 420px); }
.hero__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; clip-path: inset(100% 0 0 0 round 28px); background: var(--surface); box-shadow: var(--shadow); }
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 11, 15, .55), transparent 55%); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.15); }
.hero__badge { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; }
.hero__badge-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.hero__badge--1 { left: -40px; top: 18%; animation: float 6s ease-in-out infinite; }
.hero__badge--2 { right: -30px; bottom: 16%; animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero__orbit { position: absolute; width: 150px; height: 150px; right: -50px; top: -50px; animation: spin 18s linear infinite; opacity: 0; }
.hero__orbit text { font-size: 9.5px; letter-spacing: .12em; fill: var(--muted); font-family: var(--sans); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__scroll { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border: 1px solid var(--line-strong); border-radius: 12px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); animation: scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 60% { transform: translate(-50%, 14px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; background: var(--bg-2); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span { font-family: var(--serif); font-size: 28px; padding: 0 28px; white-space: nowrap; color: var(--muted); display: flex; align-items: center; gap: 28px; }
.marquee__track span::after { content: "✦"; font-size: 12px; color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 12vw, 160px) var(--gutter); max-width: 1400px; margin: 0 auto; }
.section__head { display: flex; align-items: flex-start; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__index { font-size: 13px; color: var(--accent); font-weight: 700; letter-spacing: .1em; padding-top: .5em; }
.section__title { font-family: var(--serif); font-size: clamp(44px, 6vw, 88px); line-height: 1; letter-spacing: -.02em; font-weight: 400; }
.section__title .word { display: inline-block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.section__title .char, .contact__title .char { display: inline-block; transform-origin: left bottom; will-change: transform; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.about__lead { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.25; margin: 0 0 28px; }
.about__lead strong { color: var(--accent-2); font-weight: 400; }
.about__text p:not(.about__lead) { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.about__text strong { color: var(--text); font-weight: 600; }
.about__marks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.about__marks li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.about__marks li::before { content: "✓"; color: var(--green); font-weight: 800; }
.about__facts { display: flex; flex-direction: column; gap: 22px; padding: 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: 100px; box-shadow: var(--shadow); }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact__label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.fact__value { font-size: 15px; }
.about__facts .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.service { position: relative; padding: 36px 32px 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .5s var(--ease), border-color .3s; }
.service::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--accent-soft); filter: blur(30px); opacity: 0; transition: opacity .5s; }
.service:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.service:hover::after { opacity: 1; }
.service--accent { background: linear-gradient(135deg, var(--surface), var(--accent-soft)); border-color: rgba(124, 140, 248, .35); }
.service__num { font-family: var(--serif); font-size: 15px; color: var(--accent); letter-spacing: .1em; }
.service h3 { font-size: 24px; margin: 18px 0 12px; letter-spacing: -.01em; }
.service p { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.service__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.service__tags li { font-size: 12px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); background: var(--bg); }

/* ---------- Stack ---------- */
.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; perspective: 1200px; }
.stack-card { padding: 32px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; transform-style: preserve-3d; transition: border-color .3s; }
.stack-card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 45%); }
.stack-card:hover { border-color: rgba(124, 140, 248, .4); }
.stack-card:hover::before { opacity: 1; }
.stack-card__icon { font-family: var(--serif); font-size: 30px; color: var(--accent); margin-bottom: 40px; }
.stack-card h3 { font-size: 20px; margin-bottom: 16px; }
.stack-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stack-card li { color: var(--muted); font-size: 14px; padding-left: 14px; position: relative; }
.stack-card li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-left: 28px; }
.timeline__line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.timeline__line span { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: top; transform: scaleY(0); }
.tl-item { position: relative; display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.tl-item::before { content: ""; position: absolute; left: -33px; top: 52px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-item__meta { display: flex; flex-direction: column; gap: 8px; }
.tl-item__date { font-family: var(--serif); font-size: 22px; }
.tl-item__type { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.tl-item h3 { font-size: 22px; margin-bottom: 14px; }
.tl-item__org { color: var(--muted); font-weight: 400; font-size: 17px; }
.tl-item ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Projects ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.filter { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .3s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.project { display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .3s, box-shadow .5s; }
.project:hover { transform: translateY(-6px); border-color: rgba(124, 140, 248, .4); box-shadow: var(--shadow); }
.project__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); border: 0; padding: 0; width: 100%; display: block; }
.project__media img { position: absolute; inset: -6%; width: 112%; max-width: none; height: 112%; object-fit: cover; object-position: top; transition: opacity .6s var(--ease), transform .8s var(--ease); will-change: transform; }
.project__media img + img { opacity: 0; }
.project:hover .project__media img + img { opacity: 1; }
.project__status { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--line); }
.project__status--deployed { color: var(--green); }
.project__status--internship { color: var(--accent-2); }
.project__status--academic { color: #f7c86b; }
.project__status--competition { color: #f78fb3; }
.project__status--ai { color: #b48cff; }
/* light theme: same hues, darkened to >=4.5:1 on the white glass badge */
html[data-theme="light"] .project__status--deployed { color: #177f4d; }
html[data-theme="light"] .project__status--academic { color: #936408; }
html[data-theme="light"] .project__status--competition { color: #d80f55; }
html[data-theme="light"] .project__status--ai { color: #823fff; }
.project__body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.project h3 { font-family: var(--serif); font-size: 30px; line-height: 1.05; }
.project h3 button { font: inherit; color: inherit; text-align: left; padding: 0; }
.project h3 button:hover { color: var(--accent-2); }
.project p { color: var(--muted); font-size: 15px; margin: 0; }
.project__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.project__tags span { font-size: 12px; padding: 5px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.project__links { display: flex; gap: 18px; margin-top: auto; padding-top: 14px; flex-wrap: wrap; align-items: center; }
.project__links a, .project__links button { font-size: 14px; font-weight: 600; color: var(--accent-2); display: inline-flex; gap: 6px; align-items: center; padding: 0; }
.project__links a::after { content: "↗"; transition: transform .3s var(--ease); }
.project__links a:hover::after { transform: translate(3px, -3px); }
.project__links button::after { content: "→"; transition: transform .3s var(--ease); }
.project__links button:hover::after { transform: translateX(3px); }

/* ---------- Case study dialog ---------- */
.case { width: min(900px, calc(100vw - 48px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 28px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.case[open] { animation: caseIn .5s var(--ease); }
.case::backdrop { background: rgba(5, 5, 10, .7); backdrop-filter: blur(6px); animation: fadeIn .4s ease; }
@keyframes caseIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.case__close { position: absolute; top: 16px; right: 16px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); font-size: 14px; transition: transform .3s, background .3s; }
.case__close:hover { transform: rotate(90deg); background: var(--accent); color: #fff; }
/* the dialog itself never scrolls; this wrapper does. dvh: the mobile address bar collapsing must not clip the bottom */
.case__body { max-height: 85vh; max-height: 85dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.case__media { display: grid; gap: 2px; background: var(--line); } /* one image per row, full frame, no crop */
.case__media img { width: 100%; height: auto; }
.case__content { padding: 36px 40px 40px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.case__content > * { min-width: 0; }
.case__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.case h3 { font-family: var(--serif); font-size: clamp(32px, 4vw, 46px); line-height: 1; margin: 10px 0 18px; }
.case__desc { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.case__label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; display: block; margin-bottom: 10px; }
.case__highlights { margin: 0 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.case__side { display: flex; flex-direction: column; gap: 22px; }
.case__side p { margin: 0; font-size: 15px; }
.case__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.case__tags span { font-size: 12px; padding: 5px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.case__links { display: flex; flex-direction: column; gap: 8px; }
.case__links a { font-weight: 600; color: var(--accent-2); }
.case__links a::after { content: " ↗"; }

/* ---------- Contact ---------- */
.contact { position: relative; text-align: center; }
.contact__glow { position: absolute; left: 50%; top: 0; width: 70vw; height: 40vw; max-width: 900px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(ellipse, var(--accent-soft), transparent 60%); filter: blur(30px); }
.contact__title { font-family: var(--serif); font-size: clamp(44px, 8vw, 120px); line-height: .95; letter-spacing: -.02em; font-weight: 400; position: relative; }
.contact__title .word { display: inline-block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.contact__title em { color: var(--accent); }
.contact__sub { color: var(--muted); margin: 24px 0 64px; font-size: 15px; letter-spacing: .02em; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; text-align: left; max-width: 1100px; margin: 0 auto; }
.contact__grid > * { min-width: 0; } /* grid items default to min-width:auto; the textarea's intrinsic cols=20 width overflowed the 320px column */
.contact__form { display: flex; flex-direction: column; gap: 18px; padding: 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact__form label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.contact__form input, .contact__form textarea { font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-transform: none; letter-spacing: 0; resize: vertical; transition: border-color .3s; }
.contact__form input:focus, .contact__form textarea:focus { border-color: var(--accent); } /* keep the global :focus-visible ring */
.contact__form .btn { align-self: flex-start; }
.contact__form small { color: var(--muted); font-size: 12px; }
.contact__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact__link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; border-radius: 16px; border: 1px solid var(--line); transition: background .3s, border-color .3s, transform .3s var(--ease); }
.contact__link:hover { background: var(--surface); border-color: rgba(124, 140, 248, .4); transform: translateX(6px); }
.contact__link-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.contact__link span:last-child { font-size: 15px; font-weight: 500; word-break: break-all; text-align: right; }

/* ---------- Footer ---------- */
.footer { padding: 48px var(--gutter) 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.footer__brand { display: block; font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); color: var(--text); line-height: 1; margin-bottom: 8px; }
.footer__time { text-align: right; }
.footer__time strong { display: block; font-family: var(--serif); font-size: 28px; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* ---------- Reveal defaults ---------- */
[data-reveal] { opacity: 0; transform: translateY(40px); }
[data-hero] { opacity: 0; transform: translateY(24px); }
.section__title .word > span, .contact__title .word > span { display: inline-block; transform: translateY(110%); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stack { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr .8fr; gap: 40px; }
  .nav__links { gap: 20px; }
}
@media (max-width: 900px) {
  .nav__links { position: fixed; inset: 0; background: var(--bg); z-index: -1; flex-direction: column; align-items: center; gap: 28px; padding: 24px; overflow-y: auto; overscroll-behavior: contain; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s, visibility .4s; }
  .nav__links.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
  /* auto margins = centered when it fits, top-aligned and scrollable when it doesn't (short landscape viewports) */
  .nav__links a:first-child { margin-top: auto; }
  .nav__links a:last-child { margin-bottom: auto; }
  .nav__links a { font-family: var(--serif); font-size: 40px; color: var(--text); }
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .hero { padding-top: 120px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { width: min(100%, 320px); order: -1; }
  .hero__badge--1 { left: -10px; }
  .hero__badge--2 { right: -10px; }
  .hero__stats { grid-template-columns: repeat(2, auto); gap: 24px 40px; }
  .hero__scroll, .hero__orbit, .scrollbar { display: none; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__facts { position: static; }
  .services { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
  .projects { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .case__content { grid-template-columns: 1fr; padding: 28px 24px 32px; }
  .footer__time { text-align: left; }
}
@media (max-width: 520px) {
  .stack { grid-template-columns: 1fr; }
  .section__head { flex-direction: column; gap: 8px; }
  .about__marks { grid-template-columns: 1fr; }
  .contact__link { flex-direction: column; align-items: flex-start; }
  .contact__link span:last-child { text-align: left; }
  .nav__tools { gap: 6px; }
}

/* ---------- Reduced motion / no-JS fallback ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal], [data-hero] { opacity: 1; transform: none; }
  .hero__photo { clip-path: none; }
  .hero__photo img { transform: none; }
  .hero__badge, .hero__orbit { opacity: 1; }
  .word > span { transform: none !important; }
}
.no-anim .preloader, .no-anim .cursor, .no-anim .cursor-ring { display: none; }
.no-anim [data-reveal], .no-anim [data-hero] { opacity: 1; transform: none; }
.no-anim .hero__photo { clip-path: none; }
.no-anim .hero__photo img { transform: none; }
.no-anim .hero__badge, .no-anim .hero__orbit { opacity: 1; }
.no-anim .word > span { transform: none !important; }
