/* ========================================
   FOUNDATION — reset, variables, base
   The Vellumere palette. Every color has a name
   because colors should mean something.
   ======================================== */

:root {
  /* Foundation — the darkest corners of the study */
  --deepest:    #1C1C1C;
  --charcoal:   #282828;
  --mahogany:   #3A2F2F;

  /* Parchment & Paper — the things you read by candlelight */
  --cream:      #F5E6D3;
  --parchment:  #E8D5C4;
  --ivory:      #FFF8F0;

  /* Accents — the objects on the desk */
  --burgundy:   #6B2C2C;
  --russet:     #CD5C5C;
  --auburn:     #BC544B;
  --forest:     #2F4538;
  --sage:       #4A5F4F;
  --moss:       #5C6F5C;
  --honey:      #C9A961;
  --brass:      #D4AF37;
  --slate:      #708090;
  --steel:      #536878;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--deepest);
  color: var(--cream);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Subtle noise grain — the paper texture that makes it feel real */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

::selection { background: var(--auburn); color: var(--ivory); }

a { color: var(--honey); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--brass); }

/* Hugo renders --- as <hr>. Give them breathing room. */
hr {
  border: none;
  height: 1px;
  background: var(--mahogany);
  margin: 3rem 0;
}


/* ========================================
   TYPOGRAPHY — fonts, sizes, prose
   Crimson Pro for structure, EB Garamond
   for reading, JetBrains Mono for making.
   ======================================== */

.prose { font-size: 1.1rem; color: var(--parchment); max-width: 680px; }
.prose p { margin-bottom: 1.3rem; }
.prose strong { color: var(--honey); font-weight: 500; }

/* Prose links need underlines for readability in long text */
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--brass); }


/* ========================================
   NAVIGATION
   Fixed top bar with frosted glass.
   ======================================== */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(28, 28, 28, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mahogany);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Crimson Pro', serif;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--honey);
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--auburn); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--parchment);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  position: relative;
}
/* Underline that grows on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--honey);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--honey); }
.nav-links a.active::after { width: 100%; }

.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  transition: all 0.3s;
}
/* X animation when menu is open */
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* ========================================
   HERO
   Full viewport, centered. The greeting is
   the first thing anyone sees.
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
}

/* Warm radial gradients that give depth to the background */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(107,44,44,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(201,169,97,0.06) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-greeting {
  font-family: 'Crimson Pro', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--honey);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.2s forwards;
}

.hero h1 {
  font-family: 'Crimson Pro', serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

/* Vertical portrait between the name and the divider */
.hero-photo {
  width: 140px;
  height: 190px;
  border-radius: 12px;
  border: 1px solid var(--mahogany);
  margin: 1.2rem auto 0;
  min-height: unset;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0;
  animation: fadeUp 1s ease 0.65s forwards;
}

.hero-subtitle {
  font-family: 'EB Garamond', serif;
  font-size: 1.25rem;
  color: var(--parchment);
  font-style: italic;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}

.hero-tagline {
  font-family: 'Crimson Pro', serif;
  font-size: 0.9rem;
  color: var(--slate);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease 1.1s forwards;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--auburn);
  margin: 2rem auto;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--slate);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeUp 1s ease 1.5s forwards;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 30px;
  background: var(--mahogany);
  margin: 0.5rem auto 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}


/* ========================================
   SECTIONS — shared spacing and headers
   ======================================== */

section {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-header {
  font-family: 'Crimson Pro', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--slate);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--auburn);
  margin-bottom: 2.5rem;
}

.section-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  color: var(--honey);
  border: 1px solid var(--mahogany);
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: all 0.3s;
}
.section-link:hover {
  border-color: var(--auburn);
  background: rgba(188, 84, 75, 0.08);
  color: var(--brass);
}


/* ========================================
   ABOUT — prose with photo, stats, epigraph
   ======================================== */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.stats-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--mahogany);
  border-bottom: 1px solid var(--mahogany);
}
.stat { text-align: center; flex: 1; min-width: 120px; }
.stat-number {
  font-family: 'Crimson Pro', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--honey);
  line-height: 1;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--slate);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.epigraph {
  border-left: 2px solid var(--auburn);
  padding-left: 1.5rem;
  margin: 3rem 0;
  max-width: 600px;
}
.epigraph p {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--parchment);
  line-height: 1.6;
}
.epigraph cite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--slate);
  font-style: normal;
  display: block;
  margin-top: 0.5rem;
}


