/* ===== ROOT VARIABLES ===== */
:root {
    /* Background Colors - LIGHT THEME */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-card: #f5f5f5;
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #666666;
    
    /* Border & Shadows */
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    
    /* Bubble Menu Colors - COLORFUL! */
    --bubble-logo-bg: #000000;
    --bubble-menu-bg: #000000;
    --bubble-overlay-bg: rgba(255, 255, 255, 0.95);
    
    /* Pill Colors - Each pill can be different! */
    --pill-home: #000000;
    --pill-about: #F4F0DE;
    --pill-projects: #E7E2D3;
    --pill-skills: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --pill-awards: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Glitch Colors - Colorful! */
    --glitch-color-1: rgba(255, 50, 50, 0.3);    /* Red */
    --glitch-color-2: rgba(50, 150, 255, 0.3);   /* Blue */
    --glitch-color-3: rgba(50, 255, 150, 0.3);   /* Green */
    --glitch-color-4: rgba(255, 150, 50, 0.3);   /* Orange */
    --glitch-color-5: rgba(200, 50, 255, 0.3);   /* Purple */
    --glitch-color-6: rgba(255, 255, 50, 0.3);   /* Yellow */
    
    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== DARK MODE VARIABLES ===== */
[data-theme="dark"] {
    /* Background Colors - DARK THEME */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #161616;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    
    /* Border & Shadows */
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    
    /* Bubble Menu Colors */
    --bubble-logo-bg: #ffffff;
    --bubble-menu-bg: #ffffff;
    --bubble-overlay-bg: rgba(0, 0, 0, 0.95);
    
    /* Pill Colors for Dark Mode */
    --pill-home: #ffffff;
    
    /* Glitch Colors - Colorful! */
    --glitch-color-1: rgba(255, 100, 100, 0.4);  /* Red */
    --glitch-color-2: rgba(100, 180, 255, 0.4);  /* Blue */
    --glitch-color-3: rgba(100, 255, 180, 0.4);  /* Green */
    --glitch-color-4: rgba(255, 180, 100, 0.4);  /* Orange */
    --glitch-color-5: rgba(220, 100, 255, 0.4);  /* Purple */
    --glitch-color-6: rgba(255, 255, 100, 0.4);  /* Yellow */
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== DARK MODE TOGGLE (below menu bar) ===== */
.dark-mode-toggle {
    position: fixed;
    top: 7rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    z-index: 997;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.dark-mode-toggle:active {
    transform: translateY(0) scale(0.95);
}

.dark-mode-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: var(--transition);
    position: absolute;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ===== COLLAPSIBLE GLASS MENU BAR ===== */
.glass-menu-bar {
    position: fixed;
    top: 6rem;
    right: 2rem;
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}


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

.glass-menu-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 0.75rem;
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
}

.glass-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.glass-menu-toggle .menu-icon {
    width: 28px;
    height: 28px;
    color: var(--text-primary);
    transition: var(--transition);
}

.glass-menu-toggle.active .menu-icon {
    transform: rotate(180deg);
}

.glass-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: visible;
    max-height: 500px;
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    position: relative;
}

/* Programming-themed decorations for desktop menu */
@media (min-width: 769px) {
    .glass-menu-list::before {
        content: '// Navigation';
        position: absolute;
        top: -1.75rem;
        left: 0;
        font-family: 'Fira Code', monospace;
        font-size: 0.75rem;
        color: var(--text-secondary);
        opacity: 0.6;
        font-weight: 500;
    }
    
    .glass-menu-list::after {
        content: '}';
        position: absolute;
        bottom: -1.5rem;
        right: 0.5rem;
        font-family: 'Fira Code', monospace;
        font-size: 1.5rem;
        color: var(--text-primary);
        opacity: 0.3;
        font-weight: 600;
    }
}

.glass-menu-list.collapsed {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
    padding: 0 1rem;
    border-width: 0;
}

.glass-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Add line numbers to desktop menu items */
@media (min-width: 769px) {
    .glass-menu-list {
        counter-reset: menu-counter;
    }
    
    .glass-menu-item {
        counter-increment: menu-counter;
        padding-left: 2.5rem;
    }
    
    .glass-menu-item::after {
        content: counter(menu-counter, decimal-leading-zero);
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        font-family: 'Fira Code', monospace;
        font-size: 0.7rem;
        color: var(--text-secondary);
        opacity: 0.5;
        font-weight: 600;
        transition: var(--transition);
    }
    
    .glass-menu-item:hover::after {
        opacity: 0.8;
        color: var(--text-primary);
    }
    
    .glass-menu-item.active::after {
        opacity: 1;
        color: #ffffff;
    }
    
    [data-theme="dark"] .glass-menu-item.active::after {
        color: #000000;
    }
}

.glass-menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-menu-item:hover::before {
    opacity: 1;
}

.glass-menu-item:hover {
    transform: translateX(-5px);
    color: var(--text-primary);
}

.glass-menu-item.active {
    background: var(--pill-home);
    font-weight: 600;
    color: #ffffff;
}

.glass-menu-item.active svg {
    color: #ffffff;
    stroke: #ffffff;
}

[data-theme="dark"] .glass-menu-item.active {
    color: #000000;
}

[data-theme="dark"] .glass-menu-item.active svg {
    color: #000000;
    stroke: #000000;
}

.glass-menu-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.glass-menu-item:hover svg {
    transform: scale(1.1);
}

.glass-menu-label {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Add code-style prefix to menu labels on desktop */
@media (min-width: 769px) {
    .glass-menu-label::before {
        content: '>';
        margin-right: 0.5rem;
        font-family: 'Fira Code', monospace;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .glass-menu-item:hover .glass-menu-label::before,
    .glass-menu-item.active .glass-menu-label::before {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-menu-bar {
        top: 1rem;
        right: 1rem;
    }
    
    .glass-menu-toggle {
        width: 48px;
        height: 48px;
        top: 1rem;
        right: 1rem;
    }
    
    .glass-menu-toggle .menu-icon {
        width: 24px;
        height: 24px;
    }

    .dark-mode-toggle {
        top: 5.5rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .glass-menu-label {
        font-size: 0.85rem;
    }
    
    .glass-menu-item {
        padding: 0.6rem 1rem;
    }
}

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

/* ===== GLITCH BACKGROUND ===== */
.glitch-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}

[data-theme="dark"] .glitch-background {
    opacity: 0.8;
}

.glitch-background::before {
    content: 'function(){console.log("Hello World");}const data=[1,2,3,4];if(true){return false;}class Component{render()} import {useState} from "react"; export default function App() { const [count, setCount] = useState(0); return <div>{count}</div>; } async function fetchData() { const response = await fetch("/api"); return response.json(); } try { throw new Error("bug"); } catch(error) { console.error(error); } const map = array.map(x => x * 2); const filter = array.filter(x => x > 0); for(let i = 0; i < 10; i++) { sum += i; } while(condition) { doSomething(); } switch(value) { case 1: break; default: break; }';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    background: linear-gradient(
        90deg,
        var(--glitch-color-1) 0%,
        var(--glitch-color-2) 20%,
        var(--glitch-color-3) 40%,
        var(--glitch-color-4) 60%,
        var(--glitch-color-5) 80%,
        var(--glitch-color-6) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    word-wrap: break-word;
    white-space: pre-wrap;
    animation: glitchScroll 60s linear infinite, colorShift 10s linear infinite;
    line-height: 2;
    letter-spacing: 0.5rem;
    opacity: 0.8;
}

[data-theme="dark"] .glitch-background::before {
    opacity: 1;
}

@keyframes colorShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes glitchScroll {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-10%, -10%);
    }
}

/* Floating code snippets */
.glitch-background .code-snippet {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    animation: float 10s ease-in-out infinite;
    opacity: 0;
    font-weight: 600;
    --snippet-opacity: 0.7;
    --snippet-color: var(--glitch-color-1);
}

.glitch-background .code-snippet:nth-child(6n+1) {
    --snippet-color: var(--glitch-color-1);
    text-shadow: 0 0 20px var(--glitch-color-1);
    color: var(--glitch-color-1);
}

.glitch-background .code-snippet:nth-child(6n+2) {
    --snippet-color: var(--glitch-color-2);
    text-shadow: 0 0 20px var(--glitch-color-2);
    color: var(--glitch-color-2);
}

.glitch-background .code-snippet:nth-child(6n+3) {
    --snippet-color: var(--glitch-color-3);
    text-shadow: 0 0 20px var(--glitch-color-3);
    color: var(--glitch-color-3);
}

.glitch-background .code-snippet:nth-child(6n+4) {
    --snippet-color: var(--glitch-color-4);
    text-shadow: 0 0 20px var(--glitch-color-4);
    color: var(--glitch-color-4);
}

.glitch-background .code-snippet:nth-child(6n+5) {
    --snippet-color: var(--glitch-color-5);
    text-shadow: 0 0 20px var(--glitch-color-5);
    color: var(--glitch-color-5);
}

.glitch-background .code-snippet:nth-child(6n) {
    --snippet-color: var(--glitch-color-6);
    text-shadow: 0 0 20px var(--glitch-color-6);
    color: var(--glitch-color-6);
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: var(--snippet-opacity, 0.5);
    }
    50% {
        opacity: var(--snippet-opacity, 0.5);
        transform: translateY(-50px) translateX(25px);
    }
    90% {
        opacity: var(--snippet-opacity, 0.5);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(50px);
    }
}

.hero-content {
    max-width: 900px;
    width: 100%;
    z-index: 1;
    animation: heroFadeIn 1s ease-out;
}

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

.terminal-window {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="dark"] .terminal-window {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close {
    background: #ff5f56;
}

.btn-minimize {
    background: #ffbd2e;
}

.btn-maximize {
    background: #27c93f;
}

.terminal-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

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

.command {
    color: var(--text-primary);
}

.output {
    color: var(--text-primary);
    margin-left: 0;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.cursor-blink {
    color: var(--text-primary);
    animation: blink 1s infinite;
}

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

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--text-primary);
    border-bottom: 3px solid var(--text-primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    animation: borderGlow 2s ease-in-out infinite;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}


/* ===== SECTIONS ===== */
section {
    padding: 6rem 2rem;
    position: relative;
}

section::before {
    content: attr(id);
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    opacity: 0.15;
    font-weight: 600;
}

section::after {
    content: '// End of section';
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    opacity: 0.15;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: left;
    position: relative;
}


.code-bracket {
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: var(--bg-secondary);
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.code-block {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.code-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.code-lang {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.file-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-block pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block code {
    color: var(--text-primary);
}

/* Light mode code colors - optimized for white background */
.keyword {
    color: #9c27b0;
    font-weight: 600;
}

.variable {
    color: #1976d2;
    font-weight: 600;
}

.property {
    color: #d32f2f;
}

.string {
    color: #388e3c;
}

/* Dark mode adjustments for code colors */
[data-theme="dark"] .keyword {
    color: #bb9af7;
    font-weight: 600;
}

[data-theme="dark"] .variable {
    color: #7dcfff;
    font-weight: 600;
}

[data-theme="dark"] .property {
    color: #ff9e64;
}

[data-theme="dark"] .string {
    color: #9ece6a;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ===== PROJECTS SECTION ===== */
.projects-container {
    max-width: 100%;
}

/* VS Code/Cursor style tabbed box for projects */
.projects-tabbed-box {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Tab Bar for Projects */
.projects-tab-bar {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.project-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.project-tab svg {
    stroke: var(--text-secondary);
    transition: stroke 0.2s ease;
}

.project-tab:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.project-tab:hover svg {
    stroke: var(--text-primary);
}

.project-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-bottom: 2px solid var(--pill-home);
}

.project-tab.active svg {
    stroke: var(--text-primary);
}

/* Tab Content for Projects */
.projects-tab-content {
    padding: 2.5rem;
    min-height: 400px;
}

.project-panel {
    display: none;
    animation: fadeInTab 0.3s ease;
}

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

/* Mobile accordion */
.projects-accordion {
    display: none;
}

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.accordion-chevron {
    transition: transform 0.25s ease;
}

.accordion-header[aria-expanded="true"] .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-panel {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
}

.accordion-panel.open {
    display: block;
}

.project-panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-panel-title::before {
    content: '>';
    font-family: 'Fira Code', monospace;
    color: var(--pill-home);
    font-size: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--text-secondary);
}

/* Project meta styles */
.project-date {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.project-role {
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.project-contrib-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: var(--text-primary);
}

.project-bullets {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-bullets li {
    margin-bottom: 0.4rem;
}

/* ===== SKILLS SECTION ===== */
.skills-section {
    background: var(--bg-secondary);
}

.skills-container {
    display: grid;
    gap: 2rem;
}

/* Terminal-style boxes for skills */
.skill-card {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.skill-card::before {
    content: attr(data-filename);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
    z-index: 1;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.skill-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 4rem 2rem 0 2rem;
    position: relative;
    z-index: 2;
}

.skill-card-icon {
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.skill-card-icon svg {
    stroke: #333333;
}

[data-theme="dark"] .skill-card-icon svg {
    stroke: #ffffff;
}

.skill-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
    padding: 0 2rem 2rem 2rem;
    position: relative;
    z-index: 2;
}

.skills-grid {
    display: grid;
    gap: 1.5rem;
}

.skill-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.skill-icon {
    font-size: 2rem;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon svg {
    stroke: #333333;
}

[data-theme="dark"] .skill-icon svg {
    stroke: #ffffff;
}

.skill-name {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-bar {
    background: var(--bg-tertiary);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    grid-column: 2;
}

.skill-progress {
    height: 100%;
    background: var(--text-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tool-badge {
    padding: 0.6rem 1.2rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: default;
}

.tool-badge:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    padding: 2rem 2rem 3rem;
    text-align: center;
}

.footer-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-separator {
    opacity: 0.5;
}

/* Responsive adjustments for glitch */
@media (max-width: 768px) {
    .glitch-background::before {
        font-size: 0.8rem;
        letter-spacing: 0.3rem;
    }
    
    .glitch-background .code-snippet {
        font-size: 0.7rem;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Menu Bar */
    .glass-menu-bar {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .glass-menu-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }


    /* Hero Section */
    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .terminal-window {
        max-width: 100%;
    }

    .terminal-body {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .hero-buttons {
        gap: 1rem;
    }

    /* Glitch Background */
    .glitch-background::before {
        font-size: 0.8rem;
        letter-spacing: 0.3rem;
    }
    
    .glitch-background .code-snippet {
        font-size: 0.7rem;
    }

    /* General Sections */
    section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* About Section */
    .about-content {
        flex-direction: column;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .about-section .code-block {
        max-width: 100%;
        overflow: hidden;
    }

    .about-section .code-block pre {
        white-space: pre-wrap;
        word-break: break-word;
        overflow-x: auto;
    }

    .code-block pre {
        font-size: 0.75rem;
        padding: 1rem;
    }

    /* Projects Section - keep tabs on tablet */
    .projects-tab-bar {
        flex-wrap: wrap;
    }
    
    .project-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Skills Section */
    .skills-container {
        gap: 1.5rem;
    }

    .skill-card-title {
        font-size: 1.3rem;
        padding: 3.5rem 1.5rem 0 1.5rem;
    }

    .skill-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .skill-description {
        font-size: 0.95rem;
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1.5rem 2.5rem;
    }

    .footer-text {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    /* Add horizontal spacing to entire site */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Mobile Menu - Full Screen Overlay */
    .glass-menu-bar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        backdrop-filter: none;
        animation: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        padding-bottom: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 9999;
    }

    .glass-menu-bar.menu-open {
        transform: translateX(0);
    }

    .glass-menu-toggle {
        position: fixed;
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        z-index: 10000;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }

    .glass-menu-toggle .menu-icon {
        width: 24px;
        height: 24px;
    }

    .glass-menu-toggle.active .menu-icon {
        transform: rotate(90deg);
    }

    .dark-mode-toggle {
        top: 4.5rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .dark-mode-toggle svg {
        width: 24px;
        height: 24px;
    }

    .glass-menu-list {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        background: transparent;
        backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 4.5rem 2rem 5rem;
        max-height: none;
        opacity: 1;
        transform: scaleY(1);
    }

    .glass-menu-list.collapsed {
        max-height: none;
        opacity: 1;
        transform: scaleY(1);
        padding: 4.5rem 2rem 5rem;
    }

    .glass-menu-item {
        padding: 1rem 0;
        font-size: 1.2rem;
        border-radius: 0;
        margin-bottom: 0.25rem;
        background: transparent;
        border: none;
        justify-content: flex-start;
    }

    .glass-menu-item::before {
        display: none;
    }

    .glass-menu-item:hover {
        transform: none;
        color: var(--text-primary);
    }

    .glass-menu-item {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: var(--text-primary);
    }

    /* Remove all active state styling in mobile */
    .glass-menu-item.active {
        background: transparent !important;
        color: var(--text-primary) !important;
        font-weight: 500 !important;
    }

    .glass-menu-item.active svg {
        stroke: var(--text-primary) !important;
        color: var(--text-primary) !important;
    }
    
    .glass-menu-item:hover {
        background: transparent !important;
    }

    .glass-menu-item svg {
        display: none;
    }

    .glass-menu-label {
        font-size: 1.4rem;
    }


    /* Hero Section */
    .hero {
        padding: 7rem 1.5rem 4rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .terminal-header {
        padding: 0.5rem;
    }

    .terminal-title {
        font-size: 0.7rem;
    }

    .terminal-buttons .button {
        width: 9px;
        height: 9px;
    }

    .terminal-body {
        font-size: 0.7rem;
        padding: 0.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* General Sections */
    section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .code-bracket {
        font-size: 1.5rem;
    }

    /* About Section */
    .about-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .code-block pre {
        font-size: 0.7rem;
        padding: 0.75rem;
        white-space: pre-wrap;
        word-break: break-word;
        overflow-x: auto;
    }

    /* Projects Section - Mobile Accordion */
    .projects-section {
        padding-bottom: 4rem;
    }
    
    .projects-tabbed-box {
        border-radius: 0;
    }
    
    .projects-tab-bar {
        flex-direction: column;
        border-bottom: none;
        background: transparent;
    }

    .project-tab {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.25rem;
        justify-content: space-between;
        position: relative;
        background: var(--bg-tertiary);
        border-radius: 0;
    }

    .project-tab:first-child {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .project-tab.active {
        background: var(--bg-card);
        font-weight: 600;
    }

    /* Hide original tab content container on mobile */
    .projects-tab-content {
        display: none !important;
    }

    /* Show panels directly with accordion behavior */
    .project-panel {
        display: block !important;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
        background: var(--bg-card);
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 0 1.25rem;
        margin: 0;
    }

    .project-panel.mobile-expanded {
        max-height: 3000px;
        opacity: 1;
        padding: 1.25rem;
    }

    .project-panel-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .project-panel-title::before {
        font-size: 1.2rem;
    }

    .project-date {
        font-size: 0.85rem;
    }

    .project-role {
        font-size: 0.9rem;
    }

    .project-contrib-title {
        font-size: 0.95rem;
    }

    .project-bullets {
        font-size: 0.9rem;
        line-height: 1.6;
        padding-left: 1rem;
    }

    .project-link {
        font-size: 0.85rem;
    }

    /* Skills Section */
    .skills-section {
        padding-bottom: 4rem;
    }
    
    .skill-card::before {
        height: 2.25rem;
        font-size: 0.75rem;
    }

    .skill-card::after {
        top: 0.65rem;
        left: 0.75rem;
        width: 10px;
        height: 10px;
        box-shadow: 17px 0 0 #ffbd2e, 34px 0 0 #27c93f;
    }

    .skill-card-title {
        font-size: 1.2rem;
        padding: 3rem 1.25rem 0 1.25rem;
    }

    .skill-card-icon svg {
        width: 22px;
        height: 22px;
    }

    .skill-description {
        font-size: 0.9rem;
        padding: 0 1.25rem 1.25rem 1.25rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem 2rem;
    }

    .footer-text {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--text-primary);
    color: var(--bg-primary);
}

