/* =========================================================================
   VARIABLES & GLOBAL TOKENS
   ========================================================================= */
:root {
    /* Color Palette */
    --bg-main: #eeeee6;
    --bg-secondary: #bdbdbc;
    --text-muted: #848484;
    --accent: #505050;
    --text-primary: #1f1f1f;

    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --max-width: 1400px;
    --nav-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-main);
}

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

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

body::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}

/* =========================================================================
   PRELOADER (ASH & PASTEL YELLOW THEME)
   ========================================================================= */
.preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #c8c8bf;
    /* Darker Ash Background */
    z-index: 10000;
    display: flex;
    justify-content: center;
    /* Move contents back to middle */
    align-items: center;
    overflow: hidden;
    transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1);
}

.preloader.fade-out {
    transform: translateY(-100%);
}

/* Massive Vertical Background Text - Reveals on class load */
.bg-vertical-text {
    position: absolute;
    font-size: min(15vw, 150px);
    font-weight: 900;
    color: rgba(0, 0, 0, 0.12);
    opacity: 0;
    /* Fade in later */
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    will-change: transform, opacity;
    transition: opacity 1.5s ease-in-out;
}

.bg-vertical-text.visible {
    opacity: 1;
    /* Match the previous look we had */
}

.bg-vertical-text.text-left {
    left: 0%;
    animation: bar-slide-down-simple 8s linear infinite;
}

.bg-vertical-text.text-center {
    left: 50%;
    animation: bar-slide-up-center 10s linear infinite;
}

.bg-vertical-text.text-right {
    right: 0%;
    animation: bar-slide-down-simple 9s linear infinite;
}

@keyframes bar-slide-down-simple {
    0% {
        transform: translateY(-100%) rotate(90deg);
    }

    100% {
        transform: translateY(100vh) rotate(90deg);
    }
}

@keyframes bar-slide-up-center {
    0% {
        transform: translate(-50%, 100vh) rotate(90deg);
    }

    100% {
        transform: translate(-50%, -100%) rotate(90deg);
    }
}

.bg-vertical-text.text-left,
.bg-vertical-text.text-right {
    transform-origin: center;
}

/* Preloader Central Header Icon */
.preloader-icon {
    font-size: 1.5rem;
    color: #a8a8a8;
    /* Muted gray for subtlety */
    display: block;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
    animation: icon-pulse 2s infinite ease-in-out;
}

@keyframes icon-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translateY(0);
    }

    50% {
        opacity: 0.9;
        transform: translateY(-5px);
    }
}

/* Terminal Container Styling (Centered) */
.preloader-terminal-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    z-index: 2;
    text-align: center;
}

.terminal-header-v3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #d4c84c;
    /* Pastel/Muted Yellow Accent */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(212, 200, 76, 0.4);
    animation: status-pulse-yellow 1.5s infinite alternate;
}

