/* sithijaranaraja.com: dark, quiet, video-led. One family (Geist, self-hosted), one accent. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0b0a12;
  --surface: #14121f;
  --raised: #1c1929;
  --line: #262237;
  --line-2: #35304b;
  --text: #ecebf5;
  --muted: #a09cb8;
  --faint: #8f8ba8;
  --accent: #8f6bff;
  --accent-2: #6e8efb;
  --accent-3: #a777e3;
  --grad: linear-gradient(120deg, #6e8efb, #a777e3);
  --grad-btn: linear-gradient(120deg, #4e6de0, #8252cf);
  --accent-ink: #ffffff;
  --matte: #080710;
  --r: 14px;
  --gutter: clamp(16px, 4vw, 56px);
  --sec: clamp(88px, 11vw, 152px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --glow: 0 0 0 1px rgba(143, 107, 255, 0.45), 0 20px 60px -20px rgba(143, 107, 255, 0.55);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Type scale: display, section, card, body, small. Two weights: 400 and 600. */
  --t-display: clamp(42px, 5.4vw, 72px);
  --t-section: clamp(28px, 3vw, 40px);
  --t-card: 21px;
  --t-body: 17px;
  --t-small: 14.5px;
  --measure: 66ch;
  --rise: 10px;
  --dur: 0.5s;
  --out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans); font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
p { max-width: var(--measure); }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
a { color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.mast { position: fixed; left: 0; right: 0; top: 0; z-index: 50; background: transparent; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.mast.is-stuck { background: rgba(11, 10, 18, 0.72); border-bottom-color: var(--line); }
.mast__bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--grad); }
.mast__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.mast__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.mast__name img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.mast__nav { display: flex; align-items: center; gap: clamp(2px, 1vw, 8px); font-size: 15px; }
.mast__nav a { text-decoration: none; color: var(--muted); padding: 8px 10px; border-radius: 8px; transition: color 0.2s; }
.mast__nav a:hover { color: var(--text); }
.mast__nav .mast__cta { color: #fff; background: var(--grad-btn); border: 0; padding: 7px 16px; border-radius: 999px; margin-left: 6px; }
.mast__nav .mast__cta:hover { filter: brightness(1.12); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line-2); font-size: 15.5px; font-weight: 500; text-decoration: none;
  color: var(--text); background: transparent; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--muted); }
.btn--primary { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: 0 10px 30px -10px rgba(110, 142, 251, 0.6); }
.btn--primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn { transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, filter 0.2s; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 17px; }

/* ---------- Hero: text beside a drifting video wall ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 5vw, 72px); align-items: center; min-height: clamp(560px, 92svh, 860px); padding-top: 68px; overflow: visible; }
.hero__name { font-size: var(--t-display); letter-spacing: -0.035em; line-height: 1.02; }
.hero__type { margin-top: 14px; font-size: clamp(24px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; max-width: none; }
.hero__type .kw { color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.type { display: grid; text-wrap: initial; }
.type > span { grid-area: 1 / 1; min-width: 0; }
.type__ghost { visibility: hidden; }
.type__cursor { display: inline-block; width: 0.08em; min-width: 3px; height: 0.86em; margin-left: 0.07em; vertical-align: -0.04em; background: var(--accent); border-radius: 1px; }
.type.is-idle .type__cursor { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.hero__role { margin-top: 18px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; max-width: 44ch; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.hero__social { display: inline-flex; gap: 4px; margin-left: 6px; }
.hero__social a { color: var(--muted); font-size: 15px; text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.hero__social a:hover { color: var(--text); }
.wall { position: relative; min-width: 0; height: clamp(480px, 80svh, 760px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; overflow: hidden; transform: rotate(-6deg) scale(1.08); transform-origin: 50% 50%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); }
.wall::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 50% 50%, transparent 40%, rgba(11, 10, 18, 0.55)); }
.wall__col { overflow: hidden; min-width: 0; container-type: size; }
.wall__track { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; will-change: transform; animation: drift 38s ease-in-out infinite alternate; }
.wall__col--1 .wall__track { animation-direction: alternate-reverse; animation-duration: 46s; }
.wall__col--2 .wall__track { animation-duration: 42s; animation-delay: -12s; }
@keyframes drift { to { transform: translateY(calc(-100% + 100cqh)); } }
.wall__tile { position: relative; display: block; min-width: 0; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--matte); box-shadow: 0 0 0 1px var(--line); }
.wall__tile video, .wall__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wall__col--1 .wall__tile { aspect-ratio: 1; }

/* ---------- Affiliation strip ---------- */
.creds__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.creds__list li { padding: 22px 20px 22px 0; display: grid; gap: 2px; align-content: start; }
.creds__list li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.creds__list strong { font-weight: 600; font-size: 15.5px; }
.creds__list span { color: var(--muted); font-size: var(--t-small); line-height: 1.45; }

