/* --------------------------------------------------------------------------
   Akash Binoj — portfolio
   Night drafting table: cream type on ink, indigo as the only signal.
   -------------------------------------------------------------------------- */

:root {
  --bg: #07080c;
  --bg-2: #0c0e15;
  --bg-3: #12151e;
  --cream: #efeae0;
  --cream-2: #d8d2c6;
  --mute: #8a857a;
  --mute-2: #5e5a52;
  --line: rgba(239, 234, 224, 0.1);
  --line-strong: rgba(239, 234, 224, 0.2);
  --signal: #9aaeff;
  --signal-soft: rgba(154, 174, 255, 0.14);
  --signal-glow: rgba(154, 174, 255, 0.28);
  --paper: #e7e1d4;
  --danger: #c45c4a;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: "Syne", "Outfit", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --nav-h: 4.5rem;
  --frame: clamp(10px, 1.6vw, 18px);
  --pad: clamp(1.25rem, 4.2vw, 5.5rem);
  --max: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  background: var(--bg);
  color: var(--cream);
  scrollbar-width: thin;
  scrollbar-color: var(--mute-2) var(--bg);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.55;
  background: var(--bg);
  color: var(--cream);
  overflow-x: hidden;
  cursor: none;
}

body.is-touch {
  cursor: auto;
}

img,
video {
  max-width: 100%;
  display: block;
}

button,
a {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: 0;
  color: inherit;
  cursor: none;
}

body.is-touch button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--signal);
  color: var(--bg);
}

:focus-visible {
  outline: 1.5px solid var(--signal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--cream);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 1rem;
}

/* Atmosphere -------------------------------------------------------------- */

.grain,
.grid-bg,
.vignette,
.frame {
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(239, 234, 224, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(239, 234, 224, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 10%, transparent 72%);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
}

.frame {
  position: fixed;
  inset: var(--frame);
  z-index: 90;
  border: 1px solid var(--line);
}

.tick {
  position: absolute;
  width: 14px;
  height: 14px;
}

.tick-tl {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--cream-2);
  border-left: 1px solid var(--cream-2);
}

.tick-tr {
  top: -1px;
  right: -1px;
  border-top: 1px solid var(--cream-2);
  border-right: 1px solid var(--cream-2);
}

.tick-bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 1px solid var(--cream-2);
  border-left: 1px solid var(--cream-2);
}

.tick-br {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--cream-2);
  border-right: 1px solid var(--cream-2);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 120;
  background: var(--signal);
  transform-origin: left;
}

/* Cursor ------------------------------------------------------------------ */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  z-index: 140;
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.has-cursor .cursor {
  opacity: 1;
}

.cursor-h,
.cursor-v {
  position: absolute;
  background: #fff;
}

.cursor-h {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.cursor-v {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
}

.cursor.is-hover {
  transform: translate(-50%, -50%) scale(1.7);
}

.cursor.is-view {
  transform: translate(-50%, -50%) scale(0.2);
  background: #fff;
  border-radius: 50%;
}

.cursor.is-view .cursor-h,
.cursor.is-view .cursor-v {
  opacity: 0;
}

.cursor-label {
  position: fixed;
  z-index: 141;
  pointer-events: none;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--cream);
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -140%);
  transition: opacity 0.25s var(--ease);
}

.cursor-label.is-on {
  opacity: 1;
}

body.is-touch .cursor,
body.is-touch .cursor-label {
  display: none !important;
}

