/* Aerospace Brutalism / Industrial Luxury Theme */
:root {
    /* Colors: Orbital Night (Refined) */
    --bg-dark: #030405;
    --surface-dark: #0e1116;
    --surface-raised: rgba(255,255,255,0.07);
    --text-primary: #f0f2f5;
    --text-secondary: #a8b3cf;
    --text-muted: #6d7280;
    --border-color: rgba(255,255,255,0.15);

    --accent: #ff4400;
    --accent-glow: rgba(255, 68, 0, 0.4);

    /* Blog / Code */
    --card-bg: linear-gradient(160deg, #2a3440 0%, #171e28 100%);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
    --code-bg: #0d1117;
    --code-color: #f472b6;
    --inline-code-bg: rgba(255,255,255,0.08);
    --toc-bg: rgba(255,255,255,0.03);
    --author-bio-bg: rgba(255,255,255,0.02);

    --grid-line: rgba(255, 255, 255, 0.08);

    /* Fonts */
    --font-heading: 'Clash Display', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    /* Metrics */
    --nav-height: 80px;
    --radius: 0px;

    /* Global Behavior */
    scroll-behavior: smooth;
}

body.disable-transitions,
body.disable-transitions * {
    transition: none !important;
    animation: none !important;
}

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

html {
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* P1-4: Lenis provides smooth wheel on desktop — native CSS smoothing
   would double-smooth and jank. JS adds .lenis-active when Lenis runs. */
html.lenis-active {
    scroll-behavior: auto;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    background: var(--bg-dark);
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    /* Subtle dark grey */
    border-radius: 0;
    /* Brutalist square */
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Cinematic Grain Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 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.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.06;
    pointer-events: none;
}

/* Background Grid Lines (CAD Blueprint) */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.05em;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

/* Force Monospace for Decryption Effect Stability */
#hero-name,
#hero-role {
    font-family: var(--font-body);
    /* JetBrains Mono */
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

/* Section Header Wrapper */
/* Section Header Wrapper */
.section-header {
    margin-bottom: 0.5rem;
    /* Tighter gap for better grouping */
    position: relative;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 1px 7px;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1;
}

.section-header h2 {
    margin-bottom: 0;
    /* Let the container handle spacing */
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Header with Scissor-Cut / Sine Wave Edge */
/* Header with Scissor-Cut / Sine Wave Edge */
.aero-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    min-height: var(--nav-height);
    /* Background & Mask moved to ::before to prevent clipping mobile menu */
    background: var(--bg-dark);
    border-bottom: none;
    border-left: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                min-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
}

@media (min-width: 769px) {
    .aero-header.header-hidden {
        transform: translateX(-50%) translateY(-100%);
    }
}

.aero-header.at-top {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.aero-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    z-index: -1;
}

/* Detached / Floating Navbar */
.aero-header.detached {
    width: min(90%, 1100px);
    top: 20px;
    min-height: 56px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--border-color);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(160deg, #2a3440 0%, #171e28 100%);
    backdrop-filter: blur(0px);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    will-change: clip-path;
    contain: paint;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
}
.aero-header.detached .logo {
    font-size: 1.15rem;
    padding: 2px 0;
}
.aero-header.detached .nav-links {
    gap: 1.2rem;
}
.aero-header.detached .nav-links a {
    font-size: 0.8rem;
}

.aero-header.detached.header-hidden {
    transform: translateX(-50%) translateY(-100%);
}

.aero-header.detached::before {
    content: none;
}

@media (max-width: 768px) {
    .aero-header.detached {
        width: 100%;
        left: 0;
        transform: none;
        top: 0;
        border: none;
        box-shadow: none;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .aero-header.detached::before {
        content: none;
    }
}

/* Scroll Signal (Wave Border) */
.signal-line {
    position: absolute;
    bottom: 0;
    /* Sits natively on the bottom edge */
    left: 0;
    width: 100%;
    height: 10px;
    z-index: 1001;
    pointer-events: none;
    overflow: hidden;
    /* Add solid background to prevent any gaps */
}

.signal-track,
.signal-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-repeat: repeat-x;
    background-size: 20px 10px;
    /* Tight frequency */
}

/* Inactive Trace (Grey) - Peak First */
.signal-track {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 5 Q5 0 10 5 Q15 10 20 5' fill='none' stroke='%23333' stroke-width='1.5'/%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Active Trace (Orange Progress) - Peak First */
.signal-fill {
    width: 0%;
    /* JS controlled */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 5 Q5 0 10 5 Q15 10 20 5' fill='none' stroke='%23ff3300' stroke-width='2'/%3E%3C/svg%3E");
    transition: width 0.1s linear;
}

.text-accent {
    color: var(--accent);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 10001;
    background: transparent;
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
}

/* Main Layout */
main {
    /* Full screen scroll container reverted to standard block */
    /* Reset old constraints */
    max-width: none;
    padding: 0;
    margin: 0;
    width: 100%;

    position: relative;
    z-index: 2;
    /* Sit above grain */
}

/* Snap Section */
.snap-section {
    min-height: 100svh;
    width: 100%;
    /* Removed scroll snap properties */

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* Padding to account for fixed header */
    padding-top: var(--nav-height);
    padding-bottom: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;

    position: relative;
    /* overflow: hidden; Removed to allow sticky elements or popouts if needed */
}

/* Constrain content width within the full-width section */
.snap-section>* {
    width: 100%;
    max-width: 1400px;
}

section {
    scroll-margin-top: 80px;
}

/* Lightbox3 theme overrides */
:root {
    --lb-image-border-radius: 0px;
    --lb-image-padding: 0px;
    --lb-chrome-bg: rgba(0, 0, 0, 0.85);
    --lb-chrome-text: rgba(255, 255, 255, 0.85);
    --lb-chrome-font-size: 13px;
    --lb-chrome-padding: 12px 16px;
    --lb-chrome-border-radius: 0px;
    --lb-backdrop-color: rgba(3, 4, 5, 0.97);
}

.snap-section-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: calc(var(--nav-height) + 2rem);
    padding-bottom: 4rem;
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
}

.snap-section-content > * {
    width: 100%;
    max-width: 1400px;
}

/* Aerospace Cards ("Ticket" / "Chamfered") */
.aero-card {
    background: var(--surface-dark);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    /* Chamfered Corners */
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%, 0 20px);
    will-change: clip-path;
    contain: paint;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;

    /* Matte Metal Gradient */
    background: linear-gradient(160deg, #2a3440 0%, #171e28 100%);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-left: 3px solid var(--border-color);
}

/* Precision Active Effect (No Flash) */
.aero-card:hover {
    border-color: var(--accent);
    border-left-color: var(--accent);
    box-shadow: 0 0 25px rgba(255, 51, 0, 0.2);
    background-color: #263340;
    transform: translateY(-2px);
}



.aero-card:hover .tag {
    border-color: var(--accent);
    color: var(--accent);
}

/* Hero */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align for technical look */
    text-align: left;
    min-height: 400px;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    /* Lock width and center to prevent text stutter/jitter */
}

.badge {
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 12px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

.badge.available::before {
    content: '●';
    margin-right: 8px;
    animation: blink 1s steps(2, start) infinite;
}

.tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.section-container {
    margin-bottom: 4rem;
    /* Explicit separation between sections */
    position: relative;
}

/* Projects section: override snap-section to fit on screen */
#projects.snap-section {
    justify-content: flex-start;
    min-height: auto;
    padding-top: calc(var(--nav-height) + 1.5rem);
    padding-bottom: 0;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Clash Display', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    padding: 15px 30px;
    font-weight: 600;
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.1s cubic-bezier(0, 0, 0.2, 1);
    box-shadow: 4px 4px 0px var(--accent);
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--accent);
    background: rgba(255, 68, 0, 0.15);
    color: var(--accent);
    border-color: var(--accent);
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 4px 4px 0px #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 2px 2px 0px var(--accent);
}

