:root{
  --blue:#0a78b5;
  --blueHover:#0b83c6;
  --bg:#061a28;
  --ink:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.75);
  --shadow:0 18px 50px rgba(0,0,0,.35);
}

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

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

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

.container{
  width: min(1140px, calc(100% - 36px));
  margin: 0 auto;
}

/* Skip link: hidden unless focused */
a.skip{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space:nowrap;
  z-index:9999;
}
a.skip:focus{
  left: 12px;
  top: 12px;
  width:auto;
  height:auto;
  clip:auto;
  padding:10px 12px;
  background:#000;
  color:#fff;
  border-radius:10px;
}

/* Header (pure white bar) */
.topbar.topbar-light{
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff; /* pure white */
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand{ display:flex; align-items:center; }
.brand-link{ display:flex; align-items:center; }

/* Taller logo but still responsive */
.tcd-logo{
  height: clamp(52px, 6vw, 78px);
  width: auto;
  display:block;
}

/* Desktop nav */
.nav{
  display:flex;
  align-items:center;
  gap: 22px;
}

.nav a{
  color: rgba(10,20,28,.88);
  font-weight: 650;
  font-size: 16px;
}

.nav a:hover{
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* nav active state */
.nav a[aria-current="true"]{
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}

/* Base button (used in dark areas like hero) */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.12);
  color: var(--ink);
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

.btn:hover{
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

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

.btn-primary{
  background: var(--blue);
  color:#fff;
  border-color: rgba(255,255,255,.18);
}

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

.btn-ghost{
  background: transparent;
  border-color: rgba(255,255,255,.28);
}

.btn-ghost:hover{
  background: rgba(255,255,255,.10);
}

/* Donate button: ONLY styled inside header */
.topbar.topbar-light .btn-donate{
  background: var(--blue);
  color: #fff;
  border: 1px solid rgba(10,120,181,.45);
  box-shadow: 0 6px 16px rgba(10,120,181,.18);
  padding: 10px 18px;
}

.topbar.topbar-light .btn-donate:hover{
  background: var(--blueHover);
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle{
  display:none;
  align-items:center;
  gap: 10px;
  border: 1px solid rgba(0,0,0,.14);
  background: rgba(255,255,255,.98);
  color: rgba(10,20,28,.92);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  cursor:pointer;
}

.nav-toggle:hover{
  background: rgba(0,0,0,.04);
}

.nav-toggle-icon{
  width: 18px;
  height: 2px;
  background: rgba(10,20,28,.75);
  position: relative;
  border-radius: 2px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after{
  content:"";
  position:absolute;
  left:0;
  width: 18px;
  height: 2px;
  background: rgba(10,20,28,.75);
  border-radius: 2px;
}

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

#site-header.is-open .nav-toggle-icon{
  background: transparent;
}
#site-header.is-open .nav-toggle-icon::before{
  top:0;
  transform: rotate(45deg);
}
#site-header.is-open .nav-toggle-icon::after{
  top:0;
  transform: rotate(-45deg);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after{
  transition: transform .18s ease, top .18s ease, background .18s ease;
}

/* Anchor offset for sticky header */
:root{ --header-offset: 30px; }

html{
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

section[id]{
  scroll-margin-top: var(--header-offset);
}

/* Hero */
.hero{
  position: relative;
  min-height: 70vh;
  overflow:hidden;
}

.hero-bg{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(6,26,40,.35), rgba(6,26,40,.90)),
    url("assets/hero.jpg") center/cover no-repeat;
  filter: saturate(1.05);
}

.hero-inner{
  position: relative;
  min-height: 70vh;
  display:flex;
  align-items:center;
  padding: 92px 0 60px;
}

.hero-card{
  width: min(780px, 100%);
  background: rgba(7,27,43,.70);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.kicker{
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  opacity: .9;
}

.hero-card h1{
  margin: 10px 0 10px;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.06;
}

.lead{
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

.hero-actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Sections */
.section{
  padding: 56px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(900px 500px at 20% 10%, rgba(10,120,181,.15), transparent 60%);
}

.split-inner{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: start; /* keep stable */
}

.split-reverse .split-inner{
  grid-template-columns: .9fr 1.1fr;
}

.panel{
  background: rgba(7,27,43,.62);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 20px;
}

.panel h2{
  margin: 0 0 10px;
  font-size: 26px;
}

.panel p{
  margin: 0 0 12px;
  color: var(--muted);
}

.media{
  display:flex;
  flex-direction:column;
  gap: 10px;

  /* optical alignment without breaking layout */
  align-self: center;
  justify-content: flex-start;
}

.media-bg{
  width: 100%;
  height: 420px;        /* prevent collapse */
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  background: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.media-digital{
  background-image:
    linear-gradient(180deg, rgba(6,26,40,.15), rgba(6,26,40,.70)),
    url("assets/digital-learning.jpg");
}

.caption{
  font-size: 13px;
  color: rgba(255,255,255,.85);
}

/* Video */
.video-title{
  font-weight: 800;
  margin-bottom: 12px;
}

.video-container{
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
}

.video-container iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* Join */
.join{
  position: relative;
  padding: 64px 0;
  overflow:hidden;
}

.join-bg{
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(6,26,40,.45), rgba(6,26,40,.90)),
    url("assets/join.jpg") center/cover no-repeat;
}

.join-inner{ position: relative; }

.join-card{
  background: rgba(7,27,43,.72);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.join-card h2{ margin: 0 0 10px; font-size: 28px; }
.join-card h3{ margin: 18px 0 6px; }

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

.contacts{
  display:grid;
  gap: 12px;
  margin: 10px 0 16px;
}

.contact{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px;
}

.name{ font-weight: 900; }
.meta{ color: var(--muted); }
.dot{ margin: 0 8px; opacity: .7; }

.join-actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */
.footer{
  background:#04131e;
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 18px 0;
}

.footer-inner{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 12px;
  color: rgba(255,255,255,.75);
}

.footer-links a:hover{ text-decoration: underline; }
.sep{ padding: 0 8px; opacity: .6; }

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

  .media-bg{
    height: 300px;
    min-height: 300px;
  }
}

/* Mobile menu and hero improvements */
@media (max-width: 760px){
  :root{ --header-offset: 20px; }

  .nav-toggle{ display:inline-flex; }

  .nav{
    display:none;
    width:100%;
    flex-direction:column;
    gap: 10px;
    padding: 12px 0 6px;
    border-top: 1px solid rgba(0,0,0,.10);
  }

  #site-header.is-open .nav{
    display:flex;
  }

  .topbar-inner{
    display:grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    align-items:center;
    gap: 10px;
  }

  .brand{ grid-area: brand; }
  .nav-toggle{ grid-area: toggle; }
  .nav{ grid-area: nav; }

  .nav a{
    padding: 10px 6px;
    border-radius: 10px;
  }

  .nav a:hover{
    background: rgba(0,0,0,.04);
    text-decoration:none;
  }

  .topbar.topbar-light .btn-donate{
    width: 100%;
    justify-content:center;
  }

  .hero-inner{
    padding: 120px 0 36px;
    align-items:flex-start;
  }

  .hero-card{
    padding: 18px;
    border-radius: 16px;
  }

  .hero-card h1{
    font-size: clamp(26px, 7.2vw, 38px);
  }

  .lead{ font-size: 15px; }

  .hero-actions{
    flex-direction:column;
    align-items:stretch;
    gap: 10px;
  }

  .hero-actions .btn{
    width:100%;
    height: 44px;
    border-radius: 14px;
  }
}

@media (max-width: 420px){
  .container{
    width: min(1140px, calc(100% - 26px));
  }
  .tcd-logo{
    height: clamp(48px, 10vw, 70px);
  }
}

:focus-visible{
  outline: 30px solid rgba(255,255,255,.9);
  outline-offset: 3px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; transition: none !important; }
}
