/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #050a14;
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', 'Roboto', sans-serif;
    color: #d4d4d4;
    background: #050a14;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   CANVAS — Full-screen fixed background
   ============================================ */
#data-rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   NAVIGATION — Split layout, clean
   ============================================ */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    background: hsl(227, 66%, 11%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-brand:hover {
    opacity: 0.8;
    text-decoration: none;
}

.nav-logo {
    height: 32px;
    width: auto;
}

.page-riddle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.5rem;
    color: #c9a84c;
    text-align: center;
    line-height: 1.7;
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-family: 'Space Grotesk', sans-serif;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    font-weight: 400;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #c9a84c;
    text-decoration: none;
}

.nav-links a.active {
    color: #c9a84c;
    text-decoration: none;
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 20;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    margin: 5px 0;
    transition: all 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.section {
    padding: 2rem 0;
}

.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 2rem;
}

.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(201, 168, 76, 0.15),
        transparent
    );
    margin: 0;
}

/* ============================================
   TYPOGRAPHY — Navy / Gold / White (BOLDER)
   ============================================ */
h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.8rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h1 span {
    color: #c9a84c;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}

h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: #e8e8e8;
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: #c9a84c;
    letter-spacing: 0.2em;
    font-weight: 400;
    text-transform: uppercase;
}

.tagline {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.6;
}

p {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    letter-spacing: 0.01em;
}

p + p {
    margin-top: 1.25rem;
}

a {
    color: #c9a84c;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #e0c06a;
    text-decoration: none;
}

/* ============================================
   PIPELINE — Hero visual
   ============================================ */
.pipeline-container {
    width: 100vw;
    max-width: 950px;
    height: 320px;
    margin-bottom: 1.5rem;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

#pipeline-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
    text-align: center;
    padding: 1rem 2rem 6rem;
}

.hero-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.7rem 2.2rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s;
    background: transparent;
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: #c9a84c;
}

.btn:hover {
    border-color: #c9a84c;
    color: #e0c06a;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.08);
    text-decoration: none;
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.45);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
}

/* ============================================
   CARDS
   ============================================ */
.glass-box {
    padding: 2.5rem 0;
}

.glass-box-inner {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.glass-box-inner:last-child {
    border-bottom: none;
}

.glass-box-inner h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.glass-box-inner h3 a:hover {
    color: #c9a84c;
}

/* ── Accordion projects ── */
.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.project-expandable .project-header {
    cursor: pointer;
}

.project-toggle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    color: rgba(201, 168, 76, 0.5);
    flex-shrink: 0;
    width: 1.6rem;
    text-align: center;
    line-height: 1.6rem;
    margin-top: 0.2rem;
    transition: color 0.3s ease;
    user-select: none;
}

.project-expandable:hover .project-toggle {
    color: rgba(201, 168, 76, 0.85);
}

.project-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.project-detail.open {
    max-height: 800px;
}

.repo-link {
    display: inline-block;
    margin: 1rem 0 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: #c9a84c;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.repo-link:hover {
    opacity: 1;
}

/* ============================================
   ARCHITECTURE DIAGRAM
   ============================================ */
.architecture-diagram {
    width: 100%;
    max-width: 700px;
    height: 640px;
    margin: 1.5rem auto 0.5rem;
    position: relative;
}

.architecture-diagram canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 480px) {
    .architecture-diagram {
        height: 480px;
    }
}

/* ============================================
   SKILL / TECH TAGS
   ============================================ */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    transition: all 0.3s;
}

.skill-tag:hover {
    color: #c9a84c;
    border-color: rgba(201, 168, 76, 0.25);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tech-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c9a84c;
}

.tech-tag::before {
    content: '#';
}

/* ============================================
   CONTACT
   ============================================ */
.contact-links {
    display: flex;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.contact-item {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.contact-item:hover {
    color: #c9a84c;
    text-decoration: none;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
    margin-top: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    padding: 0.75rem 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.18);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(201, 168, 76, 0.4);
    background: rgba(201, 168, 76, 0.03);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: rgba(220, 80, 80, 0.5);
}

.field-error {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: rgba(220, 80, 80, 0.8);
    margin-top: 0.35rem;
}

.form-error-banner {
    background: rgba(220, 80, 80, 0.08);
    border: 1px solid rgba(220, 80, 80, 0.2);
    border-radius: 2px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.form-error-banner p {
    color: rgba(220, 80, 80, 0.8);
    font-size: 0.85rem;
}

.contact-submit {
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
    padding: 0.85rem 2rem;
    cursor: pointer;
}

.contact-submit:hover {
    background: rgba(201, 168, 76, 0.08);
}

.contact-success {
    text-align: center;
    padding: 3rem 0;
}

.success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(201, 168, 76, 0.4);
    color: #c9a84c;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-alt {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-alt > p {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 1rem;
}

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-page {
    max-width: 640px;
}

.legal-updated {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
}

.legal-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.legal-content p {
    margin-bottom: 0.75rem;
}

.legal-content ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

.legal-content ul li {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.8;
    padding-left: 1.2rem;
    position: relative;
}

.legal-content ul li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: rgba(201, 168, 76, 0.4);
}

.cookie-table-wrap {
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
}

.cookie-table th {
    text-align: left;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-table td {
    color: rgba(255, 255, 255, 0.5);
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cookie-table code {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.8rem;
    color: #c9a84c;
    background: rgba(201, 168, 76, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 4rem;
    padding: 1.5rem 2rem;
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: hsl(227, 66%, 11%);
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    padding: 1rem 2rem;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.cookie-banner.visible {
    display: flex;
}

.cookie-banner p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.cookie-banner a {
    color: #c9a84c;
}

.cookie-accept {
    padding: 0.45rem 1.4rem;
    font-size: 0.75rem;
    flex-shrink: 0;
    cursor: pointer;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .page-content {
        padding: 1rem 1.25rem;
        gap: 2rem;
    }

    h1 {
        font-size: 2.4rem;
    }

    .hero-section {
        padding: 0.5rem 1rem 3rem;
    }

    .pipeline-container {
        height: 240px;
        margin-bottom: 2rem;
        max-width: 100vw;
    }

    .nav-bar {
        padding: 1rem 1.25rem;
        flex-wrap: wrap;
    }

    .nav-hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding-top: 1.5rem;
        padding-bottom: 0.5rem;
    }

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

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-logo {
        height: 26px;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
