:root {
  --navy-deep: #071029;
  --navy-primary: #0a1638;
  --navy-card: #10204d;
  --navy-elevated: #162a61;
  --navy-border: #253d7c;
  --gold: #d4af37;
  --gold-bright: #e4c356;
  --gold-soft: rgba(212, 175, 55, 0.16);
  --text-main: #f3f6fc;
  --text-muted: #c2cde4;
  --text-soft: #9bb0d6;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 8px 24px rgba(3, 8, 22, 0.35);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--navy-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 700;
  padding: 12px 18px;
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--navy-deep);
  border-bottom: 2px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
  padding: 4px 0;
}

.brand-crest-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 52px;
  background-color: var(--white);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

.brand-crest {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background-color: var(--gold-bright);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  background-color: var(--navy-card);
  color: var(--gold-bright);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-gold {
  background-color: var(--gold);
  color: var(--navy-deep);
}

.btn-gold:hover {
  background-color: var(--gold-bright);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-outline:hover {
  background-color: var(--gold-soft);
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--navy-border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--white);
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy-primary) 100%);
  border-bottom: 1px solid var(--navy-border);
  padding: 56px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 40px;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5vw, 3.35rem);
  line-height: 1.12;
  color: var(--white);
}

.hero-lead {
  margin: 0 0 26px;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--navy-border);
}

.meta-item dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.meta-item dd {
  margin: 0;
  font-weight: 600;
  color: var(--white);
}

.hero-crest-panel {
  display: flex;
  justify-content: center;
}

.crest-card {
  margin: 0;
  width: 100%;
  max-width: 310px;
  background-color: var(--navy-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.crest-frame {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
}

.crest-image {
  margin: 0 auto;
  max-height: 240px;
  width: auto;
  object-fit: contain;
}

.crest-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crest-caption strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--white);
}

.crest-caption span {
  font-size: 0.85rem;
  color: var(--gold-bright);
}

/* Shared Section Layout */
.section {
  padding: 58px 0;
}

.section:nth-of-type(even) {
  background-color: #091330;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  color: var(--white);
}

.section-intro {
  margin: 0;
  max-width: 64ch;
  color: var(--text-muted);
}

/* Overview Section */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background-color: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 22px;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--gold-bright);
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* Subjects Section */
.subject-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  background-color: var(--navy-card);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--white);
}

.filter-btn.is-active {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
}

.search-wrap {
  flex: 1 1 250px;
  max-width: 340px;
}

.search-input,
.task-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  background-color: var(--navy-deep);
  color: var(--white);
  transition: border-color 0.2s ease;
}

.search-input::placeholder,
.task-input::placeholder {
  color: var(--text-soft);
}

.search-input:focus,
.task-input:focus {
  border-color: var(--gold);
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.subject-card {
  display: flex;
  flex-direction: column;
  background-color: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.subject-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.subject-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.subject-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-bright);
  background-color: var(--gold-soft);
  padding: 4px 9px;
  border-radius: 4px;
}

.subject-code {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.06em;
}

.subject-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--white);
}

.subject-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-toggle {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 14px;
  background-color: var(--navy-elevated);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.card-toggle:hover {
  border-color: var(--gold);
  background-color: var(--navy-deep);
}

.card-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--navy-border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card-details ul {
  margin: 0;
  padding-left: 18px;
}

.card-details li + li {
  margin-top: 6px;
}

.empty-state {
  margin: 20px 0 0;
  padding: 18px;
  border: 1px dashed var(--navy-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
}

/* Schedule Section */
.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.day-tab {
  min-height: 44px;
  padding: 0 18px;
  background-color: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.day-tab:hover {
  border-color: var(--gold);
  color: var(--white);
}

.day-tab.is-active {
  background-color: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
}

.schedule-panel {
  background-color: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.schedule-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--navy-border);
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-time {
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 0.95rem;
}

.schedule-info strong {
  display: block;
  color: var(--white);
  margin-bottom: 2px;
}

.schedule-info span {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.session-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
}

.session-check-label:hover {
  background-color: var(--navy-elevated);
}

.session-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  cursor: pointer;
}

.schedule-row.is-done .schedule-info strong,
.schedule-row.is-done .schedule-info span {
  text-decoration: line-through;
  opacity: 0.68;
}

/* Study Notes / Tasks Section */
.tasks-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.tasks-intro h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--white);
}

.tasks-intro p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.progress-summary {
  display: inline-block;
  padding: 8px 14px;
  background-color: var(--navy-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 0.92rem;
}

.tasks-box {
  background-color: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.task-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.task-form .btn {
  flex-shrink: 0;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-border);
}

.task-item:last-child {
  border-bottom: none;
}

.task-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  flex: 1;
  cursor: pointer;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
  cursor: pointer;
}

.task-text {
  color: var(--text-main);
  word-break: break-word;
}

.task-item.is-completed .task-text {
  text-decoration: line-through;
  color: var(--text-soft);
}

.task-delete {
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.task-delete:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.task-empty {
  padding: 14px 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.task-footer {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* Footer */
.site-footer {
  background-color: var(--navy-deep);
  border-top: 2px solid var(--gold);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-color: var(--navy-card);
  border: 1px solid var(--gold);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold-bright);
}

.footer-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--white);
}

.footer-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.back-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--gold-bright);
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.back-top:hover {
  border-color: var(--gold);
  background-color: var(--navy-card);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-crest-panel {
    justify-content: flex-start;
  }

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

  .tasks-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--navy-deep);
    border-bottom: 2px solid var(--gold);
    display: none;
    padding: 10px 20px 16px;
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    width: 100%;
  }

  .overview-grid,
  .subjects-grid {
    grid-template-columns: 1fr;
  }

  .schedule-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .task-form {
    flex-direction: column;
  }
}
