/* =========================================================
   Tanner Wilburn — personal site
   Aesthetic: editorial / Squarespace-modern
   Light-mode default · warm cream surfaces · single warm accent
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* type */
  --font-sans: "Switzer", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --fs-eyebrow: 0.78rem;
  --fs-body: 1.0625rem;       /* 17px — Squarespace tends to use slightly larger body */
  --fs-lede: 1.25rem;
  --fs-h3: 1.5rem;
  --fs-h2: clamp(2rem, 4.2vw, 3.4rem);
  --fs-hero: clamp(3rem, 8.5vw, 7.5rem);

  --lh-tight: 1.02;
  --lh-snug: 1.18;
  --lh-body: 1.6;

  /* spacing */
  --container: 1240px;
  --container-narrow: 960px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(96px, 12vw, 180px);

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* light palette — warm cream / paper, charcoal text, muted warm clay accent */
  --bg: #f3ede4;             /* warm cream */
  --bg-elev: #faf6f0;        /* card surface, slightly lighter */
  --bg-sunken: #ece4d6;      /* recessed band */
  --ink: #1c1b1a;            /* near-black with warm undertone */
  --ink-2: #3a3833;
  --ink-3: #6b665e;
  --ink-4: #98928a;
  --hairline: #d9d0c0;
  --hairline-soft: #e4dccd;

  --accent: #b85c3b;         /* warm terracotta / clay */
  --accent-deep: #8f4124;
  --accent-soft: #f3d8c8;    /* peachy wash */
  --accent-tint: #f7e6d9;

  --shadow-sm: 0 1px 2px rgba(28, 27, 26, 0.04), 0 1px 1px rgba(28, 27, 26, 0.03);
  --shadow-md: 0 10px 24px -12px rgba(28, 27, 26, 0.18), 0 2px 6px rgba(28, 27, 26, 0.04);
  --shadow-lg: 0 30px 60px -28px rgba(28, 27, 26, 0.30), 0 8px 18px -12px rgba(28, 27, 26, 0.10);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #161514;
  --bg-elev: #1f1d1b;
  --bg-sunken: #100f0e;
  --ink: #f3ede4;
  --ink-2: #d8d1c5;
  --ink-3: #a8a297;
  --ink-4: #79746b;
  --hairline: #2b2925;
  --hairline-soft: #221f1c;

  --accent: #d8784f;
  --accent-deep: #b85c3b;
  --accent-soft: #3a2519;
  --accent-tint: #2a1c14;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, 0.7);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sr-only:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  z-index: 999;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transform-origin: left;
}

/* Ambient — kept very subtle, only a soft warm wash in upper-right */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.orb-1 {
  width: 520px; height: 520px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
}
.orb-2 {
  width: 460px; height: 460px;
  bottom: -200px; left: -160px;
  background: radial-gradient(circle, var(--accent-tint) 0%, transparent 70%);
  opacity: 0.4;
}
.noise { display: none; }
[data-theme="dark"] .orb-1,
[data-theme="dark"] .orb-2 { opacity: 0.35; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--hairline-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand-mark { color: var(--ink); }
.brand-mark path[stroke="var(--color-primary)"] { stroke: var(--accent); }
.brand-text {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-list {
  display: flex;
  gap: 36px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-list a {
  font-size: 0.92rem;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.nav-list a:hover { color: var(--ink); }
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.35s var(--ease);
}
.nav-list a:hover::after { right: 0; }

@media (max-width: 720px) {
  .nav-list { display: none; }
}

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  transform: rotate(20deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(80px, 12vw, 140px);
  padding-bottom: clamp(60px, 8vw, 100px);
  z-index: 1;
}
.grid-bg { display: none; }

.hero-inner { position: relative; z-index: 2; }

.eyebrow {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 36px;
  font-weight: 500;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 8%, transparent); }
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.018em;
  margin: 0 0 56px;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.hero-title .line { display: block; }
.hero-title-alt {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}
.hero-title .word {
  display: inline-block;
  will-change: transform;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
  margin-bottom: 80px;
}
@media (max-width: 880px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.hero-copy { max-width: 56ch; }

.hero-lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 32px;
  letter-spacing: -0.005em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink-3);
  background: var(--bg-elev);
}

/* Hero portrait — soft frame, no harsh ring */
.hero-portrait {
  margin: 0;
  display: flex;
  justify-content: center;
}
.portrait-frame {
  position: relative;
  width: min(380px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-elev);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 1.2s var(--ease);
}
.portrait-frame:hover img { transform: scale(1.03); }
.portrait-ring { display: none; }

.portrait-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline-soft);
}
.portrait-tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Hero meta strip */
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  padding-top: 32px;
  border-top: 1px solid var(--hairline-soft);
}
.hero-meta > div {
  padding-right: 24px;
}
.hero-meta > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--hairline-soft);
}
.hero-meta dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin: 0 0 6px;
  font-weight: 500;
}
.hero-meta dd {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink-2);
}
@media (max-width: 720px) {
  .hero-meta {
    grid-template-columns: 1fr;
  }
  .hero-meta > div { padding: 14px 0; border-left: 0 !important; border-top: 1px solid var(--hairline-soft); }
  .hero-meta > div:first-child { border-top: 0; padding-top: 0; }
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-cue-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}
@media (max-width: 720px) { .scroll-cue { display: none; } }