/* ---------- Sections ---------- */
.section { padding-top: var(--sec); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.section__head h2, .about__text h2, .contact h2 { font-size: var(--t-section); letter-spacing: -0.025em; line-height: 1.1; }
.section__head p { color: var(--muted); max-width: 52ch; justify-self: end; }
.meta { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-small); color: var(--muted); }
.meta span { color: var(--faint); white-space: nowrap; }

/* ---------- Areas ---------- */
.areas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.area__clips { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.area__clip { position: relative; display: block; aspect-ratio: 1; background: var(--matte); overflow: hidden; }
.area__clip video, .area__clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.area h3 { font-size: 17px; padding: 16px 18px 4px; }
.area p { color: var(--muted); font-size: var(--t-small); line-height: 1.5; padding: 0 18px 18px; }

/* ---------- Featured projects ---------- */
.featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.fcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.fcard:hover { border-color: rgba(143, 107, 255, 0.5); box-shadow: var(--glow); }
.fcard::after, .card::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(167, 119, 227, 0.18), transparent 60%); transition: opacity 0.3s; }
.fcard:hover::after, .card:hover::after { opacity: 1; }
.fcard__media, .card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--matte); overflow: hidden; }
.fcard__media video, .fcard__media img, .card__media video, .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }

.fcard__body { padding: clamp(20px, 2.2vw, 28px); display: grid; gap: 12px; align-content: start; flex: 1; }
.fcard h3 { font-size: var(--t-card); letter-spacing: -0.015em; line-height: 1.2; }
.fcard h3 a { text-decoration: none; }
.fcard h3 a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.fcard__body > p:not(.meta) { color: var(--muted); font-size: 16px; max-width: 52ch; }
.fcard__result { color: var(--text) !important; font-size: 15px !important; padding-top: 10px; border-top: 1px solid var(--line); }

