/* =========================================
   NEO-BRUTALIST PORTFOLIO
   Color Palette:
   - Light: #F8F6F1 (warm cream)
   - Primary Teal: #7AA8A3 (sage-teal)
   - Dark: #2D4542 (warm dark teal)
   - Mid: #526B67 (sage mid-tone)
   - Orange: #C87D56 (muted terracotta)
   - Secondary: #3D5A5C (warmed)
   ========================================= */

/* CSS Variables */
:root {
    --light: #F8F6F1;
    --primary: #7AA8A3;
    --dark: #2D4542;
    --mid: #526B67;
    --orange: #C87D56;
    --secondary: #3D5A5C;

    --shadow-hard: 4px 4px 0px var(--dark);
    --shadow-hard-primary: 4px 4px 0px var(--primary);
    --shadow-hard-orange: 4px 4px 0px var(--orange);
    --shadow-hard-lg: 8px 8px 0px var(--dark);

    --border: 3px solid var(--dark);
    --border-primary: 3px solid var(--primary);

    --font-mono: 'JetBrains Mono', 'Space Mono', monospace;

    --transition: all 0.2s ease;

    /* Theme-aware color tokens */
    --nav-bg-blur: rgba(248, 246, 241, 0.85);
    --shadow-black: rgba(0, 0, 0, 0.3);
    --glow-orange: rgba(200, 125, 86, 0.25);
    --highlight-primary: rgba(122, 168, 163, 0.3);
    --highlight-orange: rgba(200, 125, 86, 0.3);
    --text-light-muted: rgba(248, 246, 241, 0.8);
    --text-light-subtle: rgba(248, 246, 241, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --input-bg: #FFFFFF;
    --section-alt-bg: #eae8e3;

    /* Surface variables for always-dark sections */
    --surface-dark: #2D4542;
    --surface-light: #F8F6F1;
    --surface-dark-secondary: #3D5A5C;
}

/* Dark Mode Overrides */
html[data-theme="dark"] {
    --light: #1E1E1E;
    --primary: #8CC5BF;
    --dark: #E5E1DC;
    --mid: #9BADA8;
    --orange: #E8A06A;
    --secondary: #8AA0A2;

    --nav-bg-blur: rgba(30, 30, 30, 0.85);
    --shadow-black: rgba(0, 0, 0, 0.5);
    --glow-orange: rgba(232, 160, 106, 0.35);
    --highlight-primary: rgba(140, 197, 191, 0.3);
    --highlight-orange: rgba(232, 160, 106, 0.35);
    --text-light-muted: rgba(229, 225, 220, 0.8);
    --text-light-subtle: rgba(229, 225, 220, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --input-bg: #2A2A2A;
    --section-alt-bg: #252525;

    --surface-dark: #161616;
    --surface-light: #E5E1DC;
    --surface-dark-secondary: #1A2829;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

::selection {
    background: var(--primary);
    color: var(--light);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--light);
    border-bottom: var(--border);
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

/* [1.2] Nav scrolled state - backdrop blur + shrink */
.nav.scrolled {
    padding: 0.6rem 2rem;
    background: var(--nav-bg-blur);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.05em;
    transition: all 0.3s ease;
}

/* [1.2] Logo shrinks when scrolled */
.nav.scrolled .nav-logo {
    font-size: 1.25rem;
}

.nav-logo:hover {
    color: var(--orange);
    transform: translateX(4px);
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: lowercase;
    position: relative;
    padding: 0.25rem 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--dark);
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: var(--border);
    margin-top: 1rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.mobile-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

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

    .mobile-menu-btn {
        display: flex;
    }

    .nav-container {
        gap: 0.75rem;
    }
}

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

/* Layered Backgrounds */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    z-index: 0;
}

.hero-bg-layer-2 {
    position: absolute;
    top: 10%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: var(--dark);
    transform: rotate(-5deg);
    z-index: 1;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 2;
}

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

.hero-content {
    color: var(--light);
}

.hero-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.hero-title-line {
    display: block;
}

.hero-title-accent {
    color: var(--orange);
    position: relative;
}

.hero-title-accent::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    width: 100%;
    height: 0.15em;
    background: var(--orange);
    opacity: 0.4;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 3rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    box-shadow: 4px 4px 0px var(--shadow-black);
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--orange);
}