.btn-secondary {
    border-color: #fff;
    color: #fff;
    box-shadow: 4px 4px 0px #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #000;
    box-shadow: 2px 2px 0px #fff;
    transform: translate(2px, 2px);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* Skills */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
    justify-content: center;
}

.skill-category-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    min-height: 0;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--grid-line);
    margin-bottom: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    justify-content: center;
    align-content: start;
}

.skill-card {
    text-align: center;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-start;
}

.skill-icon {
    font-size: 2rem;
    /* P1-4: fixed box so devicon font swap doesn't shift layout (CLS). */
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    color: var(--text-primary);
    transition: transform 0.2s ease, color 0.2s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    color: var(--accent);
}

.skill-name {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.skill-level-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.skill-projects {
    font-family: var(--font-body);
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skill-level-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    margin-top: 6px;
    position: relative;
    overflow: hidden;
}

.skill-level-bar .fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.skills-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2.5rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    perspective: 1200px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Visual Profile (About Section) */
.visual-profile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .visual-profile {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

/* Holographic Frame (Avatar) */
.profile-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--grid-line);
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0%);
    transition: filter 0.3s ease;
}

.profile-frame:hover .profile-img {
    filter: grayscale(100%);
}

.frame-corners {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border: 1px solid transparent;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Mission Stats Grid */
.mission-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--grid-line);
    padding-top: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

