/* ===================== HERO OFFSET ===================== */
.hero { margin-top: 70px; }

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

:root {
    --bg:       #0a0c0f;
    --bg2:      #0f1216;
    --bg3:      #141820;
    --surface:  #1a1f28;
    --surface2: #212836;
    --border:   #2a3040;
    --accent:   #00e5a0;
    --accent2:  #00b37d;
    --accent3:  #7affd4;
    --warn:     #ffcc00;
    --error:    #ff4d6d;
    --text:     #e4e8f0;
    --muted:    #6b7a94;
    --mono:     'Space Mono', monospace;
    --sans:     'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===================== NOISE OVERLAY ===================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

/* ===================== HERO ===================== */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 2rem;
}

/* Grid background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(rgba(0,229,160,0.04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0,229,160,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
}

/* Glow blob */
.hero::after {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,229,160,0.10) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,229,160,0.08);
    border: 1px solid rgba(0,229,160,0.25);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s ease both;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
    font-family: var(--mono);
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 .highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-desc {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    max-width: 480px;
    animation: fadeUp 0.6s 0.2s ease both;
}

.hero-meta {
    display: flex;
    gap: 2rem;
    animation: fadeUp 0.6s 0.3s ease both;
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
}

.hero-meta-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
}

.hero-meta-value {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
}

/* Terminal mockup */
.hero-visual {
    animation: fadeUp 0.6s 0.2s ease both;
}

.terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
            0 0 0 1px rgba(0,229,160,0.05),
            0 40px 80px rgba(0,0,0,0.5),
            0 0 60px rgba(0,229,160,0.06);
}

.terminal-bar {
    background: var(--surface2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.terminal-title {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    margin-left: auto;
    margin-right: auto;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.9;
}

.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-comment { color: var(--muted); }
.t-ok { color: #28c840; }
.t-warn { color: var(--warn); }
.t-err { color: var(--error); }
.t-url { color: #60a5fa; }
.t-key { color: var(--accent3); }
.t-val { color: var(--text); }

.t-line { display: flex; gap: 8px; align-items: flex-start; }
.t-indent { padding-left: 1.5rem; }

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--accent);
    vertical-align: bottom;
    animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== SECTIONS ===================== */
section {
    padding: 6rem 2rem;
}

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

.section-eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--mono);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-desc {
    color: var(--muted);
    max-width: 600px;
    font-size: 1rem;
    margin-bottom: 3rem;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0;
}

/* ===================== CONTEXT SECTION ===================== */
#context { background: var(--bg); }

.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.context-text p {
    color: var(--muted);
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.context-text strong { color: var(--text); font-weight: 600; }

.missions-list {
    list-style: none;
    margin-top: 1.5rem;
}

.missions-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.95rem;
}

.missions-list li:last-child { border-bottom: none; }

.mission-icon {
    width: 32px;
    height: 32px;
    background: rgba(0,229,160,0.08);
    border: 1px solid rgba(0,229,160,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    font-size: 16px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }

.info-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.25rem;
}

.chip {
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(0,229,160,0.07);
    border: 1px solid rgba(0,229,160,0.18);
    color: var(--accent3);
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* ===================== ARCHITECTURE ===================== */
#architecture { background: var(--bg2); }

.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.arch-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
}

.arch-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,229,160,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
}

.arch-card:hover { border-color: rgba(0,229,160,0.3); transform: translateY(-4px); }
.arch-card:hover::before { opacity: 1; }

.arch-num {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(0,229,160,0.15);
    line-height: 1;
    margin-bottom: 1rem;
}

.arch-card h3 {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.arch-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.arch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1rem;
}

.arch-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 3px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 3px;
}

/* ===================== FEATURES ===================== */
#features { background: var(--bg); }

.features-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.feature-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: border-color 0.25s;
}

.feature-block:hover { border-color: rgba(0,229,160,0.25); }

.feature-block.full { grid-column: span 2; }

