/* HeinrichOS Boot Sequence Styles */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

#site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s;
}

/* Boot Container */
.boot-container {
    width: 90%;
    max-width: 700px;
    font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
    color: #00ff00;
    text-align: left;
    display: grid;
    grid-template-rows: auto 1fr auto 1fr;
    height: 600px;
    max-height: 80vh;
    gap: 1rem;
}

.boot-logo {
    text-align: center;
    animation: bootFlicker 0.5s ease-in;
    grid-row: 1;
    margin-bottom: 0;
}

.boot-ghost {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    animation: ghostPulse 2s ease-in-out infinite;
}

.boot-title {
    font-size: 2.5rem;
    color: var(--brand-1);
    margin: 0;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    letter-spacing: 0.1em;
}

.boot-version {
    font-size: 1rem;
    color: #888;
    display: block;
    margin-top: 0.5rem;
}

.boot-messages {
    grid-row: 2;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.8;
    min-height: 0;
    max-height: 200px;
}

.boot-messages::-webkit-scrollbar {
    width: 6px;
}

.boot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.boot-messages::-webkit-scrollbar-thumb {
    background: var(--brand-1);
    border-radius: 3px;
}

.boot-message {
    opacity: 0;
    animation: bootMessageFadeIn 0.3s ease-in forwards;
    margin-bottom: 0.5rem;
}

.boot-message.success::before {
    content: "[ OK ] ";
    color: #00ff00;
}

.boot-message.info::before {
    content: "[INFO] ";
    color: #667eea;
}

.boot-message.warn::before {
    content: "[WARN] ";
    color: #ffa500;
}

.boot-progress {
    grid-row: 3;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--brand-1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    align-self: center;
}

.boot-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.boot-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 1.5s infinite;
}

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

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

@keyframes bootMessageFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* HeinrichOS Status Bar */
.heinrichos-status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--brand-1);
    padding: 0.5rem 1rem;
    z-index: 1001;
    font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
    font-size: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-light .heinrichos-status-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: var(--brand-1);
}

.status-left,
.status-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-icon {
    font-size: 1rem;
}

.status-text {
    color: var(--muted-2);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .heinrichos-status-bar {
        font-size: 0.5rem;
        padding: 0.4rem 0.75rem;
    }
    
    .status-left,
    .status-right {
        gap: 0.75rem;
    }
    
    .status-icon {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .heinrichos-status-bar {
        font-size: 0.45rem;
    }
    
    .status-item {
        gap: 0.3rem;
    }
}
@media (max-width: 768px) {
    .github-charts-grid {
        grid-template-columns: 1fr !important;
    }
    .github-chart-card {
        max-width: 100% !important;
        width: 100% !important;
    }
}
/* Apply retro game font to all section titles and name */
.retro-title,
h1,
h2,
.section-title,
#user-name {
    font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
        color: var(--brand-1);
    text-shadow: rgb(34, 34, 34) 2px 2px 0px, rgb(118, 75, 162) 4px 4px 0px;
    letter-spacing: 2px;
    font-weight: normal;
}

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

*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --text: #ffffff;
    --muted: #888;
    --muted-2: #ccc;
    --card: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --brand-1: #667eea;
    --brand-2: #764ba2;
    --glass: rgba(10, 10, 10, 0.7);
    --nav-bg: rgba(10, 10, 10, 0.8);
    --nav-bg-scrolled: rgba(10, 10, 10, 0.95);
}

