:root {
    /* Soil (dark backgrounds) */
    --void: #080705; /* page background */
    --deep-earth: #0f0d09; /* primary surface */
    --topsoil: #1c1a13; /* card backgrounds */
    --sediment: #2e2b22; /* all borders/dividers */
    --ash: #6b6355; /* muted/secondary text */

    /* Clay (warm text/surface) */
    --parchment: #c9b99a; /* primary body text */
    --script: #e8dcc8; /* headings */
    --raw-clay: #a08060; /* mid-tone */
    --terracotta: #7a4f35; /* warm accent */

    /* Heat (primary actions) */
    --ember: #c8612a; /* primary CTA, links, active states */
    --ember-dim: #4a2410; /* ember hover backgrounds */
    --gold: #a8873a; /* logo text */
    --dry-grass: #8a7a2e; /* bridge */

    /* Growth (agro greens) */
    --deep-root: #1a2e1a;
    --moss: #3d5c35;
    --canopy: #5a8a48;
    --sprout: #8ab87a;
    --dew: #c2ddb8;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 48px;
    --space-xl: 80px;
    --section-gap: 120px;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--void);
}

a, a:link, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}

body {
    background-color: var(--void);
    color: var(--parchment);
    font-family: 'IM Fell English', serif;
    font-size: 16px; /* Base font size slightly smaller for mobile */
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

@media (min-width: 768px) {
    body {
        font-size: 18px;
        line-height: 1.95;
    }
}

/* Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* Typography */
h1, h2, h3, .cinzel {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--script);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1.25rem; /* Default mobile padding */
    box-sizing: border-box;
}

@media (max-width: 340px) { .container { padding-left: 1rem; padding-right: 1rem; } }
@media (min-width: 640px) { .container { padding: 3rem 2.5rem; } }
@media (min-width: 768px) { .container { padding: 4rem 5rem; } }
@media (min-width: 1024px) { .container { padding: 4rem 6rem; } }
@media (min-width: 1280px) { .container { padding: 4rem 8rem; } }

section {
    padding: var(--space-xl) 0; /* Smaller mobile padding */
    position: relative;
}

@media (min-width: 768px) {
    section {
        padding: var(--section-gap) 0;
    }
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-sm) 0;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--void) 60%, transparent);
    backdrop-filter: blur(8px);
}

.main-header .container {
    padding-top: 0;
    padding-bottom: 0;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    color: var(--gold);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--ash);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--ember);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(var(--space-xl) * 2.5) var(--space-md) var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 10;
}

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    color: var(--ember);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.hero-name {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.inti-word { color: var(--ash); }
.tech-word { color: var(--script); }

.shuffle-letter {
    display: inline-block;
    min-width: 0.7em;
}

.hero-divider {
    width: 4rem;
    height: 2px;
    background: linear-gradient(to right, var(--ember), transparent);
    margin: var(--space-md) auto;
}

.hero-tagline {
    font-style: italic;
    font-size: 1.5rem;
    max-width: 600px;
    margin: 0 auto var(--space-sm);
    line-height: 1.5;
}

.hero-subtag {
    font-family: 'JetBrains Mono', monospace;
    color: var(--ash);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.hero-ctas {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* Buttons */
.btn {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    padding: 12px 32px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--ember);
    color: var(--script);
    border: none;
}

.btn-primary:hover {
    background-color: var(--ember-dim);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--sediment);
    color: var(--ash);
}

.btn-ghost:hover {
    border-color: var(--ember);
    color: var(--script);
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    color: var(--script);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    padding: var(--space-xl) 0;
    text-align: center;
}

/* Project Cards */
.pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: var(--space-md);
}

.pcard {
    background-color: var(--topsoil);
    border: 1px solid var(--sediment);
    padding: var(--space-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pcard:hover {
    border-color: var(--ember);
    transform: translateY(-5px);
}

.ptag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--ember);
    margin-bottom: var(--space-xs);
}

.pname {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.pdesc {
    font-size: 1rem;
    color: var(--parchment);
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.pstack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-md);
}

.spill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 2px 8px;
    background-color: var(--deep-earth);
    color: var(--ash);
    border: 1px solid var(--sediment);
}

.pmet {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--ash);
}

.pfooter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.pwork {
    font-size: 0.65rem;
    color: var(--sprout);
    opacity: 0.8;
}

/* Skills Wall - Stone Inscription Style */
.swall {
    text-align: center;
}

.sinscription {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

.sglyph {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.sglyph.tier-1 { color: var(--parchment); }
.sglyph.tier-2 { color: var(--ash); }
.sglyph.tier-3 { color: var(--sediment); }

.sglyph:hover {
    color: var(--ember);
    text-shadow: 0 0 10px var(--ember-dim);
}

/* Live System Panel */
.system-panel {
    background-color: var(--deep-earth);
    border: 1px solid var(--sediment);
    padding: var(--space-md);
    margin-top: var(--space-xl);
    position: relative;
}

.panel-label {
    position: absolute;
    top: -12px;
    left: 24px;
    background-color: var(--void);
    padding: 0 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--ash);
}

.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    margin-bottom: var(--space-md);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--canopy);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--canopy);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.metric-cell {
    border-left: 1px solid var(--sediment);
    padding-left: 16px;
}

.m-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--ash);
}
/* --- SYSTEM PANEL FOOTER --- */
.system-panel-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 3rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.system-panel-footer .sys-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.system-panel-footer .sys-label {
    color: var(--sediment);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.system-panel-footer .sys-value {
    color: var(--script);
    font-weight: 500;
}

.system-panel-footer .status-ok .sys-value {
    color: var(--sprout);
    text-shadow: 0 0 10px rgba(138, 184, 122, 0.3);
}

@media (max-width: 768px) {
    .system-panel-footer {
        grid-template-columns: 1fr 1fr;
    }
}

.m-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--canopy);
}