/* About Simple Layout */
.about-simple-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bio-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.8;
    max-width: 800px;
}

.about-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--grid-line);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-separator {
    color: var(--grid-line);
}

/* Professional Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #00ffaa;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.4);
}

@media (max-width: 900px) {
    h1 {
        /* Fluid Typography */
        font-size: clamp(1.1rem, 7vw, 2rem);
        min-height: 1.2em;
        white-space: normal;
        display: block;
        letter-spacing: -0.5px;
    }

    .about-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .meta-separator {
        display: none;
    }

    .aero-card {
        padding: 1.5rem 1rem;
    }
}

/* Galaxy Z Fold / Ultra-Narrow Devices */
@media (max-width: 360px) {
    h1 {
        /* Hard-coded safety size for 344px width */
        font-size: 1.25rem !important;
        letter-spacing: -1px;
        /* Squeeze it */
        min-height: auto;
        /* Allow natural height */
    }

    /* Shrink the Role/Subtitle */
    #hero-role {
        font-size: 1rem !important;
        letter-spacing: 1px;
        /* Maintain some breathable space */
    }

    .nav-container {
        width: 100%;
        /* Use full width */
        padding: 0 5px;
    }

    main {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .aero-card {
        padding: 1.5rem 0.5rem;
        /* Minimal padding */
    }

    .project-header,
    .project-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* =========================================
   Contact Section - Professional Clean
   ========================================= */

.contact-section {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 5rem;
}

.contact-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.contact-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.contact-header h2 {
    border: none;
    padding: 0;
    margin-bottom: 1rem;
}

.contact-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Email CTA — row + copy button (kept in the global sheet so the card
   never depends on the page component's scoped stylesheet chunk) */
.contact-email-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    min-width: 0;
}
.contact-email-row .contact-email-cta {
    width: 100%;
    min-width: 0;
}
.copy-email-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0 0.8rem;
    background: transparent;
    border: 1px solid var(--grid-line);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.copy-email-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.copy-email-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.copy-email-btn svg {
    stroke: currentColor;
}

/* Email CTA */
.contact-email-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 68, 0, 0.04);
    border: 1px solid rgba(255, 68, 0, 0.2);
    border-left: 3px solid var(--accent);
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}
.contact-email-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 68, 0, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.contact-email-cta:hover {
    background: rgba(255, 68, 0, 0.07);
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(255, 68, 0, 0.08);
}
.contact-email-cta:hover::before {
    opacity: 1;
}
.contact-email-cta svg:first-child {
    color: var(--accent);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.contact-email-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.contact-email-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.contact-email-addr {
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--text-primary);
    /* Never break the address mid-word — it stays on one line and the
       font steps down on narrow screens instead of wrapping. */
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-weight: 500;
}
@media (max-width: 480px) {
    .contact-email-cta {
        padding: 1rem;
        gap: 0.75rem;
    }
    .contact-email-addr {
        font-size: 0.75rem;
    }
    .contact-email-arrow {
        display: none;
    }
}
@media (max-width: 380px) {
    .contact-email-addr {
        font-size: 0.7rem;
    }
    .copy-email-btn {
        font-size: 0.6rem;
        padding: 0 0.6rem;
    }
}
.contact-email-arrow {
    color: var(--text-secondary);
    opacity: 0.4;
    flex-shrink: 0;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-email-cta:hover .contact-email-arrow {
    opacity: 1;
    color: var(--accent);
    transform: translate(3px, -3px);
}

:global(body.light-mode) .contact-email-cta {
    background: rgba(217, 65, 0, 0.03);
    border-color: rgba(217, 65, 0, 0.2);
    border-left-color: var(--accent);
}
:global(body.light-mode) .contact-email-cta:hover {
    background: rgba(217, 65, 0, 0.06);
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(217, 65, 0, 0.06);
}

.contact-grid {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
    perspective: 1000px;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* Info Card */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.info-card {
    background: var(--surface-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

:global(body.light-mode) .info-card {
    background: var(--surface-dark);
    border-color: var(--wire-color);
}

:global(body.light-mode) .info-icon.available {
    background: rgba(0, 143, 94, 0.1);
    color: #008f5e;
}

:global(body.light-mode) .available-text {
    color: #007a50;
    font-weight: 600;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0 0.25rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--grid-line);
}

.info-item + .info-item {
    padding-top: 1rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 68, 0, 0.08);
    color: var(--accent);
    flex-shrink: 0;
    border-radius: 10px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.info-item:hover .info-icon {
    background: rgba(255, 68, 0, 0.14);
    transform: scale(1.05);
}

.info-icon.available {
    background: rgba(0, 255, 170, 0.1);
    color: #00ffaa;
}

:global(body.light-mode) .info-icon.available {
    background: rgba(0, 136, 85, 0.1);
    color: #008855;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.info-title {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

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

.available-text {
    color: #00ffaa;
}

:global(body.light-mode) .available-text {
    color: #005c3a;
    font-weight: 600;
}

/* Social Section */
.social-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.25rem 0;
}

.social-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 68, 0, 0.08);
}

:global(body.light-mode) .social-link {
    border-color: var(--wire-color);
}

:global(body.light-mode) .social-link:hover {
    border-color: var(--wire-active);
    color: var(--wire-active);
    background: rgba(0, 0, 0, 0.04);
}

/* Form Container */
.contact-form-container {
    background: var(--surface-dark);
    border: 1px solid var(--grid-line);
    padding: 2.5rem;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

@media (max-width: 900px) {
    .contact-form-container {
        padding: 2rem;
    }
}

/* =========================================
   Hero — Aerospace Brutalism (Premium)
   ========================================= */
.hero-corner {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}
.hero-corner--tl { top: 2rem; left: 2rem; }
.hero-corner--tr { top: 2rem; right: 2rem; }
.hero-corner--bl { bottom: 3rem; left: 2rem; }
.hero-corner--br { bottom: 3rem; right: 2rem; }

@media (max-width: 900px) {
    .hero-corner { display: none; }
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 60vh;
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}



.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1rem;
    max-width: 900px;
}

.hero-role-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}



