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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Boot Screen ─────────────────────────────────────────── */

.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.boot-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-content {
    max-width: 800px;
    width: 90%;
    padding: 2rem;
}

.boot-header {
    margin-bottom: 2rem;
    overflow: hidden;
}

.ascii-art {
    color: #00FF8C;
    font-size: 0.7rem;
    line-height: 1.2;
    text-align: center;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 255, 140, 0.5);
    animation: glitch 3s infinite;
}

.boot-terminal { margin-bottom: 2rem; }

.boot-terminal p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    opacity: 0;
    animation: bootLine 0.3s forwards;
}

.boot-terminal p:nth-child(1) { animation-delay: 0.5s; }
.boot-terminal p:nth-child(2) { animation-delay: 1s; }
.boot-terminal p:nth-child(3) { animation-delay: 1.5s; }
.boot-terminal p:nth-child(4) { animation-delay: 2s; }
.boot-terminal p:nth-child(5) { animation-delay: 2.5s; }
.boot-terminal p:nth-child(6) { animation-delay: 3s; }
.boot-terminal p:nth-child(7) { animation-delay: 3.5s; }

.boot-prompt {
    color: #00D9FF;
    font-weight: bold;
    margin-right: 0.5rem;
}

.boot-text   { color: #aaa; }
.boot-ok     { color: #00FF8C; }

.boot-status {
    float: right;
    font-weight: bold;
}

.boot-ready {
    color: #FFD700;
    animation: pulse 1s infinite;
}

.boot-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20%   { content: '.'; }
    40%       { content: '..'; }
    60%, 100% { content: '...'; }
}

.boot-progress {
    margin-bottom: 2rem;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    animation: bootLine 0.3s 4s forwards;
}

.boot-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00FF8C, #00D9FF);
    width: 0;
    animation: progress 2s 4s ease-out forwards;
    box-shadow: 0 0 10px rgba(0, 255, 140, 0.5);
}

@keyframes progress { to { width: 100%; } }

.boot-footer {
    text-align: center;
    color: #00FF8C;
    font-size: 0.9rem;
    opacity: 0;
    animation: bootLine 0.3s 4.5s forwards, blink 1s 5s infinite;
}

@keyframes bootLine { to { opacity: 1; } }

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

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        text-shadow: 0 0 10px rgba(0, 255, 140, 0.5);
    }
    92% {
        transform: translate(-2px, 2px);
        text-shadow: 0 0 10px rgba(0, 255, 140, 0.8), 2px 0 5px rgba(255, 0, 0, 0.5);
    }
    94% {
        transform: translate(2px, -2px);
        text-shadow: 0 0 10px rgba(0, 255, 140, 0.8), -2px 0 5px rgba(0, 0, 255, 0.5);
    }
    96% {
        transform: translate(0);
        text-shadow: 0 0 10px rgba(0, 255, 140, 0.5);
    }
}

/* ── Base ────────────────────────────────────────────────── */

body {
    font-family: 'Courier New', monospace;
    background: #121212;
    color: #fff;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#00FF8C 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* ── Nav ─────────────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid #333;
    padding: 1rem 2rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #00FF8C;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
}

.nav-links a:hover { color: #00FF8C; }

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #00FF8C;
    transition: all 0.3s;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 2rem 2rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.tag {
    display: inline-block;
    border: 1px solid #00FF8C;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: rgba(26, 26, 26, 0.7);
    color: #00FF8C;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #00FF8C, #00D9FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 1.5rem;
}

/* ── Terminal window (shared) ────────────────────────────── */

.terminal-window {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 255, 140, 0.3);
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 700px;
    text-align: left;
    box-shadow: 0 0 30px rgba(0, 255, 140, 0.2);
}

.terminal-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

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

.dot-red    { background: #FF3E3E; }
.dot-yellow { background: #FFD700; }
.dot-green  { background: #00FF8C; }

.terminal-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.terminal-text .prompt  { color: #00FF8C; }
.terminal-text .command { color: #FF6B6B; }
.terminal-text .output  { color: #fff; }

.terminal-text .link {
    color: #00D9FF;
    text-decoration: none;
    transition: color 0.3s;
}

.terminal-text .link:hover { color: #00FF8C; }

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.3s;
    border: 1px solid;
}

.btn-primary {
    background: transparent;
    border-color: #00FF8C;
    color: #00FF8C;
}

.btn-primary:hover {
    background: #00FF8C;
    color: #121212;
}

/* ── Sections (shared) ───────────────────────────────────── */

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

h2::before {
    content: '#';
    color: #00FF8C;
    margin-right: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #00FF8C;
}

.lazy-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.lazy-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── About ───────────────────────────────────────────────── */

.about-container { margin-top: 3rem; }

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-intro {
    font-size: 1.2rem;
    color: #fff !important;
}

.about-text .highlight {
    color: #00FF8C;
    font-weight: bold;
}

.about-text .link {
    color: #00D9FF;
    text-decoration: none;
    transition: color 0.3s;
}

.about-text .link:hover { color: #00FF8C; }

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 255, 140, 0.3);
    border-radius: 24px;
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 140, 0.3);
    border-color: #00FF8C;
}

.stat-number {
    font-size: 2.2rem;
    color: #00FF8C;
    font-weight: bold;
    margin-bottom: 0.4rem;
}

.stat-label {
    color: #aaa;
    font-size: 0.78rem;
    text-align: center;
    padding: 0 0.5rem;
    line-height: 1.4;
}

.about-image {
    position: sticky;
    top: 100px;
}

/* ── Code window (about.py) ──────────────────────────────── */

.code-window {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 255, 140, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 140, 0.2);
}

.code-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 140, 0.3);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-title {
    color: #aaa;
    font-size: 0.85rem;
    margin-left: auto;
}

.code-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-content pre { margin: 0; }

.code-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #fff;
}

.code-keyword  { color: #FF6B6B; }
.code-variable { color: #FFD700; }
.code-property { color: #00D9FF; }
.code-string   { color: #00FF8C; }

/* ── Projects ────────────────────────────────────────────── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 255, 140, 0.3);
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 140, 0.3);
}

.project-card h3 {
    color: #00FF8C;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-card p {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-link {
    color: #00D9FF;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.project-link:hover { color: #00FF8C; }

/* ── Contact ─────────────────────────────────────────────── */

.contact-container {
    max-width: 800px;
    margin: 3rem auto;
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.9);
    border-top: 1px solid #333;
    color: #aaa;
}

footer .signature {
    color: #00FF8C;
    font-weight: bold;
    cursor: pointer;
}

/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .boot-content    { padding: 1rem; }
    .ascii-art       { font-size: 0.5rem; }
    .boot-terminal p { font-size: 0.85rem; }
    .boot-footer     { font-size: 0.8rem; }

    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        border-bottom: 1px solid #333;
    }

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

    .nav-links a {
        margin: 0.5rem 0;
        padding: 1rem;
        border-bottom: 1px solid rgba(0, 255, 140, 0.1);
    }

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

    .about-image {
        position: static;
        order: -1;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .code-content  { font-size: 0.8rem; }
    .terminal-window { max-width: 100%; }

    #skills {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}