/* whiteowlxvi — warm light default, optional dark mode via [data-theme="dark"] */

:root {
  --bg: #f8f7f4;
  --text: #2c2830;
  --text-muted: #736b82;
  --accent: #2d1b4e;
  --border: #e8e6e1;
  --border-hover: #d4d0c8;
  --surface: #f3f2ee;
  --surface-hover: #eceae5;
  --video-bg: #111111;
  --hero-shadow: 0 2px 14px rgba(44, 40, 48, 0.08);
  --column-width: 480px;
  --nav-gap: 1.5rem;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #f5f5f5;
  --text-muted: #9a9a9a;
  --accent: #d4c8e8;
  --border: #2a2a2a;
  --border-hover: #444444;
  --surface: #141414;
  --surface-hover: #1c1c1c;
  --video-bg: #000000;
  --hero-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Layout: nav sits just left of the centered column */
.layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--nav-gap);
  padding: 2.5rem 1.5rem 3.5rem;
  min-height: 100vh;
}

/* Left navigation — anchored beside column, not screen edge */
.side-nav {
  position: sticky;
  top: calc(50vh - 4rem);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.875rem;
  padding-top: 5.5rem;
  z-index: 10;
}

.side-nav__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.125rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.theme-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.side-nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.side-nav__link:hover,
.side-nav__link:focus-visible,
.side-nav__link--active {
  color: var(--text);
  outline: none;
}

.side-nav__link--active {
  font-weight: 600;
}

/* Center column */
.page {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--column-width);
}

.column {
  width: 100%;
}

/* Hero / top photo */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero__photo {
  width: 240px;
  height: 240px;
  margin: 0 auto 1.125rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--hero-shadow);
}

.hero__photo img,
.hero__photo video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }

  .hero__photo {
    background: var(--surface);
  }
}

.hero__title {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 2.125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: lowercase;
}

.hero__logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0.35rem auto 0.5rem;
  object-fit: cover;
  border-radius: 50%;
}

.hero__tagline {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__social {
  margin: 0.625rem 0 0;
}

.hero__social a,
.section__link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.hero__social a:hover,
.hero__social a:focus-visible,
.section__link:hover,
.section__link:focus-visible {
  color: var(--text);
  outline: none;
}

/* Sections */
.section {
  padding: 1.625rem 0;
  border-top: 1px solid var(--border);
}

.section__heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  font-weight: 600;
  color: var(--text);
}

[data-theme="dark"] .section__heading {
  color: var(--accent);
}

.section__text {
  margin: 0 0 0.875rem;
  color: var(--text);
}

.section__text:last-child {
  margin-bottom: 0;
}

.section__text--muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.section__text em {
  font-style: italic;
  color: var(--accent);
}

.section__text strong {
  color: var(--text);
  font-weight: 600;
}

/* Link tree cards */
.link-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-card {
  display: block;
  padding: 0.9375rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  outline: none;
}

.link-card__label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.link-card__desc {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.625rem;
  object-fit: cover;
  border-radius: 50%;
}

.footer__brand {
  margin: 0 0 0.625rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: lowercase;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.footer__nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--text);
  outline: none;
}

.footer__sep {
  color: var(--border);
  user-select: none;
}

.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer__top:hover,
.footer__top:focus-visible {
  color: var(--text);
  outline: none;
}

.footer__top-arrow {
  font-size: 0.875rem;
  line-height: 1;
}

