@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Unbounded:wght@400;700;800;900&display=swap');

:root {
    --bg-primary: #f7f8fc;
    --bg-secondary: #eef0f7;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --border-glass: rgba(100, 116, 160, 0.18);
    --accent-primary: #4f46e5;
    --accent-secondary: #0ea5e9;
    --accent-tertiary: #10b981;
    --accent-warning: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-soft: 0 8px 32px rgba(79, 70, 229, 0.08);
    --shadow-hover: 0 20px 48px rgba(79, 70, 229, 0.14);

    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s ease;
}

* { box-sizing: border-box; padding: 0; margin: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 15% 30%, rgba(79, 70, 229, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(14, 165, 233, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
    animation: meshFloat 20s ease-in-out infinite alternate;
    filter: blur(60px);
}

@keyframes meshFloat {
    0%   { transform: scale(1) translate(0, 0); }
    50%  { transform: scale(1.08) translate(1.5%, -1.5%); }
    100% { transform: scale(1) translate(-1.5%, 1.5%); }
}

h1, h2, h3 { font-family: var(--font-display); }

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.08;
    color: var(--text-primary);
}

h1 .accent-word {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 { font-size: 2rem; font-weight: 800; letter-spacing: -1px; }
h3 { font-size: 1.3rem; font-weight: 700; }

.mono {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    letter-spacing: -0.5px;
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-fast);
}

.glass-panel:hover {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    padding: 16px 32px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
    text-transform: uppercase;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 36px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    box-shadow: none;
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(79, 70, 229, 0.06);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.site-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.2rem 2rem;
    transition: var(--transition-fast);
    background: transparent;
}

.site-nav.scrolled {
    padding: 0.7rem 2rem;
    background: rgba(247, 248, 252, 0.82);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-primary);
    text-decoration: none;
    letter-spacing: -1px;
}

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

.nav-links a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--accent-primary); }
.nav-links a:hover::after { width: 100%; }

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

.nav-hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-left: 0.5rem;
}

.lang-switcher:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(79, 70, 229, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.lang-switcher .lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-switcher .lang-label {
    text-transform: uppercase;
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: rgba(247, 248, 252, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 99;
    padding: 6rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border-glass);
}

.mobile-drawer.open { right: 0; }

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.2);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open { opacity: 1; }

.mobile-drawer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-drawer a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.mobile-drawer a:hover { color: var(--accent-primary); }

.hero-section {
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 6rem;
}

.hero-identity { display: flex; flex-direction: column; gap: 1.5rem; }

.profile-pic-wrapper {
    position: relative;
    width: 188px;
    height: 188px;
    margin-bottom: 0.5rem;
}

.profile-pic-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-glass);
    box-shadow: var(--shadow-soft);
    background: var(--bg-glass);
    transition: var(--transition-smooth);
}

.profile-pic-wrapper:hover .profile-pic-container {
    transform: scale(1.04) rotate(2deg);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-status-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.profile-pic-wrapper:hover .profile-status-badge {
    transform: scale(1.1);
    color: var(--accent-primary);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.15);
}

.profile-status-badge svg {
    width: 18px;
    height: 18px;
}

.hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    display: inline-block;
    width: fit-content;
    align-self: flex-start;
    border-right: 2px solid var(--accent-primary);
    padding-right: 4px;
}

.hero-subtitle.typing-idle {
    animation: typewriterBlink 0.75s step-end infinite;
}

@keyframes typewriterBlink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-primary); }
}

.hero-subtitle.typing-finished {
    border-right-color: transparent;
    animation: none;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 500px;
}

.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }

.social-links { display: flex; gap: 1rem; margin-top: 0.5rem; }

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-links a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}

.social-links svg { width: 20px; height: 20px; fill: currentColor; }

.hero-context { display: flex; flex-direction: column; gap: 2rem; }
.hero-context .glass-panel { padding: 2.5rem; }

.tech-stack-grid { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 1rem; }
.tech-category { display: flex; flex-direction: column; gap: 0.5rem; }

.tech-category-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.tech-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tech-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tech-badge:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(79, 70, 229, 0.06);
}

.tech-badge.cat-ai:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    background: rgba(14, 165, 233, 0.06);
}

.tech-badge.cat-infra:hover {
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
    background: rgba(16, 185, 129, 0.06);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
    z-index: 1;
}

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

.section-divider {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
    background: var(--bg-glass);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 24px 56px rgba(79, 70, 229, 0.12);
}

.project-card__image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.project-card__image-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-card__status {
    position: absolute;
    top: 1rem; right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card__status--live { background: var(--accent-tertiary); color: #fff; }
.project-card__status--beta { background: var(--accent-primary); color: #fff; }
.project-card__status--coming-soon { background: var(--accent-warning); color: #fff; }

.project-card__body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.project-card__title { font-size: 1.4rem; }
.project-card__tagline { font-size: 0.8rem; line-height: 1.5; }

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

.project-card__stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.project-card__footer {
    padding: 1.2rem 1.8rem;
    border-top: 1px solid rgba(100, 116, 160, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-card__cta {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

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

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), transparent);
    border-radius: 2px;
}

.timeline-entry {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 2rem;
}

.timeline-entry::before {
    content: "";
    position: absolute;
    left: calc(-3rem - 5px);
    top: 2.5rem;
    width: 12px; height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.timeline-period { font-size: 0.8rem; margin-bottom: 0.5rem; display: inline-block; }
.timeline-role { margin-bottom: 0.3rem; }
.timeline-company { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }

.timeline-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.timeline-highlights li {
    position: relative;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.timeline-highlights li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.contact-section h2 { margin-bottom: 1rem; }

.contact-section .section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-email { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); margin-top: 1.5rem; }

.contact-email a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.contact-socials { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }

.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-glass);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }

@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding: 7rem 2rem 4rem;
        gap: 3rem;
        min-height: auto;
    }
    h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .mobile-drawer { display: block; }
    .mobile-drawer-overlay { display: block; pointer-events: none; }
    .mobile-drawer-overlay.open { pointer-events: all; }
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .hero-section { padding: 6rem 1.2rem 3rem; gap: 2rem; }
    .hero-context .glass-panel { padding: 1.5rem; }
    .section-container { padding: 4rem 1.2rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card__body { padding: 1.2rem; }
    .project-card__footer { padding: 1rem 1.2rem; }
    .timeline { padding-left: 2rem; }
    .timeline-entry { padding: 1.5rem; }
    .timeline-entry::before { left: calc(-2rem - 5px); }
    .btn { padding: 14px 24px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #particles-canvas { display: none; }
    .reveal { opacity: 1; transform: none; }
}