.theme-light {
    --bg: #f7f7fb;
    --text: #0b0b12;
    --muted: #4a4a57;
    --muted-2: #2d2d39;
    --card: rgba(0, 0, 0, 0.04);
    --card-border: rgba(0, 0, 0, 0.08);
    --brand-1: #4e6cf0;
    --brand-2: #9c52d1;
    --glass: rgba(255, 255, 255, 0.7);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

main {
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
}

/* Enhanced content backgrounds for better visibility */
.hero-content {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--card-border);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
@media (min-width: 900px) {
    .hero-content {
        padding: 3.5rem 2.5rem;
    }
}
@media (max-width: 480px) {
    .hero-content {
        padding: 2rem 1rem;
    }
}

.about-content {
    backdrop-filter: blur(15px);
    border-radius: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    border: 1px solid var(--card-border);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 100%;
}

@media (max-width: 768px) {
    .about-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-content {
        padding: 1.5rem 1rem;
    }
}

.projects-grid {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    border: 1px solid var(--card-border);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 100%;
}

@media (max-width: 768px) {
    .projects-grid {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        padding: 1.5rem 1rem;
    }
}

.contact-content {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid var(--card-border);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .contact-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .contact-content {
        padding: 1.5rem 1rem;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Overflow container for nav items that don't fit */
.nav-overflow-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: none;
}

.nav-overflow-container.has-overflow {
    display: block;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-overflow {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}

/* Ensure overflow items maintain same styling as main nav */
.nav-overflow li {
    list-style: none;
    margin: 0;
}


/* Hide separator when theme toggle is in overflow */
.nav-overflow .theme-toggle-item::before {
    display: none;
}

.nav-overflow .theme-toggle-item {
    margin-left: 0;
    padding-left: 0;
}

/* Brand/Logo */
.nav-brand {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--brand-1);
    transform: translateY(-1px);
}

.logo-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.1);
}

.logo-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: max-content;
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-control-btn:hover {
    background: color-mix(in oklab, var(--brand-1) 15%, var(--card));
    border-color: var(--brand-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.nav-control-btn:active {
    transform: translateY(0);
}

/* Removed navbar-close styles - simplified navbar */

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}
/* Align theme toggle visually with nav items */
.theme-toggle-item { display: flex; align-items: center; }
.theme-toggle-label { 
    display: inline-flex; 
    align-items: center; 
    height: 40px; 
    padding: 0 10px; 
    border-radius: 12px; 
}
.theme-toggle-label:hover .theme-toggle-track { 
    border-color: var(--brand-1); 
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}
.theme-toggle-track { margin: 0; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.nav-link:hover::before,
.nav-link:focus::before,
.nav-link.active::before {
    opacity: 0.1;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--brand-1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.nav-icon {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.nav-link:hover .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

/* Rotate arrow on hover, focus, or when explicitly opened */
.dropdown:hover .dropdown-arrow,
.dropdown:focus-within .dropdown-arrow,
.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 0.75rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
}

/* Show dropdown on hover (for mouse devices) */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
/* Also show dropdown when parent has .open (for click/tap on desktop) */
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
/* Improve accessibility: show when any child has focus (keyboard/touch) */
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    margin: 0;
    list-style: none;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    margin: 0 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dropdown-link:hover {
    background: color-mix(in oklab, var(--brand-1) 15%, transparent);
    color: var(--brand-1);
    transform: translateX(4px);
}

/* Navbar icons */
.nav-icon {
    font-size: 1.15em;
    margin-right: 0.5em;
    vertical-align: middle;
    display: inline-block;
}

/* Theme toggle (switch) */
.theme-toggle-label { 
    padding: 0.25rem; 
    cursor: pointer; 
}
.theme-toggle-label::before { display: none; }
.theme-toggle-input { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    margin: -1px; 
    padding: 0; 
    border: 0; 
    clip: rect(0 0 0 0); 
    clip-path: inset(50%); 
    overflow: hidden; 
}
.theme-toggle-track {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 64px;
    height: 32px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    padding: 0 6px;
}
.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
}
.theme-toggle-icon { font-size: 0.9rem; line-height: 1; opacity: 0.75; }
.theme-toggle-icon.sun { color: var(--brand-1); }
.theme-toggle-icon.moon { color: var(--brand-2); }
.theme-toggle-input:focus-visible + .theme-toggle-track { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.theme-toggle-input:checked + .theme-toggle-track .theme-toggle-thumb { transform: translateX(32px); }
.theme-toggle-input:checked + .theme-toggle-track .sun { opacity: 0.4; }
.theme-toggle-input:checked + .theme-toggle-track .moon { opacity: 1; }
.theme-toggle-input:not(:checked) + .theme-toggle-track .sun { opacity: 1; }
.theme-toggle-input:not(:checked) + .theme-toggle-track .moon { opacity: 0.4; }

/* Smaller icons for games dropdown */
.dropdown-menu .nav-icon {
    font-size: 0.95em;
    margin-right: 0.4em;
}

/* Games dropdown separator */
.dropdown-separator {
    border-top: 1px solid var(--card-border);
    margin: 0.2em 1em;
    height: 0;
    background: none;
    pointer-events: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 1rem;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 6rem 1rem 4rem;
    }
}

.retro-title {
    font-family: 'Press Start 2P', monospace, cursive;
    font-size: clamp(1.4rem, 3.5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brand-1);
    text-shadow: 2px 2px 0 #222, 4px 4px 0 #764ba2;
    margin-bottom: 2rem;
    margin-top: 0;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 1rem;
}

/* Typewriter effect styles */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--brand-1);
    margin-left: 1px;
    animation: blink 1s infinite;
    vertical-align: text-top;
    position: relative;
    top: -0.1em;
}

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

