/* ==========================================================================
   1. DESIGN TOKENS & RESET
   ========================================================================== */
:root {
  --bg-main: #0a0f1f;
  --bg-secondary: #0e1627;
  --bg-hero: radial-gradient(ellipse at center, #0f1a2b 0%, #0a0f1f 60%, #070b16 100%);
  --text-primary: #e6edf3;
  --text-secondary: #9fb0c8;
  --text-muted: #7a8ca5;
  --accent-blue: #38bdf8;
  --border-soft: #1f2a44;
  --glow-blue: 0 0 15px rgba(56, 189, 248, 0.25);
  --container-max: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
html {
    scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  background: var(--bg-main); 
  color: var(--text-primary); 
  font-family: "Inter", system-ui, sans-serif; 
  line-height: 1.6;
}
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; transition: var(--transition); }

/* ==========================================================================
   2. HEADER & SEARCH INTEGRATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 22, 39, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* UPDATED BRAND SECTION FOR LOGO */
.brand { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 1.4rem; 
    font-weight: 700; 
}
.brand-text {
    display: flex;
}
.brand span { color: var(--accent-blue); }

.brand-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===============================
   CoreDeploy Search Bar (Final)
   =============================== */

/* Accessible hidden label */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Search wrapper */
.site-search {
  width: 100%;
  max-width: 420px;
}

.site-search input {
  -webkit-appearance: none;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
}


/* Input field */
.site-search input {
  width: 100%;
  height: 48px; /* Touch target perfect */
  font-size: 16px;

  padding: 0 48px 0 18px; /* Space for icon on right */

  border-radius: 999px; /* Pill shape */
  border: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;

  outline: none;
  transition: all 0.25s ease;

  /* Right-side icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}

/* Placeholder styling */
.site-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* Focus effect */
.site-search input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* Coming soon look */
.site-search input[readonly] {
  cursor: default;
  opacity: 0.85;
}


/* --- Navigation --- */
.primary-nav ul {
  display: flex;
  gap: 1.5rem;
}

.primary-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.primary-nav a span { font-size: 1.2rem; margin-bottom: 2px; }
.primary-nav a:hover { color: var(--accent-blue); }

/* ==========================================================================
   3. HERO & GRID LAYOUT (The 2x2 Table)
   ========================================================================== */
.hero { padding: 6rem 0; text-align: center; background: var(--bg-hero); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }

.core-sections { padding: 4rem 0; }
.core-sections h2 { text-align: center; margin-bottom: 3rem; font-size: 2rem; }

/* The Grid Logic */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* FORCES 2 COLUMNS */
  gap: 20px;
}

.section-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.5rem;
  height: 100%; /* Makes all cards in a row equal height */
  transition: var(--transition);
}

.section-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue);
  transform: translateY(-4px);
}

.card-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-soft), transparent);
  margin: 1rem 0;
}

.roadmap-list li { margin-bottom: 0.6rem; font-size: 0.9rem; color: var(--text-muted); }
.roadmap-list a:hover { color: var(--accent-blue); padding-left: 4px; }

/* ==========================================================================
   6. VALUE PROPOSITION
   ========================================================================== */
.value-prop {
  padding: 5rem 0;
  border-top: 1px solid var(--border-soft);
}

.value-list {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.value-list li {
  padding-left: 1rem;
  border-left: 2px solid var(--accent-blue);
}

.value-list strong {
  display: block;
  color: var(--accent-blue);
  margin-bottom: 0.25rem;
}
/* ======================================================================
   PAGE HEADING (About Page Only)
   ====================================================================== */

.page-heading {
  padding: 2.5rem 1rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-heading p {
  font-size: 0.95rem;
  color: var(--text-muted);
}
/* ======================================================================
   LEGAL PAGE HEADING (Terms / Privacy)
   ====================================================================== */

.page-legal {
  padding: 4rem 1rem 2rem;
  text-align: center;
}

.page-legal .subtitle {
  color: var(--text-secondary);
}

.page-legal .updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.legal-email {
  color: var(--accent-blue);
  font-weight: 600;
}



/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-soft);
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav ul {
  display: flex;
  gap: 2rem;
}

.footer-nav a:hover {
  color: var(--text-primary);
}
/* --- Add this before Section 8 --- */

/* Make navigation and card icons stand out with a glow */
.primary-nav a span, 
.section-card h3 span {
  display: inline-flex; /* Ensures proper alignment */
  color: var(--accent-blue);
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.4));
  margin-right: 8px;
  transition: var(--transition);
}

