/* ============================================
   Kalan Brunell — Engineering Portfolio
   Shared styles
   ============================================ */

:root {
  --bg: #f6f1e6;            /* warm cream */
  --bg-deep: #ede6d4;       /* deeper cream for section alt */
  --surface: #fffdf7;       /* off-white, slightly creamy */
  --text: #1c1a17;
  --muted: #6a6258;          /* warm gray */
  --muted-soft: #8a8276;
  --line: #ddd4bf;           /* warm beige line */
  --accent: #1f4868;         /* navy (primary) */
  --accent-hover: #133048;
  --accent-soft: #e8efe7;
  --warm: #2a5d8a;           /* brighter navy (secondary) */
  --warm-soft: #e6eef5;
  --max: 1100px;
  --radius: 12px;
  --ease: cubic-bezier(.22, .9, .32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Subtle paper-grain overlay — adds warmth without dirtying the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.62  0 0 0 0 0.5  0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Make sure content stays above the grain */
.nav, header, section, footer { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s var(--ease);
}
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------------------------------
   Nav
   ---------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 230, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav__brand:hover { color: var(--text); }
.nav__links {
  display: flex;
  gap: 4px;
}
.nav__links a {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}
@media (max-width: 600px) {
  .nav__links { gap: 0; }
  .nav__links a { padding: 6px 10px; font-size: 0.85rem; }
}

/* ----------------------------------
   Hero
   ---------------------------------- */
.hero {
  min-height: 86vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0 60px;
  position: relative;
}
.hero__text { min-width: 0; }
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 60px;
  }
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--warm);
  margin-bottom: 28px;
  font-weight: 600;
}
.hero__eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--warm);
}
.hero__name em {
  font-style: normal;
  font-weight: 700;
  color: var(--warm);
}
.hero__name {
  margin: 0 0 24px;
  line-height: 1.05;
}
.hero__tagline {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 40px;
  line-height: 1.6;
  font-weight: 400;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero__meta strong { color: var(--text); font-weight: 600; }
.hero__quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero__quicklinks a {
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 2px;
  transition: color .2s var(--ease);
}
.hero__quicklinks a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.hero__quicklinks a:hover { color: var(--text); }
.hero__quicklinks a:hover::after { transform: scaleX(1); }

.hero__visual {
  position: relative;
  align-self: center;
}
.hero__figure {
  margin: 0;
  position: relative;
}
.hero__figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 30% center;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(28, 26, 23, 0.18), 0 2px 6px rgba(28, 26, 23, 0.08);
  display: block;
}
.hero__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(42, 93, 138, 0.10), rgba(31, 72, 104, 0.06));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
@media (max-width: 900px) {
  .hero__visual { max-width: 480px; margin: 0 auto; }
  .hero__figure img { aspect-ratio: 3 / 2; }
  .hero__scroll { display: none; }
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 36px;
  background: var(--muted);
  animation: scrollCue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scrollCue {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(36px); opacity: 0; }
}

/* ----------------------------------
   Sections
   ---------------------------------- */
.section {
  padding: 110px 0;
  border-top: 1px solid var(--line);
}
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  color: var(--warm);
  font-weight: 600;
  margin-bottom: 18px;
}
.section__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--warm);
}
.section__head {
  margin-bottom: 64px;
  max-width: 760px;
}
.section__head h2 em,
.contact h2 em {
  font-style: normal;
  color: var(--warm);
  font-weight: 700;
}
.section__lead {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  color: var(--muted);
  margin: 14px 0 0;
  font-weight: 400;
  line-height: 1.6;
  max-width: 620px;
}

/* Editorial pull-quote — used between sections */
.pullquote {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 32px;
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: normal;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
  position: relative;
}
.pullquote::before,
.pullquote::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--warm);
  margin: 0 auto;
  opacity: 0.7;
}
.pullquote::before { margin-bottom: 24px; }
.pullquote::after { margin-top: 24px; }
.pullquote em { color: var(--warm); font-style: normal; font-weight: 600; }

/* ----------------------------------
   About
   ---------------------------------- */
.about {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}
.about__photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.about__body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.about__body p + p { margin-top: 1em; }
.about__meta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.9rem;
  color: var(--muted);
}
.about__meta strong { color: var(--text); font-weight: 600; display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about__photo { width: 160px; height: 160px; }
}

