﻿/* ============================================================
   Trevyn Miller — personal site
   "Engineer in the wild" — bold editorial, riso color palette
   ============================================================ */

:root {
  /* surfaces — clean COOL white (light theme) */
  --paper:    oklch(0.985 0.003 255);
  --paper-2:  oklch(0.958 0.006 262);
  --ink:      oklch(0.205 0.016 278);
  --ink-soft: oklch(0.46 0.014 272);
  --line:     oklch(0.205 0.016 278 / 0.15);
  --line-2:   oklch(0.205 0.016 278 / 0.07);

  /* aurora family — cohesive cool spectrum: magenta → violet → indigo → cyan → sky */
  --coral:  oklch(0.585 0.215 338);  /* magenta  (light-on)  */
  --violet: oklch(0.555 0.205 300);  /* electric violet      */
  --blue:   oklch(0.555 0.180 264);  /* indigo               */
  --lime:   oklch(0.820 0.130 200);  /* cyan     (dark-on)    */
  --gold:   oklch(0.800 0.135 232);  /* sky      (dark-on)    */
  --pink:   oklch(0.620 0.245 354);  /* hot pink — the accent */

  /* fixed dark text for the light-colored blocks (cyan / sky) */
  --on-bright: oklch(0.18 0.02 288);

  /* role accent — what most CTAs/links use; remappable by tweaks */
  --accent: var(--pink);
  --accent-on: oklch(0.99 0.004 320);

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 72px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --r: 18px;
  --shadow-hard: 6px 6px 0 var(--ink);
}