.typewriter-text {
    display: inline;
}

/* Hero content spacing */
.hero .subtitle {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    color: var(--muted-2);
}

.hero .description {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: var(--muted-2);
    line-height: 1.6;
}

.hero .cta-button {
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .retro-title {
        font-size: clamp(1.2rem, 4vw, 2.5rem);
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .retro-title {
        font-size: clamp(1rem, 5vw, 1.8rem);
        letter-spacing: 0.5px;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .nav-controls { 
        position: relative; 
        width: 100%; 
        min-height: 40px; 
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
    }
    
    .hamburger { 
        display: flex; 
        position: static;
        z-index: 102; 
    }
    
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--nav-bg-scrolled);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        padding: 2rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        list-style: none;
        width: 100%;
        max-width: 300px;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.9rem 1.25rem;
        border-radius: 14px;
        width: 100%;
        justify-content: center;
        margin: 0.25rem 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Center the theme toggle in hamburger menu */
    .theme-toggle-item { 
        max-width: 300px; 
        width: 100%; 
        display: flex; 
        justify-content: center; 
        margin: 0.25rem 0; 
    }
    .theme-toggle-label { 
        height: 48px; 
        padding: 0; 
        width: auto; 
    }
    .theme-toggle-track { 
        margin: 0 auto; 
    }
    
    /* Mobile dropdown as accordion */
    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        width: 100%;
    }
    .dropdown.open .dropdown-menu { display: block; }
    .dropdown-toggle .dropdown-arrow { transition: transform 0.25s ease; }
    .dropdown.open .dropdown-arrow { transform: rotate(180deg); }
    
    .dropdown-link {
        font-size: 1rem;
        padding: 0.7rem 1rem;
        margin: 0.25rem 0;
        background: var(--card);
        border: 1px solid var(--card-border);
        border-radius: 12px;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* Removed navbar-close - simplified mobile nav */
}
/* Removed stray lines causing errors */

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

/* Sections */
.section {
    padding: 8rem 0;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0;
    }
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-align: center;
/* Removed stray lines causing errors */
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

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

.about-highlight {
    color: var(--brand-1);
    font-weight: 600;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: 1rem;
    width: 100%;
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-item {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.skill-item:hover {
    transform: translateY(-5px);
    background: color-mix(in oklab, var(--brand-1) 15%, transparent);
    border-color: color-mix(in oklab, var(--brand-1) 40%, transparent);
}

.skill-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-1);
    margin-bottom: 0.5rem;
}

.skill-item p {
    font-size: 0.9rem;
    color: var(--muted);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.project-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
}

.project-card:hover {
    transform: translateY(-10px);
    background: color-mix(in oklab, var(--brand-1) 8%, var(--card));
    border-color: color-mix(in oklab, var(--brand-1) 35%, var(--card-border));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--muted-2);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: color-mix(in oklab, var(--brand-1) 20%, transparent);
    color: var(--brand-1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--brand-1);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

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

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--muted-2);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    overflow-x: auto;
}

.contact-item {
    text-align: center;
}

.contact-item h3 {
    color: var(--brand-1);
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.contact-item a {
    color: var(--muted-2);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--brand-1);
}

