/* ========================================================
   DESIGN SYSTEM - DARK AESTHETIC WITH CRISP GLOW
======================================================== */
:root {
    --bg-page: #0a0b0e;
    --bg-surface: #12141a;
    --bg-card: #181b24;
    --bg-card-hover: #222634;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.22);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #f97316; /* Default: Amber Orange */
    --accent-primary-light: #fb923c;
    --accent-primary-rgb: 249, 115, 22;
    --accent-cyan: #38bdf8;
    --accent-emerald: #10b981;
    --accent-violet: #a855f7;
    
    --font-main: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dynamic Ambient Accent Themes */
body[data-theme="amber"], body:not([data-theme]) {
    --accent-primary: #f97316;
    --accent-primary-light: #fb923c;
    --accent-primary-rgb: 249, 115, 22;
}

body[data-theme="cyan"] {
    --accent-primary: #38bdf8;
    --accent-primary-light: #7dd3fc;
    --accent-primary-rgb: 56, 189, 248;
}

body[data-theme="emerald"] {
    --accent-primary: #10b981;
    --accent-primary-light: #34d399;
    --accent-primary-rgb: 16, 185, 129;
}

body[data-theme="violet"] {
    --accent-primary: #a855f7;
    --accent-primary-light: #c084fc;
    --accent-primary-rgb: 168, 85, 247;
}

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

/* Interactive elements default to native pointer */
a,
button,
[role="button"],
.btn,
.card-btn,
.project-card,
.nav-link,
.social-link,
.skill-pill,
.modal-close,
.filter-chip,
summary,
input[type="submit"],
input[type="button"],
label[for] {
    cursor: pointer;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: color 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

/* Background Atmosphere Glow */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -100px;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.5s ease;
}

/* Linear.app / Vercel Ambient Spotlight Layer */
.linear-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(var(--accent-primary-rgb), 0.14) 0%,
        rgba(var(--accent-primary-rgb), 0.05) 35%,
        rgba(255, 255, 255, 0.01) 58%,
        transparent 72%
    );
    filter: blur(50px);
    -webkit-filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.5s ease;
    will-change: transform;
}

@media (pointer: coarse) {
    .linear-spotlight {
        display: none !important;
    }
}

main, .header, .footer {
    position: relative;
    z-index: 1;
}

/* ========================================================
   MINIMALIST EDITORIAL BRAND PRELOADER
======================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #08090d;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

.preloader.preloader-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.preloader-brand {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 700;
    font-family: var(--font-mono);
    color: #f8fafc;
    letter-spacing: -1px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.preloader-dot {
    width: 9px;
    height: 9px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 14px var(--accent-primary), 0 0 28px rgba(249, 115, 22, 0.4);
    animation: preloaderDotPulse 1.2s infinite ease-in-out;
}

@keyframes preloaderDotPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

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

.preloader-line-wrap {
    width: 140px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.preloader-line {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), #fb923c);
    border-radius: 999px;
    box-shadow: 0 0 8px var(--accent-primary);
    transition: width 0.08s ease;
}

/* Scroll Entrance Animation */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================================
   HEADER & FLOATING NAVBAR