/* Loader ------------------------------------------------------------------ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--cream);
}

.loader.is-done {
  pointer-events: none;
}

.loader-inner {
  width: min(320px, 70vw);
  text-align: center;
}

.loader-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.loader-track {
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--cream);
}

.loader-count {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--mute);
}

/* Nav --------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: calc(var(--frame) + 8px);
  left: calc(var(--frame) + 8px);
  right: calc(var(--frame) + 8px);
  z-index: 110;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.85rem 0 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.is-scrolled {
  background: rgba(7, 8, 12, 0.92);
  border-color: var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: clamp(1.1rem, 2.4vw, 2.4rem);
}

.nav-links a,
.nav-cta,
.footer-bottom a {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-2);
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active,
.nav-cta:hover,
.footer-bottom a:hover {
  color: var(--cream);
}

.nav-links a.is-active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-cta .arrow {
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  position: relative;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(239, 234, 224, 0.04);
  z-index: 2;
}

.nav-toggle span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--cream);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.nav-toggle span:first-child {
  top: 18px;
}

.nav-toggle span:last-child {
  top: 26px;
}

.nav-toggle.is-open span:first-child {
  top: 22px;
  transform: rotate(45deg);
}

.nav-toggle.is-open span:last-child {
  top: 22px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: #07080c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem var(--pad);
  gap: 0.4rem;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.mobile-menu[hidden] {
  display: none;
}

body.menu-open main,
body.menu-open .footer,
body.menu-open .rail {
  visibility: hidden;
}

.rail {
  position: fixed;
  right: calc(var(--frame) + 10px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--mute);
  background: transparent;
  transition: transform 0.3s var(--ease), background 0.3s ease, border-color 0.3s ease;
}

.rail-dot.is-active {
  background: var(--signal);
  border-color: var(--signal);
  transform: scale(1.25);
}

/* Hero -------------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 3rem) var(--pad) 5.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  width: 42vw;
  height: 42vw;
  max-width: 640px;
  max-height: 640px;
  right: -8vw;
  top: 8vh;
  background: radial-gradient(circle, var(--signal-glow), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  animation: orb 14s ease-in-out infinite;
}

.hero::after {
  content: "AB";
  position: absolute;
  right: var(--pad);
  top: 18vh;
  font-family: var(--font-serif);
  font-size: clamp(8rem, 22vw, 20rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(239, 234, 224, 0.06);
  pointer-events: none;
  user-select: none;
}

@keyframes orb {
  0%,
  100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(-6%, 8%) scale(1.12); opacity: 1; }
}

.hero-kicker,
.hero-title,
.hero-bottom,
.scroll-hint {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: clamp(1.4rem, 3vh, 2.4rem);
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 var(--signal-glow);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--signal-glow); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.dot-sep {
  opacity: 0.5;
}

.hero-title {
  display: flex;
  flex-direction: column;
}

.hero-greet {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  color: var(--cream-2);
  margin-bottom: 0.15em;
}

.hero-name {
  display: block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.1rem, 14.8vw, 12.2rem);
  letter-spacing: -0.055em;
  line-height: 0.82;
  text-transform: none;
}

.hero-name .char-wrap {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.hero-name .char-dot {
  display: inline-block;
  width: 0.12em;
  height: 0.12em;
  margin-left: 0.06em;
  background: var(--signal);
  border-radius: 2px;
  transform: translateY(-0.12em);
  vertical-align: middle;
}

.hero-name .char {
  display: inline-block;
  will-change: transform, opacity;
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 34rem) 1fr;
  gap: 2rem;
  align-items: end;
  margin-top: clamp(1.8rem, 4vh, 3.2rem);
}

.hero-lede {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  color: var(--cream-2);
  max-width: 34rem;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--cream);
  color: var(--bg);
  border-color: var(--cream);
}

.btn-primary:hover {
  background: var(--signal);
  border-color: var(--signal);
}

.btn-ghost:hover {
  border-color: var(--cream);
  background: rgba(239, 234, 224, 0.05);
}

.scroll-hint {
  position: absolute;
  left: var(--pad);
  bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}

.scroll-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--signal), transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.3); transform-origin: bottom; opacity: 0; }
}

/* Marquee ----------------------------------------------------------------- */

.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.15rem 0;
  background: var(--bg);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: max-content;
  animation: marquee 42s linear infinite;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-2);
}

.marquee-star {
  color: var(--signal);
  font-size: 0.75rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections ---------------------------------------------------------------- */

.section,
.footer {
  scroll-margin-top: 5.25rem;
}

.section {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.section-index {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.85rem;
}

.section-index span {
  color: var(--signal);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-wrap: balance;
}

.section-note {
  margin-top: 1rem;
  color: var(--mute);
  font-size: 0.95rem;
}

/* Timeline ---------------------------------------------------------------- */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12.6rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--line);
}

.timeline-progress {
  position: absolute;
  left: 12.6rem;
  top: 0.4rem;
  width: 1px;
  height: calc(100% - 0.8rem);
  background: var(--signal);
  transform: scaleY(0);
  transform-origin: top;
  z-index: 1;
}

.timeline-item {
  display: grid;
  grid-template-columns: 11.4rem 2.4rem 1fr;
  gap: 0 0.8rem;
  padding: 0 0 2.4rem;
  position: relative;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-when {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1.55rem;
  text-align: right;
}

.timeline-range {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-2);
}

.timeline-place {
  font-size: 0.78rem;
  color: var(--mute);
}

.timeline-node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--signal);
  background: var(--bg);
  margin: 1.75rem auto 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 6px var(--bg);
}

.timeline-card {
  position: relative;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(420px circle at var(--mx, 0px) var(--my, 0px), var(--signal-soft), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
    var(--bg-2);
  transition: border-color 0.35s ease, transform 0.45s var(--ease);
}

.timeline-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.timeline-card h3,
.edu-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.22rem, 1.8vw, 1.58rem);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.badge {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--signal);
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
}

.role {
  margin: 0.25rem 0 0.85rem;
  color: var(--signal);
  font-size: 0.92rem;
}