.fcard__media.collage { aspect-ratio: auto; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; background: var(--line); }
.fcard__media.collage > span { position: relative; overflow: hidden; background: var(--matte); }
.fcard__media.collage > span:first-child { grid-row: 1 / 3; aspect-ratio: 4 / 3; }
.fcard__media.collage > span video, .fcard__media.collage > span img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- More work cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.card { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color 0.25s, transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.card { position: relative; }
.card:hover { border-color: rgba(143, 107, 255, 0.5); box-shadow: var(--glow); }
.card__body { display: grid; gap: 6px; padding: 18px 20px 20px; }
.card__body strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
.card__desc { color: var(--muted); font-size: 15px; line-height: 1.5; }
.plain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); border-top: 1px solid var(--line); }
.plain li { display: grid; gap: 2px; align-content: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.plain a { display: flex; justify-content: space-between; gap: 12px; text-decoration: none; }
.plain a:hover strong { color: var(--accent); }
.plain strong { font-weight: 600; font-size: 16px; }
.plain span { color: var(--muted); font-size: 15px; }
.plain a span { color: var(--faint); font-size: var(--t-small); white-space: nowrap; }
.sub-h { font-size: var(--t-card); margin: clamp(40px, 5vw, 64px) 0 12px; }

/* ---------- Experience ---------- */
.cv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.cv__col h3 { font-size: 15px; font-weight: 500; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cv__list + h3 { margin-top: 48px; }
.cv__list li { position: relative; padding: 22px 0 22px 26px; border-bottom: 1px solid var(--line); }
.cv__list li { padding-left: 0; }
.cv__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cv__top strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
.cv__top span { flex: none; font-size: var(--t-small); color: var(--faint); }
.cv__list p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.cv__top strong a { color: inherit; text-decoration: none; }
.cv__top strong a:hover { color: var(--accent); }
.cv__list .cv__role { color: var(--text); font-size: 15.5px; margin-top: 2px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; padding: clamp(24px, 4vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.about__photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 1 / 1; background: var(--matte); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.about__text h2 { margin-bottom: 20px; }
.about__text p { color: var(--muted); max-width: var(--measure); }
.about__text p + p { margin-top: 1em; }
.about__text .lead { color: var(--text); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 64px); border-top: 1px solid var(--line); }
.skills > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.skills dt { font-weight: 600; font-size: 15.5px; }
.skills dd { color: var(--muted); font-size: 15.5px; line-height: 1.55; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: clamp(56px, 8vw, 104px) var(--gutter); border-radius: 26px; border: 1px solid var(--line); background: radial-gradient(120% 100% at 50% 0%, rgba(110, 142, 251, 0.28) 0%, rgba(167, 119, 227, 0.12) 35%, var(--surface) 70%); }
.contact h2 { font-size: var(--t-section); }
.contact p { color: var(--muted); max-width: 48ch; margin: 18px auto 0; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 32px; }
.contact .btn--lg { max-width: 100%; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.foot { margin-top: var(--sec); border-top: 1px solid var(--line); }
.foot__in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; padding-bottom: 36px; font-size: 14.5px; color: var(--faint); }
.foot__links { display: flex; gap: 20px; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------- Media frames (project pages) ---------- */
.frame { position: relative; overflow: hidden; isolation: isolate; background: var(--matte) center / cover no-repeat; background-position: var(--pos, 50% 50%); }
.frame video, .frame img, .still {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, 50% 50%); transform: scale(var(--zoom, 1)); transform-origin: var(--pos, 50% 50%);
}
.fit-contain .frame { background-image: none !important; background-color: var(--matte); }
.fit-contain .frame video, .fit-contain .frame img { object-fit: contain; transform: none; }
.figure { position: relative; }
.figure .frame { border-radius: var(--r); box-shadow: 0 0 0 1px var(--line); }
.figure.boxed .frame { width: 100%; aspect-ratio: var(--ar, 4 / 3); max-width: var(--maxw, 960px); }
.rsrc { aspect-ratio: var(--ar, 16 / 9); }
.r26 { aspect-ratio: 2.6 / 1; } .r21 { aspect-ratio: 21 / 9; } .r32 { aspect-ratio: 3 / 2; }
.r1610 { aspect-ratio: 16 / 10; } .r43 { aspect-ratio: 4 / 3; } .r45 { aspect-ratio: 4 / 5; }
.fill { position: absolute; inset: 0; }
.figure figcaption { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; padding: 12px 2px 0; font-size: 14.5px; color: var(--muted); }
.figure figcaption span:first-child { max-width: 66ch; }
.tag { font-size: 13.5px; color: var(--faint); white-space: nowrap; }
.figure__open {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; display: inline-flex; gap: 8px; align-items: center;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--text); background: rgba(11, 10, 18, 0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.figure__open:hover { background: var(--text); color: var(--bg); }
.figure__open .dur { opacity: 0.7; }
.figure__open .dur:empty { display: none; }
.figure--fallback .frame { background: var(--matte); }

/* ---------- Project page ---------- */
.proj__head { padding-top: clamp(40px, 7vh, 88px); padding-bottom: clamp(28px, 3.5vw, 48px); }
.proj__crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14.5px; color: var(--muted); margin-bottom: 22px; }
.proj__crumb a { color: var(--accent); text-decoration: none; }
.proj__crumb a:hover { text-decoration: underline; text-underline-offset: 4px; }
.proj__crumb span::before { content: "/"; margin-right: 10px; color: var(--faint); }
.proj__title { letter-spacing: -0.035em; font-size: var(--t-display); line-height: 1.02; max-width: 18ch; }
.proj__sub { margin-top: 16px; font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); max-width: 56ch; line-height: 1.5; }
.proj__sub a { color: var(--accent); }
.proj__hero .figure--hero.boxed .frame { margin: 0; }
.proj__intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 96px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); align-items: start; }
.proj__overview p { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; max-width: var(--measure); }
.proj__overview p + p { margin-top: 1em; color: var(--muted); }
.spec { font-size: 15px; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd a { color: var(--accent); }
.spec dd a + a { margin-left: 14px; }
.car { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(24px, 3vw, 48px); padding-bottom: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); padding-top: 28px; }
.car__row h2 { font-size: var(--t-small); font-weight: 600; color: var(--faint); margin-bottom: 10px; }
.car__row p { font-size: 16px; color: var(--muted); line-height: 1.6; }
.brief { padding-bottom: clamp(40px, 5vw, 64px); }
.brief h2 { font-size: var(--t-card); margin-bottom: 16px; }
.brief ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); border-top: 1px solid var(--line); }
.brief li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.sub, .project-gallery { scroll-margin-top: 84px; padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(16px, 2vw, 24px); }
.sub__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px 64px; margin-bottom: clamp(24px, 3vw, 36px); align-items: end; }
.sub__head h2, .project-gallery > h2 { font-size: var(--t-section); letter-spacing: -0.025em; line-height: 1.1; }
.sub__head p { color: var(--muted); font-size: 16px; max-width: 62ch; }
.project-gallery > h2 { margin-bottom: clamp(24px, 3vw, 36px); }
.gallery { display: grid; gap: clamp(24px, 2.6vw, 36px) clamp(16px, 2vw, 24px); }
.gallery + .gallery { margin-top: clamp(24px, 2.6vw, 36px); }
.gallery--2 { grid-template-columns: 1fr 1fr; }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery--5 { grid-template-columns: repeat(6, 1fr); }
.gallery--5 .figure { grid-column: span 2; }
.gallery--5 .figure:nth-child(-n+2) { grid-column: span 3; }
.gallery .span2 { grid-column: 1 / -1; }
.lead { margin-bottom: clamp(24px, 2.6vw, 36px); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(64px, 8vw, 112px); }
.pager a { display: grid; gap: 4px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color 0.2s; }
.pager a:hover { border-color: var(--accent); }
.pager a span { font-size: 14px; color: var(--muted); }
.pager a strong { font-size: var(--t-card); font-weight: 600; line-height: 1.2; }
.pager a[rel="next"] { text-align: right; }
.lost { padding-top: 14vh; padding-bottom: 20vh; }

