@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-700-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f6efe4;
  --bg-strong: #ebdfcc;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.7);
  --surface-muted: rgba(16, 34, 57, 0.05);
  --surface-card-start: rgba(255, 255, 255, 0.9);
  --surface-card-end: rgba(255, 255, 255, 0.68);
  --ink: #102239;
  --ink-soft: #5e6878;
  --deep: #091522;
  --deep-soft: #13253d;
  --cyan: #89d7ff;
  --cyan-strong: #056f9d;
  --orange: #ff8a5a;
  --amber: #ffd08d;
  --line: rgba(16, 34, 57, 0.12);
  --line-strong: rgba(16, 34, 57, 0.18);
  --shadow: 0 24px 80px rgba(9, 21, 34, 0.12);
  --shadow-strong: 0 28px 90px rgba(9, 21, 34, 0.16);
  --radius-2xl: 36px;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --maxw: min(1180px, calc(100vw - 32px));
  --page-top-space: clamp(3.6rem, 5.5vw, 5.6rem);
  --page-bg-top: #f8f4ee;
  --page-bg-bottom: #eee4d6;
  --page-glow-orange: rgba(255, 138, 90, 0.22);
  --page-glow-cyan: rgba(137, 215, 255, 0.24);
  --grid-overlay: rgba(16, 34, 57, 0.045);
  --header-surface: rgba(248, 243, 235, 0.76);
  --header-border: rgba(16, 34, 57, 0.08);
  --header-hover: rgba(16, 34, 57, 0.06);
  --dropdown-surface: rgba(248, 243, 235, 0.98);
  --tag-bg: rgba(137, 215, 255, 0.2);
  --hero-accent-glow: rgba(255, 208, 141, 0.32);
  --button-shadow: 0 18px 40px rgba(255, 138, 90, 0.24);
  --focus-ring: rgba(62, 181, 241, 0.48);
}

:root[data-theme="dark"] {
  --bg: #0d1623;
  --bg-strong: #162233;
  --surface: rgba(12, 20, 31, 0.82);
  --surface-strong: rgba(16, 24, 36, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --surface-muted: rgba(255, 255, 255, 0.04);
  --surface-card-start: rgba(18, 27, 42, 0.94);
  --surface-card-end: rgba(10, 18, 30, 0.92);
  --ink: #e9eef5;
  --ink-soft: #b6c0cc;
  --deep: #081321;
  --deep-soft: #13253d;
  --cyan: #89d7ff;
  --cyan-strong: #62b6f0;
  --orange: #ff8a5a;
  --amber: #ffd08d;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --shadow-strong: 0 30px 90px rgba(0, 0, 0, 0.4);
  --page-bg-top: #09101a;
  --page-bg-bottom: #0d1723;
  --page-glow-orange: rgba(255, 138, 90, 0.12);
  --page-glow-cyan: rgba(137, 215, 255, 0.12);
  --grid-overlay: rgba(255, 255, 255, 0.04);
  --header-surface: rgba(10, 16, 25, 0.8);
  --header-border: rgba(255, 255, 255, 0.08);
  --header-hover: rgba(255, 255, 255, 0.08);
  --dropdown-surface: rgba(12, 20, 31, 0.98);
  --tag-bg: rgba(98, 182, 240, 0.16);
  --hero-accent-glow: rgba(255, 208, 141, 0.12);
  --button-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  --focus-ring: rgba(98, 182, 240, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, var(--page-glow-orange), transparent 28%),
    radial-gradient(circle at 88% 6%, var(--page-glow-cyan), transparent 24%),
    linear-gradient(
      180deg,
      var(--page-bg-top) 0%,
      var(--bg) 44%,
      var(--page-bg-bottom) 100%
    );
}

body.nav-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(var(--grid-overlay) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-overlay) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent 78%);
}

body::after {
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(255, 208, 141, 0.12),
      transparent 16%
    ),
    radial-gradient(
      circle at 82% 22%,
      rgba(137, 215, 255, 0.12),
      transparent 18%
    );
}

a {
  color: inherit;
  text-decoration: none;
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

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

:where(a, button, input, select, textarea, summary, video, iframe):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

header {
  background: transparent;
  border-bottom: 0;
}

main,
.section,
#main-content {
  position: relative;
  z-index: 1;
}

.container {
  width: var(--maxw);
  margin: 0 auto;
}

.section-label,
.tag,
.page-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--tag-bg);
  color: var(--cyan-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-label,
.tag,
.page-kicker {
  margin: 0 0 0.95rem;
}

h1,
h2,
.title,
.auth-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.94;
  color: var(--ink);
  text-wrap: balance;
}

