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

:root {
  --bg: #022b3a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.09);
  --accent: #bfdbf7;
  --accent-warm: #f7c3be;
  --accent-teal: #04af9b;
  --text: #ffffff;
  --text-muted: #d1d5dc;
  --text-dim: #99a1af;
  --border: rgba(191, 219, 247, 0.2);
  --nav-bg: rgba(255, 255, 255, 0.1);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --max-width: 1100px;
  --radius: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.4) 100%), var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.75rem 1rem;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: 0 25px 25px rgba(0, 0, 0, 0.15);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

.hero-tag {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-year {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--accent-teal);
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0.375rem;
  transition: background 0.15s, transform 0.15s;
}

.btn-primary:hover {
  background: #28c6f9;
  color: #000;
  transform: translateY(-1px);
}

.scroll-hint {
  margin-top: 4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Sections */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 65ch;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: background 0.15s;
}

.card:hover {
  background: var(--bg-card-hover);
}

.card h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card.accent {
  border-color: rgba(247, 195, 190, 0.35);
}

.card.accent h3 {
  color: var(--accent-warm);
}

.info-list {
  list-style: none;
  font-size: 0.9rem;
}

.info-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.bullet-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bullet-list li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
}

.bullet-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-teal);
}

.bullet-list.compact li {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.note {
  font-size: 0.85rem !important;
  font-style: italic;
}

.address {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Class allocations */
.search-wrap {
  margin-bottom: 1.5rem;
}

.search-wrap input {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-wrap input:focus {
  border-color: var(--accent);
}

.search-wrap input::placeholder {
  color: var(--text-dim);
}

.class-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.class-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.class-card.highlight {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 1px var(--accent-teal);
}

.class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

.class-header h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.class-count {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.participant-list {
  list-style: none;
  max-height: 420px;
  overflow-y: auto;
}

.participant-list li {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.1s, color 0.1s;
}

.participant-list li:last-child {
  border-bottom: none;
}

.participant-list li.match {
  background: rgba(4, 175, 155, 0.15);
  color: var(--text);
}

.participant-list li.hidden {
  display: none;
}

.search-result {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(4, 175, 155, 0.12);
  border: 1px solid rgba(4, 175, 155, 0.35);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Schedule */
.schedule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tab {
  padding: 0.6rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.tab.active {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #000;
  font-weight: 600;
}

.schedule-panel {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 640px;
}

.schedule-table th,
.schedule-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.schedule-table th {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.2);
}

.schedule-table td:first-child {
  white-space: nowrap;
  color: var(--accent);
  font-weight: 600;
  width: 1%;
}

.schedule-table td:nth-child(2) {
  color: var(--text);
  font-weight: 500;
}

.schedule-table td:nth-child(3),
.schedule-table td:nth-child(4) {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.row-shared td {
  background: rgba(191, 219, 247, 0.04);
}

.row-lunch td:nth-child(2) {
  color: var(--accent-warm);
}

.row-ctf td:nth-child(2) {
  color: var(--accent-teal);
}

.row-dinner td:nth-child(2) {
  color: var(--accent-warm);
}

.ctf-notes {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(4, 175, 155, 0.08);
  border: 1px solid rgba(4, 175, 155, 0.25);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Topics */
.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.topic-chip {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}

.topic-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.contact-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.contact-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.contact-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.contact-card a {
  font-size: 0.85rem;
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-inner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: left;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 640px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 0.75rem 1rem;
  }

  .hero {
    padding-top: 8rem;
  }

  .schedule-table {
    font-size: 0.78rem;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.6rem 0.65rem;
  }
}
