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

:root {
  --bg:        #f8f7f4;
  --surface:   #ffffff;
  --surface2:  #f2f1ee;
  --border:    #e2e0db;
  --border2:   #c8c5be;
  --text:      #1a1916;
  --muted:     #5a5750;
  --accent:    #1a5fa8;
  --accent2:   #134a85;
  --accent-warm: #7d3f5c;
  --live:      #1a7a4a;
  --wip:       #b86a00;
  --mono:      'IBM Plex Mono', ui-monospace, monospace;
  --serif:     'Frank Ruhl Libre', Georgia, serif;
  --sans:      'Hanken Grotesk', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── SECTIONS ── */
section { padding: 6rem 0; }
.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(26, 95, 168, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 95, 168, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26, 95, 168, 0.06) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding-top: 50px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  padding-top: 40px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.4s;
}
h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.6s;
}
.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.8s;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #0b0d0f;
  font-weight: 500;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.hero-stats {
  display: flex; gap: 3rem; margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1s;
}
.stat-num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}
.stat-detail {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* ── SECTION HEADERS ── */
.section-header { margin-bottom: 3rem; }
.section-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  color: var(--text);
}
.section-sub {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ── ABOUT ── */
#about { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-body p {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.about-body p strong { color: var(--text); font-weight: 400; }
.about-sidebar {}
.sidebar-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.sidebar-block h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  background: var(--border);
  color: var(--muted);
  border: 1px solid var(--border2);
  letter-spacing: 0.04em;
}
.tag.highlight { color: var(--accent); border-color: rgba(26, 95, 168, 0.3); background: rgba(26, 95, 168, 0.07); }

/* ── PROJECTS ── */
#projects {}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

/* Tiered sizing: hero (full width) &gt; wide (half) &gt; compact (third) —
   size decreases top to bottom in priority order, so the hierarchy
   reads without a legend. */
.project-card.tier-wide { grid-column: span 3; }
.project-card.tier-compact { grid-column: span 2; }

/* RaceScout: full-width featured card */
.project-card-featured {
  grid-column: 1 / -1;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.project-card-featured:hover {
  border-color: rgba(125, 63, 92, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(125, 63, 92, 0.12), 0 2px 6px rgba(26, 25, 22, 0.06);
}
.project-card-featured .project-thumb {
  border-bottom: none;
  border-right: 1px solid var(--border);
  height: 100%;
  min-height: 320px;
}
.project-card-featured .project-body {
  padding: 2rem;
}

/* Standard cards */
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: rgba(125, 63, 92, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(125, 63, 92, 0.12), 0 2px 6px rgba(26, 25, 22, 0.06);
}

/* Accent bar: grows in on hover/focus, on every card regardless of tier */
.project-card::before,
.project-card-featured::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-warm);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: center;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 1;
}
.project-card:hover::before,
.project-card:focus-within::before,
.project-card-featured:hover::before,
.project-card-featured:focus-within::before {
  opacity: 1;
  transform: scaleY(1);
}
.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.project-thumb-placeholder {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--border2);
  letter-spacing: 0.08em;
}
.thumb-pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(26, 95, 168, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 95, 168, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-meta {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}
.project-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
}
.badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
}
.badge-live { background: rgba(26, 122, 74, 0.1); color: var(--live); border: 1px solid rgba(26, 122, 74, 0.25); }
.badge-beta { background: rgba(184, 106, 0, 0.1); color: var(--wip); border: 1px solid rgba(184, 106, 0, 0.25); }
.badge-source { background: rgba(90, 87, 80, 0.1); color: var(--muted); border: 1px solid rgba(90, 87, 80, 0.25); }
.badge-poc { background: rgba(125, 63, 92, 0.1); color: var(--accent-warm); border: 1px solid rgba(125, 63, 92, 0.28); }
.project-desc {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}
.project-desc strong {
  font-weight: 500;
  color: var(--text);
}
.project-stack { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.25rem; }
.stack-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
}
.project-links { display: flex; gap: 0.75rem; }
.project-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.project-link:hover { color: var(--text); }
.project-link.disabled { color: var(--border2); pointer-events: none; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 25, 22, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}
.modal-header {
  padding: 2rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.modal-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.modal-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.2;
}
.modal-close {
  background: none; border: none;
  font-size: 1.25rem; color: var(--muted);
  cursor: pointer; flex-shrink: 0;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 1.75rem 2rem 2rem;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 300;
  line-height: 1.85;
}
.modal-body p { margin-bottom: 1rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body strong { font-weight: 500; color: var(--text); }
.modal-body .closing-q {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── WRITING ── */
#writing { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.writing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.writing-card {
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.2s;
  cursor: pointer;
}
.writing-card:hover { background: var(--surface2); }
.writing-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--border2);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.writing-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.writing-desc {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.65;
}

