:root {
    --bg: #ffffff;
    --bg-alt: rgb(250 250 250);
    --surface: #a1a1a1;
    --accent: #050505;
    --text-primary: #050505;
    --text-secondary: #2e2e2e;
    --border: #e5e7eb;
    --nav-height: 5rem;
    --yellow: #f4ca16;
    --red: #ef4444;
    --green: #43b942;

    .btn-primary {
        --btn-bg: 
        --btn-text: #050505;
        --btn-hover: #e0b80d;
    }

    .btn-secondary {
        --btn-bg: #0a192f;
        --btn-text: #ffffff;
        --btn-hover: #0f233f;
    }
}

/* Dark Mode Overrides (Triggered by the JS switch) */
[data-theme="dark"] {
    --bg: #1f1d20;
    --bg-alt: #242225;
    --surface: #39302B;
    --accent: #a79986;
    --text-primary: #ddd7d7;
    --text-secondary: rgb(250 250 250);
    --border: #2d2b2e;
}

* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
        
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   GLOBAL TOP LOADING BAR
   ========================================================================== */

/* 1. Base State: Fixed at the very top of the screen, invisible by default */
#top-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--yellow);
    z-index: 9999;
    opacity: 0;
    transition: none;
    pointer-events: none; /* Ensures it doesn't block clicks while processing */
}

/* 2. Active State: Crawls smoothly across the screen when loading begins */
#top-loading-bar.active {
    width: 75%;
    opacity: 1;
    /* This long transition curve simulates a natural load speed */
    transition: width 15s cubic-bezier(0.08, 0.82, 0.17, 1); 
}

/* 3. Complete State: Snaps instantly to 100% and cleanly fades away */
#top-loading-bar.complete {
    width: 100% !important;
    opacity: 0;
    transition: width 0.3s ease-out, opacity 0.3s ease-out 0.4s !important;
}

/* ==========================================================================
   CMS ADMIN WORKSPACE ISOLATION TOKENS (UPDATED)
   ========================================================================== */
.admin-body {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-clean: #e2e8f0;
    --accent-primary: #0f172a;
    --accent-hover: #334155;
    
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    padding: 3rem 2rem;
    margin: 0;
    box-sizing: border-box;
}

/* Force all headers within the admin body to inherit Inter and break global font rules */
.admin-body h1, 
.admin-body h2, 
.admin-body h3, 
.admin-body h4 {
    font-family: 'Inter', sans-serif !important;
}

.admin-body * {
    box-sizing: border-box;
}

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

a:active {
    text-decoration: none;
    color: currentColor;
}

a:visited {
    text-decoration: none;
    color: currentColor;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: 25px;
    line-height: 1.2;
}

h3 {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
}

h4 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

p {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.15rem;
}

.container {
    /* max-width: 72rem; */
    max-width: 80%;
    margin: 0 auto;
}

.v-space {
    padding: 6rem 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 4px; /* Subtle radius to complement your modular blocks */
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    align-self: flex-start;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #f4ca16;
    color: #050505 !important; /* Forces link visibility overrides */
}

.btn-primary:hover {
    background-color: #e0b80d;
    box-shadow: 0 4px 14px rgba(244, 202, 22, 0.25);
}

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

.btn-secondary:hover {
    background-color: var(--bg-alt);
    box-shadow: 0 4px 14px rgba(10, 25, 47, 0.05);
}

.btn:active {
    transform: translateY(1px);
}

.rotate-icon {
    transform: rotateZ(90deg);
}

/* --- Universal Gradient Underline Utility --- */
.hov-line {
    position: relative;
    display: inline-block;
}

.hov-line::after {
    content: '';
    position: absolute;
    bottom: -6px; 
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #f4ca16, rgba(244, 202, 22, 0));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.hov-line.active::after {
    transform: scaleX(1) !important;
}

.hov-line:hover::after {
        transform: scaleX(1);
    }

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid transparent; 
    transition: border-color 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    border-bottom: 1px solid var(--border);
    /* filter: drop-shadow(0px 0px 3px #a1a1a1); */
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s;
    cursor: pointer;
}

