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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #050505;
    --bg-card: #0f0f0f;
    --bg-card-hover: #141414;
    --accent: #00ff88;
    --accent-secondary: #00cc6a;
    --accent-dim: rgba(0, 255, 136, 0.08);
    --accent-glow: rgba(0, 255, 136, 0.15);
    --text-primary: #e4e4e4;
    --text-secondary: #8a8a8a;
    --text-dim: #404040;
    --border: #1a1a1a;
    --border-light: #252525;
    --code-purple: #c792ea;
    --code-blue: #82aaff;
    --code-yellow: #ffcb6b;
    --code-orange: #f78c6c;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #f5f5f5;
    --bg-card-hover: #eeeeee;
    --accent: #00cc6a;
    --accent-secondary: #00a855;
    --accent-dim: rgba(0, 204, 106, 0.08);
    --accent-glow: rgba(0, 204, 106, 0.2);
    --text-primary: #1a1a1a;
    --text-secondary: #606060;
    --text-dim: #a0a0a0;
    --border: #e0e0e0;
    --border-light: #d0d0d0;
    --code-purple: #9c27b0;
    --code-blue: #2196f3;
    --code-yellow: #ff9800;
    --code-orange: #ff5722;
}

html {
    scroll-behavior: smooth;
}

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

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 255, 136, 0.02) 0%, transparent 50%);
    transition: opacity 0.3s ease;
}

[data-theme="light"] .gradient-bg {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 204, 106, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 204, 106, 0.03) 0%, transparent 50%);
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.05),
        rgba(0, 0, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.4;
}

[data-theme="light"] .scanlines {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.02),
        rgba(0, 0, 0, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.3;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

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

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

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

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 6%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.8);
}

nav.scrolled {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.95);
}

[data-theme="light"] nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
}

nav a {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--accent);
    padding: 7px 14px;
    background: var(--accent-dim);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

[data-theme="light"] .nav-status {
    border: 1px solid rgba(0, 204, 106, 0.3);
}

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

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

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 110px 6% 80px;
    gap: 60px;
}

.hero-content {
    max-width: 580px;
}

.terminal-tag {
    font-family: 'Fira Code', monospace;
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3.4rem;
    font-weight: 700;
    margin-bottom: 22px;
    line-height: 1.15;
    letter-spacing: -1px;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

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

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

.typed-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin-bottom: 18px;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    line-height: 2;
}

[data-theme="light"] .typed-text {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.const { color: var(--code-purple); }
.var { color: var(--code-blue); }
.string { color: var(--accent); }
.number { color: var(--code-orange); }

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 30px;
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.btn {
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: var(--accent);
    color: #000000;
    font-weight: 600;
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn.primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.35);
}

[data-theme="light"] .btn.primary:hover {
    box-shadow: 0 15px 40px rgba(0, 204, 106, 0.3);
}

.btn.secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn.secondary:hover {
    background: var(--accent-dim);
    transform: translateY(-4px);
}

.social-links {
    display: flex;
    gap: 14px;
}

.social-link {
    color: var(--text-secondary);
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.15);
}

[data-theme="light"] .social-link:hover {
    box-shadow: 0 10px 30px rgba(0, 204, 106, 0.2);
}

.hero-terminal {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px var(--accent-glow);
}

[data-theme="light"] .hero-terminal {
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.1),
        0 0 40px var(--accent-glow);
}

.terminal-header {
    background: #111;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .terminal-header {
    background: #e8e8e8;
}

.terminal-buttons {
    display: flex;
    gap: 7px;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-btn.red { background: #ff5f56; }
.term-btn.yellow { background: #ffbd2e; }
.term-btn.green { background: #27ca40; }

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

.terminal-body {
    padding: 22px;
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    line-height: 1.9;
}

.prompt {
    color: var(--accent);
    margin-right: 10px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.output {
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 22px;
}

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

section {
    padding: 100px 6%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 50px;
}

.section-header.center {
    justify-content: center;
}

.section-number {
    font-family: 'Fira Code', monospace;
    color: var(--accent);
    font-size: 0.95rem;
}

.section-header h2 {
    font-family: 'Fira Code', monospace;
    font-size: 1.7rem;
    font-weight: 600;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light), transparent);
    max-width: 320px;
}

.code-comment {
    font-family: 'Fira Code', monospace;
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-bottom: 22px;
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 70px;
    max-width: 1050px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.skill-item {
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 8px 0;
    transition: color 0.3s;
}

.skill-item:hover {
    color: var(--text-primary);
}

.skill-arrow {
    color: var(--accent);
    margin-right: 10px;
}

.experience-container {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.experience-card {
    position: relative;
    padding-left: 32px;
}

.exp-line {
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--border));
}

.exp-dot {
    position: absolute;
    left: 0;
    top: 8px;
    width: 13px;
    height: 13px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent);
}

.exp-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.3s;
}

.exp-content:hover {
    border-color: var(--border-light);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.exp-header h3 {
    font-size: 1.18rem;
}

.exp-header a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s;
}

.exp-header a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px var(--accent-glow);
}

.at {
    color: var(--text-dim);
    margin: 0 5px;
}

.exp-date {
    font-family: 'Fira Code', monospace;
    color: var(--text-dim);
    font-size: 0.83rem;
}

.exp-list {
    list-style: none;
    margin-bottom: 22px;
}

.exp-list li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.list-arrow {
    color: var(--accent);
    margin-right: 10px;
}

.exp-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--accent);
    padding: 10px 16px;
    background: var(--accent-dim);
    border-radius: 6px;
    width: fit-content;
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.4s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 30px var(--accent-glow);
}

.project-card.featured {
    border-color: rgba(0, 255, 136, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 255, 136, 0.02) 100%);
}

[data-theme="light"] .project-card.featured {
    border-color: rgba(0, 204, 106, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 204, 106, 0.03) 100%);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
}

.folder-icon {
    color: var(--accent);
}

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

.project-icon {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    padding: 4px;
}

.project-icon:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.featured-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.73rem;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 14px;
    color: var(--text-primary);
    transition: color 0.3s;
}

.project-card:hover h3 {
    color: var(--accent);
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 22px;
    flex: 1;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tech span {
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--text-dim);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

[data-theme="light"] .project-tech span {
    background: rgba(0, 0, 0, 0.05);
}

.more-projects {
    text-align: center;
    margin-top: 44px;
}

.contact {
    text-align: center;
    padding: 120px 6%;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: 1.9rem;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.contact-content > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 38px;
    line-height: 1.8;
}

.contact-alt {
    margin-top: 44px;
}

.contact-socials {
    margin-top: 14px;
    font-family: 'Fira Code', monospace;
    font-size: 0.92rem;
}

.contact-socials a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-socials a:hover {
    color: var(--accent);
}

.separator {
    color: var(--text-dim);
    margin: 0 14px;
}

footer {
    padding: 40px 6%;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.code-bracket {
    color: var(--text-dim);
}

.back-to-top {
    font-family: 'Fira Code', monospace;
    font-size: 0.83rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
        padding: 100px 6% 70px;
    }

    .hero-content {
        max-width: 100%;
    }

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

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

    .hero-terminal {
        max-width: 520px;
        margin: 0 auto;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    nav ul {
        display: none;
    }

    .theme-toggle {
        padding: 8px;
    }

    .nav-status {
        font-size: 0.72rem;
        padding: 6px 11px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }

    .exp-header {
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

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

    section {
        padding: 70px 5%;
    }

    .contact {
        padding: 90px 5%;
    }

    footer {
        padding: 34px 5%;
    }
}