:root {
  --bg: #0d1117;
  --bg-elev: #11161d;
  --grid: #161c24;
  --border: #1f2933;
  --fg: #d6dde6;
  --fg-dim: #8b97a5;
  --fg-faint: #5b6573;
  --accent: #7fd1a0;
  --accent-dim: #4d8a6a;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-dim);
}
a:hover { color: #fff; border-bottom-color: var(--accent); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px 96px;
}

/* Header / nav */
header.site {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 18px 22px;
  margin-bottom: 40px;
}
header.site .name {
  color: var(--fg);
  font-size: 17px;
}
header.site .name::before {
  content: "> ";
  color: var(--accent);
}
header.site .tag {
  color: var(--fg-dim);
  font-size: 13px;
  margin-top: 4px;
}
header.site .tag::before {
  content: "> ";
  color: var(--accent);
}
header.site .social {
  margin-top: 8px;
  font-size: 13px;
  color: var(--fg-dim);
}
header.site .social::before {
  content: "> ";
  color: var(--accent);
}
header.site .social a {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent-dim);
}
header.site .social a:hover { color: #fff; border-bottom-color: var(--accent); }
header.site nav {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
header.site nav a {
  border: 1px solid var(--border);
  padding: 4px 10px;
  font-size: 13px;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--border);
}
header.site nav a:hover {
  color: var(--fg);
  border-color: var(--accent-dim);
}
header.site nav a.active {
  color: var(--accent);
  border-color: var(--accent-dim);
}
header.site nav a::before { content: "["; color: var(--fg-faint); margin-right: 2px; }
header.site nav a::after  { content: "]"; color: var(--fg-faint); margin-left: 2px; }

/* Section headings */
h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 12px;
}
h1 { font-size: 22px; }
h2 {
  font-size: 16px;
  margin-top: 40px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
  color: var(--accent);
}
h2::before { content: "## "; color: var(--fg-faint); }
h3 { font-size: 15px; color: var(--fg); }

p { margin: 0 0 14px; }

/* Home intro */
.intro {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 8px;
}
.intro .photo {
  width: 160px;
  height: 200px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}
.intro .body p:first-child { margin-top: 0; }
@media (max-width: 560px) {
  .intro { grid-template-columns: 1fr; }
  .intro .photo { width: 140px; height: 175px; }
}

/* Lists */
ul.plain {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
ul.plain li {
  padding: 4px 0;
  color: var(--fg);
}
ul.plain li .year {
  color: var(--fg-faint);
  margin-right: 10px;
  display: inline-block;
  min-width: 48px;
}
ul.plain li::before {
  content: "* ";
  color: var(--accent-dim);
}

/* Studio block on games page */
.studio {
  margin-bottom: 28px;
}
.studio h3 {
  color: var(--accent);
  margin-bottom: 8px;
}
.studio h3::before { content: "// "; color: var(--fg-faint); }

/* Talks */
.talk {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.talk.has-thumb {
  display: grid;
  grid-template-columns: 128px 1fr;
  column-gap: 18px;
  row-gap: 10px;
  align-items: start;
}
.talk.has-thumb.wide {
  grid-template-columns: 200px 1fr;
}
.talk.has-thumb > .thumb { grid-column: 1; grid-row: 1; }
.talk.has-thumb > .body  { grid-column: 2; grid-row: 1; }
.talk.has-thumb > details { grid-column: 1 / -1; }
.talk .thumb { aspect-ratio: 1 / 1; }
.talk.has-thumb.wide .thumb { aspect-ratio: 16 / 9; }
.talk .thumb .play { font-size: 22px; }
@media (max-width: 560px) {
  .talk.has-thumb.wide { grid-template-columns: 1fr; }
  .talk.has-thumb.wide > .thumb,
  .talk.has-thumb.wide > .body { grid-column: 1; }
  .talk.has-thumb.wide > .body { grid-row: 2; }
}
.talk .title {
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}
.talk .venues {
  color: var(--fg-dim);
  font-size: 13px;
  margin: 0 0 8px;
}
.talk .venues .v { display: block; }
.talk .co-authors {
  font-size: 13px;
  color: var(--fg-dim);
  margin: 6px 0 0;
}
.talk .meta {
  font-size: 13px;
  color: var(--fg-dim);
  margin: 6px 0 0;
}
.talk .meta a { font-size: 13px; }
.talk details {
  margin-top: 10px;
  color: var(--fg-dim);
  font-size: 13px;
}
.talk details summary {
  cursor: pointer;
  color: var(--accent);
  list-style: none;
  user-select: none;
}
.talk details summary::-webkit-details-marker { display: none; }
.talk details summary::before {
  content: "[+] ";
  color: var(--fg-faint);
}
.talk details[open] summary::before {
  content: "[-] ";
}
.talk details p {
  margin-top: 8px;
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
}

/* Shared thumbnail (used by both videos and talks) */
.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 200ms ease, opacity 200ms ease;
}
.thumb:hover img { transform: scale(1.04); }
.thumb .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 28px;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  opacity: 0.85;
}
.thumb:hover .play { opacity: 1; color: var(--accent); }
.thumb .badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.75);
  color: var(--accent);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--accent-dim);
  letter-spacing: 0.5px;
}
.thumb.playlist {
  background-image:
    repeating-linear-gradient(45deg, #161c24 0 8px, #11161d 8px 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb.playlist .play { color: var(--fg-faint); }

/* Interviews / videos */
.video {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  align-items: start;
}
.video:last-child { border-bottom: none; }
.video .info .yr {
  color: var(--fg-faint);
  font-size: 13px;
}
.video .info .title {
  color: var(--fg);
  margin-top: 2px;
  font-size: 15px;
}
.video .info .title a { border-bottom: none; color: var(--fg); }
.video .info .title a:hover { color: var(--accent); }
.video .info .kind {
  color: var(--fg-dim);
  font-size: 12px;
  margin-top: 4px;
}
@media (max-width: 560px) {
  .video { grid-template-columns: 1fr; }
}

/* Footer */
footer.site {
  margin-top: 64px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--fg-faint);
  font-size: 12px;
}
