@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');



/* ============================================================
   LIGHT THEME PALETTES
   ============================================================ */

/* Palette 1 – AWS Nitro (Light) */
:root.light-theme[data-palette="1"] {
    --surface-dim: #fff8f0;
    --background: #fff8f0;
    --surface-container: #ffffff;
    --surface-container-low: #fff1e0;
    --surface-container-lowest: #ffe6cc;
    --surface-container-high: #fffaf5;
    --surface-container-highest: #ffd9a8;
    --surface-bright: #ffffff;
    --primary: #cc7a00;
    --primary-container: #ff9900;
    --secondary: #b45309;
    --border-utility: #ffd9a8;
    --text-primary: #1c0f00;
    --text-muted: #9a5b12;
    --on-surface: #431f05;
    --on-primary: #ffffff;
    --grid-color: #cc7a00;
    --grid-opacity: 0.12;
    --shadow-color: 255, 153, 0;
}

/* Palette 2 – Cloud Hybrid (Light) */
:root.light-theme[data-palette="2"] {
    --surface-dim: #f0fbfb;
    --background: #f0fbfb;
    --surface-container: #ffffff;
    --surface-container-low: #e2f7f8;
    --surface-container-lowest: #d2f0f2;
    --surface-container-high: #f7fdfe;
    --surface-container-highest: #b6ecf0;
    --surface-bright: #ffffff;
    --primary: #0e7490;
    --primary-container: #06b6d4;
    --secondary: #7c3aed;
    --border-utility: #a5e9ef;
    --text-primary: #00363d;
    --text-muted: #0e7490;
    --on-surface: #06505c;
    --on-primary: #ffffff;
    --grid-color: #0e7490;
    --grid-opacity: 0.1;
    --shadow-color: 6, 182, 212;
}

/* Palette 3 – Terminal Green (Light) */
:root.light-theme[data-palette="3"] {
    --surface-dim: #f5fdf5;
    --background: #f5fdf5;
    --surface-container: #ffffff;
    --surface-container-low: #edfced;
    --surface-container-lowest: #e0f5e0;
    --surface-container-high: #f8fef8;
    --surface-container-highest: #bbf0bb;
    --surface-bright: #ffffff;
    --primary: #15803d;
    --primary-container: #22c55e;
    --secondary: #65a30d;
    --border-utility: #86efac;
    --text-primary: #052e16;
    --text-muted: #166534;
    --on-surface: #14532d;
    --on-primary: #ffffff;
    --grid-color: #15803d;
    --grid-opacity: 0.1;
    --shadow-color: 21, 128, 61;
}

/* ============================================================
   THEME SYSTEM – CSS Variables for Theming
   ============================================================ */

/* Default Theme – Azure Cloud (Palette 0) */
:root {
    --surface-dim: #0a1429;
    --background: #0a1429;
    --surface-container: #122041;
    --surface-container-low: #0e1a36;
    --surface-container-lowest: #060e20;
    --surface-container-high: #1a2d57;
    --surface-container-highest: #22376b;
    --surface-bright: #2b4784;
    --primary: #4cc2ff;
    --primary-container: #0078d4;
    --secondary: #38bdf8;
    --border-utility: #1e3a6b;
    --text-primary: #f2f8ff;
    --text-muted: #8fb3e0;
    --on-surface: #d6e8ff;
    --on-primary: #ffffff;
    --grid-color: #0078d4;
    --grid-opacity: 0.1;
    --shadow-color: 0, 120, 212;
}

:root.light-theme {
    --surface-dim: #f8fafc;
    --background: #f8fafc;
    --surface-container: #ffffff;
    --surface-container-low: #f1f5f9;
    --surface-container-lowest: #e2e8f0;
    --surface-container-high: #f8fafc;
    --surface-container-highest: #cbd5e1;
    --surface-bright: #ffffff;
    --primary: #0284c7;
    --primary-container: #0ea5e9;
    --secondary: #d97706;
    --border-utility: #cbd5e1;
    --text-primary: #0f172a;
    --text-muted: #475569;
    --on-surface: #1e293b;
    --on-primary: #ffffff;
    --grid-color: #94a3b8;
    --grid-opacity: 0.18;
    --shadow-color: 14, 165, 233;
}