======================================================== */
.header {
    position: sticky;
    top: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    background: rgba(18, 20, 26, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.header.header-hidden {
    transform: translateY(-90px);
    opacity: 0;
    pointer-events: none;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: opacity 0.25s ease;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(var(--accent-primary-rgb), 0.35));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.logo-mark svg {
    display: block;
}

.logo:hover .logo-mark {
    transform: rotate(-10deg) scale(1.12);
    filter: drop-shadow(0 0 12px rgba(var(--accent-primary-rgb), 0.6));
}

.logo-accent {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.navbar {
    display: flex;
    gap: 26px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

.mobile-nav-resume {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Theme Palette Switcher Dropdown */
.theme-palette-wrap {
    position: relative;
}

.palette-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 13px;
    transition: var(--transition);
}

.palette-toggle-btn:hover,
.theme-palette-wrap.open .palette-toggle-btn {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.09);
}

.palette-current-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    transition: background 0.3s ease;
}

.palette-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -20px;
    background: rgba(18, 20, 28, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 12px;
    min-width: 165px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-primary-rgb), 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.theme-palette-wrap.open .palette-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.palette-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 6px;
    text-transform: uppercase;
}

.palette-swatches {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.palette-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.palette-swatch:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.palette-swatch.active {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.swatch-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sound-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.sound-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.btn-pill {
    padding: 7px 18px;
    border-radius: 20px;
    background: var(--text-primary);
    color: var(--bg-page);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-pill:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    font-size: 20px;
    color: var(--text-primary);
}

/* ========================================================
   HERO SECTION
======================================================== */
.hero {
    min-height: 85vh;
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 50px;
}

.tag-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 40%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 22px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 18px;
}

.hero-tagline {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 38px;
}

/* Modern Button with Click Ripple Wave */
.btn {
    position: relative;
    overflow: hidden;
    padding: 13px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-page);
}

.btn-primary:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

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

.btn-outline:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Fluid Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleWave 0.6s linear;
    background-color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

@keyframes rippleWave {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.social-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-label {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.social-link {
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* ========================================================
   HERO INTERACTIVE DEVELOPER STUDIO CARD
   Ultra-clean, zero-scroll-trap, 1-click accessibility
======================================================== */
.hero-studio-card {
    background: rgba(14, 16, 23, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 35px rgba(var(--accent-primary-rgb), 0.1);
    transition: var(--transition), border-color 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.hero-studio-card:hover {
    border-color: rgba(var(--accent-primary-rgb), 0.35);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), 0 0 50px rgba(var(--accent-primary-rgb), 0.18);
}

.studio-header {
    background: rgba(20, 23, 34, 0.88);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.studio-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.s-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.studio-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.studio-status {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.s-pulse {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulseGlow 2s infinite;
}

/* 1-Click Accessible Tabs Bar */
.studio-tabs {
    padding: 8px 12px;
    background: rgba(10, 12, 18, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.studio-tabs::-webkit-scrollbar { display: none; }

.s-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 6px 13px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.s-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.s-tab.active {
    background: rgba(var(--accent-primary-rgb), 0.14);
    color: var(--accent-primary);
    border-color: rgba(var(--accent-primary-rgb), 0.45);
}

.tab-badge {
    background: var(--accent-primary);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Panels Body - Perfectly fitted with ZERO scrollbars */
.studio-body {
    padding: 16px 18px;
    min-height: 220px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.studio-panel {
    display: none;
    animation: studioFadeIn 0.25s ease forwards;
}

.studio-panel.active {
    display: block;
}

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

/* Panel 1: Code Overview */
.code-editor-box {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.code-line {
    word-break: break-word;
}
.code-line.indent {
    padding-left: 16px;
}

.token-keyword { color: #f43f5e; font-weight: 600; }
.token-var { color: #38bdf8; }
.token-prop { color: #cbd5e1; }
.token-string { color: #34d399; }
.token-accent-text { color: var(--accent-primary); font-weight: 600; }

.panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-action-btn {
    padding: 7px 15px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.panel-action-btn.primary {
    background: var(--accent-primary);
    color: #fff;
}
.panel-action-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.panel-action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.panel-action-btn.secondary:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Panel 2: Projects List */
.mini-projects-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.mini-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-project-row:hover {
    background: rgba(var(--accent-primary-rgb), 0.08);
    border-color: rgba(var(--accent-primary-rgb), 0.35);
    transform: translateX(3px);
}

.mini-p-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-p-num {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
}

.mini-p-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.mini-p-sub {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.mini-p-btn {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary);
    background: transparent;
    border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-mono);
}

.mini-project-row:hover .mini-p-btn {
    background: var(--accent-primary);
    color: #fff;
}

/* Panel 3: Skills Pills */
.studio-skills-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.studio-skill-group .group-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: block;
    margin-bottom: 5px;
}

.group-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.s-pill {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.s-pill:hover {
    background: rgba(var(--accent-primary-rgb), 0.16);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Panel 4: Direct Connect */
.studio-contact-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.studio-contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all 0.2s ease;
}

.studio-contact-item.link-item:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.08);
}

.sc-left {
    display: flex;
    align-items: center;
    gap: 9px;
}
.sc-left i {
    width: 14px;
    text-align: center;
    color: var(--accent-primary);
}

.sc-val {
    font-family: var(--font-mono);
    font-size: 11.5px;
}

.sc-copy-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    background: rgba(var(--accent-primary-rgb), 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
}

.sc-copy-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

.sc-ext {
    font-size: 10px;
    opacity: 0.6;
}

/* Bottom Studio Footer */
.studio-footer {
    padding: 9px 16px;
    background: rgba(18, 20, 28, 0.95);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sf-status {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-status i {
    color: var(--accent-primary);
}

.sf-sim-btn {
    background: rgba(var(--accent-primary-rgb), 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.sf-sim-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* Interactive Tech Stack ↔ Project Highlighting */
.skills-interactive-hint {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.hint-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 6px var(--accent-primary);
}

.skills-interactive-hint.hint-active {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.08);
}

.project-card.skill-matched {
    border-color: var(--accent-primary) !important;
    background: rgba(24, 27, 36, 0.98) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(var(--accent-primary-rgb), 0.3) !important;
    transform: translateY(-8px) scale(1.02) !important;
    opacity: 1 !important;
    filter: none !important;
}

.project-card.skill-dimmed {
    opacity: 0.28 !important;
    filter: grayscale(70%) !important;
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.35s ease !important;
}

.skill-pill.active,
.skill-pill.skill-highlighted {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 16px rgba(var(--accent-primary-rgb), 0.45) !important;
    transform: translateY(-3px) scale(1.06) !important;
}

.tech-stack-pills span.matched-tech-tag {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.5) !important;
}

/* ========================================================
   COMMON SECTION HEADERS
======================================================== */
.section {
    width: 90%;
    max-width: 1200px;
    margin: 120px auto 0;
}

.section-header {
    margin-bottom: 50px;
}

.mono-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ========================================================
   PROJECTS (01 - 04)
======================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.project-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease, 
                background 0.4s ease;
    transform-style: preserve-3d;
}

/* Glass shine light beam effect on card hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -140%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-20deg);
    transition: left 0.75s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover::before {
    left: 200%;
}

/* Specific Card Themed Hover Glows */
.project-card.card-sih:hover {
    border-color: rgba(249, 115, 22, 0.5);
    background: #1c1f2b;
    box-shadow: 0 20px 45px rgba(249, 115, 22, 0.22);
}

.project-card.card-chronofact:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: #192226;
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.2);
}

.project-card.card-kitchen:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: #19212c;
    box-shadow: 0 20px 45px rgba(56, 189, 248, 0.22);
}

.project-card.card-portfolio:hover {
    border-color: rgba(244, 63, 94, 0.5);
    background: #231b26;
    box-shadow: 0 20px 45px rgba(244, 63, 94, 0.2);
}

.project-card.card-aihub:hover {
    border-color: rgba(6, 182, 212, 0.55);
    background: #0e2026;
    box-shadow: 0 20px 45px rgba(6, 182, 212, 0.24);
}

.project-card:hover .project-num {
    color: var(--accent-primary);
    transform: scale(1.15);
}

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

.project-num {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
}

.badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sih-badge {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.project-card:hover .sih-badge i {
    animation: trophyBounce 0.5s ease infinite alternate;
}

@keyframes trophyBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px) rotate(-8deg); }
}

.live-badge {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.live-badge i {
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

.progress-badge {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.progress-badge i {
    animation: spinSlow 3s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.project-summary {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tech-stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.tech-stack-pills span {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: #cbd5e1;
}

.card-links {
    display: flex;
    gap: 12px;
}

.card-btn {
    flex: 1;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.card-btn.primary {
    background: var(--text-primary);
    color: var(--bg-page);
}

.card-btn.primary:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.card-btn.outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.card-btn.outline:hover {
    border-color: var(--border-highlight);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

/* ========================================================
   TECHNICAL SKILLS
======================================================== */
.skills-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.skill-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 26px;
    transition: var(--transition);
}

.skill-category-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}

.skill-pill:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(249, 115, 22, 0.06);
    transform: translateY(-2px);
}

/* ========================================================
   ABOUT & EDUCATION
======================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
}

.about-narrative {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 34px;
}

.about-narrative h3 {
    font-size: 24px;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.about-narrative p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.focus-bullets {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bullet-tag {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bullet-tag i {
    color: var(--accent-emerald);
}

.education-card {
    background: linear-gradient(145deg, #181b24, #12141a);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.edu-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-cyan);
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.education-card .degree {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.education-card .field {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 14px;
}

.education-card .college,
.education-card .year {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edu-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ========================================================
   ACHIEVEMENTS
======================================================== */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.achievement-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
}

.achievement-item:hover {
    border-color: var(--border-highlight);
    transform: translateY(-3px);
}

.achieve-icon {
    font-size: 24px;
    color: var(--accent-primary);
    background: rgba(249, 115, 22, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achieve-content h4 {
    font-size: 17px;
    margin-bottom: 6px;
}

.achieve-content p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================================
   CONTACT & FORM
======================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 34px;
}

.contact-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 14.5px;
    margin-bottom: 28px;
}

.contact-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.contact-detail-row i {
    font-size: 18px;
    color: var(--accent-primary);
    margin-top: 4px;
}

.contact-detail-row .label {
    display: block;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-detail-row .val {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-detail-row a.val:hover {
    color: var(--accent-primary);
}

.social-links-inline {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.social-links-inline a {
    color: var(--accent-cyan);
    font-size: 13.5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.social-links-inline a:hover {
    color: var(--accent-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.15);
}

.btn-submit {
    cursor: pointer;
    border: none;
    justify-content: center;
}

.form-msg {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-emerald);
    min-height: 20px;
}

/* ========================================================
   FOOTER
======================================================== */
.footer {
    width: 90%;
    max-width: 1200px;
    margin: 120px auto 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: var(--text-muted);
}

.back-top {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.back-top:hover {
    color: var(--accent-primary);
}

/* ========================================================
   MOBILE RESPONSIVENESS
======================================================== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-tagline {
        margin: 0 auto 34px;
    }

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

    .social-bar {
        justify-content: center;
    }

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

/* ========================================================
   PROJECT EXPANDED DETAILS MODAL (SAME DARK THEME & ANIMATION)
======================================================== */
.project-card {
    cursor: pointer;
}

.project-card a, .project-card button, .open-modal-btn {
    cursor: pointer;
}

/* ========================================================
   PROJECT DETAILS MODAL LIGHTBOX & CASCADE ANIMATIONS
   Completely above header & fluid staggered micro-interactions
======================================================== */
body.modal-open .header {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -28px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.project-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 12, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overscroll-behavior: contain;
}

.project-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* ========================================================
   MODAL CONTAINER & CORNER-INTEGRATED CLOSE BUTTON
======================================================== */
.modal-dialog-container {
    position: relative;
    max-width: 860px;
    width: 100%;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(28px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.project-modal-backdrop.active .modal-dialog-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close button seamlessly integrated with the top-right 24px corner curve */
.modal-corner-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: rgba(18, 22, 32, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 120;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-corner-close-btn:hover {
    background: rgba(var(--accent-primary-rgb), 0.25);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(90deg) scale(1.12);
    box-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.35);
}

/* Modal Card with ZERO scrollbars cutting through the rounded curve */
.project-modal-card {
    background: #12151d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    position: relative;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(var(--accent-primary-rgb), 0.14);
    
    /* COMPLETE ELIMINATION OF NATIVE SCROLLBARS: Eliminates blue arrows and edge cuts */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.project-modal-card::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.project-modal-card::-webkit-scrollbar-button,
*::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Subtle reading progress bar pinned to the top edge */
.modal-scroll-progress-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 100;
    overflow: hidden;
}

.modal-scroll-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--modal-scroll-pct, 0%);
    background: linear-gradient(90deg, var(--accent-primary), #38bdf8);
    transition: width 0.08s ease-out;
}

.modal-body-content {
    padding: 34px 40px 38px;
    clear: both;
}

/* ========================================================
   MODAL INTERNAL SECTIONS & STAGGERED ENTRANCE ANIMATIONS
======================================================== */
.modal-header-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    padding-right: 50px; /* leaves breathing space for corner close button */
    opacity: 0;
    transform: translateY(-10px);
}

.project-modal-backdrop.active .modal-header-tag {
    animation: modalSlideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
}

.modal-project-idx {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 700;
}

.modal-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
    line-height: 1.25;
    opacity: 0;
    transform: translateY(14px);
}

.project-modal-backdrop.active .modal-title {
    animation: modalSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.14s forwards;
}

.modal-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
    opacity: 0;
    transform: translateY(14px);
}

.project-modal-backdrop.active .modal-subtitle {
    animation: modalSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* Prototype Media Frame with Glow Sweep Animation */
.modal-media-frame {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: #090a0f;
    position: relative;
    opacity: 0;
    transform: scale(0.96);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-modal-backdrop.active .modal-media-frame {
    animation: modalMediaZoom 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards;
}

.modal-media-frame:hover {
    border-color: rgba(var(--accent-primary-rgb), 0.4);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--accent-primary-rgb), 0.15);
}

.modal-media-img {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-media-frame:hover .modal-media-img {
    transform: scale(1.03);
}

.modal-media-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(10, 11, 16, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 11.5px;
    font-family: var(--font-mono);
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s ease;
}

.modal-media-caption i {
    color: var(--accent-primary);
}

/* Deep Engineering Grid with Cascade Animations */
.modal-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.modal-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 18px 22px;
    opacity: 0;
    transform: translateY(18px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.project-modal-backdrop.active .modal-block {
    animation: modalSlideUp 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.project-modal-backdrop.active .modal-block:nth-child(1) { animation-delay: 0.28s; }
.project-modal-backdrop.active .modal-block:nth-child(2) { animation-delay: 0.36s; }
.project-modal-backdrop.active .modal-block:nth-child(3) { animation-delay: 0.44s; }
.project-modal-backdrop.active .modal-block:nth-child(4) { animation-delay: 0.52s; }

.modal-block:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(var(--accent-primary-rgb), 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 20px rgba(var(--accent-primary-rgb), 0.08);
}

.modal-block h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-block h4 i {
    color: var(--accent-primary);
    font-size: 13px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-block:hover h4 i {
    transform: scale(1.2) rotate(6deg);
}

.modal-block p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.modal-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.modal-bullets li {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
    transition: transform 0.2s ease, color 0.2s ease;
}

.modal-bullets li:hover {
    transform: translateX(4px);
    color: var(--text-primary);
}

.modal-bullets li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    transition: transform 0.2s ease;
}

.modal-bullets li:hover::before {
    transform: scale(1.3);
}

.modal-code-diagram {
    background: #090b10;
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-primary);
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 10px;
    overflow-x: auto;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.modal-code-diagram:hover {
    box-shadow: 0 0 25px rgba(var(--accent-primary-rgb), 0.12);
}

.modal-code-diagram code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #93c5fd;
    line-height: 1.65;
    white-space: pre-wrap;
    display: block;
}

.modal-notice-banner {
    background: rgba(var(--accent-primary-rgb), 0.08);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 12.5px;
    color: #fdba74;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.55;
    margin-bottom: 22px;
    opacity: 0;
    transform: translateY(14px);
}

.project-modal-backdrop.active .modal-notice-banner {
    animation: modalSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.modal-notice-banner i {
    color: var(--accent-primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.modal-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
    opacity: 0;
    transform: translateY(14px);
}

.project-modal-backdrop.active .modal-footer-actions {
    animation: modalSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.56s forwards;
}

@keyframes modalSlideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes modalMediaZoom {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================================
   RESPONSIVE DESIGN SUITE: MOBILE, TABLET & TOUCH DEVICES
======================================================== */

/* Touch Ergonomics (All Touchscreens: iPad, iPhone, Android) */
@media (hover: none), (pointer: coarse) {
    .linear-spotlight {
        display: none !important;
    }

    .tilt-card {
        transform: none !important;
        transition: border-color 0.25s ease, background 0.25s ease !important;
    }

    .tilt-card:active {
        border-color: rgba(var(--accent-primary-rgb), 0.5) !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    .btn:active,
    .card-btn:active,
    .palette-toggle-btn:active,
    .sound-toggle-btn:active,
    .menu-toggle:active {
        transform: scale(0.96) !important;
    }
}

/* 1. TABLET SCREENS (769px to 1024px: iPads, Android Tablets) */
@media (max-width: 1024px) {
    .header {
        width: 94%;
        max-width: 900px;
        padding: 12px 20px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
        margin-top: 100px;
        padding-bottom: 40px;
    }

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

    .social-bar {
        justify-content: center;
    }

    .hero-studio-card {
        max-width: 580px;
        margin: 0 auto;
    }

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

    .skills-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* 2. MOBILE LANDSCAPE & SMALL TABLETS (max-width: 768px) */
@media (max-width: 768px) {
    /* Safe viewport constraints */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Fixed Pill Header on Mobile */
    .header {
        top: 10px;
        width: calc(100% - 20px);
        padding: 10px 14px;
        border-radius: 99px;
    }

    .logo {
        font-size: 17px;
        gap: 7px;
    }

    .logo-mark svg {
        width: 20px;
        height: 20px;
    }

    .header-right {
        gap: 7px;
    }

    .header-right .btn-pill {
        display: none !important; /* Moved to mobile dropdown */
    }

    .palette-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .sound-toggle-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    #sound-text {
        display: none !important; /* Icon-only on mobile */
    }

    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--border-subtle);
        border-radius: 50%;
        color: var(--text-primary);
        font-size: 14px;
        cursor: pointer;
        transition: all 0.25s ease;
    }

    .menu-toggle.active {
        background: rgba(var(--accent-primary-rgb), 0.2);
        border-color: var(--accent-primary);
        color: var(--accent-primary);
    }

    /* Mobile Slide-down Navigation Panel */
    .navbar {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(14, 18, 25, 0.98);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        flex-direction: column;
        padding: 18px 16px;
        gap: 8px;
        border-radius: 20px;
        border: 1px solid var(--border-subtle);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(var(--accent-primary-rgb), 0.12);
        display: none;
        animation: mobileMenuDrop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        z-index: 1000;
    }

    .navbar.active {
        display: flex !important;
    }

    .nav-link {
        font-size: 15px;
        font-weight: 600;
        padding: 11px 14px;
        border-radius: 12px;
        width: 100%;
        display: flex;
        align-items: center;
        color: var(--text-secondary);
        transition: background 0.2s ease, color 0.2s ease;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(255, 255, 255, 0.06);
        color: var(--accent-primary);
    }

    .mobile-nav-resume {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary, #fb923c)) !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        padding: 13px !important;
        border-radius: 14px !important;
        margin-top: 6px;
        box-shadow: 0 4px 18px rgba(var(--accent-primary-rgb), 0.4);
    }

    /* Hero Section Responsive */
    .hero {
        margin-top: 80px;
        padding: 16px 0;
        width: 100%;
        min-height: auto;
        gap: 28px;
    }

    .hero-title {
        font-size: clamp(28px, 7.8vw, 38px);
        letter-spacing: -0.8px;
        line-height: 1.18;
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(16px, 4.4vw, 20px);
        line-height: 1.35;
        margin-bottom: 12px;
    }

    .hero-tagline {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 22px;
        padding: 0 4px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 13px 18px;
        font-size: 14px;
    }

    /* Hero Developer Studio Card */
    .hero-studio-card {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        border-radius: 18px;
    }

    .studio-header {
        padding: 10px 14px;
    }

    .studio-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
    }

    .studio-tabs::-webkit-scrollbar {
        display: none;
    }

    .s-tab {
        padding: 5px 9px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .studio-body {
        padding: 12px;
        min-height: auto;
    }

    .code-editor-box {
        font-size: 11px;
        line-height: 1.6;
        padding: 10px 12px;
        max-height: 220px;
        overflow-x: auto;
    }

    .studio-actions-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .studio-btn-primary,
    .studio-btn-outline {
        padding: 7px 10px;
        font-size: 11px;
        flex: 1;
        justify-content: center;
    }

    .studio-meta-bar {
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* Grids & Sections on Mobile */
    .section {
        padding: 44px 0;
        width: 92%;
        margin: 0 auto;
    }

    .section-title {
        font-size: clamp(24px, 6vw, 30px);
    }

    .section-desc {
        font-size: 13.5px;
        margin-bottom: 24px;
    }

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

    .project-card {
        border-radius: 18px;
    }

    .project-img {
        height: 180px;
    }

    .project-content {
        padding: 18px 16px;
    }

    .skills-categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .contact-info,
    .contact-form {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    }

    /* Project Modal Mobile Polish */
    .project-modal-backdrop {
        padding: 12px 8px;
    }

    .modal-dialog-container {
        width: 100%;
        max-height: 94vh;
    }

    .project-modal-card {
        max-height: 94vh;
        border-radius: 18px;
    }

    .modal-body-content {
        padding: 20px 16px 26px;
    }

    .modal-title {
        font-size: 20px;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .modal-subtitle {
        font-size: 13.5px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .modal-corner-close-btn {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .modal-header-tag {
        padding-right: 44px;
        gap: 8px;
    }

    .modal-media-img {
        max-height: 190px;
    }

    .modal-block {
        padding: 14px 14px;
    }

    .modal-code-diagram code {
        font-size: 11px;
    }

    .modal-footer-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer-actions .card-btn {
        max-width: 100% !important;
        width: 100%;
        justify-content: center;
    }
}

/* 3. SMALL PHONES (max-width: 480px: iPhone SE, Galaxy S, older Androids) */
@media (max-width: 480px) {
    .header {
        top: 8px;
        width: calc(100% - 16px);
        padding: 8px 12px;
    }

    .logo {
        font-size: 16px;
    }

    .hero-title {
        font-size: clamp(26px, 8vw, 32px);
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .tag-label {
        font-size: 11px;
        padding: 4px 10px;
    }

    .skills-categories-grid .category-title {
        font-size: 15px;
    }

    .skill-pill {
        font-size: 11.5px;
        padding: 5px 9px;
    }
}

@keyframes mobileMenuDrop {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}