/* ============================================================
   Miles Gullingsrud — professional site
   Visual language: Invisible Technologies design system
   (achromatic core + electric-blue accent + APK type + halftone)
   ============================================================ */

@import url("assets/fonts/fonts.css");

:root {
  /* core */
  --white: #ffffff;
  --carbon: #0f0f0f;

  /* neutrals */
  --n-50:  #f7f7f7;
  --n-100: #efefef;
  --n-200: #dbdbdb;
  --n-300: #c4c4c4;
  --n-500: #9c9c9c;
  --n-600: #757575;
  --n-700: #5a5a5a;
  --n-900: #2b2b2b;

  /* warm neutral (soft sand ramp) */
  --sand-100: #fffdf9;
  --sand-200: #fff3de;
  --sand-300: #fce8c1;
  --sand-400: #e3cfa9;
  --sand-900: #645740;

  /* accent — tweakable */
  --accent: #0c76fe;          /* electric blue 600 */
  --accent-strong: #015fd6;   /* 700 hover */
  --accent-tint: #e6f1ff;     /* 100 */
  --accent-ink: #ffffff;      /* text on accent */

  /* type */
  --display: "Nunito", "Calibri", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Nunito", "Calibri", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* spacing */
  --pad-x: clamp(20px, 6vw, 120px);
  --maxw: 1240px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--display);
  color: var(--carbon);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

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

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.eyebrow.muted { color: var(--n-600); }
.eyebrow.on-dark { color: var(--accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.04; }
h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; }

.lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.5; color: var(--n-700); font-weight: 400; letter-spacing: -0.01em; }

a { color: inherit; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
section { position: relative; }

.section-pad { padding-top: clamp(72px, 9vw, 132px); padding-bottom: clamp(72px, 9vw, 132px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--n-100);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--carbon); }
.brand .mark {
  width: 34px; height: 34px; border: 1.5px solid var(--carbon);
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.04em;
}
.brand .name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.brand .name small { display: block; font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--n-600); margin-top: 1px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--n-700);
  font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color .15s var(--ease);
}
.nav-links a:hover { color: var(--carbon); }
.nav-cta { display: inline-flex; }
@media (max-width: 860px) { .nav-links .anchor { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 22px; border: 1.5px solid var(--carbon);
  background: var(--carbon); color: var(--white);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 16px; height: 16px; }
.btn-sm { padding: 9px 16px; font-size: 11px; }
.btn-ghost { background: transparent; color: var(--carbon); }
.btn-ghost:hover { background: var(--carbon); color: var(--white); border-color: var(--carbon); }
.btn-on-dark { background: var(--white); color: var(--carbon); border-color: var(--white); }
.btn-on-dark:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-outline-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline-dark:hover { background: var(--white); color: var(--carbon); border-color: var(--white); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--white); color: var(--carbon);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--n-100);
}
.hero-pattern {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--white) 38%, var(--sand-200) 78%, var(--sand-300) 100%);
  pointer-events: none;
}
html[data-texture="off"] .hero-pattern { display: none; }
.hero::after { content: none; }
.hero-inner { position: relative; z-index: 2; padding-top: clamp(64px, 10vw, 128px); padding-bottom: clamp(72px, 11vw, 140px); }

.hero-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }
.hero-kicker .who { font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--carbon); }
.hero-kicker .rule { width: 40px; height: 1.5px; background: var(--accent); }
.hero-kicker .role { font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--n-600); }

.hero h1 {
  font-size: clamp(40px, 6.6vw, 92px);
  line-height: 1.0; font-weight: 800; letter-spacing: -0.025em;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 .hl { color: var(--accent); }
.hero .hero-sub { margin-top: 30px; max-width: 56ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--n-700); font-weight: 400; letter-spacing: -0.01em; }

.hero-variant { display: none; }
html[data-hero="thesis"] .hero-variant.v-thesis { display: block; }
html[data-hero="name"]   .hero-variant.v-name   { display: block; }
html[data-hero="role"]   .hero-variant.v-role   { display: block; }

.hero-actions { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta { margin-top: 56px; display: flex; gap: 40px; flex-wrap: wrap; padding-top: 30px; border-top: 1px solid var(--n-200); }
.hero-meta .item .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--n-500); font-weight: 700; }
.hero-meta .item .v { font-size: 16px; color: var(--carbon); margin-top: 4px; }

/* tailored-to-Visa chip */
.tailor-chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--carbon); background: var(--accent); padding: 7px 13px;
}
.tailor-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--carbon); }
html[data-tailored="off"] .tailor-only { display: none !important; }

/* ============================================================
   THESIS / operator-not-advisor
   ============================================================ */
.thesis { background: var(--sand-200); }
.thesis-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 880px) { .thesis-grid { grid-template-columns: 1fr; } }

.thesis h2 { font-size: clamp(30px, 3.8vw, 52px); letter-spacing: -0.03em; margin-top: 22px; max-width: 18ch; }
.thesis h2 .hl { color: var(--accent); }
.thesis .body { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; max-width: 52ch; }
.thesis .body p { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.62; color: var(--n-900); }
.thesis .body strong { font-weight: 500; }

.portrait-wrap { position: relative; }
.portrait-wrap .portrait { width: 100% !important; height: clamp(420px, 42vw, 560px) !important; border: 1.5px solid var(--carbon); }
.portrait-tag {
  position: absolute; left: -1.5px; bottom: -1.5px;
  background: var(--carbon); color: var(--white);
  font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 14px;
}

/* ============================================================
   PROOF POINTS
   ============================================================ */
.sec-head { max-width: 760px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 52px); margin-top: 18px; letter-spacing: -0.03em; }
.sec-head .lead { margin-top: 22px; }

