/*
  Minimal, modern styling for a GitHub Pages static site.
  No frameworks required.
*/

:root {
  --bg: #070b14;
  --bg2: #0b1220;
  --surface: rgba(255, 255, 255, 0.06);
  --surface2: rgba(255, 255, 255, 0.085);
  --stroke: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted2: rgba(255, 255, 255, 0.55);
  --accent: #9ae6ff;
  --accent2: #b6ff8f;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  --alt-border: rgba(255,255,255,0.06);
  --radius: 18px;
  --radius-sm: 14px;
  --max: 1100px;
  /* Slideshow banner ratio (match your cropped images). Example: 2 / 1, 16 / 9, 21 / 9 */
  --top-slideshow-ratio: 2 / 1;
}

html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg2: #ffffff;
  --surface: #ffffff;
  --surface2: #f2f5fa;
  --stroke: rgba(11, 18, 32, 0.12);
  --text: rgba(11, 18, 32, 0.92);
  --muted: rgba(11, 18, 32, 0.72);
  --muted2: rgba(11, 18, 32, 0.55);
  --shadow: 0 18px 55px rgba(11, 18, 32, 0.18);
  --alt-border: rgba(11, 18, 32, 0.08);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg2);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
}

html[data-theme="light"] body {
  background:
    linear-gradient(180deg, #f6f8fc 0%, #eaf3fa 100%);
}

a { color: inherit; text-decoration: none; }

code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--stroke);
  background: var(--surface2);
  border-radius: 8px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--stroke);
}

.skip-link:focus {
  left: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 11, 20, 0.65);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

html[data-theme="light"] .site-header {
  background: rgba(246, 248, 252, 0.82);
  border-bottom: 1px solid rgba(11,18,32,0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 0;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface2);
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  object-fit: cover;
  display: block;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(154,230,255,0.22), rgba(182,255,143,0.18));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text { display: grid; line-height: 1.15; }
.brand-title { font-weight: 800; font-size: 14px; letter-spacing: 0.02em; }
.brand-subtitle { font-size: 12px; color: var(--muted2); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.site-nav a {
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--muted);
}

.site-nav a:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-cta {
  border: 1px solid var(--stroke);
  background: var(--surface);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
}

.theme-switch:hover {
  background: var(--surface2);
}

.theme-switch-track {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  position: relative;
}

.theme-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface2);
  display: grid;
  place-items: center;
  transition: transform 160ms ease;
}

.theme-switch[aria-checked="true"] .theme-switch-thumb {
  transform: translateX(20px);
}

.theme-switch-icon {
  font-size: 15px;
  line-height: 1;
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  position: relative;
  border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.top-slideshow {
  background: var(--bg);
  border-bottom: 1px solid var(--alt-border);
}

.top-slideshow-track {
  position: relative;
  width: 100%;
  aspect-ratio: var(--top-slideshow-ratio);
  height: auto;
  overflow: hidden;
}

.top-slideshow-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.top-slideshow-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 1;
  transform: scale(1);
  transition: opacity 420ms ease, transform 1200ms ease;
  will-change: opacity, transform;
}

.top-slideshow-image.is-fading {
  opacity: 0;
  transform: scale(1.02);
}

.top-slideshow-controls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(7, 11, 20, 0.62);
  backdrop-filter: blur(10px);
  z-index: 1;
  max-width: min(var(--max), calc(100vw - 32px));
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar (keeps a clean look while still scrollable) */
.top-slideshow-controls::-webkit-scrollbar { height: 0; }
.top-slideshow-controls { scrollbar-width: none; }

@media (max-width: 480px) {
  .top-slideshow-controls {
    gap: 6px;
    padding: 7px 9px;
    max-width: calc(100vw - 20px);
  }
}

html[data-theme="light"] .top-slideshow-controls {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(11,18,32,0.14);
}

.top-slideshow-btn {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  padding: 0;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  opacity: 0.38;
  transform: scale(1);
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease, border-color 180ms ease;
}

html[data-theme="light"] .top-slideshow-btn {
  border: 1px solid rgba(11,18,32,0.12);
  background: rgba(11,18,32,0.05);
  color: rgba(11,18,32,0.88);
}

.top-slideshow-btn:hover {
  background: rgba(255,255,255,0.12);
  opacity: 0.65;
}

html[data-theme="light"] .top-slideshow-btn:hover {
  background: rgba(11,18,32,0.08);
}

.top-slideshow-btn[aria-current="true"] {
  border-color: rgba(154,230,255,0.40);
  background: linear-gradient(135deg, rgba(154,230,255,0.85), rgba(182,255,143,0.55));
  box-shadow: 0 0 0 2px rgba(7, 11, 20, 0.35);
  opacity: 1;
  transform: scale(1.45);
  animation: topSlideshowDotPulse 1300ms ease-in-out infinite;
}