@keyframes status-pulse-yellow {
    from {
        opacity: 0.4;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

.status-text {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: #888;
}

/* Main Terminal Logic Area */
.boot-terminal {
    font-size: 0.85rem;
    color: #444;
    /* Darker text for visibility on ash */
    line-height: 1.8;
    height: 450px;
    /* Increased to prevent cropping */
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Keep text centered vertically */
}

/* Pastel Yellow accents in preloader terminal lines */
.terminal-accent {
    color: #bfa800;
    /* Darker pastel yellow for readability */
    font-weight: 500;
}

.terminal-index {
    color: #bbb;
    margin-right: 1.2rem;
    display: inline-block;
    width: 30px;
}

.loader-percent-v3 {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.1em;
}

/* Responsive adjustment for vertical text & Mobile Preloader */
@media (max-width: 768px) {
    .bg-vertical-text.text-center {
        display: none;
    }

    .bg-vertical-text {
        font-size: 15vw;
        color: rgba(0, 0, 0, 0.08);
        /* Slightly more subtle on small screens */
    }

    .preloader-terminal-container {
        max-width: 90%;
        padding: 1.5rem;
    }

    .boot-terminal {
        height: 320px;
        font-size: 0.75rem;
    }

    .bg-vertical-text.text-left {
        left: 0;
    }

    .bg-vertical-text.text-right {
        right: 0;
    }
}

@media (max-width: 480px) {

    .bg-vertical-text.text-left,
    .bg-vertical-text.text-right {
        display: none;
        /* Hide for cleaner mobile UI if desired, or keep 1 */
    }

    .bg-vertical-text.text-center {
        display: block;
        /* Show center text instead on very small screens for better central focus */
        font-size: 25vw;
    }

    .boot-terminal {
        height: 280px;
        font-size: 0.7rem;
    }
}

/* =========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

.code-font {
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
}

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

.dot-separator {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

.code-bracket {
    color: var(--text-muted);
    font-weight: 300;
}

p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 300;
}

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

ul {
    list-style: none;
}

.section-padding {
    padding: 100px 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

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

/* Skills Split Layout */
.skills-split-container {
    display: flex;
    gap: 4rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.skills-side-left, .skills-side-right {
    flex: 1;
    min-width: 380px; /* Reduced to keep 'same row' on more screens */
}

.skills-side-right {
    margin-top: 0; /* Align with left headline */
}

.side-marquee {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

.github-contribution-wrapper {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(189, 189, 188, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
    transition: var(--transition-smooth);
}

.github-contribution-wrapper:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.github-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.github-chart-img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) opacity(0.8);
    transition: var(--transition-smooth);
}

.github-contribution-wrapper:hover .github-chart-img {
    filter: grayscale(0%) opacity(1);
}

@media (max-width: 1024px) {
    .skills-split-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .skills-side-left, .skills-side-right {
        min-width: 100%;
    }
}

.section-tag {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    position: relative;
    display: inline-block;
    letter-spacing: -1.5px;
    margin-top: 5px;
}

.section-title::after {
    content: '_';
    position: absolute;
    right: -1.5rem;
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

/* Background Effects */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(31, 31, 31, 0.1);
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 80, 80, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(31, 31, 31, 0.05);
}

/* =========================================================================
   NAVIGATION
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(238, 238, 230, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(189, 189, 188, 0.3);
    z-index: 100;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

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

.nav-links li a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
    position: relative;
}

.nav-links li a:hover {
    color: var(--text-primary);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: var(--transition-fast);
}

.nav-links li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
/* THEME: LIGHT ASH HERO BACKGROUND (PREMIUM MINIMALIST) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #eeeee6;
    /* Reverted to Ash/Off-White Base */
}

.hero-dark-bg {
    /* Keeping the container but renaming its feel */
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Subtle Dot Matrix Grid (Darker for light theme) */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 35px 35px;
    z-index: 1;
}

/* Cursor-Reactive Glow Trail (Subtle shadow/light) */
.cursor-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 200, 76, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    transition: transform 0.08s linear;
}

/* Very Low-Opacity Floating Symbols (Dark for light theme) */
.code-rain-container {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.floating-code-symbol {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #1f1f1f;
    opacity: 0.1;
    white-space: nowrap;
    will-change: transform;
}

/* Hero container styling updates for Light theme */
.hero-container {
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 800px;
    z-index: 11;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: #1f1f1f;
    /* Dark title */
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    margin-bottom: 2.5rem;
    color: #848484;
    /* Muted gray */
}

.hero-subtitle .keyword {
    color: #a626a4;
}

.hero-subtitle .variable {
    color: #4078f2;
}

.hero-subtitle .string {
    color: #50a14f;
}

.hero-subtitle .cursor {
    color: #d4c84c;
    animation: cursor-blink 1s infinite;
    font-weight: 200;
}

@keyframes cursor-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

/* Image styling */
.hero-image-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
}

.hero-image-outline {
    position: relative;
    width: 340px;
    height: 440px;
    border: 1px solid var(--bg-secondary);
    border-radius: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.hero-img-inner {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #e9e9e1;
}

.hero-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(110%);
    transition: var(--transition-slow);
}

.hero-image-outline:hover .hero-profile-img {
    filter: grayscale(0%) contrast(100%);
}

.hero-image-accents .accent-line {
    position: absolute;
    background: var(--accent);
}

.hero-image-accents .accent-line:nth-child(1) {
    top: -15px;
    right: -15px;
    width: 80px;
    height: 1px;
}

.hero-image-accents .accent-line:nth-child(2) {
    top: -15px;
    right: -15px;
    width: 1px;
    height: 80px;
}

.glow-sphere {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(189, 189, 188, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    animation: float 8s ease-in-out infinite;
}

.glow-sphere.secondary {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(132, 132, 132, 0.2) 0%, transparent 70%);
    top: 60%;
    left: 40%;
    animation-delay: -4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, -60%);
    }
}



