:root {
  color-scheme: light dark;
  --bg: light-dark(#faf9f7, #121211);
  --surface: light-dark(#f2f0eb, #171715);
  --surface-2: light-dark(#ebe9e3, #1a1a18);
  --border: light-dark(#e3e0d9, #262521);
  --text: light-dark(#1c1b19, #e8e6e1);
  --text-2: light-dark(#55524b, #a8a59e);
  --text-3: light-dark(#64615a, #8a877f);
  --text-4: light-dark(#6e6a62, #7a776f);
  --faint: light-dark(#757168, #57544d);
  --dot: light-dark(#d5d1c9, #3a3934);
  --link: light-dark(#3f3c36, #c9c6bf);
  --link-underline: light-dark(#cfcbc3, #3a3934);
  --avatar-bg: light-dark(#e3e0d9, #2a2a28);
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 88px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 44px;
  min-height: calc(100vh - 144px);
  box-sizing: border-box;
}

.id {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.id-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--avatar-bg);
  object-fit: cover;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bio {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 52ch;
  text-wrap: pretty;
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text-4);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  flex-wrap: wrap;
}

.meta .dot {
  color: var(--dot);
}

.meta a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--link-underline);
}

nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

nav a {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}

nav a:hover {
  background: var(--surface);
}

nav .t {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

nav .d {
  font-size: 14px;
  color: var(--text-3);
}

nav .ar {
  font-size: 13px;
  color: var(--faint);
}

.talks {
  display: flex;
  flex-direction: column;
}

.talks h2 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
}

.talk {
  border-bottom: 1px solid var(--border);
}

.talk-row {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  gap: 16px;
  align-items: baseline;
  width: 100%;
  margin: 0;
  padding: 13px 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.talk-row:hover {
  background: var(--surface);
}

.talks .dt {
  font-size: 13px;
  color: var(--faint);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.talks .tt {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.talks .vn {
  font-size: 13px;
  color: var(--text-3);
}

.talks .tg {
  font-size: 14px;
  color: var(--faint);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.talk-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.talk.open .talk-panel {
  grid-template-rows: 1fr;
}

.talk-inner {
  overflow: hidden;
  min-height: 0;
}

.talk-body {
  padding: 2px 0 18px;
  margin-left: 92px;
}

.talk-body p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.talk-body .talk-meta {
  font-size: 13px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.talk-body .talk-meta a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--link-underline);
}

.talk-body iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  background: var(--surface-2);
  margin: 14px 0 4px;
}

.talk-body .talk-ext {
  display: block;
  position: relative;
  margin: 14px 0 4px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  text-decoration: none;
  color: #e8e6e1;
}

.talk-body .talk-ext img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.12s;
}

.talk-body .talk-ext:hover img {
  opacity: 1;
}

.talk-body .talk-ext .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

footer {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--faint);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

footer .yr {
  margin-left: auto;
}

@media (max-width: 560px) {
  nav a {
    grid-template-columns: 1fr auto;
  }

  nav .d {
    grid-column: 1 / -1;
  }

  nav .ar {
    grid-row: 1;
    grid-column: 2;
  }

  .talk-row {
    grid-template-columns: 76px 1fr auto;
  }

  .talks .vn {
    grid-column: 2;
  }

  .talks .tg {
    grid-row: 1;
    grid-column: 3;
  }

  .talk-body {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  nav a,
  .talk-row,
  .talk-panel,
  .talk-ext img {
    transition: none;
  }
}
