/* ===== Tokens (see design_system.md) — Pantone palette ===== */
:root {
  /* 11-0110 TCX Buttercream */
  --bg: #f6ecc9;
  --bg-alt: #efe0b3;
  /* 19-1528 TCX Windsor Wine, deep shade for the dark bookend */
  --bg-deep: #3d1420;
  --surface: #fffcf2;
  --ink: #2a1418;
  --ink-dim: #6c5b47;
  --line: rgba(42, 20, 24, 0.12);

  /* 19-1528 TCX Windsor Wine */
  --accent: #6d2a39;
  --accent-soft: #e7d3d3;
  /* 18-0835 TCX Dried Tobacco */
  --accent-2: #6f5a3e;
  --accent-2-soft: #e6dcc4;
  /* deeper Windsor Wine shade, for a third differentiator without a new hue */
  --accent-3: #4a1b26;
  --accent-3-soft: #ddc8c9;
  --on-dark: #f6ecc9;

  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; animation-timing-function: var(--ease); }
img { height: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

@media (max-width: 860px), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: none; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Grain texture (tactile, artist-made feel) ===== */
.grain-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Custom cursor — hand-drawn, artist energy ===== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 7px; height: 7px; background: var(--accent); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid var(--accent);
  transition: width .3s var(--ease-bounce), height .3s var(--ease-bounce), border-color .3s var(--ease), transform .3s var(--ease-bounce), border-radius .3s var(--ease);
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
}
.cursor-ring.hover {
  width: 58px; height: 58px;
  border-color: var(--accent-2);
  transform: translate(-50%, -50%) rotate(20deg);
}

/* ===== Hand-drawn squiggle accents ===== */
.squiggle { display: block; height: 14px; width: 100%; max-width: 220px; color: var(--squiggle-color, var(--accent)); margin-top: 6px; }
.squiggle path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

.doodle-mark {
  position: absolute;
  color: var(--mark-color, var(--accent));
  pointer-events: none;
}

/* ===== Progress bar ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  z-index: 10000;
}

/* ===== Nav ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px 64px;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), padding .3s var(--ease), border-color .3s var(--ease);
}
.navbar.scrolled { background: var(--bg); padding-top: 14px; padding-bottom: 14px; border-bottom-color: var(--line); }
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  letter-spacing: 0.3px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
/* Logo: pipeline nodes (Tobacco) flowing into a painted Y (Wine) — design_system.md "Brand" */
.logo-mark { width: 36px; height: 36px; flex: none; overflow: visible; }
.logo-mark .lm-line { fill: none; stroke: var(--accent-2); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 16; stroke-dashoffset: 16; animation: lm-draw .5s var(--ease) .1s forwards; }
.logo-mark .lm-node { fill: var(--accent-2); }
.logo-mark .lm-brush, .logo-mark .lm-drip { fill: var(--accent); }
.logo-mark .lm-brush { transform-origin: 16px 16px; animation: lm-paint .45s var(--ease-bounce) .45s both; }
.logo-mark .lm-drip { animation: lm-drip .5s var(--ease) .85s both; }
@keyframes lm-draw { to { stroke-dashoffset: 0; } }
@keyframes lm-paint { from { transform: scale(0.4); opacity: 0; } }
@keyframes lm-drip { from { transform: translateY(-4px); opacity: 0; } }
.nav-logo:hover .lm-drip { animation: lm-drip .5s var(--ease) both; }
.logo-word { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; letter-spacing: 0.2px; color: var(--ink); white-space: nowrap; }
.logo-word .lw-paints { color: var(--accent); }
.logo-word .lw-pipes { font-family: var(--font-mono); font-style: normal; font-size: 0.82em; letter-spacing: 0; color: var(--accent-2); margin-left: 1px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }
.btn.nav-cta { padding: 11px 20px; font-size: 0.7rem; white-space: nowrap; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 1px;
  background: currentColor;
  transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: background .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span { background: var(--on-dark); }

@media (max-width: 860px) {
  .navbar { padding: 18px 20px; gap: 16px; }
  .navbar.scrolled { padding-top: 12px; padding-bottom: 12px; }
  .nav-toggle { display: flex; order: 3; }
  .btn.nav-cta { padding: 9px 12px; font-size: 0.62rem; letter-spacing: 0.5px; }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: 78%;
    background: var(--bg-deep);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    gap: 28px;
    transition: right .4s var(--ease);
  }
  .logo-word .lw-paints, .logo-word .lw-pipes { display: none; }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 0.85rem; color: var(--on-dark); }
  .nav-links a.active { color: var(--accent-soft); }
}

