/* ============================================================
   Justin Dillingham — personal brand site
   "Warm editorial light" design system
   ============================================================ */

:root {
  /* Accent (tweakable) — emerald = growth */
  --accent: #0f7a63;
  --accent-2: #11906f;
  --accent-soft: #e3efe9;
  --accent-ink: #ffffff;

  /* Light base */
  --bg:       #f5f2ea;   /* warm ivory */
  --bg-alt:   #ece6d8;   /* sand (alt sections) */
  --surface:  #ffffff;   /* cards */
  --surface-2:#fbf9f3;
  --line:     rgba(26, 27, 30, 0.12);
  --line-2:   rgba(26, 27, 30, 0.20);

  /* Type */
  --ink:    #1a1c20;     /* primary */
  --ink-2:  #4f535b;     /* secondary */
  --ink-3:  #82868f;     /* faint */

  /* Dark closing block */
  --dark:      #14201c;
  --dark-text: #eef2ee;
  --dark-dim:  #9fb0a7;
  --dark-line: rgba(255,255,255,0.12);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.eyebrow.center { justify-content: center; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; margin: 0; }

.h-section {
  font-size: clamp(34px, 5.2vw, 60px);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead { color: var(--ink-2); font-size: clamp(18px, 2vw, 21px); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .25s, color .25s, border-color .25s;
}
.btn .arr { transition: transform .3s cubic-bezier(.2,.7,.3,1); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-2); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gut);
  transition: background .35s, border-color .35s, padding .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  padding-block: 13px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 11px;
}
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; letter-spacing: -0.03em;
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--font-display);
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  letter-spacing: -0.01em; position: relative; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0;
  background: var(--accent); transition: width .28s cubic-bezier(.2,.7,.3,1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: inline-flex; }