/* ----------------------------------
   Experience
   ---------------------------------- */
.experience {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) {
  .experience { grid-template-columns: 1fr; }
}
.experience__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.exp-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.exp-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  color: var(--text);
}
.exp-card--upcoming { cursor: default; }
.exp-card--upcoming:hover {
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}
.exp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}
.exp-card__title { margin: 0; font-size: 1.3rem; }
.exp-card__org {
  color: var(--muted);
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.exp-card__date {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin: 0 0 20px;
}
.exp-card__logo {
  height: 28px;
  width: auto;
  opacity: 0.85;
  flex-shrink: 0;
}
.exp-card ul {
  padding-left: 18px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}
.exp-card li { margin-bottom: 6px; line-height: 1.55; }
.exp-card__more {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.exp-extras {
  border-radius: var(--radius);
  padding: 32px;
  background: transparent;
  border: 1px dashed var(--line);
}
.exp-extras h3 { margin-top: 0; font-size: 1.15rem; }
.exp-extras__group { margin-bottom: 20px; }
.exp-extras__group:last-child { margin-bottom: 0; }
.exp-extras__group h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.exp-extras__role {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 4px 0;
}
.exp-extras__role strong { color: var(--text); font-weight: 500; }
.exp-extras__logos {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.exp-extras__logos img {
  height: 52px;
  width: auto;
  opacity: 0.85;
}

/* ----------------------------------
   Project list — magazine style
   ---------------------------------- */
.proj-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proj-item {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  padding: 24px;
  align-items: center;
  color: var(--text);
  border-radius: var(--radius);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
  position: relative;
}
.proj-item:hover {
  background: var(--surface);
  border-color: var(--warm);
  color: var(--text);
}
.proj-item:hover .proj-item__media img {
  transform: scale(1.03);
}
.proj-item:hover .proj-item__media::after {
  opacity: 0;
}
.proj-item:hover .proj-item__cta { color: var(--warm); }
.proj-item:hover .proj-item__cta::after { transform: translateX(8px); }
.proj-item:hover .proj-item__title { color: var(--accent); }

/* Alternate sides: even items flip media to the right */
.proj-item:nth-child(even) .proj-item__media { order: 2; }
.proj-item:nth-child(even) .proj-item__body  { order: 1; }

.proj-item__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-deep);
  box-shadow: 0 6px 22px rgba(40, 30, 15, 0.08);
  max-width: 480px;
}
.proj-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
  display: block;
}
.proj-item__media::after {
  /* warm tint overlay so images feel integrated */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184, 90, 48, 0.10), rgba(31, 72, 104, 0.10));
  mix-blend-mode: multiply;
  opacity: 1;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}

.proj-item__body {
  padding: 8px 0;
}
.proj-item__num {
  font-family: 'Inter', system-ui, sans-serif;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--warm);
  margin-bottom: 14px;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.proj-item__num::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--warm);
}
.proj-item__title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  transition: color .2s var(--ease);
  line-height: 1.2;
}
.proj-item__hook {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}
.proj-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.proj-tag {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
}
.proj-status {
  display: inline-block;
  background: var(--warm-soft);
  color: var(--warm);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(184, 90, 48, 0.25);
}
.proj-item__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: color .25s var(--ease);
}
.proj-item__cta::after {
  content: "→";
  font-family: 'Inter', system-ui, sans-serif;
  font-style: normal;
  font-size: 1.05rem;
  transition: transform .25s var(--ease);
}

@media (max-width: 800px) {
  .proj-item {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 20px;
  }
  .proj-item:nth-child(even) .proj-item__media { order: 0; }
  .proj-item:nth-child(even) .proj-item__body  { order: 0; }
}

/* ----------------------------------
   Competencies + Skill chips
   ---------------------------------- */
