:root { 
    --primary-blue: #9aa3c2;
    --accent-cyan: #696786;
    --dark-navy: #04070f;
    --medium-navy: #1b1448;
    --light-gray: #f8fafc;
    --text-light: #d6deea;
    --text-muted: #94a3b8;
    --success-green: #10b981;
    --warning-amber: #f59e0b;

    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
    --gradient-surface: linear-gradient(145deg, rgba(26, 43, 71, 0.8) 0%, rgba(10, 20, 40, 0.95) 100%);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.25);
    --shadow-depth: 0 20px 40px rgba(0, 0, 0, 0.35);

    --font-display: 'Orbitron', monospace;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Source Sans 3', sans-serif;

    /* Spacing tokens — edit these to tune rhythm site-wide */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.75rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;
}

/* =========================
   RESET
========================= */

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

/* =========================
   BASE
========================= */

body {
    font-family: var(--font-body);
    background: var(--dark-navy);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
   STARFIELD
========================= */

#starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
}

/* =========================
   HERO VIDEO
========================= */

.hero-video-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--dark-navy);
}

.hero-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.hero-video-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(4, 7, 15, 0.3),
        rgba(4, 7, 15, 0.7)
    );
}

/* =========================
   NAVIGATION
========================= */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 20, 40, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

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

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

/* =========================
   NAV LINKS
========================= */

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: 0.3s;
    position: relative;
}

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

/* =========================
   HERO
========================= */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

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

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================
   CTA BUTTON
========================= */

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
}

/* =========================
   STATS
========================= */

.stats {
    padding: 6rem 2rem;
    background: var(--gradient-surface);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* =========================
   SECTIONS
========================= */

.features,
.applications,
.tech-specs,
.accomplishments,
.contact {
    padding: 7rem 2rem 8.5rem;
}

/* =========================
   SECTION TITLE
========================= */

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: #eef2ff;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

/* First title on a page needs no top margin */
.section-title:first-child {
    margin-top: 0;
}

/* =========================
   FEATURE DESCRIPTION
========================= */

.feature-description {
    font-size: 1rem;
    color: #a9b4c7;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

/* Last paragraph before a card or image gets a touch more breathing room */
.feature-description:last-of-type,
.feature-description + .link-card,
.feature-description + .image-block {
    /* handled via margin-top on the card/image instead */
}

/* =========================
   GRID SPACING
========================= */

.features-grid,
.applications-grid,
.accomplishments-grid,
.specs-grid {
    gap: 2rem;
}

.accomplishments-grid {
    gap: 2.5rem;
}

/* =========================
   CARDS BASE (UNIFIED SYSTEM)
========================= */

.feature-card,
.application-card,
.accomplishment-card,
.link-card {
    background: var(--gradient-surface);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.12);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0;
    /* Consistent vertical rhythm: space above every card */
    margin-top: var(--space-md);
}

/* HOVER */
.feature-card:hover,
.application-card:hover,
.accomplishment-card:hover,
.link-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow);
}

/* =========================
   LINK CARD INTERNALS
========================= */

.link-card-top {
    margin-bottom: 0.1rem;
}

.link-card-tag,
.accomplishment-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* =========================
   TITLES
========================= */

.link-card-title,
.accomplishment-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #eef2ff;
    margin: 0;
}

/* =========================
   BODY TEXT
========================= */

.link-card-body,
.accomplishment-body {
    font-size: 0.95rem;
    color: #a9b4c7;
    line-height: 1.55;
    margin: 0;
}

/* =========================
   FOOTER ACTION
========================= */

.link-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
}

.link-card-action,
.accomplishment-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary-blue);
    transition: color 0.2s;
}

.link-card:hover .link-card-action,
.accomplishment-card:hover .accomplishment-link {
    color: var(--accent-cyan);
}

/* =========================
   GLOBAL TYPOGRAPHY
========================= */

h1, h2, h3, h4 {
    line-height: 1.2;
}

p {
    line-height: 1.65;
}

/* =========================
   IMAGE BLOCK
========================= */

.image-block {
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.image-block img {
    width: 100%;
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.15);
    display: block;
}

.caption {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

/* =========================
   FOOTER
========================= */

footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* =========================
   FADE IN
========================= */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .nav-links { display: none; }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.2rem;
    }
}