@media (max-width: 820px) {
  .nav-links .nlink { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 124px; padding-bottom: clamp(40px, 7vw, 90px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: 0;
  top: -8%; right: -6%; width: 56vw; height: 56vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 6vw, 76px);
  align-items: center;
}
.hero-name {
  font-size: clamp(52px, 9vw, 116px);
  line-height: 0.92; letter-spacing: -0.045em; margin: 18px 0 0;
}
.hero-name .ln2 { color: var(--accent); }
.hero-role {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(17px, 2.1vw, 22px); color: var(--ink);
  margin: 26px 0 0; letter-spacing: -0.01em; max-width: 30ch;
}
.hero-role b { color: var(--accent); font-weight: 600; }
.hero-desc { margin: 18px 0 0; color: var(--ink-2); max-width: 46ch; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* hero meta — quick credential row (editorial / centered layouts) */
.hero-meta { display: none; gap: 0; margin-top: 46px; border-top: 1px solid var(--line); padding-top: 26px; }
.hero-meta .hm { padding-right: 38px; margin-right: 38px; border-right: 1px solid var(--line); }
.hero-meta .hm:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-meta .hm-k { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.hero-meta .hm-v { font-family: var(--font-display); font-weight: 600; font-size: clamp(15px, 1.7vw, 18px); letter-spacing: -0.01em; color: var(--ink); }

/* ---- LAYOUT: editorial (text-first, no hero photo) ---- */
.hero[data-layout="editorial"] .hero-grid { grid-template-columns: 1fr; }
.hero[data-layout="editorial"] .portrait-wrap { display: none; }
.hero[data-layout="editorial"] .hero-copy { max-width: 920px; }
.hero[data-layout="editorial"] .hero-name { font-size: clamp(56px, 12vw, 150px); }
.hero[data-layout="editorial"] .hero-role { max-width: 34ch; }
.hero[data-layout="editorial"] .hero-meta { display: flex; flex-wrap: wrap; row-gap: 18px; }

/* ---- LAYOUT: centered (text-first, centered, no hero photo) ---- */
.hero[data-layout="centered"] { text-align: center; padding-top: 150px; }
.hero[data-layout="centered"] .hero-grid { grid-template-columns: 1fr; justify-items: center; }
.hero[data-layout="centered"] .portrait-wrap { display: none; }
.hero[data-layout="centered"] .hero-copy { max-width: 880px; }
.hero[data-layout="centered"] .eyebrow { justify-content: center; }
.hero[data-layout="centered"] .hero-name { font-size: clamp(56px, 11vw, 140px); }
.hero[data-layout="centered"] .hero-role,
.hero[data-layout="centered"] .hero-desc { margin-left: auto; margin-right: auto; }
.hero[data-layout="centered"] .hero-actions { justify-content: center; }
.hero[data-layout="centered"] .hero-meta { display: flex; justify-content: center; flex-wrap: wrap; row-gap: 18px; }

/* ---- LAYOUT: split (original — photo right) ---- */
.hero[data-layout="split"] .hero-meta { display: none; }

/* portrait — tall environmental shot */
.portrait-wrap { position: relative; justify-self: center; width: 100%; max-width: 440px; }
.portrait {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3.4 / 4.4;
  background: var(--bg-alt);
  box-shadow: 0 30px 60px -30px rgba(20,32,28,0.45);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.portrait-tag {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  background: color-mix(in srgb, #ffffff 82%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 15px;
  display: flex; align-items: center; gap: 11px;
  box-shadow: 0 10px 24px -12px rgba(20,32,28,0.3);
}
.portrait-tag .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.portrait-tag .t1 { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); }
.portrait-tag .t2 { font-size: 12.5px; color: var(--ink-2); }
.portrait-frame {
  position: absolute; z-index: -1; inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--accent); border-radius: 18px; opacity: 0.5;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait-wrap { grid-row: 1; max-width: 330px; }
  .portrait-frame { inset: 14px -14px -14px 14px; }
}

/* ---------- credibility marquee ---------- */
.cred {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-block: 26px; overflow: hidden; position: relative; z-index: 1;
}
.cred .lab {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
  text-align: center; margin-bottom: 18px;
}
.cred-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: clamp(22px, 5vw, 60px);
}
.cred-row span {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(16px, 2vw, 22px);
  color: var(--ink-3); letter-spacing: -0.01em; transition: color .25s;
}
.cred-row span:hover { color: var(--ink); }

/* ============================================================
   ABOUT (sand)
   ============================================================ */
.paper { background: var(--bg-alt); color: var(--ink); }

.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.about-media { position: sticky; top: 100px; }
.about-photo {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4 / 4.7; background: var(--bg);
  box-shadow: 0 30px 60px -34px rgba(20,32,28,0.45);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.about-statement {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px); line-height: 1.22; letter-spacing: -0.02em;
  text-wrap: balance; margin-top: 26px;
}
.about-statement em { font-style: normal; color: var(--accent); }
.about-body p { color: var(--ink-2); font-size: 18px; margin: 0 0 18px; }
.about-body p:first-child { margin-top: 4px; }
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--ink); font-weight: 600; }
.about-meta { margin-top: 30px; display: flex; gap: 40px; flex-wrap: wrap; }
.about-meta .k { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.about-meta .v { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-media { position: static; }
  .about-photo { aspect-ratio: 16 / 12; max-width: 420px; }
}

/* ============================================================
   FOCUS cards
   ============================================================ */
.focus-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }
.focus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 26px 28px; position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s, box-shadow .3s;
  box-shadow: 0 1px 0 rgba(26,27,30,0.02);
}
.fcard:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 24px 50px -28px rgba(20,32,28,0.35); }
.fcard .num {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 18px;
}
.fcard .ico { width: 40px; height: 40px; margin-bottom: 18px; color: var(--accent); }
.fcard h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 11px; }
.fcard p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.fcard::after {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s cubic-bezier(.2,.7,.3,1);
}
.fcard:hover::after { width: 100%; }
@media (max-width: 1000px) { .focus-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .focus-grid { grid-template-columns: 1fr; } }

/* ============================================================
   EXPERIENCE timeline
   ============================================================ */