/* ── EXPERIENCE ── */
#experience {}
.exp-list { position: relative; padding-left: 1.5rem; }
.exp-list::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.exp-item {
  position: relative;
  padding-bottom: 3rem;
  padding-left: 2rem;
}
.exp-item:last-child { padding-bottom: 0; }
.exp-item::before {
  content: '';
  position: absolute; left: -1.5rem; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
}
.exp-header { margin-bottom: 0.5rem; }
.exp-role {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text);
}
.exp-company {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}
.exp-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}
.exp-body {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
}
.exp-body ul { list-style: none; padding: 0; }
.exp-body ul li {
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.35rem;
}
.exp-body ul li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--border2);
  font-size: 0.8rem;
}

/* ── FOOTER ── */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-links {
  display: flex; gap: 1.5rem; justify-content: center;
  margin-top: 1rem;
}
.footer-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--border2);
  letter-spacing: 0.06em;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  section { padding: 4rem 0; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.tier-wide,
  .project-card.tier-compact { grid-column: 1 / -1; }
  .project-card-featured { grid-template-columns: 1fr; }

.project-card-featured .project-thumb {
  height: 200px;
}

.project-card-featured .project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
  
  .skills-grid { grid-template-columns: 1fr; }
  .writing-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 2rem; }
}

/* ── AI DOCS ASSISTANT — HERO CARD ── */

/* Override featured card to use two-column metric + content layout */
.project-card-featured.ai-hero {
  grid-template-columns: 1fr 240px;
}

.ai-hero .project-thumb {
  border-bottom: none;
  border-left: 1px solid var(--border);
  border-right: none;
  height: auto;
  min-height: 100%;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Pulled quote replacing the problem/solution paragraphs on the hero card */
.spotlight-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--text);
  margin-top: 0.5rem;
}
.spotlight-quote::before {
  content: "\201C";
  color: var(--accent-warm);
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -0.32em;
  margin-right: 0.05em;
}

/* Stat strip in the hero sidebar */
.metric-stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
}

.metric-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-stat-val {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1;
}

.metric-stat-lbl {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Card right body adjustments */
.ai-hero .project-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
}

.project-eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.project-details-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.project-details-btn:hover { color: var(--text); }

/* ── AI DOCS ASSISTANT — MODAL ── */

.modal-screenshot {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  overflow: hidden;
  max-height: 520px;
}

.modal-screenshot img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

/* Letterbox variant: for portrait/mismatched-aspect screenshots that would
   otherwise be cropped or upscaled by object-fit: cover. Shows the full
   image, centered, at its own aspect ratio. */
.modal-screenshot.fit-contain {
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-screenshot.fit-contain img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-screenshot-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
  padding: 0.6rem 2rem 0;
}

.modal-section {
  margin-bottom: 1.75rem;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.modal-section p {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.modal-section p:last-child { margin-bottom: 0; }
.modal-section p strong { color: var(--text); font-weight: 500; }

/* Eval results table */
.eval-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.eval-table th {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.eval-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
}

.eval-table tr:last-child td { border-bottom: none; }

.eval-table .eval-val {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 500;
}

.eval-table .eval-best { color: var(--live); }

/* Modal demo link */
.modal-demo-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.modal-demo-link:hover { color: var(--text); }


/* ── BEYOND WORK ── */
.beyond-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.beyond-photo {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface2);
}

.beyond-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.beyond-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(26,25,22,0.65);
  padding: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.beyond-fullbleed {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 560px;
}

.beyond-fullbleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.beyond-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,25,22,0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

@media (max-width: 768px) {
  .beyond-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .beyond-fullbleed {
    height: 280px;
  }
}