:root {
  color-scheme: light;
  --background: #f8efeb;
  --surface: #fff9f6;
  --ink: #38241e;
  --accent: #6b2038;
  --highlight: #ecd6ca;
  --border: #93674f;
  --hero: #671f36;
  --hero-ink: #fff4eb;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #24171a;
  --surface: #352125;
  --ink: #fff0e7;
  --accent: #ffc4ce;
  --highlight: #583629;
  --border: #b5856c;
  --hero: #561c30;
  --hero-ink: #fff4eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}

.wrap { width: min(68rem, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  color: var(--ink);
  font: bold 1.5rem Georgia, serif;
  text-decoration: none;
}

.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; padding-bottom: 0.75rem; }

.nav a {
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  border-radius: 0.35rem;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: var(--highlight);
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

main a { color: var(--accent); }

.nav a:hover { text-decoration: underline; }

.hobbies-menu { position: relative; }

.hobbies-menu summary {
  padding: 0.55rem 0.7rem;
  cursor: pointer;
}

.hobbies-menu:has(a[aria-current="page"]) summary {
  background: var(--highlight);
  color: var(--accent);
  border-radius: 0.35rem;
  font-weight: 700;
}

.hobbies-menu-links {
  position: absolute;
  z-index: 1;
  inset-inline-start: 0;
  width: max-content;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
}

.hobbies-menu-links a { display: block; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  color: var(--accent);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

main { padding-block: clamp(1.5rem, 5vw, 4rem); }

.hero {
  padding: clamp(1.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  background: var(--hero);
  color: var(--hero-ink);
}

h1 { font-family: Georgia, serif; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 7vw, 5rem); margin: 0; }
p { font-size: 1.25rem; }
.hero p { max-width: 53ch; margin-bottom: 0; }

.overview h2,
.overview h3 {
  font-family: Georgia, serif;
  line-height: 1.2;
}

.overview h2 { margin: 0 0 1rem; font-size: 1.75rem; }
.overview h3 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.overview h3 a { color: var(--accent); text-underline-offset: 0.15em; }

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
}

.overview-grid article {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.overview-stack { grid-template-columns: minmax(0, 1fr); }

.overview-grid p { margin: 0; }

.media-section + .media-section { margin-top: 2rem; }

.media-card {
  display: grid;
  grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
}

.media-poster {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.35rem;
}

.media-placeholder {
  display: grid;
  place-items: center;
  padding: 0.5rem;
  background: var(--highlight);
  text-align: center;
}

.media-card .media-rating { margin-bottom: 0.65rem; font-size: 1rem; }
.media-rating span { color: var(--accent); }

.half-star { position: relative; display: inline-block; }

.half-star::before {
  position: absolute;
  inset-inline-start: 0;
  content: "★";
  clip-path: inset(0 50% 0 0);
}

@media (max-width: 30rem) {
  .media-card { grid-template-columns: minmax(0, 1fr); }
  .media-poster { max-width: 8rem; }
}

.feedback-form {
  display: grid;
  gap: 0.65rem;
  max-width: 34rem;
  margin-top: 1rem;
}

.feedback-form label { font-weight: 650; }

.feedback-form select,
.feedback-form input,
.feedback-form textarea {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: var(--background);
  color: var(--ink);
  font: inherit;
}

.feedback-form button { justify-self: start; }

.review-feedback { margin-top: 1rem; }

#review-dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--ink);
}

#review-dialog::backdrop { background: rgb(0 0 0 / 65%); }
#review-dialog h2 { margin-top: 0; }
#review-dialog form + p { white-space: pre-wrap; overflow-wrap: anywhere; }

.hobbies-table { width: 100%; border-collapse: collapse; font-size: 1.125rem; }
.hobbies-table caption { text-align: left; margin-bottom: 0.5rem; }
.hobbies-table th,
.hobbies-table td {
  padding: clamp(0.65rem, 2vw, 1.25rem);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.hobbies-table thead { background: var(--highlight); }
.hobbies-table th:first-child { width: 22%; }

button {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 0.35rem;
  background: var(--highlight);
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