.comps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}
.comp {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.comp:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.comp h4 {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.comp p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.skill-groups {
  display: grid;
  gap: 28px;
}
.skill-group {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.skill-group:last-child { border-bottom: none; padding-bottom: 0; }
.skill-group__label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-top: 8px;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
@media (max-width: 720px) {
  .skill-group { grid-template-columns: 1fr; gap: 12px; }
}

/* ----------------------------------
   Education & Awards
   ---------------------------------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 820px) {
  .edu-grid { grid-template-columns: 1fr; gap: 40px; }
}
.edu-col h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 24px;
  font-weight: 600;
}
.edu-block {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 22px;
  margin-bottom: 32px;
}
.edu-block:last-child { margin-bottom: 0; }
.awards-col .edu-block { border-left-color: #c2c8d0; }
.edu-block__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 4px;
}
.edu-block__head h4 { margin: 0; font-size: 1.05rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.edu-block__date {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}
.edu-block__org {
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 0.93rem;
  font-style: italic;
}
.edu-block p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}
.edu-block p + p { margin-top: 8px; }

/* ----------------------------------
   Contact / footer
   ---------------------------------- */
.contact {
  text-align: center;
  padding: 140px 0 100px;
  border-top: 1px solid var(--line);
}
.contact__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--warm);
  margin-bottom: 18px;
  font-weight: 600;
}
.contact h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 18px;
}
.contact__lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.contact__links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.contact__links a {
  color: var(--text);
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.contact__links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ----------------------------------
   Detail / project pages
   ---------------------------------- */
.detail-hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  margin-bottom: 32px;
  transition: color .2s var(--ease);
}
.detail-back::before {
  content: "←";
  transition: transform .2s var(--ease);
  display: inline-block;
}
.detail-back:hover { color: var(--warm); }
.detail-back:hover::before { transform: translateX(-4px); }

.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  color: var(--warm);
  margin-bottom: 18px;
  font-weight: 600;
}
.detail-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--warm);
}

.detail-title {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin: 0 0 24px;
  max-width: 900px;
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 24px;
  align-items: center;
}
.detail-meta strong { color: var(--text); font-weight: 600; }

.detail-summary {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 760px;
  line-height: 1.7;
  margin: 0;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.detail-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.detail-github:hover {
  background: var(--accent);
  color: var(--bg);
}

.detail-body {
  padding: 60px 0 100px;
}
.detail-body > .container > * + * { margin-top: 40px; }

.detail-callout {
  background: var(--surface);
  border-left: 3px solid var(--warm);
  padding: 22px 26px;
  border-radius: 0 8px 8px 0;
  font-size: 1.02rem;
}
.detail-callout p { margin: 0; line-height: 1.7; }
.detail-callout strong { color: var(--accent); }

.detail-section h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin: 0 0 18px;
  color: var(--accent);
}
.detail-section h3 {
  font-size: 1.18rem;
  color: var(--accent);
  margin: 28px 0 12px;
}
.detail-section h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  margin: 22px 0 8px;
  font-weight: 600;
}
.detail-section p {
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 16px;
}
.detail-section p:last-child { margin-bottom: 0; }

.detail-figure { margin: 28px 0; }
.detail-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(40, 30, 15, 0.10);
  background: var(--surface);
}
.detail-figure figcaption {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.detail-figure--narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.detail-figure--tight img { box-shadow: 0 4px 16px rgba(40, 30, 15, 0.06); }

.detail-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 28px 0;
}
.detail-grid-2 .detail-figure { margin: 0; }
@media (max-width: 720px) {
  .detail-grid-2 { grid-template-columns: 1fr; }
}

.detail-grid-side {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
  margin: 28px 0;
}
.detail-grid-side--flip {
  grid-template-columns: 320px 1fr;
}
.detail-grid-side .detail-figure { margin: 0; }
@media (max-width: 760px) {
  .detail-grid-side,
  .detail-grid-side--flip {
    grid-template-columns: 1fr;
  }
}

.detail-pillrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.detail-pill {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.detail-pill h4 {
  margin: 0 0 6px;
  color: var(--warm);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.detail-pill p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

.detail-credits {
  margin-top: 64px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.detail-credits h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 12px;
  font-weight: 600;
}
.detail-credits ul {
  padding-left: 18px;
  margin: 0 0 12px;
  line-height: 1.6;
}
.detail-credits li { margin-bottom: 6px; }
.detail-credits__note {
  font-style: italic;
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

.detail-footer-nav {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.detail-footer-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color .2s var(--ease);
}
.detail-footer-nav a:hover { color: var(--warm); }

/* ----------------------------------
   Reveal-on-scroll animations
   ---------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll::after { animation: none; }
}