/* Unified lesson block — video, audio, tools, table */
.lesson-block {
  margin-top: 1.125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.lesson-block .list-video {
  margin: 1.125rem auto 0.875rem;
  border-radius: 4px;
}

.lesson-block .list-audio {
  margin-bottom: 0.75rem;
}

.lesson-block .list-tools {
  margin-bottom: 0;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.lesson-block .vocab-list {
  border: none;
  border-radius: 0;
  background: var(--bg);
}

/* Vocabulary lists */
.page--list {
  max-width: 600px;
}

.list-header {
  margin-bottom: 1.5rem;
}

.list-header__back {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.list-header__back:hover,
.list-header__back:focus-visible {
  color: var(--text);
  outline: none;
}

.list-header__title {
  margin: 0 0 0.3rem;
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text);
}

.list-header__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.list-teaser {
  margin: 0 0 0.875rem;
}

.list-teaser__link {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.list-teaser__link:hover,
.list-teaser__link:focus-visible {
  color: var(--text);
  outline: none;
}

.list-teaser__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.list-video {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 1.125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--video-bg);
}

.list-video video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.list-audio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.list-audio__play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.list-audio__play:hover,
.list-audio__play:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  outline: none;
}

.list-audio__play.is-playing {
  border-color: var(--accent);
  color: var(--accent);
}

.list-audio__icon {
  font-size: 0.625rem;
  line-height: 1;
}

.list-audio__label {
  color: var(--text-muted);
}

.list-audio__pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.625rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.list-audio__pause:hover:not(:disabled),
.list-audio__pause:focus-visible:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.list-audio__pause:disabled {
  opacity: 0.35;
  cursor: default;
}

.list-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.list-tools__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.list-tools__link:hover,
.list-tools__link:focus-visible {
  color: var(--text);
  outline: none;
}

.vocab-list {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}

.vocab-list__head,
.vocab-list__row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  padding: 0.6875rem 1rem;
  align-items: center;
}

.vocab-list__head-play,
.vocab-list__play {
  grid-column: 1;
}

.vocab-list__head span:nth-child(2),
.vocab-list__greek {
  grid-column: 2;
  min-width: 0;
}

.vocab-list__head span:nth-child(3),
.vocab-list__translit {
  grid-column: 3;
  min-width: 0;
}

.vocab-list__head span:nth-child(4),
.vocab-list__english {
  grid-column: 4;
  min-width: 0;
}

.vocab-list__head-play {
  width: 2rem;
}

.vocab-list__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.vocab-list__play:hover,
.vocab-list__play:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
  outline: none;
}

.vocab-list__play.is-playing {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
}

.vocab-list__head {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.vocab-list__row {
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.vocab-list__row:hover {
  background: var(--surface-hover);
}

.vocab-list__row:last-child {
  border-bottom: none;
}

.vocab-list__greek {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.vocab-list__translit {
  color: var(--text-muted);
  font-size: 0.8125rem;
  opacity: 0.85;
}

.vocab-list__english {
  color: var(--text);
}

.vocab-list--preview {
  margin-top: 1rem;
}

.vocab-list__more {
  margin: 1rem 0 0;
}

.vocab-list__more a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.vocab-list__more a:hover,
.vocab-list__more a:focus-visible {
  color: var(--text);
  outline: none;
}

/* Tablet */
@media (max-width: 768px) {
  .layout {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .side-nav {
    padding-top: 0;
  }
}

/* Mobile: nav moves above column */
@media (max-width: 640px) {
  .layout {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.25rem 2.5rem;
  }

  .side-nav {
    position: static;
    align-items: center;
    padding-top: 0;
    gap: 0.625rem;
  }

  .theme-toggle {
    order: -1;
  }

  .side-nav__links {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }

  .hero {
    margin-bottom: 1.75rem;
  }

  .hero__photo {
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
  }

  .hero__title {
    font-size: 1.875rem;
  }

  .section {
    padding: 1.375rem 0;
  }

  .lesson-block .list-video {
    margin-top: 1rem;
  }

  .list-video {
    max-width: 100%;
  }

  .vocab-list__head,
  .vocab-list__row {
    grid-template-columns: 2rem 1fr;
    gap: 0.35rem 0.75rem;
    padding: 0.75rem 1rem;
  }

  .vocab-list__head span:nth-child(n+3),
  .vocab-list__row .vocab-list__translit,
  .vocab-list__row .vocab-list__english {
    grid-column: 2;
  }

  .vocab-list__row .vocab-list__greek {
    grid-column: 2;
  }

  .vocab-list__play {
    grid-column: 1;
    grid-row: span 3;
    align-self: start;
  }

  .vocab-list__head span:not(:first-child):not(:nth-child(2)) {
    display: none;
  }

  .vocab-list__row .vocab-list__translit::before {
    content: "· ";
    opacity: 0.5;
  }
}