.hero-role {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.05em;
    border: none;
    padding: 0;
    margin: 0;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 1;
}

.hero-scroll-text {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
}

.hero-scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* =========================================
   About — Premium Portfolio
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    align-items: start;
    padding: 2rem 0;
    perspective: 1000px;
}

@media (max-width: 960px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.about-visual-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.12);
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.about-frame-border {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 1;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter 0.4s ease;
}

.about-frame:hover .about-img {
    filter: grayscale(0%);
}

.about-frame-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 68, 0, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 68, 0, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 2;
}

.about-specs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
}

.about-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.about-spec-key {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.about-spec-val {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.about-spec-val--accent {
    color: var(--accent);
}

.about-spec-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.about-content-col {
    display: flex;
    flex-direction: column;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}



.about-header h2 {
    border: none;
    padding: 0;
    margin: 0;
}

.about-bio {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 650px;
}

.about-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    border-top: 2px solid var(--accent);
    padding-top: 2rem;
}

.about-metric {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.about-metric-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.about-metric-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─── Achievements — Mission Patch Collection ─── */
.about-badges {
    margin-bottom: 1.5rem;
}

.about-badges-category {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem 1.25rem 1.25rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.about-badges:last-child .about-badges-category:last-child {
    margin-bottom: 0;
}

.about-badges-category:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.about-badges-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--grid-line);
}

.about-badges-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.5;
}