/* =========================================================================
   ABOUT SECTION
   ========================================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: center;
}


.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.stats-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-secondary);
}

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

.stat-num {
    font-size: 2.5rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
}

.infinity-pulse {
    display: inline-block;
    animation: infinityBreath 3s ease-in-out infinite;
    color: var(--text-primary);
}

@keyframes infinityBreath {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.stat-item:hover .bxs-map {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
}

/* Terminal Card */
.terminal-card {
    background-color: var(--text-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    min-width: 0;
    width: 100%;
}

.terminal-header {
    background-color: #2a2a2a;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background-color: #ff5f56;
}

.dot-yellow {
    background-color: #ffbd2e;
}

.dot-green {
    background-color: #27c93f;
}

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

.terminal-body {
    padding: 1.5rem;
    color: #e0e0e0;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
}

.terminal-body>div {
    visibility: hidden;
    opacity: 0;
}

.prompt {
    color: var(--text-muted);
}

.command {
    color: #98c379;
    font-weight: bold;
}

.text-white {
    color: #ffffff !important;
}

.terminal-output {
    margin: 0.5rem 0 1rem 0;
    color: #abb2bf;
    white-space: pre;
}

/* Syntax Highlighting */
.code-keyword {
    color: #c678dd;
}

/* Purple */
.code-type {
    color: #e5c07b;
}

/* Gold/Yellow */
.code-string {
    color: #98c379;
}

/* Green */

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: #cccccc;
    animation: terminal-blink 1s step-end infinite;
    vertical-align: middle;
}

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

/* =========================================================================
   SKILLS SECTION
   ========================================================================= */
/* SYS.CAPABILITIES Marquee */


.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 2.5rem 0;
    position: relative;
    border-top: 1px solid #000000;
    border-bottom: 1px solid #000000;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* Robotic borders */
.marquee-container::before,
.marquee-container::after {
    display: none;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
    /* Slightly slower for 'heavy duty' feel */
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 4rem;
    transition: var(--transition-fast);
    cursor: default;
}

.marquee-item i {
    font-size: 2.8rem;
    color: #000000;
    opacity: 1;
    /* Icon always solid black */
}

.marquee-item span {
    font-size: 1.2rem;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #848484;
    /* Ash color by default */
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.marquee-item:hover span {
    color: #000000;
    /* Deep black on hover */
    opacity: 1;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Skills section spacing */
.skills {
    background-color: transparent;
}

/* =========================================================================
   PROJECTS SECTION
   ========================================================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

/* V2 Project Card - Dark overlay card with background image */
.project-card-v2 {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--text-primary);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.project-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.project-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background-size: cover;
    background-position: center top;
    opacity: 0.4;
    transition: var(--transition-smooth);
}

.project-card-v2:hover .project-card-bg {
    opacity: 0.55;
    transform: scale(1.03);
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(31, 31, 31, 0.3) 0%, rgba(31, 31, 31, 0.85) 45%, rgba(31, 31, 31, 1) 65%);
    z-index: 1;
}