/* Palette 1 – AWS Nitro */
[data-palette="1"] {
    --surface-dim: #1a0f02;
    --background: #1a0f02;
    --surface-container: #2b1a06;
    --surface-container-low: #211405;
    --surface-container-lowest: #0d0701;
    --surface-container-high: #3a2410;
    --surface-container-highest: #4d3015;
    --surface-bright: #5c3a1c;
    --primary: #ffac4b;
    --primary-container: #ff9900;
    --secondary: #ffb84d;
    --border-utility: #4d3015;
    --text-primary: #fff8f0;
    --text-muted: #d6a877;
    --on-surface: #ffe6c7;
    --on-primary: #1a0f02;
    --grid-color: #ff9900;
    --grid-opacity: 0.1;
    --shadow-color: 255, 153, 0;
}

/* Palette 2 – Cloud Hybrid (Multi-cloud Teal/Violet) */
[data-palette="2"] {
    --surface-dim: #0a0f1a;
    --background: #0a0f1a;
    --surface-container: #111a2e;
    --surface-container-low: #0d1525;
    --surface-container-lowest: #05080f;
    --surface-container-high: #18263f;
    --surface-container-highest: #213350;
    --surface-bright: #2c4063;
    --primary: #2dd4bf;
    --primary-container: #06b6d4;
    --secondary: #a78bfa;
    --border-utility: #1f3354;
    --text-primary: #ecfdfb;
    --text-muted: #7fa8b8;
    --on-surface: #c7f5ef;
    --on-primary: #04181a;
    --grid-color: #06b6d4;
    --grid-opacity: 0.1;
    --shadow-color: 6, 182, 212;
}

/* Palette 3 – Terminal Green */
[data-palette="3"] {
    --surface-dim: #050505;
    --background: #050505;
    --surface-container: #0e120f;
    --surface-container-low: #080a08;
    --surface-container-lowest: #000000;
    --surface-container-high: #141a15;
    --surface-container-highest: #1a221c;
    --surface-bright: #222e25;
    --primary: #4ade80;
    --primary-container: #22c55e;
    --secondary: #a3e635;
    --border-utility: #15291b;
    --text-primary: #ecfdf5;
    --text-muted: #6b7280;
    --on-surface: #d1fae5;
    --on-primary: #022c22;
    --grid-color: #22c55e;
    --grid-opacity: 0.07;
    --shadow-color: 34, 197, 94;
}

/* ============================================================
   BASE & RESET
   ============================================================ */

html { overflow-x: hidden; width: 100%; }
html.scroll-smooth { scroll-behavior: smooth; }
.hidden { display: none !important; }

body {
    background-color: var(--surface-dim);
    color: var(--on-surface);
    font-family: 'IBM Plex Sans', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

body.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure page content sits above the code/grid background layers */
main,
nav,
footer,
#back-to-top {
    position: relative;
    z-index: 1;
}
nav#persistent-nav { z-index: 50; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
}

.font-mono-labels {
    font-family: 'IBM Plex Mono', monospace;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */

@media (min-width: 640px) {
    .sm\:block { display: block !important; }
    .sm\:flex { display: flex !important; }
    .sm\:grid { display: grid !important; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .sm\:flex-row { flex-direction: row !important; }
    .sm\:items-center { align-items: center !important; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:flex { display: flex !important; }
    .md\:block { display: block !important; }
    .md\:grid { display: grid !important; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .md\:grid-cols-12 { grid-template-columns: repeat(12, 1fr) !important; }
    .md\:col-span-4 { grid-column: span 4 !important; }
    .md\:col-span-5 { grid-column: span 5 !important; }
    .md\:col-span-7 { grid-column: span 7 !important; }
    .md\:col-span-8 { grid-column: span 8 !important; }
    .md\:order-1 { order: 1; }
    .md\:order-2 { order: 2; }
}

@media (min-width: 1024px) {
    .lg\:col-span-5 { grid-column: span 5 !important; }
    .lg\:col-span-7 { grid-column: span 7 !important; }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, 1fr) !important; }
}

/* ============================================================
   CODE / TERMINAL BACKGROUND
   ============================================================ */

.code-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--background);
}

.code-bg-scroll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3vw;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.9;
    white-space: pre;
    color: var(--primary-container);
    /* Slight blur to avoid visual clutter */
    filter: blur(1.2px);
    opacity: 0.38;
    animation: code-scroll 80s linear infinite;
    will-change: transform;
    text-shadow: 0 0 8px rgba(var(--shadow-color), 0.35);
}