.about-badges-count {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    color: var(--text-secondary);
    opacity: 0.35;
    margin-left: auto;
}

.about-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 1rem;
    justify-items: center;
}

/* ─── Badge Cell ─── */
.badge-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0;
    user-select: none;
    background: transparent;
    border: none;
    width: 100%;
    max-width: 96px;
    opacity: 0;
    transform: translateY(12px);
    animation: badgeFadeIn 0.4s ease-out forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes badgeFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .badge-cell {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.badge-cell-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    transition: transform 0.2s ease;
}

.badge-cell-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
    transition: filter 0.2s ease, transform 0.2s ease;
}

.badge-cell:hover .badge-cell-frame {
    transform: translateY(-3px);
}
.badge-cell:hover .badge-cell-frame img {
    filter: drop-shadow(0 3px 12px rgba(0,0,0,0.45));
    transform: scale(1.06);
}
.badge-cell:hover .badge-cell-name {
    color: var(--text-primary);
    opacity: 0.9;
}

/* Rarity — accent dot */
.badge-cell-dot {
    position: absolute;
    bottom: -2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.06);
    z-index: 2;
}

.badge-cell-dot.uncommon {
    background: rgb(168, 141, 250);
    border-color: rgba(168, 141, 250, 0.4);
    box-shadow: 0 0 6px rgba(168, 141, 250, 0.3);
}

.badge-cell-dot.rare {
    background: rgb(251, 191, 36);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

/* Badge name */
.badge-cell-name {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
    opacity: 0.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease, color 0.2s ease;
}

/* ─── Badge Show More Button ─── */
.about-badges-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}
.about-badges-more:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
}
.about-badges-less {
    border-style: solid;
    border-color: rgba(255,255,255,0.05);
}
.about-badges-less:hover {
    border-color: rgba(255,255,255,0.12);
}
.more-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 0;
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 600;
}

/* ─── Badge Preview — Detail Overlay ─── */
.badge-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.badge-preview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2.5rem 2rem 1.75rem;
    background: var(--surface-dark);
    cursor: default;
    max-width: 340px;
    width: 85%;
}

.badge-preview-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.badge-preview-nav .badge-preview-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.badge-preview-nav .badge-preview-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.badge-prev,
.badge-next {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.3);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-family: inherit;
    line-height: 1;
}
.badge-prev:hover:not(:disabled),
.badge-next:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}
.badge-prev:disabled,
.badge-next:disabled {
    opacity: 0.15;
    cursor: default;
}

.badge-preview-counter {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.15);
    letter-spacing: 0.05em;
    margin-top: -0.75rem;
}

.badge-preview-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.badge-preview-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.5;
}

.badge-preview-meta .badge-preview-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
}

.badge-preview-rarity {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
}

.badge-preview-rarity.uncommon { color: rgb(168, 141, 250); }
.badge-preview-rarity.rare { color: rgb(251, 191, 36); }

.badge-preview-link {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--accent);
    text-decoration: none;
    padding: 6px 16px;
    border: 1px solid var(--accent);
    margin-top: 0.25rem;
    letter-spacing: 0.06em;
    opacity: 0.8;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.badge-preview-link:hover {
    background: var(--accent);
    color: #000;
    opacity: 1;
}

.badge-preview-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    line-height: 1;
    z-index: 2;
}

.badge-preview-close:hover {
    opacity: 0.8;
}