nav a:hover {
    opacity: 1;
}

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

.nav-links a {
    position: relative; 
    display: inline-block;
    padding: 0; 
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px; 
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #f4ca16, rgba(244, 202, 22, 0));
    transform: scaleX(0); 
    transform-origin: left; 
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a:hover {
    opacity: 1; 
}

.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Content Views */
#main-view, #project-view {
    transition: opacity 0.4s ease;
}

.hidden {
    display: none;
    opacity: 0;
}

/* Hero */
.hero {
    min-height: calc(100vh - var(--nav-height)); 
    background: var(--bg);
    display: flex;
    align-items: center;
    /* background-image: url("/images/white-bg.jpg"); */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
}

.hero-sec {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - var(--nav-height));
    cursor: default;
}

.hero-para {
    position: absolute;
    bottom: 4rem;
    left: 0;
    max-width: 20rem;
}

.hero-para a {
    color: var(--text-secondary);
    display: flex;
    gap: 5px;
    align-items: baseline;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 8vw, 8rem);
    line-height: 1.1;
    /* margin-bottom: 1rem; */
}

.motion-block h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-secondary);
    font-weight: 300;
}

.motion-design-block {
    display: block;
    width: fit-content;
}

.location-underline-alignment {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 1rem;       /* Adds breathing space under the heading text */
    margin-bottom: 10rem;    /* Preserves your original 7rem layout spacing */
    width: 100%;
    gap: 20px;
}

/* --- Underline Stretch Mechanics --- */
.hero-underline-wrapper {
    flex-grow: 1;
    height: 6px;
    position: relative;
    min-width: 50px; /* Ensures the line is visible even on tight viewports */
}

.hero-curved-underline {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #f4ca16, rgba(244, 202, 22, 0));
    
}

.hero-social-icons {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    font-size: 2rem;
    gap: 1rem;
    transform: translatex(-50%);
}

.scroll {
    writing-mode: vertical-rl;
    text-orientation: upright;
    position: absolute;
    right: 0;
    bottom: 4rem;
    text-transform: uppercase;
}

.studio-list {
    margin-top: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.studio-list span {
    color: var(--accent);
    font-weight: 600;
    margin-right: 15px;
}

/* Toggle switch */
/* --- Clickable Horizontal Toggle Mechanism --- */

.horizontal-toggle-switch {
    display: inline-flex;
    flex-direction: row; /* Changed to row for header placement */
    background-color: var(--border);
    border-radius: 20px;
    padding: 4px;
    gap: 4px;
    width: fit-content;
    cursor: pointer;
    user-select: none;
    position: relative; /* Anchor for the backplate slider */
    z-index: 1;
}

/* The standalone sliding indicator card */
.active-indicator-backplate {
    position: absolute;
    left: 4px;
    top: 4px;
    
    /* Dynamically computed by JavaScript to match the exact active segment width */
    width: 31px; 
    height: calc(100% - 8px);
    
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    
    /* Smooth sliding transitions along the X axis */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
    pointer-events: none;
}

/* Individual state segments */
.toggle-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px; /* Balanced horizontal padding for icon alignment */
    border-radius: 16px;
    color: var(--text-secondary);
    background-color: transparent;
    border: 1px solid transparent;
    transition: color 0.25s ease;
    z-index: 3; /* Places icons safely over the slider backplate */
}

/* High-Definition Icon settings */
.hd-icon {
    width: 15px;
    height: 15px;
    display: block;
}

/* --- State Rules: Color Swaps --- */
.horizontal-toggle-switch[data-active="light"] .light-segment {
    color: var(--text-primary);
}

.horizontal-toggle-switch[data-active="dark"] .dark-segment {
    color: var(--text-primary);
}

/* Project Grid */
.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px 3rem;
}