.hero-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-border {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 100%;
    border: 4px solid var(--orange);
    background: transparent;
    z-index: 0;
}

/* [1.1] Mouse-follow glow effect container */
.hero-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--glow-orange) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
}

.hero-image-wrapper:hover .hero-glow {
    opacity: 1;
}

.hero-image {
    position: relative;
    z-index: 1;
    max-height: 600px;
    object-fit: contain;
    filter: drop-shadow(8px 8px 0 var(--shadow-black));
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.7;
    z-index: 10;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image-wrapper {
        order: -1;
    }

    .hero-bg-layer-2 {
        width: 100%;
        height: 50%;
        top: auto;
        bottom: 0;
        right: 0;
        transform: rotate(0);
    }
}

/* =========================================
   SECTIONS - GENERAL
   ========================================= */
.section {
    padding: 8rem 2rem;
    position: relative;
}

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

.section-header {
    margin-bottom: 4rem;
}

.section-number {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.section-title-accent {
    color: var(--primary);
}

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

/* Alternating section backgrounds */
.section:nth-child(odd) {
    background: var(--light);
}

.section:nth-child(even) {
    background: linear-gradient(180deg, var(--section-alt-bg) 0%, var(--light) 100%);
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-card {
    background: var(--light);
    border: var(--border);
    padding: 2.5rem;
    box-shadow: var(--shadow-hard);
    position: relative;
}

.about-card::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--primary);
    z-index: -1;
}

.about-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.about-text {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    color: var(--mid);
}

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

.highlight {
    background: linear-gradient(180deg, transparent 60%, var(--highlight-primary) 60%);
    padding: 0 0.25rem;
}

.highlight-secondary {
    background: linear-gradient(180deg, transparent 60%, var(--highlight-orange) 60%);
    padding: 0 0.25rem;
}

/* Awards Box */
.awards-box {
    background: var(--surface-dark);
    border: var(--border);
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.award {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--surface-light);
}

.award i {
    font-size: 1.5rem;
    color: var(--orange);
}

.award-info {
    display: flex;
    flex-direction: column;
}

.award-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.award-year {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    opacity: 0.7;
    transition: var(--transition);
}

.timeline-item:hover,
.timeline-item-active {
    opacity: 1;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--light);
    border: 4px solid var(--primary);
    transform: translateX(-8px);
}

.timeline-item-active .timeline-marker {
    background: var(--primary);
}

.timeline-card {
    background: var(--light);
    border: var(--border);
    padding: 1.5rem;
    box-shadow: var(--shadow-hard);
    transition: var(--transition);
}

.timeline-item:hover .timeline-card {
    transform: translateX(8px);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.timeline-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

.timeline-company {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.8125rem;
    color: var(--mid);
}

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

/* =========================================
   PROJECTS SECTION
   ========================================= */
.projects {
    background: var(--surface-dark) !important;
    color: var(--surface-light);
}

.projects .section-number {
    color: var(--orange);
}

.projects .section-title-accent {
    color: var(--orange);
}

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

.project-card {
    background: var(--surface-dark-secondary);
    border: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    /* [1.3] Enable 3D transforms */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary);
}

.project-card,
.insight-card,
.cert-card {
    cursor: pointer;
}

/* [1.3] Tilt + glow on hover */
.project-card:hover {
    transform: translate(-4px, -4px) rotateX(2deg) rotateY(-2deg);
    box-shadow:
        8px 8px 0 var(--primary),
        0 0 20px var(--highlight-primary);
}

.project-card-inner {
    padding: 2rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--surface-dark);
}

.project-icon-secondary {
    background: var(--orange);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--surface-light);
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-light-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-bg);
}

.project-stat {
    font-size: 0.8125rem;
    color: var(--text-light-subtle);
}

.project-stat strong {
    color: var(--orange);
}

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

/* =========================================
   SKILLS SECTION
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.skill-card {
    background: var(--light);
    border: var(--border);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    /* [1.3] Enable 3D transforms */
    transform-style: preserve-3d;
}