.code-bg-scroll .cl-key { color: var(--primary); opacity: 0.9; }
.code-bg-scroll .cl-cmd { color: var(--secondary); }
.code-bg-scroll .cl-str { color: #7ee787; }
.code-bg-scroll .cl-com { color: var(--text-muted); font-style: italic; }
.code-bg-scroll .cl-var { color: var(--primary); }
.code-bg-scroll .cl-num { color: var(--secondary); }

@keyframes code-scroll {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Vignette to fade edges so text stays readable */
.code-bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 0%, transparent 40%, var(--background) 92%),
        linear-gradient(to bottom, var(--background) 0%, transparent 8%, transparent 92%, var(--background) 100%);
    pointer-events: none;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .code-bg-scroll { animation: none; }
}

/* Light theme: use dark, saturated code colors so it's clearly visible on light backgrounds */
:root.light-theme .code-bg-scroll {
    opacity: 0.45;
    filter: blur(1px);
    color: #0f4c81;
    text-shadow: none;
}
:root.light-theme .code-bg-scroll .cl-key { color: #7c3aed; opacity: 1; }   /* keywords - purple */
:root.light-theme .code-bg-scroll .cl-cmd { color: #b91c1c; }               /* cmdlets - red */
:root.light-theme .code-bg-scroll .cl-str { color: #15803d; }               /* strings - dark green */
:root.light-theme .code-bg-scroll .cl-com { color: #64748b; }               /* comments - slate */
:root.light-theme .code-bg-scroll .cl-var { color: #0369a1; }               /* variables - dark blue */
:root.light-theme .code-bg-scroll .cl-num { color: #c2410c; }               /* numbers - orange */

/* Desktop centered nav links */
.desktop-nav-links {
    display: none;
}
@media (min-width: 768px) {
    .desktop-nav-links {
        display: flex;
    }
}
.whitespace-nowrap { white-space: nowrap; }

/* ============================================================
   GRID OVERLAY BACKGROUND
   ============================================================ */

.grid-bg {
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: var(--grid-opacity);
    transition: background-image 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav-bg {
    background-color: var(--surface-dim);
    border-bottom: 1px solid var(--border-utility);
    backdrop-filter: blur(12px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--text-primary) !important;
    background-color: var(--surface-container-low);
    border-color: var(--border-utility);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-container) !important;
    background-color: var(--surface-container-high);
    border-color: var(--primary-container);
}

#persistent-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* ============================================================
   MOBILE MENU
   ============================================================ */

#mobile-menu {
    background-color: var(--surface-dim) !important;
    border: 1px solid var(--border-utility);
}

#mobile-menu a {
    color: var(--text-muted) !important;
    font-family: 'IBM Plex Mono', monospace;
    display: block;
    margin: 0.25rem 0;
    padding: 12px 16px;
    border-radius: 4px;
    transition: all 0.25s ease;
}

#mobile-menu a:hover {
    background-color: var(--surface-container-low);
    color: var(--text-primary) !important;
    transform: translateX(4px);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
    background-color: var(--primary-container);
    color: var(--on-primary);
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid var(--primary-container);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--shadow-color), 0.35);
    transform: translateY(-1.5px);
}

.btn-secondary {
    background-color: var(--surface-container);
    color: var(--primary-container);
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 1px solid var(--border-utility);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--surface-container-high);
    border-color: var(--primary-container);
    color: var(--text-primary);
    transform: translateY(-1.5px);
}

/* ============================================================
   GLASS / GLOW CARDS
   ============================================================ */

