/* ============================================================
   IZHAN — portfolio
   Palette and glass treatment carried over from the 2022 build.
   ============================================================ */

/* ============================================================
   PALETTES
   Every colour the page uses lives here. "spectrum" is the
   original build; "orange" is the Teenage-Engineering-leaning
   set. Swap with data-palette on <html>; the toggle persists.
   Ramp stops are space-separated RGB triples so main.js can
   read and interpolate them without a colour parser.
   ============================================================ */

:root,
:root[data-palette="spectrum"] {
  --paper:      #ffffff;
  --ink:        #050304;
  --ink-soft:   #242424;
  --muted:      #747474;
  --accent:     #4ae0ab;

  --hero-base:  #e7dcef;
  --footer-bg:  #c6dfdd;
  --footer-bg2: #e7f1ee;
  --footer-link:#4b3bc4;

  /* Hero orbs: each drifts between an A and a B colour. */
  --orb-1a: #29f7ae;  --orb-1b: #fb539d;
  --orb-2a: #fd9c2c;  --orb-2b: #a15a96;
  --orb-3a: #feb89f;  --orb-3b: #3457e7;
  --orb-4a: #fe3b9a;  --orb-4b: #5cefb2;
  --orb-5a: #a91191;  --orb-5b: #d6875c;

  /* Timeline */
  --rule-1: #755ff0;  --rule-2: #a91191;
  --card-shadow: 49, 14, 61;

  --rail-dim:  #3d3d3d;
  --rail-1:    #755ff0;
  --rail-2:    #e28f4c;
  --rail-3:    #f800be;
  --dot-ring:  #f7bb0c;
  --dot-glow:  rgba(247, 187, 12, .16);

  /* Projects: scroll ramp + card scrim */
  --proj-0: 255 255 255;
  --proj-1: 147  81 228;
  --proj-2:  47 110 235;
  --proj-3:  70 179 148;
  --card-scrim:   rgba(34, 22, 88, .42);
  --tinker-scrim: rgba(34, 22, 88, .38);
  --tinker-hover: rgba(20, 12, 60, .48);
  --proj-head:    #16093c;
  --proj-num:     rgba(20, 8, 60, .13);
  --proj-label:   rgba(24, 12, 56, .88);
}

/* Teenage Engineering: warm off-white, hard black, one loud orange,
   and sand/rust neutrals doing the work the rainbow used to do. */
:root[data-palette="orange"] {
  --paper:      #f2efe9;
  --ink:        #14110d;
  --ink-soft:   #2a251e;
  --muted:      #7d766a;
  --accent:     #ff5c00;

  --hero-base:  #efe6d8;
  --footer-bg:  #f0d9b8;
  --footer-bg2: #faf3e7;
  --footer-link:#c1440e;

  --orb-1a: #ff5c00;  --orb-1b: #ffc93c;   /* orange  <-> yellow */
  --orb-2a: #ff9642;  --orb-2b: #f4ead6;   /* amber   <-> cream  */
  --orb-3a: #ffdca8;  --orb-3b: #e5484d;   /* gold    <-> red    */
  --orb-4a: #c1440e;  --orb-4b: #ffd166;   /* rust    <-> yellow */
  --orb-5a: #9e2b25;  --orb-5b: #ff8c42;   /* deep red<-> orange */

  --rule-1: #ff5c00;  --rule-2: #8a3b12;
  --card-shadow: 74, 34, 12;

  --rail-dim:  #3a352d;
  --rail-1:    #ff5c00;
  --rail-2:    #ffc93c;
  --rail-3:    #e5484d;
  --dot-ring:  #ffc247;
  --dot-glow:  rgba(255, 194, 71, .18);

  --proj-0: 244 240 233;   /* warm white   */
  --proj-1: 248 205 158;   /* soft apricot */
  --proj-2: 232 166 155;   /* dusty rose   */
  --proj-3: 243 224 170;   /* pale butter  */
  --card-scrim:   rgba(48, 24, 10, .64);
  --tinker-scrim: rgba(48, 24, 10, .58);
  --tinker-hover: rgba(32, 14, 4, .72);
  --proj-head:    #2a1206;
  --proj-num:     rgba(60, 26, 6, .14);
  --proj-label:   rgba(48, 20, 4, .92);
}

