:root {
  --bg: #020307;
  --bg-soft: #070c1a;
  --ink: #e9f3f1;
  --muted: #9eb8b2;
  --green: #5dff9f;
  --green-soft: rgba(93, 255, 159, 0.2);
  --grid: rgba(64, 153, 132, 0.14);
  --line: rgba(93, 255, 159, 0.35);
  --panel: rgba(5, 10, 21, 0.72);
  --panel-border: rgba(93, 255, 159, 0.38);
  --link-bg: rgba(8, 17, 24, 0.6);
  --glow: 0 0 1.4rem rgba(93, 255, 159, 0.18);
}

html[data-theme="light"] {
  --bg: #eef6f4;
  --bg-soft: #d7ebe6;
  --ink: #112018;
  --muted: #355348;
  --green: #1f8f5f;
  --green-soft: rgba(31, 143, 95, 0.15);
  --grid: rgba(30, 82, 63, 0.1);
  --line: rgba(31, 143, 95, 0.28);
  --panel: rgba(245, 252, 249, 0.88);
  --panel-border: rgba(31, 143, 95, 0.26);
  --link-bg: rgba(228, 246, 239, 0.78);
  --glow: 0 0 1rem rgba(31, 143, 95, 0.08);
}

html[data-theme="retro"] {
  --bg: #050011;
  --bg-soft: #1a083b;
  --ink: #f7f3ff;
  --muted: #d4c7f6;
  --green: #00f0ff;
  --green-soft: rgba(255, 60, 196, 0.2);
  --grid: rgba(0, 240, 255, 0.2);
  --line: rgba(255, 60, 196, 0.5);
  --panel: rgba(24, 8, 50, 0.78);
  --panel-border: rgba(0, 240, 255, 0.58);
  --link-bg: rgba(36, 10, 70, 0.62);
  --glow: 0 0 1.5rem rgba(255, 60, 196, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 17px;
  background:
    radial-gradient(circle at 10% -20%, color-mix(in oklab, var(--bg-soft) 80%, black) 0%, transparent 38%),
    radial-gradient(circle at 80% 0%, color-mix(in oklab, var(--bg-soft) 70%, #5dff9f 4%) 0%, transparent 44%),
    var(--bg);
  line-height: 1.6;
}

a {
  color: color-mix(in oklab, var(--green) 80%, white 15%);
  text-underline-offset: 0.2rem;
}

a:hover,
a:focus-visible {
  color: var(--green);
}

#starfield,
.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.noise {
  z-index: -1;
  background-image: radial-gradient(var(--grid) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(8px);
}

.brand {
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--green);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(0.5rem, 2vw, 1.2rem);
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a.current {
  color: var(--green);
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--glow);
  background: var(--link-bg);
}

.mode-option {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.76rem;
  line-height: 1;
  padding: 0.45rem 0.58rem;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    background-color 180ms ease;
}

.mode-option:hover,
.mode-option:focus-visible {
  border-color: var(--line);
  color: var(--ink);
}

.mode-option.active {
  color: var(--ink);
  border-color: var(--green);
  background: color-mix(in oklab, var(--link-bg) 62%, var(--green-soft) 38%);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--green) 65%, transparent),
    0 0 12px color-mix(in oklab, var(--green) 35%, transparent);
}

html[data-theme="retro"] body {
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
  background: #000080 url("./water-bg.jpg") repeat;
}

html[data-theme="retro"] #starfield,
html[data-theme="retro"] .noise {
  display: none;
}

html[data-theme="retro"] a {
  color: #0000ee;
}

html[data-theme="retro"] a:visited {
  color: #551a8b;
}

html[data-theme="retro"] a:hover,
html[data-theme="retro"] a:focus-visible {
  color: #ff0000;
}

html[data-theme="retro"] .site-header {
  position: static;
  background: #c0c0c0;
  border-bottom: 2px outset #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="retro"] .brand,
html[data-theme="retro"] .nav-links a {
  font-family: Verdana, Arial, sans-serif;
  text-decoration: underline;
  letter-spacing: 0;
  text-transform: none;
  color: #0000ee;
}

html[data-theme="retro"] .nav-links a.current {
  color: #cc0000;
}

html[data-theme="retro"] .mode-switch {
  border: 2px outset #ffffff;
  border-radius: 0;
  box-shadow: none;
  background: #c0c0c0;
}

html[data-theme="retro"] .mode-option {
  border-radius: 0;
  border: 1px outset #ffffff;
  font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
  padding: 0.35rem 0.5rem;
  color: #000;
  background: #dcdcdc;
}

html[data-theme="retro"] .mode-option.active {
  border: 1px inset #ffffff;
  background: #ffff99;
  box-shadow: none;
}

html[data-theme="retro"] .panel {
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  color: #000;
}

html[data-theme="retro"] h1,
html[data-theme="retro"] h2,
html[data-theme="retro"] h3 {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  text-shadow: none;
  color: #000;
}

html[data-theme="retro"] .hero h1,
html[data-theme="retro"] .page-hero h1 {
  font-size: 2rem;
  line-height: 1.2;
  max-width: none;
}

html[data-theme="retro"] .hero {
  display: block;
}

html[data-theme="retro"] .hero::after {
  content: "";
  display: table;
  clear: both;
}

html[data-theme="retro"] .hero-photo-wrap {
  float: left;
  width: auto;
  margin: 0 12px 6px 0;
}

html[data-theme="retro"] .hero p,
html[data-theme="retro"] .page-hero p,
html[data-theme="retro"] .talk-card > p:not(.talk-meta),
html[data-theme="retro"] .entry-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

html[data-theme="retro"] .hero-photo,
html[data-theme="retro"] .talk-media,
html[data-theme="retro"] .entry-card,
html[data-theme="retro"] .uniform-links a,
html[data-theme="retro"] .plain-item,
html[data-theme="retro"] .contact-form input,
html[data-theme="retro"] .contact-form textarea {
  border-radius: 0;
}

html[data-theme="retro"] .uniform-links a,
html[data-theme="retro"] .plain-item,
html[data-theme="retro"] .entry-card,
html[data-theme="retro"] .talk-link,
html[data-theme="retro"] .contact-submit {
  background: #ffffcc;
  border: 1px solid #000;
  box-shadow: none;
  transform: none;
  transition: none;
}

html[data-theme="retro"] .uniform-links a:hover,
html[data-theme="retro"] .uniform-links a:focus-visible,
html[data-theme="retro"] .entry-card:hover,
html[data-theme="retro"] .entry-card:focus-visible,
html[data-theme="retro"] .talk-link:hover,
html[data-theme="retro"] .talk-link:focus-visible,
html[data-theme="retro"] .contact-submit:hover,
html[data-theme="retro"] .contact-submit:focus-visible {
  transform: none;
  box-shadow: none;
  background: #fff0a6;
  border-color: #000;
}

html[data-theme="retro"] .site-footer,
html[data-theme="retro"] .kicker,
html[data-theme="retro"] .entry-meta,
html[data-theme="retro"] .talk-meta,
html[data-theme="retro"] .uniform-links span,
html[data-theme="retro"] .plain-item span {
  color: #222;
  font-family: Verdana, Arial, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

html[data-theme="retro"] .hero-photo {
  image-rendering: pixelated;
  width: 145px;
  height: auto;
  object-fit: unset;
  background: transparent;
  border: 0;
}

html[data-theme="retro"] .retro-only {
  display: block;
}

html[data-theme="retro"] .hero-photo-wrap figcaption {
  display: none;
}

html[data-theme="retro"] .retro-marquee {
  margin: 0 0 0.55rem;
  border: 1px solid #000;
  background: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.2rem 0;
}

html[data-theme="retro"] .retro-marquee span {
  display: inline-block;
  padding-left: 100%;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(
    90deg,
    #ff0000 0%,
    #ff9900 16%,
    #ffee00 32%,
    #00cc33 48%,
    #0099ff 64%,
    #6633ff 80%,
    #ff33cc 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: retro-marquee-scroll 12s linear infinite;
}

html[data-theme="retro"] .retro-counter {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

html[data-theme="retro"] #visitor-count {
  display: inline-block;
  min-width: 7ch;
  padding: 0 0.2rem;
  color: #00ff00;
  background: #000;
  border: 1px inset #777;
}

html[data-theme="retro"] .retro-footerbits {
  margin: 0 0 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

html[data-theme="retro"] .webring-badge {
  margin: 0;
  padding: 0.15rem 0.45rem;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  border: 2px ridge #fff;
  background: linear-gradient(90deg, #ff66cc 0%, #66ccff 35%, #ffff66 70%, #66ff99 100%);
}

html[data-theme="retro"] .netscape-badge {
  height: 31px;
  width: auto;
  border: 1px solid #000;
  image-rendering: pixelated;
}

@keyframes retro-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.layout {
  width: min(1120px, 92vw);
  margin: clamp(1rem, 2vw, 2rem) auto 4rem;
  display: grid;
  gap: 1.2rem;
}

.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--glow);
  padding: clamp(1rem, 2vw, 1.5rem);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.hero-copy {
  order: 2;
}

.hero h1 {
  margin: 0 0 0.7rem;
  line-height: 1.06;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 4.2vw, 3rem);
  max-width: 14ch;
}

.hero p {
  margin: 0 0 0.8rem;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.62;
}

.hero-photo-wrap {
  margin: 0;
  order: 1;
  width: 100%;
}

.hero-photo {
  width: 100%;
  height: clamp(405px, calc(34vw + 85px), 505px);
  border-radius: 14px;
  display: block;
  border: 1px solid var(--panel-border);
  object-fit: cover;
  object-position: center 24%;
}

.hero-photo-wrap figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.retro-only {
  display: none;
}

.links-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.stacked-panels {
  display: grid;
  gap: 1.2rem;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.16rem, 2.3vw, 1.6rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.uniform-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.uniform-links li {
  margin: 0;
}

.uniform-links a,
.plain-item {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  background: var(--link-bg);
  text-decoration: none;
  color: var(--ink);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.uniform-links a:hover,
.uniform-links a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  background: color-mix(in oklab, var(--link-bg) 80%, var(--green-soft) 20%);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--green) 65%, transparent),
    0 0 18px color-mix(in oklab, var(--green) 45%, transparent);
}

.uniform-links strong,
.plain-item strong {
  font-size: 1rem;
  line-height: 1.24;
}

.uniform-links span,
.plain-item span {
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--muted);
}

.site-footer {
  width: min(1120px, 92vw);
  margin: 0 auto 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  line-height: 1.06;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.page-hero p {
  margin: 0;
  max-width: 72ch;
  font-size: 1.03rem;
  line-height: 1.65;
}

.kicker {
  margin: 0 0 0.35rem;
  font-family: "Space Mono", "Courier New", monospace;
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.talk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.talk-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "media"
    "meta"
    "title"
    "desc"
    "cta";
  align-items: start;
  gap: 0.55rem;
  padding: 0.9rem;
}

.talk-card h2 {
  grid-area: title;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.talk-card p {
  margin: 0;
}

.talk-meta {
  grid-area: meta;
  font-family: "Space Mono", "Courier New", monospace;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.talk-card > p:not(.talk-meta) {
  grid-area: desc;
  font-size: 0.94rem;
  line-height: 1.45;
}

.talk-media {
  grid-area: media;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.talk-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

.talk-card:hover .talk-media img,
.talk-card:focus-within .talk-media img {
  transform: scale(1.03);
}

.talk-link {
  grid-area: cta;
  justify-self: start;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  border-radius: 9px;
  background: var(--link-bg);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.talk-link:hover,
.talk-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--green) 65%, transparent),
    0 0 18px color-mix(in oklab, var(--green) 45%, transparent);
}

.interview-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.interview-panel {
  padding: 1rem;
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.entry-card {
  display: grid;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  background: var(--link-bg);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.entry-card:hover,
.entry-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  background: color-mix(in oklab, var(--link-bg) 80%, var(--green-soft) 20%);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--green) 65%, transparent),
    0 0 18px color-mix(in oklab, var(--green) 45%, transparent);
}

.entry-meta {
  margin: 0;
  color: var(--muted);
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry-meta span {
  margin-left: 0.45rem;
  color: var(--ink);
  opacity: 0.8;
}

.entry-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.entry-cta {
  color: var(--green);
  font-weight: 500;
  font-size: 0.88rem;
}

.contact-layout {
  width: min(860px, 92vw);
}

.form-panel {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.contact-form {
  display: grid;
  gap: 0.55rem;
}

.contact-form label {
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--link-bg);
  color: var(--ink);
  font: inherit;
  padding: 0.65rem 0.72rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 170px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--green) 65%, transparent),
    0 0 18px color-mix(in oklab, var(--green) 35%, transparent);
}

.contact-submit {
  margin-top: 0.35rem;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--link-bg);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--green) 65%, transparent),
    0 0 18px color-mix(in oklab, var(--green) 45%, transparent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 940px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-header nav {
    order: 3;
    width: 100%;
  }

  .mode-switch {
    order: 2;
    margin: 0 auto;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .hero,
  .links-layout,
  .talk-grid,
  .interview-sections {
    grid-template-columns: 1fr;
  }

  .hero-photo-wrap {
    width: 100%;
  }

  .hero-photo {
    height: auto;
    object-fit: contain;
  }

  .talk-card {
    padding: 0.8rem;
  }
}

@media (max-width: 540px) {
  .nav-links {
    gap: 0.6rem;
  }
}