/* ========================================
   CURRENTLY — active projects get a 2-col
   grid, queued/waiting sit compact below.
   ======================================== */

/* Active projects: 2-column grid with full descriptions */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.project {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.2rem 1.4rem;
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
  transition: border-color 0.3s;
}
.project:hover { border-color: var(--auburn); }

.project-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.45rem;
}
.status-active { background: var(--moss); box-shadow: 0 0 6px rgba(92, 111, 92, 0.5); }
.status-queued { background: var(--honey); }
.status-waiting { background: var(--slate); }

.project-info { min-width: 0; }

.project-name {
  font-family: 'Crimson Pro', serif;
  color: var(--ivory);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.project-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--auburn);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--slate);
  line-height: 1.5;
}

/* Queued/waiting: compact row, less visual weight */
.project-queue {
  margin-top: 1.2rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--mahogany);
}

.queue-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--slate);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.project-compact {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
}
.project-compact .project-status { margin-top: 0; }
.project-compact .project-name {
  font-size: 0.95rem;
  margin-bottom: 0;
}
.project-compact .project-type {
  margin-bottom: 0;
  font-size: 0.68rem;
}


/* ========================================
   RENAISSANCE — domain list, not cards.
   Think table of contents, not portfolio.
   ======================================== */

.domain-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 1.5rem;
}

.domain {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--mahogany);
  transition: background 0.3s;
}
.domain:hover { background: rgba(40, 40, 40, 0.5); }

/* Remove bottom border on last two items */
.domain:nth-last-child(-n+2) { border-bottom: none; }

.domain-name {
  font-family: 'Crimson Pro', serif;
  color: var(--ivory);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.domain-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--auburn);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ========================================
   SCRIPTORIUM — three layers, stacked with
   visual depth. Not a card row.
   ======================================== */

.scriptorium-layers {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.layer {
  padding: 1.5rem 2rem;
  border: 1px solid var(--mahogany);
  background: linear-gradient(135deg, var(--charcoal), rgba(58, 47, 47, 0.3));
  transition: border-color 0.3s;
  position: relative;
}
.layer:hover { border-color: var(--auburn); }

/* Stack effect — each layer slightly indented */
.layer:nth-child(1) { z-index: 3; border-radius: 6px 6px 0 0; }
.layer:nth-child(2) { z-index: 2; margin-left: 1rem; margin-right: -1rem; border-top: none; }
.layer:nth-child(3) { z-index: 1; margin-left: 2rem; margin-right: -2rem; border-top: none; border-radius: 0 0 6px 6px; }

.layer-header {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.layer-number {
  font-family: 'Crimson Pro', serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--honey);
  opacity: 0.6;
  line-height: 1;
}

.layer h4 {
  font-family: 'Crimson Pro', serif;
  color: var(--ivory);
  font-size: 1.1rem;
}

.layer p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.55;
  padding-left: 2.6rem;
}


/* ========================================
   WRITING — clean list, not cards
   ======================================== */

.writing-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.writing-entry { border-bottom: 1px solid var(--mahogany); padding-bottom: 1.5rem; }
.writing-entry:last-child { border-bottom: none; }

.writing-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--slate);
  letter-spacing: 0.04em;
}

.writing-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.2rem 0;
}
.writing-title a { color: var(--ivory); }
.writing-title a:hover { color: var(--honey); }

.writing-desc {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: var(--parchment);
}


/* ========================================
   CONNECT — horizontal centered links in
   the footer, plus the dedicated /connect/
   page with personality cards.
   ======================================== */

/* Cards for the /connect/ page */
.connect-card {
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  transition: border-color 0.3s, transform 0.2s;
}
.connect-card:hover {
  border-color: var(--auburn);
  transform: translateY(-2px);
}

.connect-card h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.connect-card h3 a { color: var(--ivory); }
.connect-card h3 a:hover { color: var(--honey); }

.connect-card p {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.55;
}

/* Email gets the featured treatment — full width, auburn accent */
.connect-featured {
  margin: 2rem 0 1.2rem;
}

.connect-card.featured {
  border-color: var(--auburn);
  padding: 1.8rem 2rem;
}
.connect-card.featured h3 {
  font-size: 1.4rem;
}
.connect-card.featured h3 a { color: var(--honey); }
.connect-card.featured h3 a:hover { color: var(--brass); }
.connect-card.featured p {
  font-size: 1rem;
  color: var(--parchment);
}