.skill-card::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    z-index: -1;
    transition: all 0.3s ease;
}

/* [1.3] Tilt + glow on hover */
.skill-card:hover {
    transform: translate(-4px, -4px) rotateX(3deg) rotateY(-3deg);
    box-shadow: 0 0 15px var(--highlight-primary);
}

.skill-card:hover::after {
    bottom: -8px;
    right: -8px;
}

.skill-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--mid);
    transition: var(--transition);
}

.skill-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: grayscale(100%) sepia(50%) hue-rotate(90deg) saturate(150%) brightness(0.8);
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    color: var(--primary);
}

.skill-card:hover .skill-icon img {
    filter: grayscale(0%);
}

.skill-icon img.dark-logo {
    filter: invert(60%) sepia(30%) hue-rotate(110deg) saturate(200%) brightness(0.85);
}

.skill-card:hover .skill-icon img.dark-logo {
    filter: none;
}

.skill-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-level {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    display: inline-block;
}

.skill-level-expert {
    background: var(--surface-dark);
    color: var(--primary);
}

.skill-level-advanced {
    background: var(--surface-dark);
    color: var(--orange);
}

.skill-level-proficient {
    background: var(--mid);
    color: var(--light);
}

@media (max-width: 968px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* Certifications */
.certifications {
    background: var(--surface-dark);
    padding: 3rem;
    border: var(--border);
}

.certifications-title {
    color: var(--surface-light);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

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

.cert-card {
    background: var(--surface-dark-secondary);
    border: 2px solid var(--primary);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateX(8px);
    box-shadow: -4px 4px 0 var(--primary);
}

.cert-icon {
    font-size: 2rem;
    color: var(--primary);
}

.cert-info {
    display: flex;
    flex-direction: column;
}

.cert-name {
    color: var(--surface-light);
    font-weight: 600;
    font-size: 0.9375rem;
}

.cert-badge {
    font-size: 0.6875rem;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

@media (max-width: 640px) {
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   RESUME SECTION
   ========================================= */
.resume-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: var(--light);
    border: var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-transform: lowercase;
}

.filter-btn:hover {
    background: var(--primary);
    color: var(--dark);
}

.filter-btn.active {
    background: var(--surface-dark);
    color: var(--surface-light);
    box-shadow: var(--shadow-hard-primary);
}

.resume-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resume-card {
    background: var(--light);
    border: var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-hard);
    transition: var(--transition);
}

.resume-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-hard-lg);
}

.resume-card.hidden {
    display: none;
}

.resume-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.resume-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    padding: 0.75rem;
    background: white;
    flex-shrink: 0;
    border: 2px solid var(--primary);
}

.resume-card-title {
    flex: 1;
    min-width: 200px;
}

.resume-card-title h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.resume-company {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

.resume-date {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: var(--surface-dark);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resume-list {
    list-style: none;
    padding-left: 0;
}

.resume-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--mid);
}

.resume-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.resume-desc {
    font-size: 0.875rem;
    color: var(--mid);
}

/* =========================================
   INSIGHTS SECTION
   ========================================= */
.insights {
    background: var(--surface-dark-secondary) !important;
    color: var(--surface-light);
}

.insights .section-number {
    color: var(--orange);
}

.insights .section-title-accent {
    color: var(--orange);
}

.insights .section-subtitle {
    color: var(--text-light-subtle);
}

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

.insight-card {
    background: var(--surface-dark);
    border: 3px solid transparent;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    /* [1.3] Enable 3D transforms */
    transform-style: preserve-3d;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
}

/* [1.3] Tilt + glow on hover */
.insight-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 0 0 25px var(--highlight-primary);
}

.insight-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--surface-dark);
}

.insight-icon-secondary {
    background: var(--mid);
    color: var(--surface-light);
}

.insight-icon-orange {
    background: var(--orange);
    color: var(--surface-dark);
}

.insight-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--surface-light);
}

.insight-desc {
    font-size: 0.8125rem;
    color: var(--text-light-subtle);
    line-height: 1.7;
}

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

