/* ============================================================
   Digital Finance Seminar — Academic Landing Page
   Color Palette:
     --navy:      #1a365d
     --blue:      #2b6cb0
     --slate:     #2d3748
     --gray-100:  #f7fafc
     --gray-200:  #edf2f7
     --gray-300:  #e2e8f0
     --gray-500:  #a0aec0
     --white:     #ffffff
   ============================================================ */

:root {
  --navy:     #1a365d;
  --blue:     #2b6cb0;
  --blue-light: #3182ce;
  --slate:    #2d3748;
  --gray-50:  #f9fafb;
  --gray-100: #f7fafc;
  --gray-200: #edf2f7;
  --gray-300: #e2e8f0;
  --gray-400: #cbd5e0;
  --gray-500: #a0aec0;
  --gray-600: #718096;
  --gray-700: #4a5568;
  --white:    #ffffff;
  --teal:     #2c7a7b;
  --teal-light: #38a89d;
  --amber:    #b7791f;
  --amber-light: #d69e2e;
  --font-serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max-width: 960px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --radius: 4px;
  --transition: 0.2s ease;
}

/* ---- Reset & Base ---- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-serif);
  color: var(--slate);
  background: var(--white);
  line-height: 1.7;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--blue-light);
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.35rem;
}

/* ---- Layout ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */

.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0 2.75rem;
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 50%, var(--blue) 100%);
}

.header-brand {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1rem;
  display: block;
}

.header-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.header-subtitle {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gray-400);
  letter-spacing: 0.01em;
}

/* ---- Section ---- */

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--gray-200);
}

.section-title {
  margin-bottom: 1.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--navy);
  display: inline-block;
}

/* ---- Overview Meta Grid ---- */

.overview-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.meta-item {
  font-size: 0.92rem;
}

.meta-label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  display: block;
  margin-bottom: 0.2rem;
}

.meta-value {
  color: var(--slate);
}

/* ---- Learning Objectives ---- */

.objectives-list {
  list-style: none;
  padding-left: 0;
  counter-reset: obj;
}

.objectives-list li {
  counter-increment: obj;
  padding-left: 2.25rem;
  position: relative;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.objectives-list li::before {
  content: counter(obj);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- Day Cards ---- */

.day-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.day-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.day-card:hover {
  box-shadow: var(--shadow-md);
}

.day-card-header {
  background: var(--gray-50);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.day-number {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  white-space: nowrap;
}

.day-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.day-card-body {
  padding: 1.25rem 1.5rem;
}

.day-card-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.92rem;
  margin: 0;
}

.day-card-body dt {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  padding-top: 0.15em;
  white-space: nowrap;
}

.day-card-body dd {
  margin: 0;
  color: var(--slate);
  line-height: 1.55;
}

.day-card-body dd + dt {
  margin-top: 0.25rem;
}

.day-card-body dd + dd {
  margin-top: 0.25rem;
}

.entry-point {
  font-style: italic;
  color: var(--gray-700);
}

/* ---- Downloads ---- */

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.download-card:hover {
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.download-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.download-label {
  flex: 1;
}

.download-section-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  margin-bottom: 0.6rem;
  margin-top: 1.25rem;
}

.download-section-label:first-child {
  margin-top: 0;
}

/* ---- Reading List ---- */

.reading-list {
  list-style: none;
  padding-left: 0;
  counter-reset: ref;
}

.reading-list li {
  counter-increment: ref;
  padding: 0.7rem 0 0.7rem 2.75rem;
  position: relative;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--gray-100);
}

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

.reading-list li::before {
  content: "[" counter(ref) "]";
  position: absolute;
  left: 0;
  top: 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-500);
  width: 2rem;
  text-align: right;
}

.reading-list .ref-authors {
  font-weight: 600;
  color: var(--navy);
}

.reading-list .ref-title {
  /* inherits serif */
}

.reading-list .ref-venue {
  font-style: italic;
  color: var(--gray-600);
  font-size: 0.88rem;
}

/* ---- Textbooks ---- */

.textbook-list {
  list-style: none;
  padding-left: 0;
}

.textbook-list li {
  padding: 0.55rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--gray-100);
  padding-left: 1rem;
  position: relative;
}

.textbook-list li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--gray-400);
}

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

