/* Homepage theme: dark, warm, scroll-driven. Used by index.html only. */
:root {
  --ink: #11100d;
  --ink-2: #1b1915;
  --sand: #d0c5ab;
  --sand-dim: rgba(208, 197, 171, 0.66);
  --line: rgba(208, 197, 171, 0.16);
  --accent: #e0463c;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(1.25rem, 3.2vw, 3rem);
}

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

html { scroll-behavior: smooth; background: var(--ink); }
/* Lenis takes over smoothing when it loads */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--sand); color: var(--ink); padding: .6rem 1rem; border-radius: .5rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Hero (pinned; the page slides over it) ---------- */
.hero {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; min-height: 620px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--gutter); padding-bottom: 6.5rem;
  gap: 1.25rem;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; will-change: transform; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%;
  filter: brightness(.7) saturate(.92);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 0%, rgba(17,16,13,.55) 32%, rgba(17,16,13,0) 62%),
    linear-gradient(to bottom, rgba(17,16,13,.6), rgba(17,16,13,0) 22%);
}

.hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.brand { font-weight: 800; font-size: 1rem; letter-spacing: .14em; line-height: 1.15; text-transform: uppercase; }
.top-links { display: flex; gap: clamp(1rem, 2vw, 1.75rem); }
.hero-top .top-link { font-size: .85rem; font-weight: 500; color: var(--sand-dim); transition: color .2s; }
.hero-top .top-link:hover { color: var(--sand); }

.hero-mid { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-top: auto; padding-bottom: .75rem; }
.hero-intro { max-width: 26ch; font-size: 1rem; color: var(--sand-dim); }
.hero-stats { display: flex; gap: .75rem; }
.stat-tile {
  width: clamp(110px, 9vw, 150px); aspect-ratio: 1;
  padding: .9rem; border-radius: .9rem;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(208,197,171,.12), rgba(208,197,171,.03));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: .72rem; font-weight: 600; line-height: 1.35; color: var(--sand-dim);
}
.stat-tile strong { white-space: nowrap; font-size: clamp(1.1rem, 1.65vw, 1.6rem); font-weight: 800; color: var(--sand); letter-spacing: -.03em; line-height: 1; }
.stat-tile:nth-child(n+2) strong { color: var(--accent); }
.stat-tile:nth-child(2) { margin-top: 1rem; }
.stat-tile:nth-child(3) { margin-top: 2rem; }

.hero-title {
  font-size: clamp(3rem, min(11vw, 17vh), 11.5rem);
  font-weight: 800; line-height: .88; letter-spacing: -.045em; text-transform: uppercase;
}
.hero-line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-line > span { display: block; will-change: transform; }
.hero-line.is-right { text-align: right; }

/* ---------- Page body ---------- */
.page { position: relative; z-index: 1; background: var(--ink); }
.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; }

.statement { padding-block: clamp(6rem, 15vw, 13rem) clamp(3rem, 7vw, 6rem); }
.statement-text {
  font-size: clamp(1.85rem, 4.7vw, 4.4rem);
  font-weight: 600; line-height: 1.13; letter-spacing: -.035em;
  max-width: 19em;
}
.statement-text .w { display: inline-block; margin-right: .26em; }

.about-details {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}
.about-details p { color: var(--sand-dim); max-width: 46ch; margin-bottom: 1.25rem; }
.meta-list { border-top: 1px solid var(--line); }
.meta-list li {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: .95rem;
}
.meta-list li span:first-child { color: var(--sand-dim); }
.meta-list li span:last-child { font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.4rem; border-radius: .8rem;
  font-weight: 700; font-size: .9rem; border: 1px solid var(--sand);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--sand); color: var(--ink); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-solid:hover { background: #f05a50; border-color: #f05a50; color: #fff; }

/* Section heads */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(2rem, 5vw, 4rem); flex-wrap: wrap; }
.section-title { font-size: clamp(2.6rem, 8vw, 7rem); font-weight: 800; line-height: .95; letter-spacing: -.05em; }
.section-note { color: var(--sand-dim); font-size: .95rem; max-width: 32ch; }