/* Optional: Make the emoji pop even more when you hover the link */
.primary-nav a:hover span {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.8));
  transform: scale(1.1);
}

/* ==========================================================================
   SCROLL OFFSET FIX
   ========================================================================== */

/* This creates a 'buffer' so the sticky header doesn't cover the card title */
#foundations-core,
#infrastructure,
#programming-data,
#ai-intelligence {
    scroll-margin-top: 100px; 
}

/* On Mobile, the header might be taller, so we increase the gap */
@media (max-width: 768px) {
    #foundations-core,
    #infrastructure,
    #programming-data,
    #ai-intelligence {
        scroll-margin-top: 210px;
    }
}

/* ==========================================================================
   4. MOBILE & TABLET OPTIMIZATION
   ========================================================================== */

@media (max-width: 992px) {
    .header-flex { 
        flex-direction: column !important; 
        gap: 0.5rem !important; 
        padding: 0.5rem 1rem !important;
    }

    .nav-wrapper { 
        flex-direction: column !important; 
        gap: 0.6rem !important; 
        width: 100%; 
    }

    .site-search { 
        width: 100% !important; 
        max-width: 300px; 
        height: 34px !important;
        margin: 0 auto;
    }

    .site-search input { 
        width: 100% !important; 
        font-size: 0.85rem !important;
    }

    .learning-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Specific Font Fixes for Mobile */
@media (max-width: 768px) {
    /* Updated Mobile Logo */
    .brand { 
        font-size: 1.5rem !important; 
        gap: 8px !important;
    }
    
    .brand-icon {
        width: 24px !important;
        height: 24px !important;
    }

    .skip-link { 
        font-size: 0.7rem !important; 
        opacity: 0.5; 
    }

    .primary-nav ul {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 1.8rem !important; 
        padding-inline: 1rem;
        margin-top: 5px !important;
    }

    .primary-nav li a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 4px; 
        min-width: 50px;  
        font-size: 0.65rem !important;
    }

    .primary-nav a span {
        font-size: 1.2rem !important;
        margin-bottom: 2px !important;
    }
    
    .hero { padding: 3rem 1rem !important; }
    .hero h1 { font-size: 1.8rem !important; }
}

/* JS Interactions */
.highlight-glow {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4) !important;
}

/* ==========================================================================
   FINAL SLIM HEADER FIX FOR MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .skip-link {
        position: absolute;
        top: -100px;
        left: 0;
    }
    .skip-link:focus {
        top: 0;
        position: relative;
        display: block;
        text-align: center;
        font-size: 0.7rem;
    }

    .header-flex {
        padding: 0.5rem 1rem !important;
        gap: 0.3rem !important;
    }

    .nav-wrapper {
        gap: 0.4rem !important;
    }

    .site-search {
        height: 30px !important;
        padding: 0 10px !important;
        max-width: 250px;
        margin: 0 auto;
    }

    .site-search label {
        display: none;
    }

    .site-search input {
        height: 100%;
        font-size: 0.8rem !important;
    }

    /* Adjusted gap to accommodate logo space */
    .primary-nav ul {
        gap: 0.7rem !important;
        margin-top: 2px !important;
    }

    .primary-nav a span {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }

    .primary-nav a {
        font-size: 0.65rem !important;
    }
}

/* ==========================================================================
   FINAL LAYOUT POLISH
   ========================================================================== */

.value-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0; 
}

@media (max-width: 768px) {
    .site-footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-nav ul {
        justify-content: center;
        gap: 1.5rem;
    }
    @media (max-width: 768px) {
  .page-heading {
    padding: 2rem 1rem 1.25rem;
  }

  .page-heading h2 {
    font-size: 1.6rem;
  }

  .page-heading p {
    font-size: 0.9rem;
  }
}

}
/* ======================================================================
   LEGAL PAGE CARD SPACING (Privacy & Terms)
   ====================================================================== */

.page-legal + .core-sections .section-card {
  margin-bottom: 1.5rem;
}

/* Remove extra space after last card */
.page-legal + .core-sections .section-card:last-child {
  margin-bottom: 0;
}