.project-card-inner {
    position: relative;
    z-index: 2;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

.project-category {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.project-ext-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.project-ext-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.project-card-body {
    margin-top: auto;
}

.project-title-v2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 0.8rem;
}

.project-desc-v2 {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

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

.project-tags span {
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.project-tags span:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.projects-cta {
    text-align: center;
    margin-top: 2rem;
}

/* =========================================================================
   CONTACT SECTION (ROBOTIC / IDE AESTHETIC)
   ========================================================================= */
.contact-card {
    background: #d4d4cd;
    border: 1px dashed var(--bg-secondary);
    border-radius: 12px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    margin: 0 auto;
}

/* INITIAL COLLAPSED STATE (The Button) */
.contact-card.contact-collapsed {
    max-width: 400px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    cursor: pointer;
    gap: 0;
}

.contact-card.contact-collapsed:hover {
    background: #e1e1db;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-card.contact-collapsed .contact-header p,
.contact-card.contact-collapsed .contact-form,
.contact-card.contact-collapsed::before {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    pointer-events: none;
    position: absolute;
}

.contact-card.contact-collapsed #typing-contact-title {
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin: 0;
}

/* Corner Hacker Accents Removed */

.contact-header {
    position: relative;
    z-index: 2;
}

.contact-header .section-title {
    color: var(--text-primary);
}

#typing-contact-title {
    opacity: 0;
    visibility: hidden;
}

.contact-header p {
    font-size: 1rem;
    margin-top: 1.5rem;
    color: var(--text-muted);
    transition: opacity 0.4s 0.3s;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: transparent;
    padding: 0;
    border: none;
    position: relative;
    transition: opacity 0.4s 0.4s;
}

/* IDE Mac traffic dots moved to top left of the card */
.contact-card::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #f9f9f6;
    border: 1px solid var(--bg-secondary);
    border-radius: 6px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #abb2bf;
    font-family: var(--font-mono);
}

.submit-btn {
    align-self: flex-end;
    margin-top: 1rem;
    font-family: var(--font-mono);
    background: #eeeee6;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    padding: 1rem 2.5rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.submit-btn:hover {
    background: var(--text-primary);
    color: var(--bg-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
footer {
    border-top: 1px solid var(--bg-secondary);
    padding: 3rem 5% 1rem 5%;
    background: transparent;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.social-links a {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(189, 189, 188, 0.3);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* =========================================================================
   SCROLL ANIMATIONS
   ========================================================================= */

/* --- Base state: all animated elements start hidden --- */
.anim-slide-left,
.anim-slide-right,
.anim-fade-up,
.anim-zoom-in,
.reveal {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Initial positions before animation --- */
.anim-slide-left {
    transform: translateX(-70px);
}

.anim-slide-right {
    transform: translateX(70px);
}

.anim-fade-up {
    transform: translateY(50px);
}

.anim-zoom-in {
    transform: scale(0.85);
}

.reveal {
    transform: translateY(40px);
}

/* --- Active (visible) states --- */
.anim-slide-left.anim-active,
.anim-slide-right.anim-active,
.anim-fade-up.anim-active,
.anim-zoom-in.anim-active,
.reveal.active {
    opacity: 1;
    transform: none;
}

/* --- Hero stagger delays --- */
.hero-content.anim-slide-left {
    transition-delay: 0.1s;
}

.hero-image-container.anim-slide-right {
    transition-delay: 0.35s;
}

/* --- About section stagger delays --- */
.about-info.anim-slide-left {
    transition-delay: 0.05s;
}

.terminal-card.anim-slide-right {
    transition-delay: 0.25s;
}

/* --- Old stagger-container support (kept for projects) --- */
.stagger-container .reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-container.active .reveal-item {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entry timing */
.reveal-item:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal-item:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal-item:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal-item:nth-child(4) {
    transition-delay: 0.4s;
}

.reveal-item:nth-child(5) {
    transition-delay: 0.5s;
}

.reveal-item:nth-child(6) {
    transition-delay: 0.6s;
}

@media (max-width: 992px) {

    .about-grid,
    .contact-card {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-graphic {
        display: none;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 5%;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background: var(--bg-main);
        width: 100%;
        text-align: center;
        transition: var(--transition-smooth);
        padding: 2rem 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-container {
        flex-wrap: wrap;
    }

    .contact-card {
        padding: 2rem;
    }
}