:root {
  --silver-mist:   #B0BEC5;   /* Logo "SILVER", decorative accents        */
  --digital-teal:  #2196A6;   /* Logo "BYTE", CTAs, links, accent bars    */
  --slate-navy:    #1E3A5F;   /* Headlines, nav bg, section headers       */
  --charcoal:      #2D2D2D;   /* Body text, footer bg                     */
  --soft-white:    #F4F6F8;   /* Page background, card backgrounds        */
  --white:         #FFFFFF;   /* Card fills, nav bg on scroll             */
  --light-teal:    #E6F5F8;   /* Teal card tints, highlight backgrounds   */
  --light-navy:    #E9EFF7;   /* Navy card tints, pill/badge backgrounds  */
  --mid-gray:      #6B7A8D;   /* Body copy, descriptive text              */
  --light-border:  #DCE3EA;   /* Card borders, dividers                   */
  --dark-navy:     #12263F;   /* Footer, deepest backgrounds              */
}

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

html { 
  font-size: 16px; 
  scroll-behavior: smooth;
}

body {
  background-color: var(--soft-white);
  color: var(--charcoal);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.7;
}

/* Typography Grid */
h1   { font-size: clamp(2rem,   5vw, 3.5rem);  font-family: 'Big Shoulders Display', sans-serif; font-weight: 700; color: var(--slate-navy); line-height: 1.1; margin-bottom: 0.5em; }
h2   { font-size: clamp(1.5rem, 3vw, 2.25rem); font-family: 'Instrument Sans', sans-serif; font-weight: 600; color: var(--slate-navy); line-height: 1.2; margin-bottom: 0.5em; }
h3   { font-size: clamp(1.1rem, 2vw, 1.5rem);  font-family: 'Work Sans', sans-serif; font-weight: 600; color: var(--slate-navy); line-height: 1.3; margin-bottom: 0.5em; }
p    { font-size: 1rem; line-height: 1.7; color: var(--mid-gray); font-family: 'Work Sans', sans-serif; margin-bottom: 1em; }

a {
  color: var(--digital-teal);
  text-decoration: underline;
}

a:hover {
  color: var(--slate-navy);
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--digital-teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--digital-teal); color: white;
  padding: 0.5rem 1rem; border-radius: 0 0 6px 6px;
  font-weight: 600; z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Wordmark */
.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.wordmark:hover {
  text-decoration: none;
}
.wm-silver,
.wm-byte {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  display: inline;
}
.wm-silver { color: var(--silver-mist); }
.wm-byte   { color: var(--digital-teal); }
.wm-academy {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 400;
  font-size: clamp(0.65rem, 1.2vw, 0.85rem);
  color: var(--charcoal);
  letter-spacing: 0.25em;
  margin-top: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  transition: box-shadow 0.3s ease;
  border-bottom: 1px solid var(--light-border);
}
.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  border-bottom-color: transparent;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: 'Work Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--digital-teal); }

.nav-cta {
  background: var(--digital-teal);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
  min-width: 240px;
  text-align: center;
}
.nav-cta:hover {
  background: var(--slate-navy) !important;
  transform: translateY(-1px);
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none;
  cursor: pointer; padding: 0;
}
.hamburger .bar {
  display: block;
  height: 2px; width: 100%;
  background: var(--slate-navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    padding: 1.5rem 2rem 2rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    border-top: 3px solid var(--digital-teal);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--light-border);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-radius: 6px;
    padding: 0.75rem 0 !important;
  }
}

/* Layout Patterns */
section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.section-label {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--digital-teal);
  margin-bottom: 0.5rem;
  display: block;
}
.section-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--slate-navy);
  margin-bottom: 1rem;
}

.teal-bar {
  border-left: 5px solid var(--digital-teal);
  padding-left: 1.25rem;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--charcoal);
  line-height: 1.6;
  margin: 1.5rem 0;
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--light-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 3px 3px 0 var(--light-border);
  transition: box-shadow 0.2s, transform 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: 4px 4px 16px rgba(30,58,95,0.10);
  transform: translateY(-2px);
}
.card.accent-teal { border-left: 5px solid var(--digital-teal); }
.card.accent-navy { border-left: 5px solid var(--slate-navy); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--digital-teal);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--slate-navy);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33,150,166,0.3);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: var(--digital-teal);
  border: 2px solid var(--digital-teal);
}
.btn-secondary:hover {
  background: var(--light-teal);
  color: var(--digital-teal);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Navy Strip */
.navy-bar {
  background: var(--slate-navy);
  color: #DAE4EA;
  padding: 1.25rem 0;
  font-size: 0.95rem;
}
.navy-bar .notes-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}
.navy-bar .notes-list li {
  display: flex;
  align-items: center;
}
.navy-bar .dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--digital-teal);
  border-radius: 50%;
  margin-right: 0.6rem;
  flex-shrink: 0;
}

/* Badges */
.series-badge {
  display: inline-block;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 0.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-navy { background: var(--light-navy); color: var(--slate-navy); }
.badge-teal { background: var(--light-teal); color: var(--digital-teal); }

/* Hero Section Specifics */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0;
  background: var(--white);
  border-bottom: 1px solid var(--light-border);
  text-align: left;
}
.hero h1 {
  max-width: 800px;
}
.hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  color: var(--charcoal);
}

/* Footer */
footer {
  background: var(--charcoal);
  color: #8A8C96;
  padding: 3rem 0;
}
footer .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer .footer-url {
  color: var(--digital-teal);
  text-decoration: none;
  font-size: 0.9rem;
}
footer .footer-url:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  footer .footer-inner { flex-direction: column; text-align: center; }
}