.summary {
  color: var(--cream-2);
  font-size: 0.98rem;
  max-width: 62ch;
  text-wrap: pretty;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.05rem;
}

.tags li {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--line);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

/* Education --------------------------------------------------------------- */

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.edu-card {
  position: relative;
  min-height: 100%;
  padding: 1.8rem 1.7rem 1.9rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(480px circle at var(--mx, 40px) var(--my, 40px), var(--signal-soft), transparent 44%),
    var(--bg-2);
  overflow: hidden;
}

.edu-card::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  width: 10rem;
  height: 10rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.edu-fig,
.fig {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

.edu-when {
  margin: 1.4rem 0 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-2);
}

/* Projects ---------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 1rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  min-height: 280px;
  isolation: isolate;
  transition: border-color 0.35s ease, transform 0.5s var(--ease);
}

.project-grid:hover .project-card {
  opacity: 0.55;
}

.project-grid:hover .project-card:hover {
  opacity: 1;
}

.project-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.project-card.featured {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  min-height: 520px;
}

.project-media {
  position: absolute;
  inset: 0;
  background: var(--paper);
  overflow: hidden;
  z-index: 0;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.project-card:hover .project-media img {
  transform: scale(1.06);
}

.project-meta {
  position: relative;
  z-index: 1;
  padding: 3.4rem 1.15rem 1.2rem;
  background: linear-gradient(to top, rgba(7, 8, 12, 0.94) 12%, rgba(7, 8, 12, 0.72) 58%, transparent);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.project-meta .fig {
  color: var(--signal);
}

.project-meta h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.25rem;
  color: var(--cream);
}

.project-meta p {
  color: var(--cream-2);
  font-size: 0.88rem;
}

/* Footer ------------------------------------------------------------------ */

.footer {
  position: relative;
  z-index: 1;
  padding: clamp(4.5rem, 10vh, 8rem) var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
}

.footer-index {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.8rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.footer-copy {
  margin: 1rem 0 1.8rem;
  color: var(--cream-2);
  max-width: 36rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Dialog ------------------------------------------------------------------ */

body.is-dialog-open,
body.is-dialog-open * {
  cursor: auto !important;
}

body.is-dialog-open a,
body.is-dialog-open button {
  cursor: pointer !important;
}

body.is-dialog-open .cursor,
body.is-dialog-open .cursor-label {
  display: none !important;
}

.project-dialog {
  width: min(1080px, calc(100vw - 2rem));
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 1.25rem 1.4rem 2rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--cream);
  overflow: auto;
  overscroll-behavior: contain;
  cursor: auto;
}

.project-dialog[open] {
  display: flex;
  flex-direction: column;
}

.project-dialog::backdrop {
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.dialog-close {
  position: sticky;
  top: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  flex-shrink: 0;
  gap: 0.45rem;
  margin: 0 0 0.6rem;
  padding: 0.55rem 0.85rem 0.55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream);
  color: var(--bg);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.dialog-x {
  font-size: 1.1rem;
  line-height: 1;
}

.dialog-body {
  padding-top: 0.2rem;
  min-height: 0;
}

.dialog-body h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0.4rem 0 1.2rem;
  text-wrap: balance;
}

.dialog-body p {
  color: var(--cream-2);
  font-size: 1.02rem;
  max-width: 68ch;
  margin-bottom: 0.85rem;
}

.dialog-body a {
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.8rem;
  margin: 0.4rem 0 1.6rem;
}

.image-gallery img,
.image-gallery video {
  width: 100%;
  height: auto;
  min-height: 180px;
  max-height: 56vh;
  object-fit: contain;
  background: #05060a;
  border: 1px solid var(--line);
}

.image-gallery video {
  background: #000;
}

/* Reveal defaults (JS enhances) ------------------------------------------- */

.reveal,
.reveal-line,
.hero-name .char {
  opacity: 1;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1080px) {
  .timeline::before,
  .timeline-progress {
    left: 0.42rem;
  }

  .timeline-item {
    grid-template-columns: 1.3rem 1fr;
    grid-template-areas:
      "node when"
      "node card";
  }

  .timeline-when {
    grid-area: when;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-top: 0.15rem;
    padding-left: 0.9rem;
  }

  .timeline-node {
    grid-area: node;
    margin: 0.35rem auto 0;
  }

  .timeline-card {
    grid-area: card;
  }

  .edu-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card.featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .rail {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-label {
    display: none !important;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding-bottom: 6.5rem;
  }

  .hero-name {
    font-size: 16.8vw;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .hero::after {
    display: none;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card.featured {
    min-height: 300px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .frame {
    inset: 8px;
  }

  .project-dialog {
    padding: 1rem 1rem 1.5rem;
    width: calc(100vw - 1.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .cursor,
  .cursor-label {
    display: none !important;
  }

  body {
    cursor: auto;
  }
}