/* ---- midnight theme (DEFAULT) — deep cool charcoal ---- */
[data-theme="midnight"] {
  --paper:    oklch(0.205 0.020 286);
  --paper-2:  oklch(0.252 0.024 286);
  --ink:      oklch(0.965 0.006 286);
  --ink-soft: oklch(0.70 0.018 286);
  --line:     oklch(0.965 0.006 286 / 0.15);
  --line-2:   oklch(0.965 0.006 286 / 0.07);
  --coral:  oklch(0.645 0.225 338);  /* magenta */
  --violet: oklch(0.625 0.205 300);
  --blue:   oklch(0.640 0.180 264);  /* indigo  */
  --lime:   oklch(0.840 0.130 200);  /* cyan    */
  --gold:   oklch(0.820 0.140 232);  /* sky     */
  --pink:   oklch(0.700 0.245 354);
  --shadow-hard: 6px 6px 0 oklch(0 0 0 / 0.55);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

/* atmospheric aurora glow behind everything (fixed to viewport) */
[data-theme="midnight"] body {
  background-image:
    radial-gradient(52% 50% at 4% -6%,  oklch(0.66 0.250 354 / 0.40), transparent 72%),
    radial-gradient(50% 46% at 101% 4%, oklch(0.64 0.210 300 / 0.36), transparent 72%),
    radial-gradient(55% 52% at 90% 86%, oklch(0.62 0.195 264 / 0.32), transparent 74%),
    radial-gradient(46% 46% at 0% 100%, oklch(0.84 0.145 200 / 0.22), transparent 74%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
[data-theme="paper"] body {
  background-image:
    radial-gradient(45% 40% at 5% -3%,  oklch(0.62 0.245 354 / 0.11), transparent 70%),
    radial-gradient(42% 40% at 99% 7%,  oklch(0.58 0.200 300 / 0.09), transparent 70%),
    radial-gradient(50% 46% at 90% 90%, oklch(0.58 0.190 264 / 0.09), transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

/* ---- shared type ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

section { padding-block: clamp(72px, 11vw, 150px); position: relative; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gut);
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--paper) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, padding .3s;
}
.nav.scrolled { border-bottom-color: var(--line); padding-block: 10px; }
.nav__brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -0.01em; font-size: 17px;
}
.nav__mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: -0.03em;
}
.nav__links { display: flex; gap: 4px; align-items: center; }
.nav__links a {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.02em; padding: 8px 13px; border-radius: 9px;
  color: var(--ink-soft); transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--ink); background: var(--line-2); }
.btn {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 99px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper); white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--accent, .nav__links a.btn--accent { background: var(--accent); color: #fff; }
.btn--game, .nav__links a.btn--game { background: #ee1111; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--lg { padding: 16px 26px; font-size: 15px; }
@media (max-width: 760px){ .nav__links a:not(.btn){ display: none; } }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: clamp(120px, 17vh, 200px); padding-bottom: clamp(48px,7vw,96px); }
.hero__grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.hero__status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--ink-soft); padding: 7px 13px 7px 11px;
  border: 1px solid var(--line); border-radius: 99px; margin-bottom: 26px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--lime) 70%, transparent);
  animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 color-mix(in oklab,var(--lime) 60%,transparent);}
  70%{box-shadow:0 0 0 9px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(54px, 11.5vw, 138px); line-height: 0.86;
  letter-spacing: -0.04em; margin-bottom: 22px;
}
.hero h1 .l2 { color: var(--accent); }
.hero__role {
  font-family: var(--font-mono); font-size: clamp(14px,1.7vw,18px);
  letter-spacing: 0.02em; color: var(--ink); margin-bottom: 20px;
}
.hero__role b { color: var(--ink); }
.hero__lede {
  font-size: clamp(17px, 1.9vw, 21px); max-width: 38ch;
  color: var(--ink-soft); margin-bottom: 30px; text-wrap: pretty;
}
.hero__cta { display: flex; gap: 13px; flex-wrap: wrap; }

/* photo column */
.hero__photo { position: relative; justify-self: center; }
.hero__photo .block {
  position: absolute; inset: 0; border-radius: var(--r);
  transform: rotate(-3deg) translate(16px, 16px); background: var(--blue);
  z-index: 0;
}
.hero__photo .photo-slot {
  position: relative; z-index: 1;
  width: clamp(284px, 36.5vw, 446px); height: clamp(350px, 45vw, 550px);
  border: 2px solid var(--ink); border-radius: var(--r);
  box-shadow: var(--shadow-hard);
  object-fit: cover; display: block;
}
.hero__tag {
  position: absolute; z-index: 2; bottom: -14px; left: -16px;
  background: var(--gold); color: var(--on-bright);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 8px 13px; border: 2px solid var(--ink); border-radius: 99px;
  box-shadow: 3px 3px 0 var(--ink); white-space: nowrap;
}
@media (max-width: 860px){
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { justify-self: start; margin-top: 8px; }
}

/* marquee strip */
.marquee {
  border-block: 1px solid var(--line); overflow: hidden;
  padding-block: 16px; white-space: nowrap; margin-top: clamp(40px,6vw,72px);
}
.marquee__track { display: inline-flex; gap: 0; animation: scroll 34s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px,2.6vw,30px); letter-spacing: -0.02em;
  padding-inline: 26px; color: var(--ink);
}
.marquee span i { color: var(--accent); font-style: normal; }
.marquee .sep { color: var(--ink-soft); }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .marquee__track{ animation: none; } }

/* =========================================================
   IMPACT METRICS
   ========================================================= */
.metrics__grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 14px; margin-top: 44px;
}
.metric {
  grid-column: span 2; border: 2px solid var(--ink); border-radius: var(--r);
  padding: 26px 24px 22px; background: var(--paper);
  transition: transform .25s ease, box-shadow .25s ease;
}
.metric:nth-child(1){ background: var(--coral); color: #fff; border-color: transparent; }
.metric:nth-child(2){ background: var(--blue); color: #fff; border-color: transparent; }
.metric:nth-child(3){ background: var(--lime); color: var(--on-bright); border-color: transparent; }
.metric:nth-child(4){ grid-column: span 3; }
.metric:nth-child(5){ grid-column: span 3; }
.metric:hover { transform: translateY(-5px); box-shadow: var(--shadow-hard); }
.metric .num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(38px, 5vw, 62px); line-height: 0.92; letter-spacing: -0.035em;
}
.metric .num .suf { font-size: 0.55em; }
.metric .lbl { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em;
  margin-top: 10px; opacity: 0.92; }
@media (max-width: 880px){
  .metrics__grid { grid-template-columns: repeat(2, 1fr); }
  .metric, .metric:nth-child(4), .metric:nth-child(5){ grid-column: span 1; }
}

/* =========================================================
   EXPERIENCE TIMELINE
   ========================================================= */
.exp__head { display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 52px; }
.exp__head p { color: var(--ink-soft); max-width: 40ch; }

.tl { position: relative; }
.tl::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.role { position: relative; padding-left: 44px; padding-bottom: 46px; }
.role:last-child { padding-bottom: 0; }
.role__node {
  position: absolute; left: 0; top: 5px; width: 16px; height: 16px;
  border-radius: 50%; border: 3px solid var(--paper);
  background: var(--accent); box-shadow: 0 0 0 2px var(--accent);
}
.role__top { display: flex; justify-content: space-between; gap: 16px;
  align-items: baseline; flex-wrap: wrap; }
.role__title { font-family: var(--font-display); font-weight: 700;
  font-size: clamp(21px,2.6vw,30px); letter-spacing: -0.02em; }
.role__co { color: var(--ink-soft); font-size: 15px; margin-top: 3px; }
.role__co b { color: var(--ink); font-weight: 600; }
.role__date { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em;
  color: var(--ink-soft); white-space: nowrap; }
.role ul { list-style: none; margin-top: 16px; display: grid; gap: 10px; max-width: 75ch; }
.role li { position: relative; padding-left: 22px; color: var(--ink-soft);
  font-size: 15.5px; text-wrap: pretty; }
.role li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.role li b { color: var(--ink); font-weight: 600; }

/* =========================================================
   SKILLS
   ========================================================= */
.skills { background: color-mix(in oklab, var(--paper-2) 86%, transparent); }
.skills__grid { display: grid; grid-template-columns: repeat(2,1fr);
  gap: 16px; margin-top: 44px; }
.skillcard { border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 24px 24px 26px; background: var(--paper); }
.skillcard h3 { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px;
  display: flex; align-items: center; gap: 9px; }
.skillcard h3::before { content:""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag { font-family: var(--font-body); font-size: 14.5px; font-weight: 500;
  padding: 7px 13px; border-radius: 9px; background: var(--paper-2);
  border: 1px solid var(--line); transition: transform .18s, background .18s, color .18s; }
.tag:hover { transform: translateY(-2px); background: var(--c); color: #fff;
  border-color: transparent; }
@media (max-width: 720px){ .skills__grid { grid-template-columns: 1fr; } }

/* =========================================================
   LEADERSHIP
   ========================================================= */
.lead__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 44px; }
.leadcard { border: 2px solid var(--ink); border-radius: var(--r); padding: 26px 24px;
  background: var(--paper); transition: transform .25s, box-shadow .25s; }
.leadcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-hard); }
.leadcard .ic { font-family: var(--font-display); font-weight: 700; font-size: 30px;
  width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center;
  background: var(--c); color: #fff; margin-bottom: 18px; }
.leadcard h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em; margin-bottom: 8px; }
.leadcard p { color: var(--ink-soft); font-size: 15px; text-wrap: pretty; }
@media (max-width: 900px){ .lead__grid { grid-template-columns: 1fr; } }

/* =========================================================
   LIFE / HOBBIES
   ========================================================= */
.life { background: color-mix(in oklab, var(--paper-2) 86%, transparent); }
.life__intro { color: var(--ink-soft);
  max-width: 46ch; margin-top: 18px; font-size: 18px; }
.life__grid { display: grid; grid-template-columns: repeat(4,1fr);
  grid-auto-rows: 150px; gap: 14px; margin-top: 46px; }
.tile { border-radius: var(--r); padding: 20px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .3s ease; cursor: default; }
.tile:hover { transform: translateY(-6px) rotate(-0.6deg); }
.tile h4 { font-family: var(--font-display); font-weight: 700; font-size: 23px;
  letter-spacing: -0.02em; line-height: 1; }
.tile span { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  opacity: 0.85; margin-top: 7px; }
.tile--lg { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile .corner { position: absolute; top: 16px; right: 18px; font-family: var(--font-mono);
  font-size: 12px; opacity: 0.6; }
.t-blue{ background: var(--blue); color:#fff;} .t-coral{ background: var(--coral); color:#fff;}
.t-lime{ background: var(--lime); color: var(--on-bright);} .t-violet{ background: var(--violet); color:#fff;}
.t-gold{ background: var(--gold); color: var(--on-bright);}
.tile .photo-slot { position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: var(--r); z-index: 0; object-fit: cover; }
.tile.has-slot h4, .tile.has-slot span { position: relative; z-index: 2;
  text-shadow: 0 1px 14px rgba(0,0,0,.5); color: #fff; }
.tile.has-slot::after { content:""; position:absolute; inset:0; z-index:1;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.5)); border-radius: var(--r); }
@media (max-width: 820px){ .life__grid { grid-template-columns: repeat(2,1fr); }
  .tile--lg{ grid-row: span 1; } }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { text-align: center; }
.contact .section-title { font-size: clamp(40px, 8vw, 104px); margin-block: 12px 8px; }
.contact h2 .l2 { color: var(--accent); }
.contact p { color: var(--ink-soft); font-size: 18px; max-width: 44ch; margin: 0 auto 36px; }
.contact__cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.contact__meta { margin-top: 40px; font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.03em; color: var(--ink-soft); display: flex; gap: 20px;
  justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { border-top: 1px solid var(--line); padding-block: 30px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.03em; color: var(--ink-soft); }
.footer a:hover { color: var(--accent); }
.totop { cursor: pointer; }

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.settled { transition: none; }
.reveal[data-d="1"]{ transition-delay: .08s; }
.reveal[data-d="2"]{ transition-delay: .16s; }
.reveal[data-d="3"]{ transition-delay: .24s; }
.reveal[data-d="4"]{ transition-delay: .32s; }
@media (prefers-reduced-motion: reduce){
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== calm motion (tweak) ===== */
.calm .marquee__track { animation: none; }
.calm .dot { animation: none; }
.calm .reveal { transition-duration: .3s; }
.calm .tile:hover, .calm .metric:hover, .calm .leadcard:hover { transform: none; box-shadow: none; }
.calm .btn:hover, .calm .tag:hover { transform: none; }