.proof-list { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-direction: column; }
.proof {
  display: grid; grid-template-columns: 56px 1fr; gap: clamp(20px, 3vw, 44px);
  padding: clamp(32px, 4vw, 48px) 0;
  border-top: 1.5px solid var(--carbon);
}
.proof:last-child { border-bottom: 1.5px solid var(--carbon); }
.proof .num { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; color: var(--accent); padding-top: 8px; }
.proof-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(20px, 4vw, 56px); }
@media (max-width: 900px) { .proof-body { grid-template-columns: 1fr; gap: 22px; } .proof { grid-template-columns: 40px 1fr; gap: 16px; } }

.proof h3 { font-size: clamp(23px, 2.4vw, 32px); letter-spacing: -0.025em; line-height: 1.08; }
.proof .ctx { margin-top: 14px; color: var(--n-700); font-size: 16px; line-height: 1.6; }
.proof .ctx .role-line { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--n-500); margin-bottom: 10px; }

.proof-right { display: flex; flex-direction: column; gap: 18px; }
.metric-row { display: flex; gap: 28px; flex-wrap: wrap; }
.metric .figure { font-family: var(--mono); font-weight: 700; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.01em; color: var(--carbon); line-height: 1; }
.metric .label { font-size: 13px; color: var(--n-600); margin-top: 8px; max-width: 22ch; line-height: 1.35; }
.maps {
  margin-top: 4px; display: inline-flex; align-items: flex-start; gap: 9px;
  background: var(--accent-tint); padding: 11px 14px;
  border-left: 3px solid var(--accent);
}
.maps .lbl { font-family: var(--mono); font-weight: 700; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-strong); white-space: nowrap; padding-top: 1px; }
.maps .txt { font-size: 13px; line-height: 1.4; color: var(--n-900); }

/* ============================================================
   CAPABILITIES
   ============================================================ */
.caps { background: var(--carbon); color: var(--white); }
.caps .sec-head h2 { color: var(--white); }
.caps .sec-head .lead { color: var(--n-300); }
.cap-grid { margin-top: clamp(40px, 5vw, 60px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: rgba(255,255,255,0.16); border: 1.5px solid rgba(255,255,255,0.16); }
@media (max-width: 880px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cap-grid { grid-template-columns: 1fr; } }
.cap { background: var(--carbon); padding: clamp(26px, 3vw, 38px); display: flex; flex-direction: column; gap: 16px; transition: background .2s var(--ease); }
.cap:hover { background: #161616; }
.cap .ico { width: 28px; height: 28px; color: var(--accent); }
.cap h4 { font-size: 19px; color: var(--white); letter-spacing: -0.01em; }
.cap p { font-size: 14.5px; line-height: 1.55; color: var(--n-300); }

/* ============================================================
   STAT BAND
   ============================================================ */
.stats { background: var(--accent); color: var(--accent-ink); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 4vw, 48px); }
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; } }
.stat .figure { font-family: var(--mono); font-weight: 700; font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.02em; line-height: 0.95; }
.stat .label { margin-top: 12px; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.85); max-width: 24ch; }
html[data-accent-ink="dark"] .stats .stat .label { color: rgba(15,15,15,0.7); }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.xp-list { margin-top: clamp(40px, 5vw, 60px); }
.xp {
  display: grid; grid-template-columns: 168px 1fr; gap: clamp(20px, 4vw, 56px);
  padding: clamp(26px, 3vw, 38px) 0;
  border-top: 1px solid var(--n-200);
  align-items: baseline;
}
.xp:first-child { border-top: 1.5px solid var(--carbon); }
@media (max-width: 720px) { .xp { grid-template-columns: 1fr; gap: 10px; } }
.xp .when { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; color: var(--n-600); }
.xp .when .now { color: var(--accent); }
.xp .role { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; font-weight: 400; }
.xp .org { font-size: 16px; color: var(--n-700); margin-top: 4px; }
.xp .org .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--n-500); }
.xp .desc { margin-top: 14px; color: var(--n-700); font-size: 15.5px; line-height: 1.6; max-width: 64ch; }
.xp-cred { margin-top: 18px; display: flex; gap: 10px 24px; flex-wrap: wrap; }
.xp-cred .c { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--n-700); }
.xp-cred .c b { color: var(--carbon); font-weight: 700; }

/* education strip */
.edu { margin-top: clamp(36px, 4vw, 52px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: var(--n-200); border: 1px solid var(--n-200); }
@media (max-width: 700px) { .edu { grid-template-columns: 1fr; } }
.edu .e { background: var(--white); padding: 24px; }
.edu .e .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.edu .e .t { font-size: 17px; margin-top: 10px; letter-spacing: -0.01em; }
.edu .e .m { font-size: 13px; color: var(--n-600); margin-top: 6px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--carbon); color: var(--white); overflow: hidden; position: relative; }
.contact-pattern { display: none; }
.contact-inner { position: relative; z-index: 2; }
.contact h2 { font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.03em; max-width: 18ch; }
.contact h2 .hl { color: var(--accent); }
.contact .close-note { margin-top: 28px; max-width: 60ch; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--n-300); }
.contact .close-note strong { color: var(--white); font-weight: 500; }
.contact-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.contact-details { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.15); display: flex; gap: 48px; flex-wrap: wrap; }
.cd .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--n-500); }
.cd a, .cd .v { display: block; margin-top: 6px; font-size: 17px; color: var(--white); text-decoration: none; letter-spacing: -0.01em; }
.cd a:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: var(--carbon); color: var(--n-500); border-top: 1px solid rgba(255,255,255,0.1); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.foot .fname { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--n-300); }
.foot .fnote { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--n-600); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
