/* The Data and AI School of London - Main Styles */
/* Dark theme (default) */
:root,
html[data-theme="dark"] {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-elevated: #21262d;
  --text-primary: #e6edf3;
  --text-muted: #8b949e;
  --accent: #00d4aa;
  --accent-hover: #00f5c4;
  --accent-muted: rgba(0, 212, 170, 0.15);
  --border: #30363d;
  --header-bg: rgba(13, 17, 23, 0.9);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

/* Light theme */
html[data-theme="light"] {
  --bg-dark: #f6f8fa;
  --bg-card: #ffffff;
  --bg-elevated: #eaeef2;
  --text-primary: #1f2328;
  --text-muted: #656d76;
  --accent: #098c6a;
  --accent-hover: #057a5c;
  --accent-muted: rgba(9, 140, 106, 0.12);
  --border: #d0d7de;
  --header-bg: rgba(246, 248, 250, 0.9);
  --shadow: 0 8px 32px rgba(31, 35, 40, 0.12);
}

/* System theme: follow OS preference */
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --bg-dark: #f6f8fa;
    --bg-card: #ffffff;
    --bg-elevated: #eaeef2;
    --text-primary: #1f2328;
    --text-muted: #656d76;
    --accent: #098c6a;
    --accent-hover: #057a5c;
    --accent-muted: rgba(9, 140, 106, 0.12);
    --border: #d0d7de;
    --header-bg: rgba(246, 248, 250, 0.9);
    --shadow: 0 8px 32px rgba(31, 35, 40, 0.12);
  }
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-elevated: #21262d;
    --text-primary: #e6edf3;
    --text-muted: #8b949e;
    --accent: #00d4aa;
    --accent-hover: #00f5c4;
    --accent-muted: rgba(0, 212, 170, 0.15);
    --border: #30363d;
    --header-bg: rgba(13, 17, 23, 0.9);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}
.logo span {
  color: var(--accent);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
.nav-main a {
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--text-primary);
  background: var(--accent-muted);
}
.nav-main .nav-theme-wrap {
  margin-left: 0.25rem;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition:
    background var(--transition),
    border-color var(--transition);
}
.theme-toggle:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
}
.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
}

/* Main content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 200%;
  background: radial-gradient(
    ellipse at center,
    var(--accent-muted) 0%,
    transparent 60%
  );
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}
.hero h1 .highlight {
  color: var(--accent);
}
.hero .tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  position: relative;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.hero-image {
  position: relative;
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Image sections */
.image-section {
  margin-bottom: 3rem;
}
.image-section img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  object-fit: cover;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.image-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.image-grid img:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.img-with-caption {
  margin-bottom: 2rem;
}
.img-with-caption img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.img-with-caption .caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.banner-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.banner-image img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  display: block;
}
.two-col-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.two-col-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  object-fit: cover;
}
@media (max-width: 768px) {
  .two-col-image {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
}

/* Section titles */
.section-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Course cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.course-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.course-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.course-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.course-card .badge {
  display: inline-block;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

/* Content sections */
.content-section {
  margin-bottom: 3rem;
}
.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-actions {
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.footer-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-nav a:hover {
  color: var(--accent);
}

/* Page title (inner pages) */
.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.page-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 640px;
}

/* About: values / list */
.values-list {
  list-style: none;
}
.values-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.values-list li:last-child {
  border-bottom: none;
}
.values-list .value-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* Utility */
.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;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-main {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 1rem;
  }
  .nav-main.is-open {
    display: flex;
  }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .hero {
    padding: 2.5rem 0;
  }
}