/* ===== Buttons & links (design_system.md §3) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .3s var(--ease-bounce), background .2s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(-1deg) translateY(-2px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-dark); }
.btn-primary:hover { background: var(--accent-3); border-color: var(--accent-3); color: var(--on-dark); }
.btn-outline { border-color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); }

/* Context flips for anything sitting on a solid wine/tobacco section */
.on-dark { color: var(--on-dark); --giant-color: var(--on-dark); }
.on-dark .section-num { color: rgba(246,236,201,0.6); }
.on-dark .btn-outline, .on-dark .link-underline { border-color: var(--on-dark); color: var(--on-dark); }
.on-dark .link-underline { border-bottom-color: rgba(246,236,201,0.45); }
.on-dark .btn-outline:hover { border-color: var(--bg); background: rgba(246,236,201,0.1); color: var(--bg); }
.on-dark .link-underline:hover { border-color: var(--bg); color: var(--bg); }
.btn-light { background: var(--bg); border-color: var(--bg); color: var(--ink); }
.btn-light:hover { background: var(--surface); border-color: var(--surface); color: var(--accent); }

.link-underline {
  color: var(--ink);
  border-bottom: 1px solid rgba(26,25,23,0.3);
  padding-bottom: 2px;
  font-size: 0.95rem;
  display: inline-block;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .25s var(--ease-bounce);
}
.link-underline:hover { border-color: var(--accent); color: var(--accent); transform: translateX(3px); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  padding: 140px 64px 0;
  gap: 40px;
}
.hero-visual {
  aspect-ratio: 3/4;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero-content { padding-bottom: 64px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--ink-dim);
  letter-spacing: 2px;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero-title em { font-style: italic; color: var(--accent); position: relative; }
.hero-sub {
  max-width: 480px;
  font-size: 1.05rem;
  color: var(--ink-dim);
  margin: 28px 0 36px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 20px; flex-wrap: wrap; }

.hero--page { min-height: 88vh; padding-bottom: 72px; align-items: center; }
.hero--page .hero-content { padding-bottom: 0; }
.hero--page .hero-visual { aspect-ratio: 4/5; max-height: 72vh; }
.hero--text { grid-template-columns: 1fr; min-height: 62vh; align-items: end; }
.hero--text .hero-title { max-width: 18ch; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 120px 28px 0; }
  .hero-visual { order: -1; aspect-ratio: 4/3; }
  .hero--page { min-height: auto; padding-bottom: 64px; }
  .hero--page .hero-visual { aspect-ratio: 4/3; max-height: none; }
}

