:root {
    --bg: #ffffff;
    --text: #111;
    --light: #f5f5f7;
    --accent: #111;
    --accent2: #2563eb;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 16px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ─── NAV ─────────────────────────────────────────── */
.nav {
    position: fixed;
    width: 100%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

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

.logo {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 6px 12px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--light);
}

.flag-btn {
    margin-left: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    line-height: 1;
}

.flag-btn:hover {
    background: var(--light);
    transform: scale(1.05);
}

/* ─── HERO ─────────────────────────────────────────── */
.hero {
    padding: 160px 24px 100px;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.hero-content {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 80px;
    flex-wrap: wrap;
}

.photo-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.photo-frame {
    width: 220px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.photo-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.photo-frame:hover {
    transform: translateY(-10px) scale(1.01);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    flex: 2;
    min-width: 300px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: var(--accent2);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 52px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--text), transparent);
    margin: 22px 0;
    border-radius: 2px;
}

.role {
    font-size: 19px;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.5;
}

.contact-hero {
    margin-top: 28px;
    font-size: 14px;
    line-height: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-hero p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-icon {
    font-size: 15px;
    opacity: 0.6;
    width: 20px;
}

.contact-hero a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.contact-hero a:hover {
    border-bottom-color: var(--text);
}

.hero-buttons {
    margin-top: 34px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--text);
    color: #fff;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-secondary {
    border: 1.5px solid var(--border);
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s;
}

.btn-secondary:hover {
    background: var(--light);
    transform: translateY(-1px);
}

/* ─── STATS BAR ─────────────────────────────────────── */
.stats-bar {
    background: var(--text);
    color: #fff;
    padding: 36px 24px;
}

.stats-grid {
    max-width: 900px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    text-align: center;
}

.stat-item .number {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-item .label {
    font-size: 13px;
    opacity: 0.55;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.03em;
}

/* ─── SECTIONS ───────────────────────────────────────── */
.section {
    padding: 110px 24px;
}

.section-header {
    max-width: 800px;
    margin: 0 auto 80px;
}

.section-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 12px;
}

.section h2 {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-sub {
    margin-top: 12px;
    color: var(--muted);
    font-size: 16px;
}

.light {
    background: var(--light);
}

.narrow {
    max-width: 800px;
    margin: auto;
}

.center {
    text-align: center;
}

/* ─── PROFILE ───────────────────────────────────────── */
#profile .narrow > p {
    font-size: 17px;
    line-height: 1.85;
    color: #333;
    margin-bottom: 20px;
}

/* ─── SKILLS ─────────────────────────────────────────── */
.skills-grid {
    max-width: 900px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.skill-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.skill-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

.skill-card-icon {
    font-size: 28px;
    margin-bottom: 14px;
    display: block;
}

.skill-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    font-size: 12px;
    background: var(--light);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
}

/* ─── EXPERIENCE ─────────────────────────────────────── */
.experience-timeline {
    max-width: 800px;
    margin: auto;
    position: relative;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.experience-item {
    padding-left: 36px;
    padding-bottom: 56px;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    width: 11px;
    height: 11px;
    background: var(--text);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--text);
}

.experience-item:last-child {
    padding-bottom: 0;
}

.exp-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exp-date {
    font-size: 12px;
    font-weight: 600;
    background: var(--light);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.experience-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.experience-item .company {
    font-size: 14px;
    color: var(--accent2);
    font-weight: 500;
    margin-bottom: 10px;
}

.experience-item p {
    font-size: 15px;
    color: #444;
    line-height: 1.75;
    max-width: 640px;
}

.exp-bullets {
    margin-top: 12px;
    padding-left: 18px;
}

.exp-bullets li {
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ─── EDUCATION ─────────────────────────────────────── */
.education-grid {
    max-width: 900px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.edu-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.edu-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.07);
    transform: translateY(-3px);
}

.edu-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.edu-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.edu-card .institution {
    font-size: 14px;
    color: var(--accent2);
    font-weight: 500;
    margin-bottom: 4px;
}

.edu-card .year {
    font-size: 13px;
    color: var(--muted);
}

/* ─── PROJECTS ───────────────────────────────────────── */
.projects-grid {
    max-width: 900px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.project-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--text), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.project-card .proj-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent2);
    margin-bottom: 12px;
}

.project-card h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.project-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

.project-meta {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-meta span {
    font-size: 11px;
    background: var(--light);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 500;
}

/* ─── CONTACT ───────────────────────────────────────── */
.contact-section {
    background: #0f0f0f;
    color: #fff;
    text-align: center;
    padding: 110px 24px;
}

.contact-section h2 {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: #fff;
}

.contact-section .sub {
    font-size: 17px;
    opacity: 0.5;
    margin-bottom: 48px;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s;
    background: rgba(255,255,255,0.04);
}

.contact-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

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

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

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

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger.active > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.stagger.active > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.stagger.active > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.stagger.active > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.stagger.active > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }
.stagger.active > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.5s; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }
    .hero h1 { font-size: 32px; }
    .divider { margin: 16px auto; }
    .hero-buttons { justify-content: center; }
    .contact-hero { align-items: center; }
    .section h2 { font-size: 26px; }
    .contact-section h2 { font-size: 28px; }
    .nav-links a { display: none; }

    /* Circular avatar on mobile */
    .photo-frame {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }

    .photo-frame:hover {
        transform: none;
    }
}