/* ─── Light mode ─── */
:global(body.light-mode) .badge-cell-name {
    color: #52525b;
    opacity: 0.7;
}
:global(body.light-mode) .badge-cell:hover .badge-cell-name {
    color: #18181b;
    opacity: 1;
}
:global(body.light-mode) .badge-cell-frame img {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}
:global(body.light-mode) .badge-cell:hover .badge-cell-frame img {
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.12));
}
:global(body.light-mode) .badge-preview-card {
    background: #f5f5f7;
}
:global(body.light-mode) .badge-preview-name {
    color: #18181b;
}
:global(body.light-mode) .badge-preview-rarity {
    color: rgba(0,0,0,0.3);
}
:global(body.light-mode) .badge-preview-rarity.uncommon { color: rgb(124, 85, 194); }
:global(body.light-mode) .badge-preview-rarity.rare { color: rgb(210, 148, 0); }
:global(body.light-mode) .badge-prev,
:global(body.light-mode) .badge-next {
    border-color: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.25);
}
:global(body.light-mode) .badge-prev:hover:not(:disabled),
:global(body.light-mode) .badge-next:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}
:global(body.light-mode) .badge-preview-counter {
    color: rgba(0,0,0,0.15);
}
:global(body.light-mode) .about-badges-more {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.08);
    color: #52525b;
}
:global(body.light-mode) .about-badges-more:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.15);
    color: #18181b;
}

