:root {
  --bg:        #0d0f14;
  --surface:   #13161d;
  --border:    #1e2330;
  --accent:    #e8601c;
  --accent2:   #f5a623;
  --text:      #e2e4ea;
  --muted:     #6b7280;
  --tag-bg:    #1a1f2e;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

.inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}

/* ── Nav ── */
nav {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.nav-author {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }

/* ── Intro strip ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.intro {
  padding: clamp(36px, 5vh, 56px) 0 clamp(28px, 4vh, 44px);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(36px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.intro::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -8%;
  width: 55%;
  height: 130%;
  background: radial-gradient(ellipse, rgba(232, 96, 28, 0.09) 0%, transparent 65%);
  pointer-events: none;
}

.intro::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(232, 96, 28, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.5;
}

.intro > * { position: relative; z-index: 1; }

.intro-left {
  animation: fadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-cards {
  animation: fadeUp 0.55s 0.13s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.intro-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.intro-project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.intro-card-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
}

.intro-card-name span { color: var(--accent2); }

.intro-card-subtitle {
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  margin-top: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.card-subtitle {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.intro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.intro-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(232, 96, 28, 0.35);
  background: rgba(232, 96, 28, 0.07);
  border-radius: 4px;
  padding: 3px 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.intro-heading {
  font-size: clamp(32px, 3.5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.intro-body {
  font-size: clamp(14px, 1vw, 15px);
  color: var(--muted);
  max-width: 600px;
  line-height: 1.8;
}

.intro-body strong {
  color: var(--text);
  font-weight: 500;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 13px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.meta-value.accent { color: var(--accent); }

@media (max-width: 700px) {
  .intro-cards { grid-template-columns: 1fr; }
}

/* ── Section ── */
section {
  padding-bottom: clamp(48px, 7vh, 96px);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title span { color: var(--accent); margin-right: 10px; }

.anchor-heading {
  color: inherit;
  text-decoration: none;
}

.anchor-heading::after {
  content: ' #';
  font-size: 0.75em;
  color: var(--border);
  opacity: 0;
  transition: opacity 0.15s;
}

.anchor-heading:hover::after {
  opacity: 1;
}

.section-meta {
  font-size: 12px;
  color: var(--muted);
}

/* ── Project header ── */
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.card-title {
  font-size: clamp(16px, 1.3vw, 21px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.card-title span { color: var(--accent2); }

.card-desc {
  font-size: clamp(13px, 0.85vw, 14px);
  color: var(--muted);
  max-width: 680px;
  line-height: 1.7;
}

.card-bullets {
  list-style: none;
  font-size: clamp(13px, 0.85vw, 14px);
  color: var(--muted);
  max-width: 680px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.card-bullets li {
  padding-left: 16px;
  position: relative;
}

.card-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.card-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  transition: color 0.15s, border-color 0.15s;
}

.card-link:hover { color: var(--text); border-color: var(--muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 clamp(18px, 2vw, 32px) 18px;
}

.tag {
  background: var(--tag-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.tag-accent {
  color: var(--accent);
  border-color: rgba(232, 96, 28, 0.35);
  background: rgba(232, 96, 28, 0.07);
}

/* ── Rerun embed ── */
.rerun-embed {
  background: #080a0f;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 24px;
  position: relative;
}

.rerun-embed iframe {
  display: block;
  width: 100%;
  height: clamp(520px, 72vh, 960px);
  border: none;
}

.rerun-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rerun-overlay-hint {
  background: rgba(13, 15, 20, 0.7);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--muted);
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: opacity 0.15s;
}

.rerun-overlay:hover .rerun-overlay-hint {
  color: var(--text);
  border-color: var(--muted);
}

.rerun-overlay.hidden {
  display: none;
}

.embed-caption {
  padding: 10px clamp(18px, 2vw, 32px);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.embed-caption a { color: var(--muted); text-decoration: none; }
.embed-caption a:hover { color: var(--text); }

/* ── Upcoming grid ── */
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 22vw, 380px), 1fr));
  gap: 14px;
  margin-top: 8px;
}

.upcoming-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px;
  opacity: 0.5;
}

.upcoming-card .card-title {
  font-size: 14px;
  margin-bottom: 8px;
}

.upcoming-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--tag-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  margin-bottom: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ── Talos media ── */
.talos-media {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 16px;
  margin-top: 24px;
}

.talos-media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.talos-media-card-label {
  padding: 12px 16px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.talos-media-card img {
  width: 100%;
  display: block;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.talos-media-card .embed-caption {
  padding: 10px 16px;
}

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

@media (max-width: 600px) {
  .nav-author { display: none; }
  nav ul { gap: 18px; }
  .card-header { flex-direction: column; }
  .section-header { flex-direction: column; gap: 4px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