/* ---------- Practice band — editorial numbered list ---------- */
.practice-band {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.practice-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 40%, color-mix(in srgb, var(--accent) 6%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.practice-band > .container { position: relative; z-index: 1; }

.practice-band-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.practice-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.practice-rule {
  height: 1px;
  background: var(--hairline);
  width: 100%;
}
.practice-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.practice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.practice-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: baseline;
  gap: 32px;
  padding: clamp(22px, 3vw, 34px) 0;
  border-top: 1px solid var(--hairline);
  position: relative;
  cursor: default;
  transition: padding-left 0.5s var(--ease);
}
.practice-item:last-child { border-bottom: 1px solid var(--hairline); }

.practice-item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.practice-item:hover::before { opacity: 1; }
.practice-item:hover { padding-left: 16px; }

.practice-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  transition: transform 0.5s var(--ease), letter-spacing 0.5s var(--ease);
  transform-origin: left center;
}
.practice-item:hover .practice-num {
  transform: scale(1.4);
  letter-spacing: 0.22em;
}

.practice-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 5.5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.4s var(--ease), transform 0.5s var(--ease);
  display: inline-block;
}
.practice-item:hover .practice-name {
  color: var(--accent);
}

.practice-arrow {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--ink-3);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.4s var(--ease);
}
.practice-item:hover .practice-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

@media (max-width: 720px) {
  .practice-band-head { grid-template-columns: auto 1fr; }
  .practice-count { display: none; }
  .practice-item { grid-template-columns: 60px 1fr; gap: 16px; }
  .practice-arrow { display: none; }
  .practice-item:hover { padding-left: 8px; }
}

/* ---------- Two-col section pattern ---------- */
.two-col {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(40px, 6vw, 96px);
}
@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

.col-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  position: sticky;
  top: 100px;
  align-self: start;
  font-weight: 500;
}
@media (max-width: 880px) {
  .col-label { position: static; flex-direction: row; gap: 16px; }
}
.section-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  text-transform: none;
}
.section-name { line-height: 1.4; }

.col-content > * + * { margin-top: 1.1em; }

.section-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  color: var(--ink);
  max-width: 22ch;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.section-title-wide { max-width: 26ch; }

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* About paragraphs */
.section-about p {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}
.link {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  transition: color 0.2s var(--ease);
}
.link:hover { color: var(--accent); }