.glow-card {
    background-color: var(--surface-container);
    border: 1px solid var(--border-utility);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-card:hover {
    box-shadow: 0 0 20px 0 rgba(var(--shadow-color), 0.22);
    border-color: var(--primary-container) !important;
    transform: translateY(-3px);
}

.glass {
    background-color: rgba(var(--shadow-color), 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ============================================================
   PULSE NODE (Timeline)
   ============================================================ */

.pulse-node {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%   { box-shadow: 0 0 0 0 rgba(var(--shadow-color), 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(var(--shadow-color), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--shadow-color), 0); }
}

/* ============================================================
   ORBITING RINGS
   ============================================================ */

.orbiting-ring {
    border: 1px dashed var(--border-utility);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */

.progress-bar-container {
    width: 100%;
    background-color: var(--surface-container-lowest);
    border: 1px solid var(--border-utility);
    border-radius: 3px;
    padding: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 12px;
    background: linear-gradient(90deg, var(--primary-container), var(--primary));
    border-radius: 1.5px;
    transition: width 1.2s cubic-bezier(0.1, 0.8, 0.25, 1);
    width: 0%;
}

/* ============================================================
   FORM INPUTS
   ============================================================ */

.form-input {
    background-color: var(--surface-container-low) !important;
    border: 1px solid var(--border-utility) !important;
    color: var(--text-primary) !important;
    transition: all 0.25s ease;
    font-family: 'IBM Plex Sans', sans-serif;
    caret-color: var(--primary-container);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.55;
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--surface-container-low) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--primary-container) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-input:focus {
    border-color: var(--primary-container) !important;
    box-shadow: 0 0 10px 0 rgba(var(--shadow-color), 0.2);
    background-color: var(--surface-container-high) !important;
    color: var(--text-primary) !important;
    outline: none;
}

/* ============================================================
   THEME / PALETTE / MOBILE TOGGLE BUTTONS
   ============================================================ */

#theme-toggle,
#palette-toggle,
#mobile-menu-button {
    background-color: var(--surface-container-low) !important;
    border: 1px solid var(--border-utility) !important;
    color: var(--primary-container) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

#theme-toggle:hover,
#palette-toggle:hover,
#mobile-menu-button:hover {
    background-color: var(--surface-container-high) !important;
    border-color: var(--primary-container) !important;
    color: var(--text-primary) !important;
    transform: translateY(-1px);
}

/* ============================================================
   PALETTE DROPDOWN
   ============================================================ */

.palette-selector { position: relative; }

.palette-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface-container-high);
    border: 1px solid var(--border-utility);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 8px;
    z-index: 1000;
    min-width: 210px;
}

.palette-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.palette-option:hover {
    background: var(--surface-container);
    color: var(--text-primary);
}

.palette-option.active {
    background: rgba(var(--shadow-color), 0.1);
    border: 1px solid var(--primary-container);
    color: var(--primary-container);
}

.palette-colors {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================================
   DIAGNOSTIC METRICS STATUS INDICATORS
   ============================================================ */

.status-indicator {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.4;
}

.status-ok {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.status-passed {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.status-ready {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.status-uptime {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

/* ============================================================
   TERMINAL-STYLE CONTACT BUTTON
   ============================================================ */

#nav-contact-terminal {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: none;
}

#nav-contact-terminal.terminal-active {
    background-color: var(--surface-container-high) !important;
    border-color: var(--primary-container) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 10px rgba(var(--shadow-color), 0.2);
}

/* ============================================================
   TERMINAL CURSOR
   ============================================================ */

.terminal-cursor {
    animation: terminal-blink 1s step-end infinite;
    color: var(--primary-container);
}

@keyframes terminal-blink {
    from, to { opacity: 1; }
    50%      { opacity: 0; }
}

/* ============================================================
   BLOCKQUOTE – Leadership Protocol
   ============================================================ */

blockquote {
    border-left: 2px solid var(--primary-container);
    padding-left: 1rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    margin: 0;
    font-style: italic;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: rgba(var(--shadow-color), 0.03);
    border-radius: 0 4px 4px 0;
}

blockquote::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
}

/* ============================================================
   UPTIME COUNTER (Footer)
   ============================================================ */

.uptime-counter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    color: var(--text-muted);
    opacity: 0.75;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.uptime-counter .uptime-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #4ade80;
    animation: uptime-pulse 2s ease-in-out infinite;
}

@keyframes uptime-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ============================================================
   PROJECT IMAGES
   ============================================================ */

.project-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--surface-container-lowest);
    overflow: hidden;
}

.project-image-themed {
    filter: grayscale(100%) contrast(1.1) brightness(0.85);
    mix-blend-mode: luminosity;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(11, 19, 38, 0.75));
    mix-blend-mode: color;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-card:hover .project-image-themed {
    filter: grayscale(20%) contrast(1.15) brightness(0.95);
    mix-blend-mode: normal;
}