@media (max-width: 640px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: var(--light);
    border: var(--border);
    padding: 2.5rem;
    box-shadow: var(--shadow-hard-lg);
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    padding: 1rem;
    background: var(--input-bg);
    color: var(--dark);
    border: var(--border);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 4px 4px 0 var(--primary);
}

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

.submit-btn {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    padding: 1.25rem 2rem;
    background: var(--surface-dark);
    color: var(--surface-light);
    border: var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition);
    text-transform: lowercase;
}

.submit-btn:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: var(--shadow-hard);
}

.submit-btn i {
    transition: var(--transition);
}

.submit-btn:hover i {
    transform: translateX(8px);
}

/* Contact Info */
.contact-info-title {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--secondary);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border: var(--border);
    transition: var(--transition);
}

.contact-detail:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-hard-primary);
}

.contact-detail i {
    font-size: 1.25rem;
    color: var(--primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-dark);
    color: var(--primary);
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mid);
}

.contact-value {
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--light);
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--mid);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-hard);
}

/* Availability Box */
.availability-box {
    background: var(--surface-dark);
    border: 3px solid var(--primary);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.availability-indicator {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 0.25rem;
    animation: pulse 2s ease 3;
}

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

.availability-box h4 {
    color: var(--primary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.availability-box p {
    color: var(--text-light-muted);
    font-size: 0.8125rem;
    line-height: 1.6;
}

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

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: var(--surface-dark);
    color: var(--surface-light);
    padding: 3rem 2rem;
    border-top: 4px solid var(--primary);
    text-align: center;
}

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 1rem;
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--text-light-subtle);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.75rem;
    color: var(--mid);
}

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

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger delays for grid items */
.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }
.animate-stagger > *:nth-child(7) { animation-delay: 0.7s; }
.animate-stagger > *:nth-child(8) { animation-delay: 0.8s; }
.animate-stagger > *:nth-child(9) { animation-delay: 0.9s; }

/* =========================================
   UTILITIES
   ========================================= */
.text-primary { color: var(--primary); }
.text-orange { color: var(--orange); }
.text-secondary { color: var(--secondary); }

.bg-primary { background: var(--primary); }
.bg-dark { background: var(--dark); }
.bg-orange { background: var(--orange); }

/* =========================================
   SKIP LINK
   ========================================= */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface-dark);
    color: var(--primary);
    border: var(--border);
    z-index: 9999;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

/* =========================================
   FOCUS STATES
   ========================================= */
a:focus-visible,
button:focus-visible,
.social-link:focus-visible,
.filter-btn:focus-visible,
.theme-toggle:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: none;
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@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;
    }
}

/* =========================================
   THEME TOGGLE
   ========================================= */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--light);
    border: var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: var(--dark);
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    box-shadow: var(--shadow-hard);
    transform: translate(-2px, -2px);
}

.theme-toggle .fa-sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle .fa-sun {
    display: inline-block;
}

/* Theme transition class */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s !important;
}

/* =========================================
   DARK MODE EDGE CASES
   ========================================= */
html[data-theme="dark"] .hero-bg-layer {
    background: linear-gradient(135deg, #1a3633 0%, #0f1a19 100%);
}

html[data-theme="dark"] .hero-bg-layer-2 {
    background: #111;
}

html[data-theme="dark"] .hero-title {
    color: var(--dark);
}

html[data-theme="dark"] .hero-label,
html[data-theme="dark"] .hero-subtitle,
html[data-theme="dark"] .hero-stat-label,
html[data-theme="dark"] .timeline-company {
    color: var(--text-light-muted);
}

html[data-theme="dark"] .skill-icon img {
    filter: grayscale(100%) sepia(50%) hue-rotate(90deg) saturate(150%) brightness(1.2);
}

html[data-theme="dark"] .skill-icon img.dark-logo {
    filter: invert(80%) sepia(30%) hue-rotate(110deg) saturate(200%) brightness(1.1);
}

html[data-theme="dark"] .skill-card:hover .skill-icon img,
html[data-theme="dark"] .skill-card:hover .skill-icon img.dark-logo {
    filter: grayscale(0%);
}

html[data-theme="dark"] .resume-logo {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive font sizes */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }
}