:root {
  --glass-bd:   hsla(0, 0%, 100%, .28);
  --glass-bg:   linear-gradient(144deg, hsla(0,0%,100%,.35), hsla(0,0%,100%,.10) 58%);
  --glass-sh:   7px 7px 20px -10px rgba(0,0,0,.55);

  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1100px;
  --gutter: clamp(20px, 5vw, 60px);
}

/* Palette swaps shouldn't look like a page reload. */
body, .hero, .footer, .exp, .toolkit, .projects, .nav,
.tl__rail, .tl__dot, .card, .tinker__card {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #fff; color: #000; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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


/* ---------------- Preloader (a-3 "Preload Animation") ----------------
   Black hold on the vertical logo mark, then it scales away and the
   chrome fades in behind it. Click / key / scroll skips it. */

.preloader {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  background: #020203;
  transition: opacity .5s ease-in;
}
.preloader__mark {
  width: 76px;
  transition: transform .5s ease-in;
  transform-origin: 50% 50%;
}
.preloader.is-dismissing .preloader__mark { transform: scale(0); }
.preloader.is-dismissing { opacity: 0; }
.preloader.is-done { display: none; }

/* Chrome starts hidden and is faded in by the preloader sequence. */
.js .nav { opacity: 0; transition: opacity .7s ease-out; }
.js .nav.is-revealed { opacity: 1; }
.js .hero__scroll { opacity: 0; transition: opacity .5s ease; }
.js .hero__scroll.is-revealed { opacity: 1; }

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

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(5,3,4,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  max-width: 1240px; margin-inline: auto;
  padding: 12px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}

.nav__brand { margin-right: auto; display: flex; }
.nav__brand img { width: 26px; }

.nav__menu { display: flex; align-items: center; gap: 28px; }

.nav__menu a {
  font-family: var(--sans);
  font-size: 12px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav__menu a:hover { color: var(--accent); }
.nav__menu a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.nav__menu a.nav__cta {
  border: 1px solid #fff;
  border-radius: 4px;
  padding: 9px 16px;
}
.nav__menu a.nav__cta:hover { background: #fff; color: var(--ink); }
.nav__menu a.nav__cta.is-active { border-color: #fff; color: #fff; }

.nav__toggle {
  display: none;
  width: 40px; height: 34px;
  background: none; border: 0; cursor: pointer;
  padding: 8px 6px;
  flex-direction: column; justify-content: space-between;
}
.nav__toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .22s, opacity .22s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* ---------------- Palette toggle ---------------- */

.palette {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px 7px 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  transition: background-color .2s, border-color .2s;
}
.palette:hover { background: rgba(255,255,255,.16); border-color: #fff; }

.palette__chip {
  width: 13px; height: 13px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.palette__chip--spectrum { background: linear-gradient(135deg, #29f7ae, #755ff0 55%, #fe3b9a); }
.palette__chip--orange   { background: linear-gradient(135deg, #ffc247, #ff5c00 55%, #8a3b12); }

/* The active palette's chip is the one that reads as selected. */
:root:not([data-palette="orange"]) .palette__chip--orange,
:root[data-palette="orange"] .palette__chip--spectrum { opacity: .35; }

.palette__name { min-width: 62px; text-align: left; }

@media (max-width: 780px) {
  .palette {
    justify-content: center;
    margin-top: 12px;
    padding: 12px;
    font-size: 11px;
  }
  .palette__name { min-width: 0; }
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 110px var(--gutter) 70px;
  overflow: hidden;
  background: var(--hero-base);
}

.hero__bg { position: absolute; inset: 0; filter: blur(80px); opacity: 1; }
.orb { position: absolute; border-radius: 50%; }
/* Each orb drifts, scales AND shifts hue -- the colour change is what made
   the original background feel alive. Durations/offsets/colours are the
   ones from the Webflow "BG Move" action lists. */
.orb--1 { width: 60vmax; height: 60vmax; top: -15%;    right: -13%; animation: orb1 20s ease-in-out infinite; }
.orb--2 { width: 40vmax; height: 40vmax; top: 0;       left: 0;     animation: orb2 14s ease-in-out infinite; animation-delay: -7s; }
.orb--3 { width: 30vmax; height: 30vmax; top: 3%;      left: 26%;   animation: orb3 24s ease-in-out infinite; animation-delay: -3s; }
.orb--4 { width: 40vmax; height: 40vmax; bottom: 0;    left: 0;     animation: orb4 22s ease-in-out infinite; animation-delay: -9s; }
.orb--5 { width: 35vmax; height: 35vmax; bottom: -13%; right: 15%;  animation: orb5 24s ease-in-out infinite; animation-delay: -5s; }

@keyframes orb1 {
  0%,100% { transform: translate3d(0,0,0)          scale(1);   background-color: var(--orb-1a); }
  50%     { transform: translate3d(-10%,-5%,0)     scale(1.2); background-color: var(--orb-1b); }
}
@keyframes orb2 {
  0%,100% { transform: translate3d(0,0,0)          scale(1);   background-color: var(--orb-2a); }
  50%     { transform: translate3d(15%,10%,0)      scale(1.3); background-color: var(--orb-2b); }
}
@keyframes orb3 {
  0%,100% { transform: translate3d(0,0,0)          scale(1);   background-color: var(--orb-3a); }
  50%     { transform: translate3d(30%,-15%,0)     scale(1.2); background-color: var(--orb-3b); }
}
@keyframes orb4 {
  0%,100% { transform: translate3d(0,0,0)          scale(1);   background-color: var(--orb-4a); }
  50%     { transform: translate3d(30%,10%,0)      scale(1.2); background-color: var(--orb-4b); }
}
@keyframes orb5 {
  0%,100% { transform: translate3d(0,0,0)          scale(1);   background-color: var(--orb-5a); }
  50%     { transform: translate3d(30%,-15%,0)     scale(1.2); background-color: var(--orb-5b); }
}
@media (prefers-reduced-motion: reduce) { .orb { animation: none !important; } }

.glass {
  border: 2px solid var(--glass-bd);
  border-radius: 2em;
  background-image: var(--glass-bg);
  box-shadow: var(--glass-sh);
}


/* ---- Floating / tilting hero card (a-6 "GP Moving Card", a-21 float) ----
   .hero__stage holds the perspective, .hero__float does the slow bob and
   .hero__card takes the mouse-driven rotation, so the two never fight over
   the same transform. */

.hero__stage {
  position: relative;
  width: 100%; max-width: 700px;
  perspective: 8000px;
}

.hero__float { animation: heroFloat 4s ease-in-out infinite; will-change: transform; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.hero__card {
  position: relative;
  backdrop-filter: blur(2em);
  -webkit-backdrop-filter: blur(2em);
  width: 100%;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  will-change: transform;
}

/* The soft radial pool that slides opposite the tilt to sell the depth. */
/* No border-radius: clipping a gradient that still has alpha left at the
   edge is what drew a visible ring. It now fades to fully transparent
   well inside the box, so there is no edge to see. */
.hero__shadow {
  position: absolute; left: 50%; top: 50%;
  width: 170%; height: 170%;
  margin: -85% 0 0 -85%;
  background-image: radial-gradient(closest-side circle at 50% 50%,
      rgba(var(--card-shadow), .30) 0%,
      rgba(var(--card-shadow), .12) 42%,
      rgba(var(--card-shadow), 0)   70%);
  transform: translate3d(var(--sh-x, 0px), var(--sh-y, 0px), -60px);
  pointer-events: none; z-index: -1;
}

@media (prefers-reduced-motion: reduce) {
  .hero__float { animation: none; }
  .hero__card, .hero__shadow { transform: none !important; }
}

.hero__photo {
  width: clamp(140px, 34vw, 240px);
  aspect-ratio: 1; object-fit: cover;
  border-radius: 50%;
  border: 3px solid hsla(0,0%,100%,.5);
  margin-bottom: 22px;
}

.hero__wordmark { width: min(100%, 460px); }
.hero__rule {
  display: block;
  width: 132px; height: 5px;
  margin-top: 6px;
  border-radius: 3px;
  background-image: linear-gradient(90deg, var(--rule-1), var(--rule-2));
}

.hero__noun {
  font-family: var(--sans);
  font-size: 15px; font-weight: 300; letter-spacing: .08em;
  color: #fff;
  margin: 10px 0 6px;
  text-shadow: 0 1px 10px rgba(0,0,0,.35);
}

.hero__def {
  font-family: var(--sans);
  font-size: clamp(15px, 2.2vw, 19px); font-weight: 300; line-height: 1.5;
  color: #fff;
  margin: 0 0 26px; max-width: 30ch;
  text-shadow: 0 1px 14px rgba(0,0,0,.42);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.btn {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 13px 24px; border-radius: 6px;
  text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #fff; color: var(--ink); }
.btn--ghost { border: 1.5px solid #fff; color: #fff; background: rgba(0,0,0,.22); }
.btn--ghost:hover { background: #fff; color: var(--ink); }

.hero__scroll {
  position: relative;
  margin-top: 34px;
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.9); text-decoration: none;
}
.hero__scroll::after { content: " ↓"; }
.hero__scroll:hover { color: #fff; }

/* ---------------- Section headings ---------------- */

.sec-head { position: relative; padding-top: 46px; margin-bottom: 54px; }

.sec-head__num {
  position: absolute; top: -6px; left: -4px;
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(64px, 10vw, 112px); line-height: .8;
  color: rgba(0,0,0,.09);
  pointer-events: none; user-select: none;
}
.sec-head--dark .sec-head__num { color: rgba(255,255,255,.14); }

.sec-head__label {
  position: relative; display: block;
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.sec-head--dark .sec-head__label { color: rgba(255,255,255,.6); }

.sec-head__title {
  position: relative;
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0; max-width: 16ch;
}
.sec-head--dark .sec-head__title { color: #fff; }

/* ---------------- 01 About ---------------- */

.about { padding: clamp(70px, 10vw, 130px) 0; background: var(--paper); }

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.about__sub {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  margin: 0 0 18px;
}

.about__body p { margin: 0 0 18px; max-width: 62ch; }
.about__body p:last-child { margin-bottom: 0; }

.about__figure { margin: 0; }
.about__figure img { border-radius: 14px; width: 100%; }
.about__figure figcaption {
  font-family: var(--sans); font-size: 12px; letter-spacing: .04em;
  color: var(--muted); margin-top: 10px; text-align: center;
}

/* ---------------- 02 Experience ---------------- */

.exp {
  padding: clamp(70px, 10vw, 130px) 0;
  background: var(--ink);
  color: rgba(255,255,255,.86);
}

/* ---- Timeline ------------------------------------------------------------
   Rebuilt from the original: a dim rail with a gradient fill that tracks the
   middle of the viewport, dots that stick at 50vh while their entry passes,
   and each entry lighting #3D3D3D -> #FFF with an amber ring on arrival
   (Webflow "Timeline Animation", 56%->63%). */

.tl__wrap { position: relative; }

.tl__rail {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; margin-left: -1.5px;
  background: var(--rail-dim);
}
.tl__rail-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background-image: linear-gradient(180deg, var(--rail-1), var(--rail-2) 65%, var(--rail-3));
}

.tl { list-style: none; margin: 0; padding: 0; position: relative; }

.tl__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr);
  align-items: start;
  padding: 60px 0;
}

.tl__mid { display: flex; justify-content: center; align-self: stretch; }

.tl__dot {
  position: sticky; top: 50vh;
  width: 20px; height: 20px;
  border: 2px solid var(--rail-dim);
  border-radius: 50%;
  background: var(--ink);
  transition: background-color .45s ease, border-color .45s ease, box-shadow .45s ease;
}
.tl__item.is-lit .tl__dot {
  background: #fff;
  border-color: var(--dot-ring);
  box-shadow: 0 0 0 5px var(--dot-glow);
}

.tl__left { text-align: right; padding-right: 34px; }
.tl__right { padding-left: 34px; }

/* Dim until the entry reaches the middle of the screen. */
.tl__left, .tl__right { color: var(--rail-dim); transition: color .45s ease; }
.tl__item.is-lit .tl__left, .tl__item.is-lit .tl__right { color: rgba(255,255,255,.86); }

/* Company / role / dates stacked and right-aligned against hairline rules,
   the way the original laid it out. */
.tl__org {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: .01em; text-transform: uppercase;
  color: inherit; margin: 0 0 10px;
  transition: color .45s ease;
}
.tl__item.is-lit .tl__org { color: #fff; }

.tl__role {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.25;
  letter-spacing: .05em; text-transform: uppercase;
  color: inherit; margin: 0;
  padding: 10px 0;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transition: color .45s ease;
}
.tl__item.is-lit .tl__role { color: #fff; }

.tl__meta {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: .02em;
  margin: 10px 0 0; color: inherit; opacity: .9;
}

.tl__blurb { font-style: italic; margin: 0 0 12px; font-size: 15.5px; opacity: .8; }

.tl__right ul { margin: 0; padding-left: 18px; }
.tl__right li { margin-bottom: 12px; font-size: 16px; }
.tl__right li:last-child { margin-bottom: 0; }

.tl__right strong { color: inherit; font-weight: 700; transition: color .45s ease; }
.tl__item.is-lit .tl__right strong { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .tl__dot, .tl__left, .tl__right, .tl__org, .tl__role, .tl__right strong { transition: none; }
}

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

.projects {
  padding: clamp(70px, 10vw, 130px) 0 clamp(80px, 10vw, 140px);
  background-color: var(--proj-bg, #ffffff);
  color: #fff;
}

.projects .sec-head__num { color: var(--proj-num); }
.projects .sec-head__label { color: var(--proj-label); }
.projects .sec-head__title { color: var(--proj-head); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  padding: 30px 28px;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  background-color: var(--card-scrim);
  background-image: linear-gradient(160deg, hsla(0,0%,100%,.13), hsla(0,0%,100%,.02) 58%);
  border-color: hsla(0, 0%, 100%, .32);
}
.card__icon { font-size: 32px; line-height: 1; margin-bottom: 14px; }
.card__title {
  font-family: var(--sans); font-weight: 700;
  font-size: 24px; letter-spacing: -.01em;
  margin: 0 0 4px; color: #fff;
}
.card__sub {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.78); margin: 0 0 16px;
}
.card p { font-size: 15.5px; line-height: 1.6; margin: 0 0 14px; color: rgba(255,255,255,.95); }
.card strong { color: #fff; font-weight: 700; }

.card:hover { transform: scale(1.05); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; padding: 0; }
.tags li {
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .06em;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
}

.tinker__head {
  text-shadow: 0 1px 14px rgba(10, 6, 40, .3);
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(24px, 3.5vw, 34px);
  margin: clamp(60px, 8vw, 90px) 0 6px; color: #fff;
}
.tinker__intro { margin: 0 0 30px; color: #fff; text-shadow: 0 1px 12px rgba(10, 6, 40, .32); }

.tinker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

.tinker__card {
  display: flex; flex-direction: column;
  padding: 22px 22px 24px;
  background-color: var(--tinker-scrim);
  background-image: linear-gradient(160deg, hsla(0,0%,100%,.13), hsla(0,0%,100%,.02) 58%);
  border-color: hsla(0, 0%, 100%, .32);
  text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s;
}
.tinker__card:hover { transform: translateY(-4px); border-color: #fff; background-color: var(--tinker-hover); }
.tinker__icon { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.tinker__title { font-family: var(--sans); font-weight: 700; font-size: 19px; color: #fff; margin-bottom: 6px; }
.tinker__desc { font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,.94); }

/* ---------------- 04 Toolkit ---------------- */

.toolkit { padding: clamp(70px, 10vw, 130px) 0; background: var(--ink); color: rgba(255,255,255,.86); }

.toolkit__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(34px, 5vw, 64px);
  align-items: start;
}

.toolkit__sub {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 22px;
}

.edu__item { padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.edu__item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.edu__degree { font-family: var(--sans); font-weight: 700; font-size: 19px; color: #fff; margin: 0; }
.edu__school { margin: 4px 0 0; font-size: 15.5px; color: rgba(255,255,255,.8); }
.edu__meta {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .04em;
  color: rgba(255,255,255,.5); margin: 4px 0 0;
}
.edu__courses { font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,.6); margin: 12px 0 0; }

.skills__group { margin-bottom: 22px; }
.skills__group:last-child { margin-bottom: 0; }
.skills__label {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin: 0 0 9px;
}
.tags--dark li { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.9); }

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

.footer {
  position: relative;
  background-image: linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg2) 62%);
  color: var(--ink);
  padding: clamp(50px, 7vw, 80px) 0 40px;
}

/* One thin band of the palette's own colour, and nothing else. */
.footer::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background-image: linear-gradient(90deg, var(--rule-1), var(--rule-2));
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.footer__brand img { width: 124px; }
.footer__copy { font-family: var(--sans); font-size: 12px; letter-spacing: .06em; color: var(--muted); margin: 16px 0 0; }

.footer__head {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}

.footer__col a {
  display: block; margin-bottom: 9px;
  font-size: 15px; text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,.25);
  width: fit-content;
  transition: border-color .18s, color .18s;
}
.footer__col a:hover { color: var(--footer-link); border-color: var(--footer-link); }
.footer__loc { font-size: 15px; color: var(--muted); margin: 12px 0 0; }

/* ---------------- Back to top ---------------- */

.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--ink); font-size: 20px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.totop.is-visible { opacity: 1; pointer-events: auto; }
.totop:hover { transform: translateY(-3px); }

/* ---------------- Reveal ---------------- */

/* Ported from the original action lists: 50px of travel over 1000ms, with
   inOutQuint on the fade and inOutCubic on the move (a-4 / a-5 / a-19 / a-20).
   Default rises from below; --left slides in from the side. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 50px, 0);
  transition: opacity 1s cubic-bezier(.86, 0, .07, 1),
              transform 1s cubic-bezier(.645, .045, .355, 1);
  will-change: opacity, transform;
}
.js .reveal--left { transform: translate3d(-50px, 0, 0); }

.js .reveal.is-in { opacity: 1; transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal--left { opacity: 1; transform: none; transition: none; }
}

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

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__figure { max-width: 280px; margin-inline: auto; order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(5,3,4,.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px var(--gutter) 22px;
    border-top: 1px solid rgba(255,255,255,.12);
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav__cta { text-align: center; margin-top: 14px; border-radius: 6px; }
}

/* Below the 3-column breakpoint the rail moves to the left edge and each
   entry becomes a single stacked column, dot still sticky. */
@media (max-width: 900px) {
  .tl__rail { left: 8px; margin-left: 0; }
  .tl__item {
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 22px;
    padding: 40px 0;
  }
  .tl__mid { grid-column: 1; grid-row: 1 / span 2; justify-content: flex-start; }
  .tl__left { grid-column: 2; grid-row: 1; text-align: left; padding-right: 0; margin-bottom: 14px; }
  .tl__right { grid-column: 2; grid-row: 2; padding-left: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .hero__actions { width: 100%; flex-direction: column; }
  .btn { text-align: center; }
}
