/* ===========================
   RESET & CSS VARIABLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --midnight-teal: #0A2E3C;
    --charcoal-slate: #2C3E50;
    --abyss: #0D1117;
    --burnished-copper: #B87333;
    --modern-cyan: #00D9FF;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B8C1;
}

/* ===========================
   BASE
   =========================== */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--abyss);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 36px;
    width: auto;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 46, 60, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.nav-menu.active {
    right: 0;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--modern-cyan);
}

.nav-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

.back-link {
    color: var(--modern-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 0.8;
}

/* ===========================
   LAYOUT
   =========================== */
section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===========================
   HERO
   =========================== */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.85) 0%, rgba(10, 46, 60, 0.85) 100%),
                url('../images/algorithmicauthorityherovisual.webp') center/cover no-repeat;
    position: relative;
    overflow: hidden;
    max-width: none;
    width: 100%;
    margin: 0;
}

.page-home .hero {
    min-height: 60vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 217, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    position: relative;
    z-index: 1;
    background: rgba(13, 17, 23, 0.6);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

/* Hero headings — cyan by default for sub-pages */
.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--modern-cyan);
    letter-spacing: -1px;
}

/* Home page hero heading is white with a cyan highlight span */
.page-home .hero-content h1 {
    color: var(--text-primary);
}

.page-home .hero-content h1 .highlight {
    color: var(--modern-cyan);
}

/* Hero paragraphs */
.hero-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.page-home .hero-content p {
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   SECTION HEADINGS
   =========================== */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ===========================
   IMAGES
   =========================== */
.section-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    margin: 2rem 0;
}

.portrait-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2);
    border: 2px solid rgba(0, 217, 255, 0.3);
}

/* ===========================
   CTA BUTTON
   =========================== */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--modern-cyan);
    color: var(--abyss);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 217, 255, 0.4);
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background: var(--abyss);
    padding: 3rem 1.5rem 2rem;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

footer p + p {
    margin-top: 1rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--modern-cyan);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===========================
   HOME PAGE
   =========================== */

/* About Section */
.about {
    background: var(--charcoal-slate);
}

.about-content {
    display: grid;
    gap: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-visual {
    margin-top: 3rem;
}

/* Concepts Section */
.concepts-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.concept-card {
    background: var(--midnight-teal);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.1);
    transition: all 0.3s ease;
}

.concept-card:hover {
    border-color: var(--modern-cyan);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.2);
}

.concept-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--modern-cyan);
}

.concept-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.concepts-visual {
    margin-bottom: 3rem;
}

/* Proof Section */
.proof {
    background: linear-gradient(to bottom, var(--abyss), var(--charcoal-slate));
}

.proof-content {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.proof-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.proof-text p {
    margin-bottom: 1.5rem;
}

.proof-highlight {
    background: rgba(184, 115, 51, 0.1);
    border-left: 4px solid var(--burnished-copper);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.proof-highlight p {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0;
}

.proof-highlight a {
    color: var(--modern-cyan);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 217, 255, 0.4);
    transition: border-color 0.3s;
}

.proof-highlight a:hover {
    border-color: var(--modern-cyan);
}

.proof-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: var(--midnight-teal);
    padding: 5rem 1.5rem;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* ===========================
   FOUNDER PAGE
   =========================== */
.founder-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--modern-cyan);
    letter-spacing: -1px;
}

.founder-title {
    font-size: 1.125rem;
    color: var(--burnished-copper);
    font-weight: 500;
}

.page-founder .section-title {
    color: var(--modern-cyan);
    margin-bottom: 2rem;
    letter-spacing: normal;
}

.content-grid {
    display: grid;
    gap: 3rem;
    align-items: start;
}

.bio-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.125rem;
}

.portrait-section {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.trust-section {
    background: var(--charcoal-slate);
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    margin-top: 3rem;
}

.trust-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--modern-cyan);
    text-align: center;
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--midnight-teal);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 217, 255, 0.1);
    min-width: 250px;
}

.profile-link:hover {
    border-color: var(--modern-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.2);
}

.timeline-section {
    background: var(--midnight-teal);
    padding: 5rem 1.5rem;
}

.timeline-section .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.timeline-content {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--burnished-copper);
    margin-bottom: 0.5rem;
}

.timeline-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===========================
   LEGACY PROTOCOL PAGE
   =========================== */
.page-legacy .section-title {
    font-size: 2.5rem;
    color: var(--modern-cyan);
    margin-bottom: 2rem;
    letter-spacing: normal;
}

.section-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.125rem;
}

.bridge-section {
    background: var(--charcoal-slate);
}

.protocol-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.protocol-card {
    background: var(--midnight-teal);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.1);
}

.protocol-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--modern-cyan);
}

.protocol-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.attribution {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(184, 115, 51, 0.1);
    border-left: 4px solid var(--burnished-copper);
    border-radius: 4px;
}

.attribution p {
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 0;
}

/* .founder-name used as inline <span> inside attribution — reset heading styles */
.attribution .founder-name {
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    letter-spacing: inherit;
    margin-bottom: 0;
    display: inline;
}

/* ===========================
   POLICY PAGES
   =========================== */
.page-policy footer {
    background: var(--charcoal-slate);
    margin-top: 4rem;
}

.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem;
}

.content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--modern-cyan);
}

.last-updated {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 0.875rem;
}

.content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--modern-cyan);
}

.content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--burnished-copper);
}

.content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.content li {
    margin-bottom: 0.5rem;
}

/* ===========================
   RESPONSIVE — 768px
   =========================== */
@media (min-width: 768px) {
    /* Navigation */
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        flex-direction: row;
        gap: 2rem;
    }

    .nav-menu a {
        font-size: 1rem;
    }

    .nav-close {
        display: none;
    }

    /* Hero */
    .hero-content {
        padding: 3rem;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .hero-content p {
        font-size: 1.25rem;
    }

    .founder-name {
        font-size: 4rem;
    }

    .founder-title {
        font-size: 1.25rem;
    }

    /* Layout */
    section {
        padding: 7rem 2rem;
    }

    /* Home page */
    .page-home .section-title {
        font-size: 3rem;
    }

    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }

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

    .proof-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    /* Founder page */
    .content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .profile-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Legacy Protocol page */
    .protocol-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Policy pages */
    .content h1 {
        font-size: 3.5rem;
    }

    .content {
        padding: 10rem 2rem 4rem;
    }
}

/* ===========================
   RESPONSIVE — 1024px
   =========================== */
@media (min-width: 1024px) {
    .concepts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