/* ---------- Projects: full-screen panels, each slides over the last ---------- */
.feat { border-top: 1px solid var(--line); }
.feat-head { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(1.5rem, 3vw, 2.5rem); }
.feat-title { font-size: clamp(3.5rem, 15vw, 15rem); font-weight: 800; line-height: .88; letter-spacing: -.05em; text-transform: uppercase; }

.proj-stack { position: relative; }
.proj {
  position: sticky; top: 0; display: block;
  height: 100vh; height: 100svh; min-height: 560px;
  background: var(--ink); border-top: 1px solid var(--line);
}
.proj-inner {
  height: 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--gutter) 6.5rem; max-width: 1680px; margin-inline: auto;
  transform-origin: 50% 0; will-change: transform, opacity;
}
.proj-media {
  position: relative; overflow: hidden; border-radius: 1rem; min-height: 0;
  background: linear-gradient(135deg, var(--ink-2), #26231d);
}
.proj-media::before {
  content: "Preview coming soon"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .85rem; font-weight: 600; color: var(--sand-dim); opacity: .55;
}
.proj-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1);
}
.proj:hover .proj-media img { transform: scale(1.03); }

.proj-info { display: flex; flex-direction: column; justify-content: space-between; min-height: 0; padding-top: .5rem; }
.proj-num { display: block; font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 300; line-height: 1; color: var(--sand-dim); }
.proj-title { margin-top: clamp(1.5rem, 4vw, 3.5rem); font-size: clamp(1.8rem, 3.4vw, 3.4rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; max-width: 14em; }
.proj-desc { margin-top: 1.1rem; color: var(--sand-dim); font-size: 1rem; max-width: 44ch; }
.proj-open { display: inline-block; margin-top: 1.25rem; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--line); padding-bottom: .15rem; transition: color .2s, border-color .2s; }
.proj:hover .proj-open { color: var(--accent); border-color: var(--accent); }
.proj-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; }
.proj-tags { color: var(--sand-dim); font-size: .95rem; max-width: 28ch; }
.proj-next { font-size: .8rem; color: var(--sand-dim); white-space: nowrap; }