.glow-card:hover .project-image-container::after {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(11, 19, 38, 0.35));
}

/* ============================================================
   WARNING BADGE
   ============================================================ */

.warning-badge {
    border: 1px solid var(--secondary);
    background-color: rgba(255, 198, 64, 0.06);
    color: var(--secondary);
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
}

/* ============================================================
   TECH TAGS / CHIPS
   ============================================================ */

.tech-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-container);
    color: var(--primary-container);
    border: 1px solid var(--primary-container);
    border-radius: 3px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    opacity: 1;
    background: rgba(var(--shadow-color), 0.15);
}

/* ============================================================
   ENTRY / SCROLL ANIMATION
   ============================================================ */

.entry-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.entry-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */

#back-to-top {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    z-index: 99998 !important;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    border: 1px solid var(--border-utility);
    background-color: var(--surface-container);
    color: var(--primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--surface-container-high);
    border-color: var(--primary-container);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(var(--shadow-color), 0.2);
}

/* ============================================================
   SECTION GUARDS
   ============================================================ */

section[id] {
    position: relative;
    z-index: 10;
}

/* ============================================================
   SELECTION HIGHLIGHTING
   ============================================================ */

::selection {
    background-color: rgba(var(--shadow-color), 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background-color: rgba(var(--shadow-color), 0.3);
    color: var(--text-primary);
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */

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

::-webkit-scrollbar-track {
    background: var(--surface-container-lowest);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-container);
}

/* ============================================================
   DARK MODE TOGGLE ICON VISIBILITY
   ============================================================ */

html.dark .dark\:hidden { display: none !important; }
html:not(.dark) .dark\:block { display: none !important; }
html:not(.dark) .dark\:hidden { display: inline !important; }

/* ============================================================
   INLINE & ORDER UTILITIES
   ============================================================ */

.inline-flex { display: inline-flex; }
.order-1 { order: 1; }
.order-2 { order: 2; }

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    font-family: 'IBM Plex Mono', monospace;
}

/* ============================================================
   MOBILE FIXES
   ============================================================ */

@media (max-width: 767px) {
    h1 { font-size: 1.75rem !important; line-height: 1.2 !important; }
    h2 { font-size: 1.5rem !important; }

    .nav-bg { backdrop-filter: blur(8px); }

    /* Fix mobile menu */
    #mobile-menu {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    /* Fix timeline on mobile */
    .border-l.space-y-8 > div,
    .border-l.space-y-12 > div {
        padding-left: 1rem !important;
    }

    /* Fix about 3-col stat grid on very small screens */
    @media (max-width: 480px) {
        .sm\:grid-cols-3 {
            grid-template-columns: 1fr !important;
        }
    }

    /* Fix experience cards */
    .glow-card .flex-col {
        gap: 0.5rem;
    }

    /* Fix project images */
    .project-image-container {
        height: 10rem !important;
    }

    /* Fix contact form spacing */
    form.space-y-5 > div {
        margin-bottom: 0.5rem;
    }

    /* Fix footer stacking */
    footer .flex-col {
        text-align: center;
    }
}

/* ============================================================
   ADDITIONAL ANIMATIONS
   ============================================================ */

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

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

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(var(--shadow-color), 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(var(--shadow-color), 0.25);
    }
}

/* ============================================================
   FOCUS VISIBLE (Accessibility)
   ============================================================ */