.marquee {
  position: relative;
  border-top: 1.5px dashed var(--line);
  border-bottom: 1.5px dashed var(--line);
  overflow: hidden;
  padding: 22px 0;
  margin-top: 56px;
  grid-column: 1 / -1;
}
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: var(--ink-dim);
  white-space: nowrap;
}
.marquee-track span em {
  font-style: normal;
  font-family: var(--font-mono);
  color: var(--accent);
  padding: 0 4px;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Sections shared ===== */
section { position: relative; padding: clamp(96px, 14vw, 180px) 64px; overflow: hidden; }
section.banded::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: var(--band-accent, var(--accent));
  z-index: 2;
}
/* Oversized ghost numeral — editorial poster device (set via data-index on the section) */
section[data-index]::after {
  content: attr(data-index);
  position: absolute;
  top: 0.4em; right: 40px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(8rem, 20vw, 16rem);
  line-height: 1;
  color: var(--giant-color, var(--ink));
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
section > * { position: relative; z-index: 1; }

.section-head { margin-bottom: 64px; max-width: 720px; }
.section-num {
  font-family: var(--font-mono);
  color: var(--ink-dim);
  letter-spacing: 2px;
  font-size: 0.72rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-num .doodle-star { width: 14px; height: 14px; color: var(--band-accent, var(--accent)); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.1;
  margin-top: 14px;
}

.reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) { section { padding: 72px 28px; } }

/* ===== About — solid Windsor Wine block, buttercream pops out of it ===== */
.about {
  background: var(--bg-deep);
  color: var(--on-dark);
  --band-accent: var(--accent-2);
  --giant-color: var(--on-dark);
}
.about .section-num { color: rgba(246,236,201,0.55); }
.about-grid { display: grid; grid-template-columns: 0.55fr 1fr; gap: 64px; align-items: start; }
.about-visual { aspect-ratio: 3/4; max-width: 320px; overflow: hidden; border: 2px solid rgba(246,236,201,0.25); }
.about-visual img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { color: rgba(246,236,201,0.78); font-size: 1.1rem; line-height: 1.75; margin-bottom: 20px; max-width: 56ch; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.stat { background: var(--bg); padding: 28px 24px; transition: transform .3s var(--ease-bounce); }
.stat:hover { transform: translateY(-4px) rotate(-0.5deg); }
.stat-num { font-family: var(--font-display); font-weight: 600; font-size: 2.6rem; color: var(--accent); display: block; }
.stat-label { color: var(--ink-dim); font-size: 0.78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ===== Timeline ===== */
.work { --band-accent: var(--accent-2); --giant-color: var(--accent-soft); }
.timeline { max-width: 900px; }
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.timeline-item:hover { background: var(--accent-2-soft); }
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-2); letter-spacing: 0.5px; padding-top: 4px; }
.timeline-role { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; margin-bottom: 4px; }
.timeline-company { display: block; color: var(--ink-dim); font-size: 0.88rem; margin-bottom: 14px; }
.timeline-summary { color: var(--ink-dim); font-size: 1rem; line-height: 1.6; margin-bottom: 16px; max-width: 56ch; }
.timeline-card ul { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.timeline-card li { color: var(--ink-dim); line-height: 1.6; font-size: 0.96rem; max-width: 56ch; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag-row span {
  font-family: var(--font-mono); font-size: 0.68rem; padding: 6px 12px; border: 1px solid var(--line); color: var(--ink-dim);
  transition: transform .25s var(--ease-bounce), border-color .2s var(--ease), color .2s var(--ease);
}
.tag-row span:nth-child(odd):hover { transform: rotate(-3deg); }
.tag-row span:nth-child(even):hover { transform: rotate(3deg); }
.tag-row span:hover { border-color: var(--accent-2); color: var(--accent-2); }

@media (max-width: 640px) { .timeline-item { grid-template-columns: 1fr; gap: 8px; } }

/* ===== Art — solid Dried Tobacco block ===== */
.art {
  background: var(--accent-2);
  color: var(--on-dark);
  --band-accent: var(--accent-3);
  --giant-color: var(--on-dark);
}
.art .section-num { color: rgba(246,236,201,0.6); }
.art-intro { max-width: 60ch; color: rgba(246,236,201,0.85); font-size: 1.1rem; line-height: 1.75; margin-bottom: 40px; }

.art-forms-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 1px; color: rgba(246,236,201,0.6); text-transform: uppercase; margin-bottom: 14px; }
.art-forms { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }
.art-form {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--bg);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  transition: transform .3s var(--ease-bounce), background .2s var(--ease), color .2s var(--ease);
}
.art-form:nth-child(odd):hover { transform: rotate(-2deg) translateY(-2px); }
.art-form:nth-child(even):hover { transform: rotate(2deg) translateY(-2px); }
.art-form:hover { background: var(--accent); color: var(--on-dark); border-color: var(--accent); }
.art-form .doodle-star { width: 11px; height: 11px; color: var(--accent); }
.art-form:hover .doodle-star { color: var(--on-dark); }

.art-subhead { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; margin-bottom: 24px; color: var(--on-dark); }
.art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; }
.art-card { display: flex; flex-direction: column; }
.is-clickable { cursor: pointer; }
.art-visual {
  aspect-ratio: 4/5;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
  transition: background .25s var(--ease), transform .35s var(--ease-bounce);
}
.art-card:nth-child(odd):hover .art-visual { transform: rotate(-1deg) scale(1.015); }
.art-card:nth-child(even):hover .art-visual { transform: rotate(1deg) scale(1.015); }
.art-card:hover .art-visual { background: var(--accent-soft); }
.art-visual img { width: 100%; height: 100%; object-fit: cover; }
.art-visual-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim); }
.art-info h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin-bottom: 8px; color: var(--on-dark); }
.art-info p { color: rgba(246,236,201,0.8); font-size: 0.95rem; line-height: 1.6; margin-bottom: 14px; max-width: 44ch; }
.art-card-cta { grid-column: 1 / -1; border-top: 1px solid rgba(246,236,201,0.25); padding-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.art-card-cta h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--on-dark); }
.art-card-cta p { color: rgba(246,236,201,0.8); font-size: 0.95rem; max-width: 40ch; }