/* ---------- Experience / Education rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(7rem, 14rem) 1fr; gap: 2rem; padding-block: clamp(1.75rem, 3vw, 2.75rem); border-bottom: 1px solid var(--line); }
.row-date { font-size: .9rem; font-weight: 600; color: var(--accent); }
.row-title { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.row-sub { color: var(--sand-dim); font-weight: 500; margin-top: .25rem; }
.row-bullets { margin-top: 1.1rem; max-width: 70ch; }
.row-bullets li { position: relative; padding-left: 1.1rem; margin-bottom: .6rem; color: var(--sand-dim); font-size: .98rem; }
.row-bullets li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--sand-dim); }
.row-text { margin-top: 1rem; color: var(--sand-dim); max-width: 70ch; }
.row-text strong { color: var(--sand); font-weight: 600; }

.tabs-nav { display: flex; gap: 1.75rem; margin-bottom: 0; flex-wrap: wrap; }
.tab-btn {
  background: none; border: 0; border-bottom: 2px solid transparent;
  font: 700 1rem var(--font); color: var(--sand-dim); padding: .4rem 0 .7rem; cursor: pointer; transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--sand); }
.tab-btn.active { color: var(--sand); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.edu-shell { border-top: 1px solid var(--line); }

/* ---------- Experience: pinned headline, glass cards stack over it ---------- */
.xp { position: relative; border-top: 1px solid var(--line); margin-bottom: -60vh; } /* next section slides up over the pinned stack */
.xp-pin {
  position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh;
  display: flex; align-items: flex-start; justify-content: center; text-align: center;
  padding: 9svh var(--gutter) 0; pointer-events: none;
}
.xp-title { font-size: clamp(3rem, 10vw, 10.5rem); font-weight: 800; line-height: .9; letter-spacing: -.045em; text-transform: uppercase; }
.xp-cards {
  position: relative; z-index: 1; margin-top: -100vh; margin-top: -100svh;
  padding: 62vh var(--gutter) 0; display: flex; flex-direction: column; align-items: center;
  gap: 34vh; /* gap, not margin: margins would shrink each card's sticky range and release it early */
}
/* Gives the last card room to pin over the others before the section ends */
.xp-cards::after { content: ""; display: block; flex: none; height: 84vh; }
.cover { position: relative; z-index: 2; background: var(--ink); }
.xp-card {
  position: sticky; top: calc(clamp(2rem, 100svh - 680px, 28svh) + var(--i, 0) * 16px);
  width: min(740px, 100%); padding: clamp(1.4rem, 2.6vw, 2.25rem);
  border-radius: 1.25rem; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(58, 53, 44, .55), rgba(21, 19, 15, .78));
  backdrop-filter: blur(28px) saturate(1.1); -webkit-backdrop-filter: blur(28px) saturate(1.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.xp-num { display: block; font-size: 2.25rem; font-weight: 300; line-height: 1; color: var(--sand-dim); margin-bottom: 1.25rem; }
.xp-bullets li { position: relative; padding-left: 1.1rem; margin-bottom: .7rem; font-size: clamp(.95rem, 1.2vw, 1.08rem); line-height: 1.55; }
.xp-bullets li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.xp-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.xp-role { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.xp-org { font-size: .85rem; color: var(--sand-dim); }
.xp-date { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ---------- Contact / footer ---------- */
.contact { padding-block: clamp(5rem, 12vw, 11rem) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.contact-title { font-size: clamp(2.6rem, 9.5vw, 9rem); font-weight: 800; line-height: .94; letter-spacing: -.05em; max-width: 12em; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(2rem, 4vw, 3.5rem); }

.footer { padding-block: 2rem 7rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; font-size: .85rem; color: var(--sand-dim); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a:hover { color: var(--sand); }

/* ---------- Floating dock nav ---------- */
.dock {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: .15rem; padding: .45rem;
  border-radius: 1rem; background: rgba(17,16,13,.72);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line);
}
.dock a { padding: .65rem .8rem; border-radius: .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--sand-dim); transition: color .2s, background .2s; }
.dock a:hover, .dock a[aria-current="true"] { color: var(--sand); }
.dock a[aria-current="true"] { background: rgba(208,197,171,.1); }
.dock .dock-cta { background: var(--sand); color: var(--ink); font-weight: 800; margin-left: .25rem; }
.dock .dock-cta:hover { background: #fff; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .proj-inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 40svh) 1fr; gap: 1.25rem; padding-bottom: 6rem; }
  .proj-title { margin-top: 1rem; }
  .proj-desc { font-size: .92rem; margin-top: .75rem; }
  .proj-open { margin-top: .75rem; }
  .xp { margin-bottom: 0; }
  .xp-pin { position: static; height: auto; padding-block: 3rem 2rem; text-align: left; }
  .xp-cards { margin-top: 0; padding: 0 var(--gutter) 3rem; gap: 1rem; }
  .xp-card { position: static; margin-bottom: 0; }
  .xp-cards::after { display: none; }
  .about-details { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: .5rem; }
  .hero-mid { flex-direction: column; gap: 1.25rem; }
}
@media (max-width: 640px) {
  .hero { padding-bottom: 6rem; }
  .hero-title { font-size: 14vw; }
  .hero-stats { width: 100%; gap: .5rem; }
  .stat-tile { width: auto; flex: 1 1 0; aspect-ratio: auto; min-height: 118px; padding: .7rem; font-size: .66rem; }
  .stat-tile strong { font-size: 1.05rem; }
  .stat-tile:nth-child(n) { margin-top: 0; }
  .meta-list li { grid-template-columns: 1fr; gap: .15rem; }
  .dock a { padding: .6rem .6rem; font-size: .68rem; }
  .dock .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
  .hero { position: relative; }
}

/* Fun button is a <button>, so give it the same look as the dock links */
.dock button.dock-cta { padding: .65rem .8rem; border: 0; border-radius: .7rem; font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; cursor: pointer; background: var(--sand); color: var(--ink); margin-left: .25rem; transition: background .2s; }
.dock button.dock-cta:hover { background: #fff; }
.dock button.dock-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
