:root {
  --bg: #050608;
  --bg-soft: #101318;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f2f4f7;
  --muted: #a5aab3;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --content-width: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 300;
  line-height: 1.7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 100vh;
  background: #020304;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #020304;
}

.video-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(115, 141, 185, 0.16), transparent 25%),
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.045), transparent 18%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.66) 0%, rgba(5, 6, 8, 0.76) 38%, rgba(2, 3, 4, 0.87) 100%);
}

.video-background-player {
  position: absolute;
  inset: 0;
}

.video-background-player iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100dvw, 177.78dvh);
  height: max(56.25dvw, 100dvh);
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 0;
  pointer-events: none;
  filter: saturate(0.78) brightness(0.5);
  transition: opacity 360ms ease;
}

body.has-video-background .video-background-player iframe {
  opacity: 1;
}

.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 20px 0 72px;
}

.hero {
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.hero-top {
  max-width: 980px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
  margin: 0;
  color: rgba(248, 250, 252, 0.97);
  font-size: clamp(1.35rem, 2.35vw, 2.2rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.025em;
  max-width: none;
}

.hero-bottom {
  max-width: 980px;
  padding-top: 16px;
}

.lead {
  max-width: none;
  margin: 0;
  color: rgba(215, 220, 228, 0.72);
  font-size: 0.87rem;
  line-height: 1.65;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 14px;
  padding: 0;
}

.hero-links a,
.hero-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(215, 220, 228, 0.86);
  font-family: inherit;
  font-weight: 300;
  font-size: 0.77rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease;
}

.hero-link-button {
  appearance: none;
  font-family: inherit;
  font-weight: 300;
  font-size: 0.77rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.hero-links a:hover,
.hero-link-button:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.language-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  color: rgba(242, 244, 247, 0.94);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.language-switch:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
}

.hero-link-button:focus-visible,
.playlist-modal-close:focus-visible,
.language-switch:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.meta-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meta-value {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

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

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  position: sticky;
  top: 14px;
  z-index: 8;
  margin: 20px 0 32px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(10, 12, 16, 0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.year-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(230, 235, 241, 0.96);
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.year-group + .year-group {
  margin-top: 36px;
}

.year-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.year-header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.75vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.year-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
}

.project-card {
  position: relative;
  display: block;
  min-height: 420px;
  text-decoration: none;
  overflow: hidden;
}

.project-card:hover .project-media img {
  transform: scale(1.03);
}

.project-media {
  position: absolute;
  inset: 0;
  min-height: 420px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.03) brightness(0.88);
  transition: transform 220ms ease;
}

.project-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 18px 20px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.08) 34%, rgba(0, 0, 0, 0.74) 100%);
}

.project h3 {
  margin: 0;
  max-width: 92%;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.28;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.project p {
  max-width: 90%;
  margin: 8px 0 0;
  color: rgba(242, 244, 247, 0.92);
  font-size: 0.78rem;
  line-height: 1.45;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(12, 14, 18, 0.72);
  color: #f2f4f7;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.playlist-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.playlist-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.playlist-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.playlist-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 56px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 9, 12, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.playlist-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.playlist-modal-header h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.playlist-modal-close {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 244, 247, 0.84);
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.playlist-modal-body {
  aspect-ratio: 16 / 9;
  background: #000;
}

.playlist-modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

body.is-modal-open {
  overflow: hidden;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 820px) {
  .page {
    width: min(calc(100% - 24px), var(--content-width));
    padding-top: 18px;
  }

  .hero {
    padding: 20px;
  }

  .video-background-player iframe {
    width: max(145dvw, 177.78dvh);
    height: max(100dvh, 81.56dvw);
    transform: translate(-50%, -50%) scale(1.02);
  }

  .year-nav {
    top: 10px;
    gap: 4px 6px;
    padding: 5px 7px;
  }

  .year-nav a {
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .meta,
  .project-list {
    grid-template-columns: 1fr;
  }

  .project {
    min-height: 0;
  }

  .project-card,
  .project-media {
    min-height: 320px;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
  }

  .playlist-modal {
    padding: 12px;
  }

  .language-switch {
    top: 12px;
    right: 12px;
  }

  .playlist-modal-panel {
    width: min(100vw - 24px, 1120px);
  }

  .playlist-modal-header {
    padding: 12px 14px;
  }
}

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