:global(body.light-mode) .about-badges-category {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.6);
}
:global(body.light-mode) .about-badges-category:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8);
}
:global(body.light-mode) .about-badges-header {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* =========================================
   Hero & About — Mobile Responsive
   ========================================= */
@media (max-width: 900px) {
    .hero-inner {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero-scroll {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 3rem;
        align-self: center;
    }

    .about-frame {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .about-badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
        gap: 0.7rem;
    }
    .badge-cell {
        max-width: 76px;
    }
    .badge-cell-name {
        font-size: 0.5rem;
    }
    .badge-preview-image {
        width: 140px;
        height: 140px;
    }
    .badge-preview-card {
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* Footer */
.aero-footer {
    background: var(--surface-dark);
    /* Solid Surface Color */
    border-top: 2px solid var(--accent);
    padding: 4rem 2rem;
    margin-top: 5rem;
    position: relative;
    z-index: 10;
    /* Ensure it sits on top */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--grid-line);
    padding-top: 2rem;
    margin-top: 3rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Utilities */
.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    /* Silent grey */
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    width: auto;
    height: auto;
    border: none;
    box-shadow: none;
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-2px);
    background: transparent;
    box-shadow: none;
}

.social-icons a:active {
    transform: translateY(0);
}

/* Utilities */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

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

@media (max-width: 900px) {

    /* Responsive Metrics */
    :root {
        --nav-height: 70px;
    }

    /* Typography Scaling */
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Layout Adjustments */
    main {
        padding-top: 100px;
        /* Reduced specific to mobile */
        padding-left: 1rem;
        padding-right: 1rem;
    }

    section {
        margin-bottom: 5rem;
    }

    .snap-section,
    .snap-section-content,
    .contact-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .aero-card {
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        /* Widened for text fit */
        gap: 0.8rem;
    }

    .skill-card {
        padding: 1rem 0.2rem;
        /* Minimal side padding */
    }

    .skill-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .skill-card h3 {
        font-size: 0.75rem;
        overflow-wrap: normal;
        /* Prefer keeping words together */
        word-wrap: normal;
        hyphens: none;
        /* No broken words */
        line-height: 1.25;
        width: 100%;
        padding: 0 2px;
    }

    /* --- Typography Scaling --- */
    h1 {
        font-size: 2.2rem;
        /* Reduced from 3.5rem */
    }

    h2 {
        font-size: 1.5rem;
        /* Reduced from 2rem */
    }

    .tagline {
        font-size: 0.95rem;
    }

    /* --- Layout & Spacing --- */
    .snap-section {
        padding-top: calc(var(--nav-height) + 1rem);
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 2rem;
        /* Allow natural height if content overflows 100vh */
        height: auto;
        min-height: 100svh;
        justify-content: flex-start;
        /* Start from top on mobile */
    }

    .section-container {
        margin-bottom: 4rem;
        /* Reduce large gap */
    }

    /* --- Hero Section --- */
    .hero-content {
        min-height: auto;
        /* Remove rigid height constraint */
        padding-top: 2rem;
        align-items: flex-start;
        text-align: left;
    }

    .cta-group {
        flex-direction: column;
        /* Stack buttons */
        width: 100%;
        gap: 0.75rem;
    }

    .cta-group .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- About Section --- */
    .visual-profile {
        display: flex;
        flex-direction: column;
        /* Stack image and text */
        gap: 1.5rem;
    }

    .profile-frame {
        width: 100%;
        max-width: 200px;
        /* Limit image size on mobile */
        margin: 0 auto;
        /* Center image */
    }

    .mission-stats {
        margin-top: 1.5rem;
        gap: 1rem;
    }

    /* --- Skills Section --- */
    .skills-wrapper {
        grid-template-columns: 1fr;
        /* Stack categories */
        gap: 1.5rem;
    }

    .skill-category-card {
        padding: 1.5rem;
        /* Reduce padding */
    }

    .projects-grid {
        gap: 1rem;
    }

    /* --- General Utilities --- */
    .aero-card {
        padding: 1.5rem;
        /* Consistent padding reduction */
    }

    /* --- Contact Section --- */
    .contact-section {
        padding-top: calc(var(--nav-height) + 2rem);
        padding-bottom: 3rem;
        min-height: auto;
    }

    .contact-header {
        margin-bottom: 2.5rem;
    }

    .contact-container {
        padding: 0 1.25rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .social-links {
        flex-wrap: wrap;
    }

    /* --- About Section --- */
    .about-grid {
        gap: 2rem;
    }

    .about-specs {
        padding: 1rem;
    }

    .about-bio {
        font-size: 1rem;
    }

    .about-metrics {
        gap: 1.25rem;
        padding-top: 1.75rem;
    }

    /* --- Snap Section Content --- */
    .snap-section-content {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 380px) {

    /* Small phone adjustments */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* --- Extra Small Screens (480px and below) --- */
@media (max-width: 480px) {

    /* --- Hero --- */
    .hero-name {
        font-size: clamp(2rem, 10vw, 2.8rem);
        letter-spacing: -0.03em;
        margin-bottom: 0.75rem;
    }

    .hero-role {
        font-size: clamp(0.85rem, 4vw, 1.05rem);
        letter-spacing: 0.08em;
    }

    .hero-tagline {
        font-size: clamp(0.85rem, 3.5vw, 0.95rem);
        max-width: 100%;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    .hero-inner {
        padding: 2.5rem 0;
        min-height: auto;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .cta-group .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.85rem;
    }

    .hero-scroll {
        margin-top: 2.5rem;
    }

    /* --- About --- */
    .about-grid {
        gap: 1.5rem;
    }

    .about-specs {
        padding: 0.85rem;
    }

    .about-metrics {
        gap: 1rem;
        padding-top: 1.25rem;
    }

    .about-metric-value {
        font-size: 1.4rem;
    }

    .about-bio {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* --- Contact --- */
    .contact-section {
        padding-top: calc(var(--nav-height) + 1rem);
        padding-bottom: 2rem;
    }

    .contact-header {
        margin-bottom: 1.5rem;
    }

    .contact-header h2 {
        font-size: 1.3rem;
    }

    .contact-description {
        font-size: 0.85rem;
    }

    .contact-container {
        padding: 0 1rem;
    }

    .contact-grid {
        gap: 1.5rem;
    }

    .info-card {
        padding: 1.25rem;
    }

    .contact-form-container {
        padding: 1rem;
    }

    .info-item {
        gap: 0.75rem;
    }

    .info-icon {
        width: 36px;
        height: 36px;
    }

    .info-title {
        font-size: 0.65rem;
    }

    .info-text {
        font-size: 0.8rem;
    }

    .social-section {
        gap: 0.75rem;
    }

    .social-label {
        font-size: 0.65rem;
    }

    /* --- Skills --- */
    .skill-name {
        font-size: 0.7rem;
    }

    .skill-icon {
        font-size: 1.5rem;
    }

    .category-title {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.6rem;
    }

    .skill-card {
        padding: 0.75rem 0.15rem;
    }

    /* --- Snap Section Content --- */
    .snap-section-content {
        padding-top: calc(var(--nav-height) + 1rem);
        padding-bottom: 2.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .snap-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* --- Accessibility (a11y) Improvements --- */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background: var(--surface-dark);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--accent);
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cert-card-wrap {
        opacity: 1 !important;
        transform: none !important;
    }

    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Skip-to-content link ── */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 100000;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #030405;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 0.5rem;
}