.exp-list { display: flex; flex-direction: column; }
.exp {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 30px; align-items: baseline;
  padding: 34px 0; border-top: 1px solid var(--line);
  transition: padding-left .3s; position: relative;
}
.exp:last-child { border-bottom: 1px solid var(--line); }
.exp::before {
  content: ""; position: absolute; left: -1px; top: -1px; height: calc(100% + 2px); width: 0;
  background: var(--accent); opacity: 0; transition: opacity .3s;
}
.exp:hover { padding-left: 22px; }
.exp:hover::before { opacity: 0.08; width: 100%; }
.exp .when { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--accent); letter-spacing: 0.02em; }
.exp .role { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.02em; }
.exp .org { color: var(--ink-2); font-size: 15.5px; margin-top: 4px; }
.exp .desc { color: var(--ink-2); font-size: 16px; margin-top: 12px; max-width: 60ch; }
.exp .tag {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; white-space: nowrap;
}
@media (max-width: 760px) {
  .exp { grid-template-columns: 1fr; gap: 8px; }
  .exp .tag { display: none; }
}

/* ============================================================
   MEDIA / press cards
   ============================================================ */
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mcard {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 28px 26px; transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s, box-shadow .3s;
}
.mcard:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 24px 50px -28px rgba(20,32,28,0.35); }
.mcard-top { display: flex; align-items: center; justify-content: space-between; }
.mcard .pub {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.mcard .arr-ico { color: var(--ink-3); transition: transform .3s, color .3s; }
.mcard:hover .arr-ico { transform: translate(3px, -3px); color: var(--accent); }
.mcard h3 { font-size: 19.5px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.mcard .meta { color: var(--ink-3); font-size: 14px; margin-top: auto; }
@media (max-width: 720px) { .media-grid { grid-template-columns: 1fr; } }

/* profile chips */
.profiles { margin-top: 44px; }
.profiles .lab { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 500; font-size: 14.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; transition: all .25s; background: var(--surface);
}
.chip:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); transition: background .25s; }
.chip:hover .d { background: var(--accent); }

/* ============================================================
   CONTACT — dark emerald closing block
   ============================================================ */
.contact { background: var(--dark); color: var(--dark-text); }
.contact .eyebrow { color: var(--accent-2); }
.contact .eyebrow::before { background: var(--accent-2); }
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.contact-intro { display: flex; align-items: center; gap: 26px; }
.contact-portrait { flex-shrink: 0; width: clamp(96px, 12vw, 132px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 2px solid var(--accent-2); box-shadow: 0 16px 36px -18px rgba(0,0,0,0.5); }
.contact-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 48% top; transform: scale(3.3); transform-origin: 48% 30%; }
.contact h2 { font-size: clamp(40px, 6.5vw, 84px); letter-spacing: -0.04em; line-height: 0.96; }
.contact h2 em { font-style: normal; color: var(--accent-2); }
.contact .lead { margin-top: 22px; color: var(--dark-dim); }
.contact-actions { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--dark-line); border-radius: 16px; padding: 26px;
  display: flex; align-items: center; gap: 18px; transition: all .3s;
}
.contact-card:hover { border-color: var(--accent-2); transform: translateX(4px); background: rgba(255,255,255,0.07); }
.contact-card .ci { width: 46px; height: 46px; border-radius: 11px; background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; }
.contact-card .ck { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dark-dim); }
.contact-card .cv { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; margin-top: 3px; word-break: break-word; color: var(--dark-text); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } .contact-intro { flex-direction: column; align-items: flex-start; gap: 20px; } }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { padding: 40px var(--gut); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: var(--bg); }
.foot .c { color: var(--ink-3); font-size: 14px; }
.foot .fl { display: flex; gap: 26px; }
.foot .fl a { font-family: var(--font-display); font-size: 14px; color: var(--ink-2); transition: color .2s; }
.foot .fl a:hover { color: var(--accent); }

/* ============================================================
   scroll reveal — gated on .anim (added only when the browser paints)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1); }
  .anim .reveal.in { opacity: 1; transform: none; }
  .anim .reveal[data-d="1"] { transition-delay: .08s; }
  .anim .reveal[data-d="2"] { transition-delay: .16s; }
  .anim .reveal[data-d="3"] { transition-delay: .24s; }
}

/* tweaks mount */
#tweaks-root { position: fixed; z-index: 9999; }
