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

:root {
    --bg: #0a0a0f;
    --bg-light: #12121a;
    --bg-card: #16161f;
    --accent: #00d4ff;
    --accent-2: #7b2fff;
    --accent-glow: rgba(0, 212, 255, 0.15);
    --text: #e8e8f0;
    --text-muted: #6b6b80;
    --text-dim: #3a3a50;
    --border: rgba(255, 255, 255, 0.06);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ===== PARTICLES CANVAS ===== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 40px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
    padding: 12px 40px;
    background: rgba(10, 10, 15, 0.95);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 3px;
}

.logo-icon {
    color: var(--accent);
    font-size: 1.4rem;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px var(--accent-glow); }
    50% { text-shadow: 0 0 25px var(--accent), 0 0 50px var(--accent-glow); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    margin-left: auto;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
}

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

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

.nav-links a:hover::after {
    width: 100%;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    display: flex;
    gap: 4px;
}

.lang-btn {
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 5px 10px;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.lang-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
}

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

.hero-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 5px;
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 8px 24px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hero-title {
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: 8px;
}

.title-line.accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line.small {
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: 16px;
    color: var(--text-muted);
    margin-top: 8px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

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

.btn-ghost:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

.hero-scroll-indicator span {
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: var(--text-dim);
    font-family: var(--font-display);
}

/* ===== SECTIONS COMMON ===== */
.section-header {
    margin-bottom: 64px;
}

.section-tag {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--accent);
    display: block;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 2px;
}

/* ===== ABOUT ===== */
.about {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

.about-lead {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text);
}

.about-text p:last-child {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 8px 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: var(--bg-light);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-2px);
}

/* ===== PROJECTS ===== */
.projects {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    background: var(--bg-light);
}

.project-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.project-card:last-child {
    margin-bottom: 0;
}

.project-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.05);
}

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

.project-card.reverse .project-image {
    order: 2;
}

.project-card.reverse .project-info {
    order: 1;
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Placeholder styling when image doesn't load */
.project-image img[src$=".jpg"] {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    min-height: 100%;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}

.project-status {
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 3px;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
}

.project-status.concept {
    background: rgba(123, 47, 255, 0.15);
    color: var(--accent-2);
    border-color: rgba(123, 47, 255, 0.3);
}

.project-status.prototype {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.3);
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.project-tags span:not(:last-child)::after {
    content: ' /';
    margin-left: 8px;
    color: var(--text-dim);
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-title-link {
    background: linear-gradient(135deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.project-title-link:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.65rem;
    letter-spacing: 2px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.project-meta {
    display: flex;
    gap: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.meta-item svg {
    color: var(--accent);
    opacity: 0.6;
}

/* ===== CONTACT ===== */
.contact {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    text-align: center;
}

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

.contact-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 300;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 48px;
    position: relative;
    transition: text-shadow 0.3s ease;
}

.contact-email:hover {
    text-shadow: 0 0 30px var(--accent-glow);
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-email:hover::after {
    transform: scaleX(1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.15);
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

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

.footer-logo {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: var(--text-dim);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.about-stats .stat-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-stats.visible .stat-card:nth-child(1) { transition-delay: 0.1s; }
.about-stats.visible .stat-card:nth-child(2) { transition-delay: 0.2s; }
.about-stats.visible .stat-card:nth-child(3) { transition-delay: 0.3s; }

.about-stats.visible .stat-card {
    opacity: 1;
    transform: translateY(0);
}

.skills-row .skill-tag {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.skills-row.visible .skill-tag {
    opacity: 1;
    transform: translateY(0);
}

.skills-row.visible .skill-tag:nth-child(1) { transition-delay: 0.05s; }
.skills-row.visible .skill-tag:nth-child(2) { transition-delay: 0.1s; }
.skills-row.visible .skill-tag:nth-child(3) { transition-delay: 0.15s; }
.skills-row.visible .skill-tag:nth-child(4) { transition-delay: 0.2s; }
.skills-row.visible .skill-tag:nth-child(5) { transition-delay: 0.25s; }
.skills-row.visible .skill-tag:nth-child(6) { transition-delay: 0.3s; }
.skills-row.visible .skill-tag:nth-child(7) { transition-delay: 0.35s; }
.skills-row.visible .skill-tag:nth-child(8) { transition-delay: 0.4s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .project-card.reverse .project-image {
        order: 0;
    }

    .project-card.reverse .project-info {
        order: 0;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 16px 20px;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

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

    .lang-switcher {
        order: 3;
        margin-left: 0;
    }

    .lang-btn {
        padding: 4px 7px;
        font-size: 0.55rem;
    }

    .nav-burger {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .project-card {
        padding: 16px;
        gap: 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