.project-card {
    cursor: pointer;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding-bottom: 2rem;
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.project-image {
    width: 100%;
    aspect-ratio: 5/4;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.5rem 0.5rem 0 0;;
}

.project-card:hover {
    transform: scale(1.01);
}

.image-size {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    margin-left: 2rem;
    margin-right: 2rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    margin-left: 2rem;
    margin-bottom: 0;
}

/* Blog/Project View */
.project-detail-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.project-detail-header {
    padding: 100px 0 60px 0;
}

.back-btn {
    margin-bottom: 40px;
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.project-visual-large {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 60px;
}

.project-body-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* About */
.about {
    background: var(--bg);
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.text-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10rem;
}

.column-text p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.column-quote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.quote-icon {
    color: var(--yellow);
    font-size: 5rem;
}

.quote-writer {
    display: flex;
    align-items: end;
}

/* Skills */


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

.skill-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 3rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.card-alt {
    background: var(--text-secondary) !important;
    cursor: pointer;
}

.card-alt:hover {
    background-color: var(--text-primary);
}

.skill-card h3 {
    color: var(--text-primary);
    
}

.skill-card p {
    color: var(--text-secondary);
}

.card-icon {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 4rem; 
    color: var(--text-secondary);
    opacity: 0.05; 
    pointer-events: none; 
    transition: opacity 0.3s ease, transform 0.3s ease;
}


.skill-card:hover .card-icon {
    opacity: 0.075;
    transform: scale(1.01);
}

.center-align {
    text-align: center;
    max-width: 50rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    text-align: left;
    background: var(--bg-alt); 
    padding: 6rem 0 2rem 0;
}

.footer-top-cta {
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 40px;
}

.footer-cta {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Scalable typographic scaling */
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr; /* Asymmetric grid favoring layout info */
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-primary);
    font-weight: 700;
}

.footer-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 320px;
    margin-bottom: 0;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a, 
.footer-links p {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    font-size: 1rem;
    margin: 0;
}

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

.font-tweak {
    font-size: 0.7rem;
    margin-left: 2px;
    opacity: 0.7;
}

.footer-location {
    margin-bottom: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.footer-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Masonry Grid */
.auto-masonry {
    column-gap: 16px;
    width: 100%;
    margin: 40px 0;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 2. Column Count Modifiers */
.cols-2 { column-count: 2; }
.cols-3 { column-count: 3; }
.cols-4 { column-count: 4; }

/* --- REQUIRED ADDITIONS (Animations & Responsiveness Only) --- */

.project-card-link { display: block; } /* Structural link wrapper added previously */

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Premium Responsive Status Modals
   ========================================================================== */

/* Fullscreen Glass Blur Backdrop Layout Canvas */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Premium Minimalist Card Base Struct - Anchor for absolute elements */
.modal-card {
    position: relative; /* CRITICAL: Anchors the top-right X button safely */
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 4rem 3rem 3rem 3rem; /* Extra top padding to clear the absolute button */
    max-width: 720px !important;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    animation: cardSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-card::-webkit-scrollbar {
    width: 6px;
}
.modal-card::-webkit-scrollbar-track {
    background: transparent;
}
.modal-card::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* Standalone Absolute Top-Right X Element */
.modal-top-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-top-close:hover {
    color: var(--text-primary);
    transform: scale(1.05);
}

/* Enforcing layout logic matching your existing action grids */
.modal-card .btn {
    align-self: center !important; /* Stops the button stretching full width layout */
    min-width: 160px;
}

/* Color Themes Anchored to your Tokens */
.modal-success .modal-icon {
    color: var(--green);
}
.modal-error .modal-icon {
    color: var(--red);
}

/* Icon Sizing Mechanics */
.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Text Element Layout Hierarchy overrides */
.modal-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.captcha-group input.input-error {
    border-color: var(--red) !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

/* --- Entrance Keyframe Animations --- */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Non-Destructive Mobile & Tablet Overrides */
@media (max-width: 1024px) {
    :root { --nav-height: 8rem;}
    .container { padding: 0 0; }
    .v-space { padding: 6rem 0; }
    h3 { font-size: 2.5rem;}
    h4 { font-size: 2rem;}
    .project-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
    .skill-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-social-icons { position: absolute; bottom: 4rem; left:auto; right: 0%; margin-bottom: 20px; display: flex; flex-direction: column; font-size: 2rem; gap: 1rem; transform: translatex(0);}
    .scroll { display: none;}
    .hero-para { max-width: 25rem;}
    p { font-size: 1.5rem;}
    nav { font-size: 1.25rem; padding: 3rem 0;}
    .nav-toggle {
        display: block;
        z-index: 200; 
    }

    .hamburger {
        display: block;
        position: relative;
        width: 1.5rem;
        height: 2px;
        background: var(--text-primary);
        transition: background 0.3s ease-in-out;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        left: 0;
        width: 1.5rem;
        height: 2px;
        background: var(--text-primary);
        transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
    }

    .hamburger::before { top: -6px; }
    .hamburger::after { top: 6px; }

    .nav-toggle.active .hamburger {
        background: transparent;
    }
    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }

    /* Transform navigation wrapper into a clean fullscreen overlay dropdown */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        font-size: 1.25rem; 
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 150;
    }

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

    /* --- THE FIX: Animate toggle independently on mobile view --- */
    .horizontal-toggle-switch {
        position: fixed;
        bottom: 10%; /* Places it perfectly toward the bottom of the screen */
        left: 50%;
        
        /* Center it horizontally and slide it off-screen to the right by default */
        transform: translate(-50%, 0) translateX(100vw);
        
        /* Mirror your mobile nav drawer opening transition speed and curve */
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
        z-index: 160; /* Sits over the nav background panel */
    }

    /* When your JS opens the menu, slide the switch into center view simultaneously */
    .nav-links.active ~ .horizontal-toggle-switch {
        transform: translate(-50%, 0) translateX(0);
    }

    .section-label { font-size: 1rem; margin-bottom: 2rem;}
    .text-col { grid-template-columns: 1fr; gap: 5rem;}
    .column-quote { text-align: center; }
    .btn { padding: 1.25rem 3rem; font-size: 1.1rem; }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* Snaps to 2x2 grid card display box */
        gap: 5rem;
    }
    .footer-desc {
        max-width: 80%;
        font-size: 1.25rem;
    }

    .footer-label { font-size: 1rem;}
    .footer-links a, .footer-links p { font-size: 1.25rem; margin: 0;}
    .footer-bottom { padding-top: 2rem; font-size: 0.85rem;}
}

@media (max-width: 768px) {
    :root { --nav-height: 6rem;}
    nav { font-size: 1rem;}
    .v-space { padding: 4rem 0; }
    .hero-sec { text-align: center;}
    .hero-para { max-width: 100%; bottom: 9rem;}
    .hero-para a { justify-content: center;}
    .hero-para p { font-size: 1.2rem; text-align: center; }
    .location-underline-alignment { margin-bottom: 20rem;}
    .hero-social-icons { left: 50%; flex-direction: row; transform: translatex(-50%);}
    .two-column { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .skill-grid { grid-template-columns: 1fr; }
    h3 { font-size: 2rem; }
    .btn { align-self: auto;}
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal-card {
        padding: 3.5rem 1.5rem 2rem 1.5rem !important;
        max-width: 95% !important;
        max-height: 85vh;
        border-radius: 0.5rem;
    }

    .modal-top-close {
        top: 1rem;
        right: 1rem;
    }

    .modal-body h3 {
        font-size: 1.5rem;
    }

    .modal-body p {
        font-size: 0.95rem;
    }

    footer {
        padding: 5rem 10% 2.5rem 10% !important;
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr; /* Pure linear stack flow on tighter viewports */
        gap: 5rem;
        padding-bottom: 5rem;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-top: 2.5rem;
        font-size: 0.85rem;
    }

    .footer-col { align-items: center;}
}