.creds {
  list-style: none;
  padding: 32px 0 0;
  margin: 8px 0 0;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.creds li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 18px;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.creds-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- Focus grid ---------- */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
}
@media (max-width: 720px) {
  .focus-grid { grid-template-columns: 1fr; }
}
.focus-card {
  background: var(--bg-elev);
  padding: clamp(28px, 4vw, 44px);
  position: relative;
  transition: background 0.3s var(--ease);
}
.focus-card:hover { background: color-mix(in srgb, var(--bg-elev) 85%, var(--accent-tint)); }
.focus-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 24px;
}
.focus-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.focus-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ---------- Work / preview cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1080px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-card {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  color: inherit;
}
a.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--hairline);
}

.work-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}
.tag-with-icon svg { color: var(--ink-3); }

.arrow-link {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.arrow-link:hover { color: var(--accent); }

.arrow {
  font-size: 1.05rem;
  color: var(--ink-3);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
a.work-card:hover .arrow { transform: translate(2px, -2px); color: var(--accent); }

.work-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  color: var(--ink);
}
.work-card > p,
.work-card-lede {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.55;
}

.work-card-link {
  margin-top: auto;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.work-card-link::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}
a.work-card:hover .work-card-link::after { transform: translateX(3px); }

/* Spotify embed */
.spotify-embed {
  border-radius: 14px;
  overflow: hidden;
  margin-top: auto;
  background: var(--bg-sunken);
}
.spotify-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
}

/* Profile preview — LinkedIn-style */
.profile-preview {
  margin-top: auto;
  background: var(--bg);
  border: 1px solid var(--hairline-soft);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.profile-preview-linkedin .profile-preview-cover {
  height: 64px;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-deep) 60%, #6a3324 100%);
  position: relative;
}
.profile-preview-linkedin .profile-preview-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, color-mix(in srgb, #fff 25%, transparent) 0%, transparent 45%);
}
.profile-preview-linkedin .profile-preview-avatar {
  position: absolute;
  top: 28px;
  left: 18px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  object-fit: cover;
  object-position: center 18%;
  box-shadow: var(--shadow-sm);
}
.profile-preview-linkedin .profile-preview-body {
  padding: 44px 18px 18px;
}
.profile-preview-name {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.profile-preview-role {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.4;
}
.profile-preview-loc {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--ink-3);
}
.profile-preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

/* Profile preview — GitHub */
.profile-preview-github {
  padding: 16px 16px 14px;
}
.profile-preview-gh-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.profile-preview-avatar-gh {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  object-fit: cover;
}
.profile-preview-handle {
  margin: 1px 0 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink-3);
}
.gh-repo {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.gh-repo-icon {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--ink-3);
}
.gh-repo-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}
.gh-repo-desc {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.4;
}

/* Secondary band */
.work-secondary {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 700px) {
  .work-secondary { grid-template-columns: 1fr; }
}
.work-secondary-card {
  background: transparent;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.4s var(--ease);
  color: inherit;
}
.work-secondary-card:hover {
  background: var(--bg-elev);
  border-color: var(--hairline);
  transform: translateY(-2px);
}
.work-secondary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.work-secondary-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.work-secondary-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* ---------- Contact ---------- */
.section-contact {
  background: var(--bg-sunken);
  border-top: 1px solid var(--hairline-soft);
}
.contact-inner {
  max-width: var(--container-narrow);
  text-align: left;
}
.contact-inner .col-label { position: static; }

.contact-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 28px 0 24px;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.contact-title-alt {
  font-style: italic;
  color: var(--accent);
}

.contact-lede {
  font-size: var(--fs-lede);
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 58ch;
  line-height: 1.55;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 4px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
.contact-email-arrow { font-size: 0.7em; transition: transform 0.3s var(--ease); }
.contact-email:hover .contact-email-arrow { transform: translate(3px, -3px); }

.contact-socials {
  list-style: none;
  padding: 36px 0 0;
  margin: 36px 0 0;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.contact-socials a {
  font-size: 0.92rem;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact-socials a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--hairline-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}
.footer-meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dot-sep { color: var(--ink-4); }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}

.hero-title .word {
  opacity: 0;
  transform: translateY(0.45em);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hero-title .word.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