@media (max-width: 760px) { .art-grid { grid-template-columns: 1fr; } .art-card-cta { flex-direction: column; align-items: flex-start; } }

/* ===== Credentials — solid poster-color cards, not thin-bordered ===== */
.credentials { --band-accent: var(--accent); --giant-color: var(--accent-soft); }
.credentials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.credential-card {
  background: var(--card-accent, var(--accent));
  color: var(--on-dark);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .35s var(--ease-bounce), box-shadow .25s var(--ease);
}
.credential-card:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 18px 40px rgba(42,20,24,0.28); }
.credential-card:nth-child(even):hover { transform: translateY(-6px) rotate(0.6deg); }
.credential-card[data-kind="education"] { --card-accent: var(--accent); }
.credential-card[data-kind="certification"] { --card-accent: var(--accent-2); }
.credential-card[data-kind="achievement"] { --card-accent: var(--accent-3); }
.credential-card[data-kind="publication"] { --card-accent: var(--ink); }
.credential-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(246,236,201,0.65); }
.credential-card h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; line-height: 1.3; color: var(--on-dark); }
.credential-card p { color: rgba(246,236,201,0.8); font-size: 0.9rem; line-height: 1.55; }
.credential-actions { margin-top: 6px; }
.credential-actions .link-underline { color: var(--on-dark); border-bottom-color: rgba(246,236,201,0.45); }
.credential-actions .link-underline:hover { color: var(--bg); border-color: var(--bg); }

@media (max-width: 900px) { .credentials-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .credentials-grid { grid-template-columns: 1fr; } }

/* ===== Skills — light section, solid tobacco/wine card blocks (distinct from both About/Skills-dark AND Credentials' 3-up grid) ===== */
.skills {
  background: var(--bg);
  color: var(--ink);
  --band-accent: var(--accent-2);
  --giant-color: var(--accent-2-soft);
}
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-group {
  background: var(--group-accent, var(--accent));
  color: var(--on-dark);
  padding: 28px 24px;
  transition: transform .35s var(--ease-bounce), box-shadow .25s var(--ease);
}
.skill-group:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 18px 40px rgba(42,20,24,0.22); }
.skill-group:nth-of-type(even):hover { transform: translateY(-6px) rotate(0.6deg); }
.skill-group:nth-of-type(4n+1) { --group-accent: var(--accent-2); }
.skill-group:nth-of-type(4n+2) { --group-accent: var(--accent); }
.skill-group:nth-of-type(4n+3) { --group-accent: var(--accent-3); }
.skill-group:nth-of-type(4n+4) { --group-accent: var(--accent-2); }
.skill-group h4 {
  font-family: var(--font-mono); color: rgba(246,236,201,0.7); text-transform: uppercase;
  font-size: 0.72rem; letter-spacing: 1.5px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(246,236,201,0.25);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  font-size: 0.82rem; color: var(--on-dark);
  border: 1px solid rgba(246,236,201,0.35);
  padding: 6px 12px;
  display: inline-block;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .25s var(--ease-bounce);
}
.skill-tags span:nth-child(odd):hover { transform: rotate(-2deg) scale(1.05); }
.skill-tags span:nth-child(even):hover { transform: rotate(2deg) scale(1.05); }
.skill-tags span:hover { border-color: var(--on-dark); background: rgba(246,236,201,0.15); }

@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .skills-grid { grid-template-columns: 1fr; } }

/* Toolkit on a Dried Tobacco block: cards flip to Buttercream */
.skills--dark { background: var(--accent-2); --band-accent: var(--accent); }
.skills--dark .skill-group { --group-accent: var(--bg); color: var(--ink); }
.skills--dark .skill-group h4 { color: var(--ink-dim); border-bottom-color: var(--line); }
.skills--dark .skill-tags span { color: var(--ink); border-color: var(--line); }
.skills--dark .skill-tags span:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ===== Section head / intro text shared by new sections ===== */
.lede { max-width: 60ch; font-size: 1.1rem; line-height: 1.75; color: var(--ink-dim); margin-bottom: 40px; }
.on-dark .lede { color: rgba(246,236,201,0.82); }
.section-foot { margin-top: 48px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* ===== Home: teaser link cards ===== */
a.art-card { color: inherit; }

/* ===== Focus (Work page) — deep wine block ===== */
.focus { background: var(--bg-deep); --band-accent: var(--accent-2); }
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.focus-item { background: var(--bg); color: var(--ink); padding: 32px 28px; transition: transform .35s var(--ease-bounce); }
.focus-item:nth-child(odd):hover { transform: translateY(-5px) rotate(-0.6deg); }
.focus-item:nth-child(even):hover { transform: translateY(-5px) rotate(0.6deg); }
.focus-item .focus-num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 1.5px; }
.focus-item h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; line-height: 1.25; margin: 14px 0 10px; }
.focus-item p { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.65; }
@media (max-width: 860px) { .focus-grid { grid-template-columns: 1fr; } }