.featured-hint {
  display: block;
  margin-top: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--slate);
  letter-spacing: 0.04em;
  font-style: italic;
}

/* The other four in a 2x2 grid */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Compact link row for footer */
.contact-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  color: var(--parchment);
  letter-spacing: 0.03em;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--mahogany);
  border-radius: 4px;
  transition: all 0.3s;
}
.contact-link:hover {
  border-color: var(--auburn);
  color: var(--ivory);
  background: rgba(188, 84, 75, 0.08);
}


/* ========================================
   FOOTER — connect links live here now so
   they appear on every page.
   ======================================== */

footer {
  text-align: center;
  border-top: 1px solid var(--mahogany);
}

.footer-connect {
  padding: 3rem 2rem 2rem;
}

.footer-heading {
  font-family: 'Crimson Pro', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--slate);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.footer-bottom {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--mahogany);
}

.footer-bottom .colophon {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--parchment);
  margin-bottom: 0.8rem;
  opacity: 0.7;
}
.footer-bottom p:last-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.05em;
}


/* ========================================
   PHOTO PLACEHOLDERS
   Mahogany blocks where CK will drop real
   photos once he's done shooting them.
   ======================================== */

.photo-placeholder {
  background: var(--mahogany);
  border: 1px solid var(--auburn);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  min-height: 200px;
}


/* ========================================
   PHOTOS & VIDEO EMBEDS
   ======================================== */

/* Studiolo desk photo in the about preview on landing —
   lives inside the 280px grid column, so just fill it */
.about-photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 6px;
  border: 1px solid var(--mahogany);
}

/* Photo on the about page — keep it modest, not a billboard */
.about-page-photo {
  max-width: 480px;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--mahogany);
  margin: 2.5rem 0;
}

/* Responsive 16:9 video embed — capped so it doesn't
   swallow the whole page */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 560px;
  margin: 1.5rem 0;
  border-radius: 6px;
  border: 1px solid var(--mahogany);
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}


/* ========================================
   DEEP PAGES — about, renaissance, career
   ======================================== */

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
}

.page-title {
  font-family: 'Crimson Pro', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.page-subtitle {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--slate);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.page-divider {
  width: 60px;
  height: 1px;
  background: var(--auburn);
  margin-bottom: 2.5rem;
}


/* ========================================
   CAREER — professional header, then
   timeline with left border.
   ======================================== */

/* The professional identity at the top of the page */
.career-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.career-header .career-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  min-height: unset;
  flex-shrink: 0;
  object-fit: cover;
  /* Nudge up and left to center on the face */
  object-position: 40% 20%;
  border: 2px solid var(--mahogany);
}

.career-name {
  font-family: 'Crimson Pro', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 0.2rem;
}

.career-current {
  font-family: 'EB Garamond', serif;
  font-size: 1.1rem;
  color: var(--honey);
  margin-bottom: 0.15rem;
}

.career-location {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--slate);
  letter-spacing: 0.04em;
}