/* Footer */
footer {
    padding: 3rem 0 4rem 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.footer-separator {
    margin: 0 0.75rem;
    color: var(--card-border);
}

.about-os-link {
    color: var(--brand-1);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.about-os-link:hover {
    color: var(--brand-2);
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.easter-egg-hint {
    cursor: pointer;
    display: inline-block;
    animation: ghostPulse 2s ease-in-out infinite;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.easter-egg-hint:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.8));
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Scroll Down Guide */
.scroll-guide {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.scroll-guide.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

.scroll-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: var(--brand-1);
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 3rem;
    color: var(--brand-1);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

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

@media (max-width: 768px) {
    .scroll-guide {
        bottom: 20px;
    }
    
    .scroll-text {
        font-size: 0.6rem;
    }
    
    .scroll-arrow {
        font-size: 1.5rem;
    }
}


/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid var(--card-border);
    background: var(--card);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text);
}

.hamburger:hover {
    background: color-mix(in oklab, var(--brand-1) 15%, var(--card));
    border-color: var(--brand-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

#back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 4rem;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, bottom 0.2s ease;
    z-index: 1002;
}

#back-to-top:hover {
    background: var(--brand-1);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 3.5rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    #back-to-top {
        bottom: 3rem;
        width: 36px;
        height: 36px;
        right: 1rem;
    }
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Game styles */
.game { display: grid; justify-items: center; gap: 1rem; }
.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 0.5rem;
    background: var(--card);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
}
.cell {
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 12px;
    font-size: 2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, transform 0.1s ease;
    min-height: 80px;
    min-width: 80px;
}
.cell:hover { background: color-mix(in oklab, var(--brand-1) 10%, var(--card)); }
.cell.win { outline: 2px solid var(--brand-1); }

/* Sudoku styles */
.sudoku-game { display: grid; justify-items: center; gap: 1rem; }
.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    grid-template-rows: repeat(9, 40px);
    gap: 1px;
    background: var(--card-border);
    padding: 1rem;
    border-radius: 16px;
    border: 2px solid var(--card-border);
}
.sudoku-cell {
    background: var(--card);
    color: var(--text);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease;
}
.sudoku-cell:hover { background: color-mix(in oklab, var(--brand-1) 10%, var(--card)); }
.sudoku-cell.selected { background: color-mix(in oklab, var(--brand-1) 20%, var(--card)); }
.sudoku-cell.given { font-weight: bold; color: var(--brand-1); }
.sudoku-cell.user-input { color: var(--text); }
.number-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.num-btn {
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.num-btn:hover { background: color-mix(in oklab, var(--brand-1) 10%, var(--card)); }
.num-btn.clear { grid-column: span 2; }

/* Pacman styles */
.pacman-game { display: grid; justify-items: center; gap: 1rem; }
#canvas {
    border: 2px solid var(--card-border);
    border-radius: 12px;
    background: #000;
}
.score-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Flappy Bird styles */
.flappy-game { display: grid; justify-items: center; gap: 1rem; }
.flappy-game #canvas {
    border: 2px solid var(--card-border);
    border-radius: 12px;
    background: #87CEEB;
}

/* Projects controls (filters + search) */
.projects-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
}
.projects-controls .filter-btn {
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
}
.projects-controls .filter-btn.active {
    background: color-mix(in oklab, var(--brand-1) 15%, transparent);
    border-color: color-mix(in oklab, var(--brand-1) 45%, var(--card-border));
}
#project-search {
    flex: 1 1 250px;
    min-width: 200px;
    max-width: 350px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    outline: none;
}

/* Contact form */
.contact-content form {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.contact-content .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.contact-content input, .contact-content textarea {
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    outline: none;
}
.contact-content .hp { display: none; }
#form-status { margin-top: 0.5rem; font-size: 0.95rem; color: var(--muted); }

/* Copy buttons */
.copy-btn {
    margin-left: 0.5rem;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
}

/* Lightbox */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}
#lightbox.show { display: flex; }
.lightbox-content {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 600px;
    width: calc(100% - 2rem);
}
.lightbox-close {
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    float: right;
    cursor: pointer;
}
.lightbox-title { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.lightbox-desc { color: var(--muted-2); }

/* Carousel */
.carousel { position: relative; overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.5s ease; }
.carousel-item { min-width: 100%; padding: 2rem; text-align: center; background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; }
.carousel .author { display: block; margin-top: 0.75rem; color: var(--muted); }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); border: 1px solid var(--card-border); background: var(--card); color: var(--text); border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }

/* Ensure all sections are contained */
section {
    width: 100%;
    overflow-x: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 2rem;
        z-index: 102;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background: var(--nav-bg-scrolled);
        backdrop-filter: blur(20px);
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        text-align: center;
        padding-top: 7rem;
        z-index: 101;
        box-shadow: 0 8px 32px rgba(0,0,0,0.25);
        transition: opacity 0.3s ease;
        margin-left: 0;
    }
    .logo {
        margin-top: 2rem;
        margin-bottom: 1.5rem;
        display: block;
        text-align: center;
    }


    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .contact-info {
        flex-direction: column;
        gap: 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .contact-content .form-row {
        grid-template-columns: 1fr;
    }
}

/* Enhanced CRT Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 10000;
    opacity: 0.4;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 9999;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
}

@keyframes crtFlicker {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.08; }
}

@keyframes crtSectionFlicker {
    0% { opacity: 0; }
    10% { opacity: 0.1; }
    20% { opacity: 0; }
    30% { opacity: 0.15; }
    40% { opacity: 0; }
    100% { opacity: 0; }
}

/* Ghost Trail Enhancement */
.ghost-trail {
    position: fixed;
    pointer-events: none;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9997;
    filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.5));
}

.ghost-trail.active {
    opacity: 0.6;
}

/* Terminal Styles */
.terminal-container {
    background: #0a0a0a;
    border: 2px solid var(--brand-1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    margin: 0 auto;
}

.terminal-header {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--brand-1);
}

.terminal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: var(--brand-1);
}

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

.terminal-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.terminal-control.close {
    background: #ff5f56;
}

.terminal-control.minimize {
    background: #ffbd2e;
}

.terminal-control.maximize {
    background: #27c93f;
}

.terminal-output {
    padding: 1.5rem;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: #0a0a0a;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: var(--brand-1);
    border-radius: 4px;
}

.terminal-line {
    margin-bottom: 0.5rem;
    color: #e5e5e5;
}

.terminal-line.terminal-blank {
    margin-bottom: 0.25rem;
}

.terminal-prompt {
    color: var(--brand-1);
    font-weight: bold;
    margin-right: 0.5rem;
}

.terminal-highlight {
    color: #00ff00;
    font-weight: bold;
}

.terminal-success {
    color: #00ff00;
}

.terminal-error {
    color: #ff5f56;
}

.terminal-link {
    color: var(--brand-2);
    text-decoration: underline;
}

.terminal-link:hover {
    color: var(--brand-1);
}

.terminal-input-line {
    padding: 1rem 1.5rem;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(102, 126, 234, 0.3);
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e5e5e5;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.terminal-input::placeholder {
    color: #666;
}

@media (max-width: 768px) {
    .terminal-output {
        font-size: 0.85rem;
        padding: 1rem;
        min-height: 250px;
    }
    
    .terminal-input-line {
        padding: 0.75rem 1rem;
    }
    
    .terminal-title {
        font-size: 0.6rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in, .carousel-track { transition: none !important; }
    html:focus-within { scroll-behavior: auto; }
    body::before, body::after, .crt-overlay { display: none !important; }
    .ghost-trail { display: none !important; }
}

/* Compact mobile navbar (logo + hamburger only) */
@media (max-width: 768px) {
  .navbar { padding: 0.35rem 0; }
  .nav-container { padding: 0 0.75rem; min-height: 52px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  .nav-brand { order: 1; }
  .nav-controls { order: 3; position: static; width: auto; gap: 0.5rem; }
  .nav-links { order: 2; }
  .hamburger { display: flex; position: static; width: 36px; height: 36px; padding: 6px; }
  .hamburger-line { width: 20px; }
  .logo { margin: 0; display: flex; align-items: center; }
  .logo-icon { font-size: 1.25rem; }
}