@keyframes topSlideshowDotPulse {
  0%, 100% { transform: scale(1.45); filter: saturate(1); }
  50% { transform: scale(1.7); filter: saturate(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .top-slideshow-image,
  .top-slideshow-btn {
    transition: none;
  }

  .top-slideshow-btn[aria-current="true"] {
    animation: none;
  }
}

/* Desktop crop control (set per-slide with CSS var --top-slide-pos via script.js) */
@media (min-width: 901px) {
  .top-slideshow-image {
    object-position: var(--top-slide-pos, 50% 35%);
  }
}

.top-slideshow-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 230, 255, 0.26);
}

.hero {
  padding: 56px 0 28px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.1;
  margin: 14px 0 12px;
}

.hero-title-main {
  display: block;
}

.hero-title-line {
  display: block;
}

.hero-title-sub {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.35;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
}

.btn:hover {
  background: var(--surface2);
}

.btn.primary {
  border-color: rgba(154,230,255,0.32);
  background: linear-gradient(135deg, rgba(154,230,255,0.22), rgba(182,255,143,0.14));
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.hero-stats > div {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--surface);
}

.hero-stats dt {
  color: var(--muted2);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-stats .yt-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.hero-stats dd {
  margin: 3px 0 0;
  font-weight: 700;
  font-size: 13px;
}

.hero-card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card-top {
  padding: 16px 16px 10px;
}

.hero-card-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted2);
}

.hero-card-title {
  margin: 6px 0 4px;
  font-weight: 800;
  font-size: 16px;
}

.hero-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: rgba(0,0,0,0.35);
  border-top: 1px solid var(--stroke);
}

.hero-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-poster {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: block;
}

.yt-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: white;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.section {
  padding: 40px 0;
  background: var(--bg2);
}

.section.alt {
  background: var(--bg);
  border-top: 1px solid var(--alt-border);
  border-bottom: 1px solid var(--alt-border);
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.video-card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  overflow: hidden;
}

.video-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-meta {
  padding: 12px 12px 14px;
}

.video-title {
  margin: 0;
  font-weight: 800;
  font-size: 14px;
}

.video-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  padding: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p { margin: 0 0 10px; color: var(--muted); }

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.list li { margin: 6px 0; }

.callout {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(154,230,255,0.24);
  background: rgba(154,230,255,0.08);
  padding: 12px;
}

.callout-title {
  margin: 0;
  font-weight: 800;
  font-size: 13px;
}

.callout-body {
  margin: 6px 0 0;
  color: var(--muted);
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
}

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

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  background: var(--surface2);
  color: var(--text);
}

.social-icon svg {
  width: 22px;
  height: 22px;
}

.social-title {
  margin: 0;
  font-weight: 850;
}

.social-desc {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.social-arrow {
  margin-left: auto;
  color: var(--muted2);
  font-weight: 800;
}

.contact-card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.muted { color: var(--muted); }

.site-footer {
  padding: 26px 0 40px;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-top: 1px solid var(--alt-border);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(154,230,255,0.55), rgba(182,255,143,0.45), transparent);
  opacity: 0.9;
}

.site-footer::after {
  content: "";
  position: absolute;
  left: -140px;
  right: -140px;
  top: -160px;
  height: 280px;
  background:
    radial-gradient(closest-side, rgba(154,230,255,0.18), transparent 70%),
    radial-gradient(closest-side, rgba(182,255,143,0.14), transparent 70%);
  filter: blur(0px);
  opacity: 0.35;
  pointer-events: none;
}

html[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--surface2) 100%);
}

html[data-theme="light"] .site-footer::after {
  opacity: 0.18;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--alt-border);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .footer-inner {
  background: var(--surface);
  border: 1px solid var(--stroke);
}

.footer-meta {
  display: grid;
  gap: 4px;
}

.footer-meta p {
  margin: 0;
}

.to-top {
  color: var(--text);
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-weight: 700;
}

.to-top:hover {
  background: var(--surface2);
  color: var(--text);
}

.to-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 230, 255, 0.22);
}

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

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .social-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 28px 0;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 14px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    padding: 36px 0 18px;
  }

  .section {
    padding: 28px 0;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .site-nav {
    position: absolute;
    right: 18px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(320px, calc(100vw - 36px));
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(7, 11, 20, 0.92);
    box-shadow: var(--shadow);
  }

  html[data-theme="light"] .site-nav {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(11,18,32,0.14);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 12px;
  }

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

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
