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

:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.8);
    --primary: #00ff88;
    --primary-dim: rgba(0, 255, 136, 0.1);
    --secondary: #00d4ff;
    --accent: #ff0080;
    --text: #e4e4e7;
    --text-dim: #71717a;
    --border: rgba(255, 255, 255, 0.08);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grid Background */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
}

.gradient-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(0, 255, 136, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Scan Line Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
    animation: scan 8s linear infinite;
    z-index: 100;
    pointer-events: none;
}

@keyframes scan {
    0% { top: -2px; }
    100% { top: 100%; }
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 0;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-dim);
    border: 1px solid var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.lang-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    background: transparent;
    color: var(--text-dim);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--text);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    width: 100%;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-dim);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.greeting {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.name {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.name span {
    color: var(--text-dim);
    font-weight: 400;
}

.title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.title-highlight {
    color: var(--secondary);
    font-weight: 600;
}

.bio {
    max-width: 600px;
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.location svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    transition: all 0.2s;
}

.tech-tag:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--primary);
}

/* CTA Buttons */
.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

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

.btn-primary:hover {
    background: #00cc6e;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

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

.btn-secondary:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.05);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* Stats Section */
.stats {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Projects Preview */
.projects-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.section-link:hover {
    color: var(--primary);
}

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

.project-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.project-icon {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.contact-card:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-weight: 500;
}

/* Footer */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 100px;
    }

    .cta-group {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .lang-switcher {
        order: -1;
    }
}

/* ===================== */
/* LIGHT MODE THEME      */
/* ===================== */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-secondary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --primary: #059669;
    --primary-dim: rgba(5, 150, 105, 0.1);
    --secondary: #0284c7;
    --accent: #db2777;
    --text: #1e293b;
    --text-dim: #64748b;
    --border: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .grid-bg {
    background-image:
        linear-gradient(rgba(5, 150, 105, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(5, 150, 105, 0.05) 1px, transparent 1px);
}

[data-theme="light"] .gradient-overlay {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(5, 150, 105, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(2, 132, 199, 0.08) 0%, transparent 50%);
}

[data-theme="light"] .scanline {
    opacity: 0.15;
}

[data-theme="light"] header {
    background: rgba(248, 250, 252, 0.9);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text);
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

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

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

/* ===================== */
/* TYPING EFFECT         */
/* ===================== */
.typing-text {
    display: inline;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

/* ===================== */
/* SCROLL ANIMATIONS     */
/* ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===================== */
/* DOWNLOAD CV BUTTON    */
/* ===================== */
.btn-download {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-download:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(219, 39, 119, 0.05);
}

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 100px;
    }

    .cta-group {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .lang-switcher {
        order: -1;
    }

    .header-right {
        gap: 0.75rem;
    }
}

/* ===================== */
/* CV UNAVAILABLE STATE  */
/* ===================== */
.btn-download.cv-unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    border-style: dashed;
}

.btn-download.cv-unavailable:hover {
    border-color: var(--text-dim);
    color: var(--text-dim);
    background: transparent;
    transform: none;
}

/* ===================== */
/* TOAST NOTIFICATION    */
/* ===================== */
.toast-message {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .toast-message {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