.hero,
.page-intro,
.page-frame,
.auth-panel,
.card,
.subject,
details.period {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero::before,
.page-intro::before,
.card::before,
.subject::before,
details.period::before,
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--hero-accent-glow) 95%, transparent),
    transparent 32%
  );
  opacity: 0.7;
}

.hero,
.page-intro {
  margin-top: var(--page-top-space);
  padding: clamp(1.7rem, 3vw, 2.7rem);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(
      circle at top left,
      var(--hero-accent-glow),
      transparent 36%
    ),
    linear-gradient(180deg, var(--surface-card-start), var(--surface-card-end));
}

.hero > *,
.page-intro > * {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 1.5rem;
  align-items: center;
}

.hero h1,
.title {
  font-size: clamp(2.8rem, 5.4vw, 5.1rem);
}

.section h2,
.auth-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.hero p,
.subtitle,
.section-intro,
.card p,
.info-row,
.auth-status,
.years,
.hint,
.subject-meta,
.event-meta,
.members,
.section-note {
  color: var(--ink-soft);
  line-height: 1.72;
}

.hero p,
.subtitle,
.section-intro,
.auth-status {
  font-size: 1rem;
}

.subtitle,
.section-intro {
  max-width: 66ch;
}

.hero-img {
  width: 100%;
  height: 340px;
  min-height: 340px;
  object-fit: cover;
  border-radius: calc(var(--radius-2xl) - 10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-soft) 94%, transparent);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.btn,
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 3.3rem;
  padding: 0 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

[hidden] {
  display: none !important;
}

.btn:hover,
.auth-btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.auth-btn {
  color: var(--deep);
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: var(--button-shadow);
}

.btn-primary:hover,
.auth-btn:hover {
  box-shadow: 0 22px 48px rgba(255, 138, 90, 0.26);
}

.btn-ghost,
.auth-btn.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-soft) 94%, transparent);
  box-shadow: none;
}

.auth-btn[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: auto;
}

.btn[aria-disabled="true"] {
  opacity: 0.58;
  cursor: not-allowed;
}

.section {
  padding: clamp(1.6rem, 2.5vw, 2.25rem) 0 0;
}

.section-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.section h2 {
  margin-bottom: 0.8rem;
}

.section-intro {
  margin: 0 0 1.15rem;
}

.section-note {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.grid {
  display: grid;
  gap: 1.05rem;
}

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

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

.card {
  padding: 1.45rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    180deg,
    var(--surface-card-start),
    var(--surface-card-end)
  );
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.card:hover,
.subject:hover,
details.period:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cyan-strong) 28%, var(--line));
  box-shadow: var(--shadow-strong);
}

.card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
  font-size: 0.92rem;
}

.info-row span,
.event-meta {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--cyan-strong) 10%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
}

.members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.95rem;
}

.members-heading {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--ink);
}

.member-pill {
  padding: 0.48rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-soft) 94%, transparent);
}

.reveal-ready {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.photo-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem;
}

.photo-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 8px);
}

.photo-card .photo-subtitle {
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}
.slider {
  width: var(--maxw);
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.swiper.group-photo-slider {
  width: 100%;
  min-height: 460px;
  padding: 1.2rem 0;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 208, 141, 0.16),
      transparent 30%
    ),
    linear-gradient(180deg, var(--surface-card-start), var(--surface-card-end));
}

.swiper.group-photo-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 90px 0 90px -26px var(--shadow),
    inset -90px 0 90px -26px var(--shadow);
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
}

.swiper-slide {
  width: 62%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.45s ease;
  transform: scale(0.84);
  opacity: 0.4;
}

.swiper-slide-active {
  transform: scale(1);
  opacity: 1;
  z-index: 10;
}

.swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  border-radius: calc(var(--radius-2xl) - 12px);
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--ink);
  z-index: 20;
  width: 48px;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px;
  font-weight: 700;
}

.swiper-pagination-bullet {
  background: var(--ink-soft);
  opacity: 0.3;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--cyan-strong);
}

@media (max-width: 720px) {
  .swiper-slide {
    width: 82%;
  }
  .swiper-slide img {
    min-height: 300px;
  }
}

@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero,
  .page-intro {
    margin-top: 2.9rem;
    padding: 1.35rem;
    border-radius: 24px;
  }

  .hero-img {
    height: 260px;
    min-height: 260px;
    border-radius: 18px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn,
  .auth-btn {
    width: 100%;
  }

  .container {
    width: min(100vw - 20px, var(--maxw));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