/* ===== Process steps (Art page) ===== */
.process { --band-accent: var(--accent-2); --giant-color: var(--accent-2-soft); }
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.process-step { border-top: 3px solid var(--accent-2); padding-top: 24px; }
.process-step .step-num { font-family: var(--font-display); font-weight: 600; font-size: 3rem; line-height: 1; color: var(--accent); display: block; margin-bottom: 14px; }
.process-step h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin-bottom: 8px; }
.process-step p { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.65; }
.process-steps.reveal .process-step { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.process-steps.reveal.in-view .process-step { opacity: 1; transform: none; }
.process-steps.reveal.in-view .process-step:nth-child(2) { transition-delay: .12s; }
.process-steps.reveal.in-view .process-step:nth-child(3) { transition-delay: .24s; }
.process-steps.reveal.in-view .process-step:nth-child(4) { transition-delay: .36s; }
.process-steps.reveal { opacity: 1; transform: none; }
@media (max-width: 860px) { .process-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .process-steps { grid-template-columns: 1fr; } }

/* ===== Commission form (Art page) — deep wine block ===== */
.commission { background: var(--bg-deep); --band-accent: var(--accent-2); }
.commission-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.commission-side h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.1; margin: 14px 0 20px; }
.commission-side ol { counter-reset: nxt; display: flex; flex-direction: column; gap: 14px; margin: 28px 0 32px; }
.commission-side li { counter-increment: nxt; display: grid; grid-template-columns: 28px 1fr; color: rgba(246,236,201,0.82); line-height: 1.6; }
.commission-side li::before { content: counter(nxt) "."; font-family: var(--font-mono); color: var(--accent-soft); font-size: 0.85rem; padding-top: 2px; }
.commission-side .alt-contact { font-size: 0.92rem; color: rgba(246,236,201,0.7); }
.commission-side .alt-contact a { color: var(--on-dark); border-bottom: 1px solid rgba(246,236,201,0.45); }

.inquiry-form { background: var(--bg); color: var(--ink); padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.inquiry-form .field { display: flex; flex-direction: column; gap: 8px; }
.inquiry-form .field.full { grid-column: 1 / -1; }
.inquiry-form label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim); }
.inquiry-form label .opt { text-transform: none; letter-spacing: 0; opacity: 0.8; }
.inquiry-form input, .inquiry-form select, .inquiry-form textarea {
  font: inherit; font-size: 0.98rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); padding: 13px 14px; border-radius: 0;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.inquiry-form textarea { min-height: 130px; resize: vertical; }
.inquiry-form input:focus, .inquiry-form select:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.inquiry-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.inquiry-form .form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.inquiry-form button[disabled] { opacity: 0.6; pointer-events: none; }
.form-status { font-size: 0.92rem; color: var(--ink-dim); }
.form-status.error { color: var(--accent); }
.form-success { grid-column: 1 / -1; text-align: left; padding: 24px 0; }
.form-success h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.8rem; color: var(--accent); margin-bottom: 10px; }
.form-success p { color: var(--ink-dim); line-height: 1.7; }
@media (max-width: 900px) { .commission-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 560px) { .inquiry-form { grid-template-columns: 1fr; padding: 26px 20px; } }

/* ===== Testimonials — light block, hidden entirely while there are none ===== */
.testimonials { background: var(--bg-alt); --band-accent: var(--accent); --giant-color: var(--accent-soft); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial { background: var(--surface); padding: 36px 32px 30px; position: relative; transition: transform .35s var(--ease-bounce); }
.testimonial:nth-child(odd):hover { transform: rotate(-0.6deg) translateY(-4px); }
.testimonial:nth-child(even):hover { transform: rotate(0.6deg) translateY(-4px); }
.testimonial::before { content: "\201C"; font-family: var(--font-display); font-size: 4.5rem; line-height: 0.6; color: var(--accent); display: block; margin-bottom: 14px; }
.testimonial blockquote { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.55; margin-bottom: 22px; }
.testimonial figcaption { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-dim); }
.testimonial figcaption strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }

/* ===== Writing — Windsor Wine block, buttercream cards ===== */
.writing { background: var(--accent); --band-accent: var(--accent-2); }
.writing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.writing-card { background: var(--bg); color: var(--ink); padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .35s var(--ease-bounce), box-shadow .25s var(--ease); }
.writing-card:nth-child(odd):hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 18px 40px rgba(42,20,24,0.28); }
.writing-card:nth-child(even):hover { transform: translateY(-6px) rotate(0.6deg); box-shadow: 0 18px 40px rgba(42,20,24,0.28); }
.writing-card time { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-2); }
.writing-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; line-height: 1.3; }
.writing-card p { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.6; flex: 1; }
.writing-card .read { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.writing-empty { max-width: 56ch; background: var(--bg); color: var(--ink); padding: 32px; }
.writing-empty p { color: var(--ink-dim); line-height: 1.7; margin-bottom: 18px; }
.on-dark .writing-empty .link-underline { color: var(--accent); border-bottom-color: rgba(109,42,57,0.4); }
@media (max-width: 900px) { .writing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .writing-grid { grid-template-columns: 1fr; } }

/* ===== Split CTA band + footer — dark bookend on every page ===== */
.cta-band { background: var(--bg-deep); --band-accent: var(--accent-2); padding-bottom: 48px; }
.cta-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(246,236,201,0.18); border: 1px solid rgba(246,236,201,0.18); }
.cta-half { background: var(--bg-deep); padding: 48px 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; transition: background .3s var(--ease); }
.cta-half:hover { background: var(--accent-3); }
.cta-half .section-num { color: rgba(246,236,201,0.6); }
.cta-half h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; }
.cta-half p { color: rgba(246,236,201,0.75); line-height: 1.65; max-width: 42ch; margin-bottom: 8px; }
@media (max-width: 760px) { .cta-split { grid-template-columns: 1fr; } .cta-half { padding: 36px 26px; } }

.footer {
  margin-top: 80px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding-top: 28px; border-top: 1px solid rgba(246,236,201,0.15);
  font-family: var(--font-mono); font-size: 0.72rem; color: rgba(246,236,201,0.55); letter-spacing: 0.5px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--on-dark); border-bottom: 1px solid rgba(246,236,201,0.3); padding-bottom: 2px; transition: border-color .2s var(--ease); }
.footer-links a:hover { border-color: var(--on-dark); }

/* ===== Drawer (design_system.md §4) ===== */
.drawer-backdrop {
  position: fixed; inset: 0; background: var(--bg-deep);
  opacity: 0; pointer-events: none; transition: opacity .32s var(--ease);
  z-index: 2000;
}
.drawer-backdrop.open { opacity: 0.55; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(880px, 60vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform .32s var(--ease);
  will-change: transform;
  overflow-y: auto;
  padding: 48px;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute; top: 32px; right: 32px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-family: var(--font-body); color: var(--ink-dim);
  border: 1px solid var(--line);
}
.drawer-close:hover { color: var(--accent); border-color: var(--accent); }
.drawer-eyebrow { font-family: var(--font-mono); color: var(--ink-dim); letter-spacing: 1.5px; font-size: 0.7rem; text-transform: uppercase; margin: 12px 0 12px; display: block; }
.drawer h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.2; margin-bottom: 8px; max-width: 640px; }
.drawer .drawer-meta { color: var(--ink-dim); font-size: 0.88rem; margin-bottom: 28px; }
.drawer .drawer-body p { color: var(--ink-dim); font-size: 1rem; line-height: 1.7; margin-bottom: 16px; }
.drawer .drawer-body ul { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.drawer .drawer-body li { color: var(--ink-dim); line-height: 1.6; font-size: 0.96rem; }
.drawer-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.drawer-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border: 1px solid var(--line); }
.drawer-gallery.single { grid-template-columns: 1fr; }
.drawer-gallery.single img { aspect-ratio: 4/3; }

@media (max-width: 640px) {
  .drawer { top: auto; bottom: 0; right: 0; left: 0; width: 100%; height: min(84vh, 680px); padding: 36px 28px; transform: translateY(100%); }
  .drawer.open { transform: translateY(0); }
}

.footer-tag { display: inline-block; margin-top: 6px; color: rgba(246,236,201,0.4); }
.name-note { background: var(--bg); padding: 26px 24px; margin-top: 12px; }
.name-note p { color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; line-height: 1.55; margin: 10px 0 0; max-width: none; }
