/* ===== VARIABLES ===== */
:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --text: #334155;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow);
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-cv-btn:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text);
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139,92,246,0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(59,130,246,0.08) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-greeting {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #94a3b8;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.hero-subtitle i { margin-right: 0.35rem; color: var(--accent); }

.hero-contact {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    background: var(--accent);
    color: #fff;
}

.hero-btn:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.hero-btn-outline {
    background: transparent;
    border: 1.5px solid #334155;
    color: #cbd5e1;
}

.hero-btn-outline:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(59,130,246,0.1);
    box-shadow: 0 6px 20px rgba(59,130,246,0.15);
}

.hero-location {
    color: #475569;
    font-size: 0.9rem;
}

.hero-location i { margin-right: 0.35rem; }

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #475569;
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--accent);
    font-size: 1.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--accent), transparent);
    margin-left: 1rem;
}

/* ===== ABOUT ===== */
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.profile-summary {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.profile-summary strong { color: var(--text); }

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-alt);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
    transition: var(--transition);
}

.highlight-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.highlight-item i {
    color: var(--accent);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.35rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
    z-index: 1;
    transition: var(--transition);
}

.timeline-dot.active {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    background: #eff6ff;
    color: var(--accent);
    white-space: nowrap;
}

.badge-active {
    background: var(--accent);
    color: #fff;
}

.timeline-org {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.timeline-org i {
    margin-right: 0.35rem;
    color: var(--accent);
    font-size: 0.85rem;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.timeline-content li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
    color: var(--text-light);
}

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

.dissertation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-alt);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.dissertation i { color: var(--accent); margin-right: 0.35rem; }

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.skill-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.tag:hover {
    background: #eff6ff;
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== LANGUAGES ===== */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.lang-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lang-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.lang-level {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
}

.lang-bar {
    grid-column: 1 / -1;
    height: 6px;
    background: var(--bg-alt);
    border-radius: 50px;
    overflow: hidden;
}

.lang-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent), #8b5cf6);
    border-radius: 50px;
    transition: width 1.2s ease;
}

/* ===== REFERENCES ===== */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.ref-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.ref-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.ref-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
}

.ref-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.ref-role {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0.15rem;
}

.ref-org {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.ref-email {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background: #eff6ff;
    border-radius: 50px;
    color: var(--accent);
    transition: var(--transition);
}

.ref-email:hover {
    background: var(--accent);
    color: #fff;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: #94a3b8;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.footer-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-links a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.footer p {
    font-size: 0.82rem;
}

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        transition: var(--transition);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-toggle {
        display: block;
    }

    .nav-cv-btn {
        order: -1;
        margin-right: auto;
        margin-left: 0.5rem;
    }

    .nav-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero { padding-top: 5rem; }

    .hero-name { font-size: 2.2rem; }

    .timeline { padding-left: 1.5rem; }

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

    .section { padding: 3rem 0; }

    .skills-grid,
    .ref-grid,
    .lang-grid {
        grid-template-columns: 1fr;
    }
}