.role {
  border-left: 2px solid var(--mahogany);
  padding-left: 1.8rem;
  margin-bottom: 2.5rem;
  position: relative;
  transition: border-color 0.3s;
}
.role:hover { border-color: var(--auburn); }
.role::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--auburn);
  border-radius: 50%;
}
.role-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ivory);
}
.role-company {
  font-family: 'Crimson Pro', serif;
  color: var(--honey);
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.role-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--slate);
  margin-bottom: 0.5rem;
}
.role-desc {
  font-size: 0.98rem;
  color: var(--parchment);
  line-height: 1.65;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.skill-category h4 {
  font-family: 'Crimson Pro', serif;
  color: var(--honey);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.skill-category p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.5;
}


/* ========================================
   RENAISSANCE FULL PAGE — skills tracker,
   reading lists, domain cards
   ======================================== */

/* Cards for the full Renaissance page (not the landing preview) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
  padding: 1.4rem;
  transition: border-color 0.3s, transform 0.2s;
}
.card:hover { border-color: var(--auburn); transform: translateY(-2px); }
.card h4 {
  font-family: 'Crimson Pro', serif;
  color: var(--ivory);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.card .card-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--auburn);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.card p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.5;
}

.skills-ticker {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
}
.skills-ticker h3 {
  font-family: 'Crimson Pro', serif;
  color: var(--ivory);
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.skills-ticker .ticker-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--slate);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  font-family: 'EB Garamond', serif;
  font-size: 0.88rem;
  color: var(--parchment);
  background: var(--mahogany);
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: border-color 0.3s;
}
.skill-tag:hover { border-color: var(--auburn); }
.skill-tag.in-progress { color: var(--honey); background: transparent; border: 1px solid var(--honey); }
.skill-tag.upcoming { color: var(--slate); background: transparent; border: 1px dashed var(--mahogany); }

.reading-section {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
}
.reading-section h3 {
  font-family: 'Crimson Pro', serif;
  color: var(--honey);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.reading-section h3 + .book-list + h3 { margin-top: 1.5rem; }
.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}
.book-item {
  font-size: 0.92rem;
  color: var(--parchment);
  padding-left: 1rem;
  border-left: 2px solid var(--forest);
}
.book-item .author {
  font-style: italic;
  color: var(--slate);
  font-size: 0.85rem;
}


/* ========================================
   YOUTUBE / CONTENT — channel cards
   ======================================== */

.channel-card {
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s;
}
.channel-card:hover { border-color: var(--auburn); }
.channel-card h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.4rem;
  color: var(--ivory);
  margin-bottom: 0.3rem;
}
.channel-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--honey);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.channel-card p { color: var(--parchment); font-size: 0.98rem; }
.channel-tracks { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.track-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cream);
  background: var(--mahogany);
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  letter-spacing: 0.03em;
}


/* ========================================
   BLOG POST — reading-optimized layout
   ======================================== */

.post-header {
  margin-bottom: 2.5rem;
}

.post-title {
  font-family: 'Crimson Pro', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.post-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--slate);
  letter-spacing: 0.04em;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.post-tag {
  color: var(--auburn);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--mahogany);
  border-radius: 3px;
  transition: border-color 0.3s;
}
.post-tag:hover { border-color: var(--auburn); color: var(--honey); }

.post-body {
  max-width: 680px;
}
.post-body p { margin-bottom: 1.3rem; }
.post-body h2 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ivory);
  margin: 2.5rem 0 1rem;
}
.post-body h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ivory);
  margin: 2rem 0 0.8rem;
}
.post-body blockquote {
  border-left: 2px solid var(--auburn);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--parchment);
}
.post-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--charcoal);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--honey);
}
.post-body pre {
  background: var(--charcoal);
  border: 1px solid var(--mahogany);
  border-radius: 6px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-body pre code {
  background: none;
  padding: 0;
  color: var(--cream);
}

.post-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--mahogany);
}


/* ========================================
   WRITING ARCHIVE
   ======================================== */

.writing-archive {
  max-width: 700px;
}

.archive-year {
  font-family: 'Crimson Pro', serif;
  font-size: 1.4rem;
  color: var(--honey);
  font-weight: 600;
  margin: 2.5rem 0 1rem;
}
.archive-year:first-child { margin-top: 0; }


/* ========================================
   UTILITIES — fade-in, scroll animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s, transform 0.7s;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================
   RESPONSIVE — mobile-first breakpoints
   ======================================== */

@media (max-width: 768px) {
  nav { padding: 0.6rem 1rem; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(28, 28, 28, 0.97);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--mahogany);
  }
  .nav-links.open { display: flex; }

  .hero-greeting { font-size: 2rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero-photo { width: 110px; height: 150px; }

  section { padding: 3.5rem 1.5rem; }
  .section-header { font-size: 1.6rem; }

  /* About layout collapses to single column */
  .about-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-grid { grid-template-columns: 1fr; }
  .connect-grid { grid-template-columns: 1fr; }

  .career-header {
    flex-direction: column;
    text-align: center;
  }

  .domain-list { grid-template-columns: 1fr; }
  .domain:last-child { border-bottom: none; }

  /* Scriptorium layers lose their indent on mobile */
  .layer:nth-child(2),
  .layer:nth-child(3) {
    margin-left: 0;
    margin-right: 0;
  }

  .card-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { gap: 1.5rem; }
  .stat-number { font-size: 2rem; }

  .page-content { padding: 6rem 1.5rem 3rem; }
  .page-title { font-size: 2rem; }
  .post-title { font-size: 2rem; }
}

@media (max-width: 480px) {
  .hero-greeting { font-size: 1.7rem; }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1.05rem; }

  .skills-grid { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: center; }
  .stats-row { flex-direction: column; gap: 1rem; }
}