.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.feature-icon-wrap {
    width: 40px;
    height: 40px;
    background: rgba(0,229,160,0.08);
    border: 1px solid rgba(0,229,160,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.feature-block h3 {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text);
    letter-spacing: 0.03em;
}

.feature-block p, .feature-block li {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.feature-list {
    list-style: none;
    margin-top: 0.5rem;
}

.feature-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.feature-list li::before {
    content: '→';
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-list li:last-child { border-bottom: none; }

/* SEO metrics table mockup */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-family: var(--mono);
    font-size: 0.75rem;
}

.metrics-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--surface2);
    color: var(--muted);
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.metrics-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text);
}

.metrics-table tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.badge-ok { background: rgba(40,200,64,0.15); color: #28c840; border: 1px solid rgba(40,200,64,0.2); }
.badge-warn { background: rgba(255,204,0,0.12); color: var(--warn); border: 1px solid rgba(255,204,0,0.2); }
.badge-err { background: rgba(255,77,109,0.12); color: var(--error); border: 1px solid rgba(255,77,109,0.2); }

/* ===================== DEMOS ===================== */
#demos { background: var(--bg2); }

.demos-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 3rem;
}

.demo-item {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3.5rem;
    align-items: center;
    padding: 4rem 0;
}

.demo-item--reverse {
    grid-template-columns: 1fr 1.4fr;
}

.demo-item--reverse .demo-video-wrap { order: 2; }
.demo-item--reverse .demo-info      { order: 1; }

/* Separator */
.demo-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Video wrapper */
.demo-video-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow:
            0 20px 60px rgba(0,0,0,0.4),
            0 0 0 1px rgba(0,229,160,0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.demo-video-wrap:hover {
    border-color: rgba(0,229,160,0.3);
    box-shadow:
            0 25px 70px rgba(0,0,0,0.5),
            0 0 40px rgba(0,229,160,0.07);
}

.demo-video-wrap video {
    width: 100%;
    height: auto;
    display: block;
}

/* Number badge */
.demo-num {
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--bg);
    background: var(--accent);
    padding: 4px 10px;
    border-radius: 12px 0 8px 0;
}

/* Info block */
.demo-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.demo-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0;
}

.demo-title {
    font-family: var(--mono);
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 0;
}

.demo-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 400px;
    margin: 0;
}

/* ===================== TECH STACK ===================== */
#stack { background: var(--bg2); }

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stack-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.stack-card:hover { border-color: rgba(0,229,160,0.3); transform: translateY(-3px); }

.stack-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stack-name {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text);
    font-weight: 700;
}

.stack-role {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ===================== SKILLS ===================== */
#skills { background: var(--bg); }

.skills-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-item {
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.skill-text {
    font-size: 0.92rem;
    color: var(--text);
}
/* ===================== DOCUMENTATION ===================== */
#documentation { background: var(--bg2); }

.docs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.doc-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.doc-card:hover {
    border-color: rgba(0,229,160,0.35);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0,229,160,0.08);
}

.doc-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
}

.doc-type {
    font-family: var(--mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 3px;
}

.doc-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.doc-arrow {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.doc-card:hover .doc-arrow {
    transform: translateX(4px);
}

/* ===================== CONTACT ===================== */
#contact {
    background: var(--bg2);
    border-top: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.contact-card .material-symbols-outlined { color: var(--accent); font-size: 28px; }

.contact-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
}

.contact-value {
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
}

a.contact-value:hover { color: var(--accent); }

/* ===================== NAV BUTTONS ===================== */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.nav-btn {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.nav-btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.nav-btn-fill {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #0a0c0f;
    font-weight: 700;
}

.nav-btn-fill:hover { background: var(--accent3); }

/* ===================== SCROLL REVEAL ===================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .hero-inner, .context-grid, .features-layout { grid-template-columns: 1fr; }
    .arch-grid { grid-template-columns: 1fr 1fr; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-row { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .feature-block.full { grid-column: span 1; }
    .hero-visual { display: none; }
    nav ul { display: none; }

    .demo-item,
    .demo-item--reverse {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2.5rem 0;
    }

    .demo-item--reverse .demo-video-wrap,
    .demo-item--reverse .demo-info {
        order: unset;
    }

    .demo-desc { max-width: 100%; }

    .doc-iframe { height: 400px; }
}

@media (max-width: 600px) {
    .arch-grid { grid-template-columns: 1fr; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
}