.m-value.gold { color: var(--gold); }

/* Dynamic Hydration Styles */

@keyframes loading-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.98); }
    50% { opacity: 0.7; transform: scale(1); }
}

/* About Section */
.about-wrap {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.about-opening {
    font-style: italic;
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
    color: var(--script);
}

.about-text p {
    margin-bottom: var(--space-md);
}

.about-meta {
    background-color: var(--topsoil);
    padding: var(--space-md);
    border: 1px solid var(--sediment);
}

.ameta-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--sediment);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.ameta-row:last-child { border-bottom: none; }

.ameta-label { color: var(--ash); }
.ameta-val { color: var(--script); }

/* Ornaments */
.ornament-spiral {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    stroke: var(--sediment);
    opacity: 0.4;
}

.ornament-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
}

.ornament-branch {
    width: 120px;
    height: 120px;
    stroke: var(--sediment);
    stroke-width: 1px;
    fill: none;
    opacity: 0.6;
    transition: all 0.5s ease;
    color: var(--sediment);
}

.ornament-branch .tip {
    fill: var(--canopy);
    opacity: 0.5;
}

.section-divider:hover .ornament-branch {
    stroke: var(--ember);
    opacity: 1;
}

/* Leaf Ornament for lists/accents */
.leaf-accent {
    width: 24px;
    height: 24px;
    stroke: var(--sediment);
    fill: none;
    display: inline-block;
    vertical-align: middle;
    margin: 0 8px;
}

/* Footer & Social Ecosystem */
footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--sediment);
    text-align: center;
}

.ecosystem-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.endpoint-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 24px;
    background-color: var(--topsoil);
    border: 1px solid var(--sediment);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
}

.endpoint-link:hover {
    border-color: var(--ember);
    transform: translateY(-3px);
}

.e-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--ash);
    text-transform: uppercase;
}

.e-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--script);
}

.endpoint-link:hover .e-url {
    color: var(--ember);
}

.flogo {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flinks {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.flinks a {
    font-family: 'JetBrains Mono', monospace;
    text-decoration: none;
    color: var(--ash);
    font-size: 0.9rem;
}

.flinks a:hover {
    color: var(--ember);
}

.fcopy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--sediment);
}

/* Scroll Ticker */
.bottom-ticker {
    position: fixed;
    bottom: 0;
    right: 0;
    background-color: var(--void);
    padding: 4px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--ash);
    border-top: 1px solid var(--sediment);
    border-left: 1px solid var(--sediment);
    z-index: 1000;
}

.cursor {
    display: inline-block;
    width: 6px;
    height: 12px;
    background-color: var(--ash);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

@media (max-width: 768px) {
    .main-header {
        padding: var(--space-sm) 0;
        background: rgba(8, 7, 5, 0.95);
        backdrop-filter: blur(12px);
    }

    .nav-wrap {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-links {
        display: none; 
    }

    .nav-logo span {
        font-size: 0.9rem;
    }

    .hero {
        min-height: 100vh;
        padding-top: var(--space-xl);
        padding-bottom: var(--space-xl);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-name { 
        font-size: clamp(3rem, 18vw, 5.5rem);
        margin-top: var(--space-md);
    }

    .hero-tagline {
        font-size: 1.1rem;
        padding: 0 var(--space-xs);
        line-height: 1.4;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: var(--space-lg) auto 0;
        gap: 12px;
    }

    .hero-ctas .btn {
        width: 100%;
        padding: 16px;
    }

    .hero-pulse {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        margin-top: var(--space-md);
    }

    .pulse-item {
        background: var(--topsoil);
        padding: 10px 16px;
        border-radius: 4px;
        border: 1px solid var(--sediment);
        width: 100%;
        max-width: 280px;
        display: flex;
        justify-content: space-between;
        font-size: 0.7rem;
    }

    .section-divider {
        gap: var(--space-sm);
        padding: var(--space-lg) 0;
        font-size: 0.65rem;
        letter-spacing: 0.2em;
    }

    .ornament-branch {
        width: 60px;
    }

    .pgrid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pcard {
        padding: var(--space-md);
    }

    .pname {
        font-size: 1.3rem;
    }

    .pdesc {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .about-wrap { 
        grid-template-columns: 1fr; 
        gap: var(--space-lg); 
    }

    .metrics-grid { 
        grid-template-columns: 1fr; 
        gap: var(--space-sm); 
    }

    .system-panel {
        padding: var(--space-md);
        margin-top: var(--space-lg);
    }

    .metric-cell {
        padding: 12px;
        border-left: none;
        border-bottom: 1px solid var(--sediment);
    }

    .metric-cell:last-child {
        border-bottom: none;
    }

    .m-value {
        font-size: 1.1rem;
    }

    .ecosystem-grid {
        gap: 12px;
    }

    .endpoint-link {
        width: 100%;
        min-width: unset;
        padding: 10px 16px;
    }

    .e-url {
        font-size: 0.8rem;
    }

    .flogo {
        font-size: 1.5rem;
    }
}

/* High-Fidelity SVG Geometry Styles */
.midrib {
    stroke: var(--sprout);
    fill: none;
}

.vein-2 {
    stroke: var(--sprout);
    opacity: 0.7;
}

.cap-body {
    fill: var(--topsoil);
    stroke: var(--sediment);
}

.cap-rim {
    fill: var(--sediment);
}

.cap-seam {
    stroke: var(--sediment);
}

.tip {
    fill: var(--ember);
}