.textbook-list .book-title {
  font-style: italic;
}

.textbook-list .book-meta {
  color: var(--gray-600);
  font-size: 0.88rem;
}

/* ---- Track Divider ---- */

.track-divider {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 50%, var(--teal) 100%);
  margin: 0;
}

/* ---- Track Labels ---- */

.track-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.track-label--phd {
  background: var(--navy);
  color: var(--white);
}

.track-label--bsc {
  background: var(--teal);
  color: var(--white);
}

/* ---- BSc accent overrides ---- */

.section--bsc .section-title {
  border-bottom-color: var(--teal);
}

.section--bsc .day-number {
  color: var(--teal);
}

.section--bsc .day-card:hover {
  box-shadow: 0 4px 12px rgba(44, 122, 123, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section--bsc .download-card {
  background: var(--teal);
}

.section--bsc .download-card:hover {
  background: var(--teal-light);
}

.section--bsc .overview-meta {
  border-left-color: var(--teal);
}

.section--bsc .objectives-list li::before {
  background: var(--teal);
}

/* ---- MSc accent overrides ---- */

.track-label--msc {
  background: var(--amber);
  color: var(--white);
}

.section--msc .section-title {
  border-bottom-color: var(--amber);
}

.section--msc .day-number {
  color: var(--amber);
}

.section--msc .day-card:hover {
  box-shadow: 0 4px 12px rgba(183, 121, 31, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section--msc .download-card {
  background: var(--amber);
}

.section--msc .download-card:hover {
  background: var(--amber-light);
}

.section--msc .overview-meta {
  border-left-color: var(--amber);
}

.section--msc .objectives-list li::before {
  background: var(--amber);
}

/* ---- MSc track divider ---- */

.track-divider--msc {
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber-light) 50%, var(--amber) 100%);
}

/* ---- Sidebar track groups ---- */

.sidebar-track-label {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin: 1rem 0 0.35rem 0.75rem;
  display: block;
}

.sidebar-links a.sidebar-link--msc:hover {
  border-left-color: var(--amber);
}

.sidebar-links a.sidebar-link--bsc:hover {
  border-left-color: var(--teal);
}

/* ---- Footer ---- */

.site-footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 2rem 0;
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.footer-copy {
  color: var(--gray-600);
}

/* ---- Sidebar Layout ---- */

.layout {
  display: flex;
  min-height: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 220px;
  min-width: 220px;
  height: 100vh;
  padding: 1.75rem 1.25rem 2rem;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  overflow-y: auto;
}

.sidebar-heading {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
}

.sidebar-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar-links li {
  margin-bottom: 0;
}

.sidebar-links a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.sidebar-links a:hover {
  background: var(--gray-200);
  color: var(--navy);
  border-left-color: var(--navy);
  text-decoration: none;
}

.layout > main {
  flex: 1;
  min-width: 0;
}

/* ---- Responsive ---- */

@media (max-width: 700px) {
  .sidebar {
    display: none;
  }

  .header-title {
    font-size: 1.6rem;
  }

  .header-subtitle {
    font-size: 0.95rem;
  }

  .overview-meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .downloads-grid {
    grid-template-columns: 1fr;
  }

  .day-card-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .day-card-body dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .day-card-body dt {
    margin-top: 0.6rem;
  }

  .day-card-body dt:first-child {
    margin-top: 0;
  }

  .section {
    padding: 2rem 0;
  }

  h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .header-title {
    font-size: 1.35rem;
  }

  .container {
    padding: 0 1rem;
  }

  .day-card-body {
    padding: 1rem;
  }

  .download-card {
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
  }
}

/* ---- Print ---- */

@media print {
  .site-header {
    background: none;
    color: var(--navy);
    padding: 1rem 0;
  }

  .site-header::after {
    display: none;
  }

  .header-title,
  .header-subtitle {
    color: var(--navy);
  }

  .header-brand {
    color: var(--gray-600);
  }

  .day-card {
    box-shadow: none;
    border: 1px solid var(--gray-300);
    break-inside: avoid;
  }

  .download-card {
    background: none;
    color: var(--navy);
    border: 1px solid var(--gray-300);
    box-shadow: none;
  }

  .sidebar {
    display: none;
  }

  .site-footer {
    background: none;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-300);
  }
}