:focus-visible {
    outline: 2px solid var(--primary-container);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    .grid-bg,
    .orbiting-ring,
    #back-to-top,
    #persistent-nav,
    .glow-card:hover {
        display: none !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* ============================================================
   TAILWIND-STYLE UTILITY CLASSES
   ============================================================ */

/* Layout */
.fixed { position: fixed; }
.sticky { position: sticky; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-3 { top: 0.75rem; }
.top-4 { top: 1rem; }
.left-0 { left: 0; }
.left-3 { left: 0.75rem; }
.right-0 { right: 0; }
.-left-\[6px\] { left: -6px; }

/* Display */
.block { display: block; }
.inline { display: inline; }
.hidden { display: none !important; }
.flex { display: flex; }
.grid { display: grid; }
.inline-flex { display: inline-flex; }

/* Flex */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.self-start { align-self: flex-start; }
.self-auto { align-self: auto; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Spacing – Space between */
.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }

/* Gap */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Sizing – Width */
.w-1\.5 { width: 0.375rem; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-5 { width: 1.25rem; }
.w-11 { width: 2.75rem; }
.w-16 { width: 4rem; }
.w-56 { width: 14rem; }
.w-full { width: 100%; }

/* Sizing – Height */
.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-11 { height: 2.75rem; }
.h-16 { height: 4rem; }
.h-40 { height: 10rem; }
.h-56 { height: 14rem; }
.h-\[260px\] { height: 260px; }
.h-full { height: 100%; }

/* Padding */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-5 { padding: 1.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pl-4 { padding-left: 1rem; }
.pl-6 { padding-left: 1.5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }

/* Margin */
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Typography – Size */
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

/* Typography – Weight */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Typography – Leading */
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

/* Typography – Tracking */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Typography – Transform */
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }

/* Text Align */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Colors – Text */
.text-text-primary { color: var(--text-primary); }
.text-text-muted { color: var(--text-muted); }
.text-primary-container { color: var(--primary-container); }
.text-secondary { color: var(--secondary); }
.text-border-utility { color: var(--border-utility); }
.text-emerald-400 { color: #34d399; }

/* Colors – Background */
.bg-primary-container { background-color: var(--primary-container); }
.bg-primary-container\/5 { background-color: rgba(56, 189, 248, 0.05); }
.bg-secondary { background-color: var(--secondary); }
.bg-surface-container { background-color: var(--surface-container); }
.bg-surface-container-high { background-color: var(--surface-container-high); }
.bg-surface-container-high\/90 { background-color: rgba(34, 42, 61, 0.9); }
.bg-surface-container-low { background-color: var(--surface-container-low); }
.bg-surface-container-lowest { background-color: var(--surface-container-lowest); }
.bg-surface-dim { background-color: var(--surface-dim); }
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500 { background-color: #10b981; }

/* Colors – Border */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-border-utility { border-color: var(--border-utility); }
.border-border-utility\/40 { border-color: rgba(51, 65, 85, 0.4); }
.border-border-utility\/60 { border-color: rgba(51, 65, 85, 0.6); }
.border-primary-container { border-color: var(--primary-container); }
.border-primary-container\/20 { border-color: rgba(56, 189, 248, 0.2); }
.border-primary-container\/30 { border-color: rgba(56, 189, 248, 0.3); }
.border-secondary { border-color: var(--secondary); }
.border-secondary\/10 { border-color: rgba(255, 198, 64, 0.1); }
.border-surface-dim { border-color: var(--surface-dim); }

/* Border Radius */
.rounded { border-radius: 0.25rem; }
.rounded-b { border-bottom-left-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }
.rounded-r { border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow */
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Effects */
.blur-3xl { filter: blur(64px); }
.mix-blend-screen { mix-blend-mode: screen; }
.opacity-40 { opacity: 0.4; }
.opacity-60 { opacity: 0.6; }
.scale-105 { transform: scale(1.05); }
.scale-110 { transform: scale(1.1); }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.resize-none { resize: none; }
.pointer-events-none { pointer-events: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Object Fit */
.object-cover { object-fit: cover; }

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Max Width */
.max-w-sm { max-width: 24rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }

/* Min Height */
.min-h-screen { min-height: 100vh; }

/* Scroll */
.scroll-smooth { scroll-behavior: smooth; }

/* Font Display */
.font-display { font-family: 'Space Grotesk', sans-serif; }

/* Animate */
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Hover */
.hover\:text-primary-container:hover { color: var(--primary-container); }
.hover\:border-primary-container:hover { border-color: var(--primary-container); }
.hover\:underline:hover { text-decoration: underline; }

/* Responsive – sm (640px) */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:h-64 { height: 16rem; }
  .sm\:h-\[320px\] { height: 320px; }
  .sm\:items-center { align-items: center; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:w-64 { width: 16rem; }
}

/* Responsive – md (768px) */
@media (min-width: 768px) {
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
  .md\:col-span-8 { grid-column: span 8 / span 8; }
  .md\:flex { display: flex; }
  .md\:flex-row { flex-direction: row; }
  .md\:hidden { display: none !important; }
  .md\:items-center { align-items: center; }
  .md\:items-end { align-items: flex-end; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:gap-4 { gap: 1rem; }
  .md\:gap-6 { gap: 1.5rem; }
  .md\:gap-8 { gap: 2rem; }
  .md\:gap-10 { gap: 2.5rem; }
  .md\:h-3\.5 { height: 0.875rem; }
  .md\:h-12 { height: 3rem; }
  .md\:h-20 { height: 5rem; }
  .md\:h-48 { height: 12rem; }
  .md\:h-80 { height: 20rem; }
  .md\:h-\[500px\] { height: 500px; }
  .md\:mb-10 { margin-bottom: 2.5rem; }
  .md\:ml-8 { margin-left: 2rem; }
  .md\:order-1 { order: 1; }
  .md\:order-2 { order: 2; }
  .md\:p-2\.5 { padding: 0.625rem; }
  .md\:p-6 { padding: 1.5rem; }
  .md\:p-8 { padding: 2rem; }
  .md\:pl-8 { padding-left: 2rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
  .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\:py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
  .md\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
  .md\:self-auto { align-self: auto; }
  .md\:space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
  .md\:space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
  .md\:space-y-12 > :not([hidden]) ~ :not([hidden]) { margin-top: 3rem; }
  .md\:text-xs { font-size: 0.75rem; line-height: 1rem; }
  .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-left { text-align: left; }
  .md\:w-3\.5 { width: 0.875rem; }
  .md\:w-12 { width: 3rem; }
  .md\:w-80 { width: 20rem; }
}

/* Responsive – lg (1024px) */
@media (min-width: 1024px) {
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:h-96 { height: 24rem; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .lg\:w-96 { width: 24rem; }
}

/* Dark mode hidden/block */
html.dark .dark\:hidden { display: none !important; }
html:not(.dark) .dark\:block { display: none !important; }
html:not(.dark) .dark\:hidden { display: inline !important; }

/* ============================================================
   MATERIAL SYMBOLS ICONS
   ============================================================ */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TYPING EFFECT
   ============================================================ */
.typing-cursor {
    animation: blink 1s step-end infinite;
    color: var(--primary-container);
    font-weight: 300;
}

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

/* ============================================================
   NAV CONTROL BUTTONS (matching bibekmallik.com.np)
   ============================================================ */
.nav-control-btn {
    background-color: transparent;
    border: 1px solid var(--border-utility);
    border-radius: 4px;
    padding: 8px 10px;
    color: var(--primary-container);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-control-btn:hover {
    background-color: var(--surface-container-high);
    border-color: var(--primary-container);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Contact terminal button (matches bibekmallik.com.np exactly) */
.nav-contact-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: none;
    background-color: var(--surface-container-high);
    border: 1px solid var(--border-utility);
    border-radius: 4px;
    padding: 8px 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.nav-contact-btn:hover {
    background-color: var(--primary-container);
    border-color: var(--primary-container);
    color: var(--on-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--shadow-color), 0.3);
}

.nav-contact-btn-mobile {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--primary-container);
    padding: 0.75rem 0;
    display: block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-contact-btn-mobile:hover {
    color: var(--text-primary);
}

/* Palette dropdown position fix */
.palette-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    z-index: 100;
}

/* ============================================================
   HIDDEN UNTIL LG (for contact button)
   ============================================================ */
.hidden-until-lg {
    display: none;
}

@media (min-width: 1024px) {
    .hidden-until-lg {
        display: inline-flex;
    }
}

/* ============================================================
   PROJECT CARDS - PERFECT GRID ALIGNMENT
   ============================================================ */
#projects .grid {
    grid-auto-rows: 1fr;
}

#projects .glow-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#projects .glow-card > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#projects .glow-card > div:last-child p {
    flex: 1;
}

#projects .glow-card > div:last-child .flex {
    margin-top: auto;
}

/* Fix: add md:grid-cols-3 */
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ============================================================
   RESPONSIVE PROJECT CARDS
   ============================================================ */
@media (max-width: 640px) {
    #projects .glow-card {
        min-height: auto;
    }
    #projects .glow-card > div:first-child {
        height: 120px;
    }
    #projects .glow-card .p-5 {
        padding: 1rem;
    }
    #projects .glow-card h3 {
        font-size: 0.9rem;
    }
    #projects .glow-card p {
        font-size: 0.7rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #projects .glow-card > div:first-child {
        height: 140px;
    }
}