/* ---------- Lightbox ---------- */
.lightbox { margin: auto; background: #000; border: 0; padding: 0; max-width: min(96vw, 1400px); width: 96vw; border-radius: 14px; overflow: hidden; }
.lightbox::backdrop { background: rgba(5, 8, 12, 0.9); }
.lightbox video { width: 100%; max-height: 86vh; background: #000; }
.lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; font-family: var(--sans); font-size: 14px; background: rgba(11, 10, 18, 0.72); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.15); padding: 7px 14px; border-radius: 999px; cursor: pointer; }

/* ---------- Load moment: the hero settles in once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__name, .hero__type, .hero__role, .hero__actions { animation: rise var(--dur) var(--out) both; }
  .hero__type { animation-delay: 0.1s; }
  .hero__role { animation-delay: 0.2s; }
  .hero__actions { animation-delay: 0.3s; }
  .wall { animation: wallin 1.2s 0.1s var(--ease) both; }
  .wall__tile { animation: tilein 0.9s var(--ease) both; }
  .wall__col--0 .wall__tile:nth-child(2), .wall__col--1 .wall__tile:nth-child(1), .wall__col--2 .wall__tile:nth-child(3) { animation-delay: 0.35s; }
  .wall__col--0 .wall__tile:nth-child(3), .wall__col--1 .wall__tile:nth-child(2), .wall__col--2 .wall__tile:nth-child(1) { animation-delay: 0.55s; }
  .wall__col--0 .wall__tile:nth-child(4), .wall__col--1 .wall__tile:nth-child(3), .wall__col--2 .wall__tile:nth-child(2) { animation-delay: 0.75s; }
  @keyframes rise { from { opacity: 0; transform: translateY(var(--rise)); } to { opacity: 1; transform: none; } }
  @keyframes wallin { from { opacity: 0; transform: rotate(-6deg) scale(1.12) translateY(24px); } to { opacity: 1; transform: rotate(-6deg) scale(1.08); } }
  @keyframes tilein { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fcard, .card, .fcard__media video, .card__media video, .card__media img { transition: none; }
}

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(var(--rise)); transition: opacity var(--dur) var(--out), transform var(--dur) var(--out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .section__head.reveal, .js .sub__head.reveal { opacity: 1; transform: none; transition: none; }
.js .section__head.reveal > *, .js .sub__head.reveal > * { opacity: 0; transform: translateY(var(--rise)); transition: opacity var(--dur) var(--out), transform var(--dur) var(--out); }
.js .section__head.reveal.is-in > *, .js .sub__head.reveal.is-in > * { opacity: 1; transform: none; }
.js .sub__head.reveal > p { transition-delay: 0.08s; }
.js .reveal.is-in.tilt { transition: box-shadow 0.4s var(--ease), border-color 0.25s; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); will-change: transform; }
.js .cards .reveal:nth-child(3n+2), .js .featured .reveal:nth-child(2n) { transition-delay: 0.08s; }
.js .cards .reveal:nth-child(3n+3) { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) { .js .reveal, .js .section__head.reveal > *, .js .sub__head.reveal > * { opacity: 1; transform: none; transition: none; } .hero__name, .hero__type, .hero__role, .hero__actions, .wall, .wall__tile, .wall__track { animation: none; } .type .type__cursor { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .cards, .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creds__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creds__list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .creds__list li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .skills { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 100px; overflow: hidden; }
  .wall { height: 360px; transform: rotate(-4deg) scale(1.05); }
  .hero__photo { order: -1; justify-self: start; max-width: 132px; aspect-ratio: 1; border-radius: 50%; }
  .section__head { grid-template-columns: 1fr; }
  .section__head p { justify-self: start; }
  .featured, .cv, .plain, .brief ul, .car, .proj__intro, .sub__head, .gallery--2, .gallery--3, .gallery--5 { grid-template-columns: 1fr; }
  .gallery--5 .figure, .gallery--5 .figure:nth-child(-n+2) { grid-column: auto; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 280px; }
  .proj__hero .figure--hero:not(.fit-contain) .r21 { aspect-ratio: 16 / 10; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .mast__nav a:not(.mast__cta) { display: none; }
  .cards, .creds__list { grid-template-columns: 1fr; }
  .areas { grid-template-columns: 1fr; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wall__col--2 { display: none; }
  .creds__list li, .creds__list li + li { padding: 16px 0; border-left: 0; }
  .creds__list li + li { border-top: 1px solid var(--line); }
  .skills > div { grid-template-columns: 1fr; gap: 10px; }
  .hero__social { margin-left: 0; }
  .pager { grid-template-columns: 1fr; }
  .pager a[rel="next"] { text-align: left; }
}
