:root {
    --transition-speed: 0.3s;
    --glass-bg-dark: rgba(255, 255, 255, 0.04);
    --glass-border-dark: rgba(255, 255, 255, 0.08);
    --glass-bg-light: rgba(255, 255, 255, 0.7);
    --glass-border-light: rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

main { flex: 1; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    transition: background-color var(--transition-speed);
}

.nav-link {
    font-weight: 500;
    transition: color var(--transition-speed);
    position: relative;
}

.nav-link.active {
    color: var(--bs-primary) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--bs-primary);
    border-radius: 1px;
}

#langIcon {
    font-size: 1.3rem;
    line-height: 1;
    display: inline-block;
}

/* ── Glassmorphism ───────────────────────────────────────── */
.glass-card {
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border-light);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-bs-theme="dark"] .glass-card {
    background: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
}

/* ── Section Headers ─────────────────────────────────────── */
.section-header {
    font-weight: 700;
    letter-spacing: -0.01em;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(var(--bs-primary-rgb), 0.2);
    display: inline-block;
}

/* ── WhatsApp Button ─────────────────────────────────────── */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: white;
}

/* ── Animations ──────────────────────────────────────────── */
.fade-in {
    animation: fadeInUp 0.45s ease forwards;
}

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

/* ── Hero ────────────────────────────────────────────────── */
.min-vh-75 { min-height: 75vh; }

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.social-links { gap: 1rem; }

.social-link {
    font-size: 1.6rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.social-link:hover {
    color: var(--bs-primary);
    transform: translateY(-2px);
}

/* ── Project Cards ───────────────────────────────────────── */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

.img-placeholder {
    aspect-ratio: 16 / 9;
    background: rgba(var(--bs-primary-rgb), 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    font-size: 2.5rem;
    border-bottom: 1px solid var(--glass-border-light);
}

[data-bs-theme="dark"] .img-placeholder {
    border-bottom-color: var(--glass-border-dark);
}

/* ── Tech Stack ──────────────────────────────────────────── */
.stack-card {
    border: 1px solid transparent;
    transition: transform 0.25s ease, border-color 0.25s;
    cursor: default;
}

.stack-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
}

.stack-icon {
    font-size: 2rem;
    display: block;
}

.stack-name {
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 1.75rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 1px;
}

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

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -1.4rem;
    top: 0.9rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bs-body-bg);
    box-shadow: 0 0 0 2px currentColor;
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-card {
    transition: transform 0.25s ease, box-shadow 0.25s;
}

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

.contact-icon { font-size: 2.2rem; }

/* ── CV Section ──────────────────────────────────────────── */
.cv-preview-container {
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.35s;
}

.cv-preview-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

#cv-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

#cv-modal.active {
    opacity: 1;
    visibility: visible;
}

.cv-modal-inner {
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(24px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cv-modal.active .cv-modal-inner {
    transform: translateY(0) scale(1);
}

/* ── Login Toast ─────────────────────────────────────────── */
.toast-container { z-index: 11000; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav-link.active::after { display: none; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2rem; }

    .hero-profile-img {
        width: 200px !important;
        height: 200px !important;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }

    .hero-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem !important;
    }

    .stack-icon { font-size: 1.6rem; }
}

/* CV drop zones */
.border-dashed { border-style: dashed !important; }

.cv-drop-zone,
[id^="drop-"], [id^="mdrop-"] {
    transition: background-color 0.15s, border-color 0.15s;
}

@media (max-width: 375px) {
    .hero-title    { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem !important; }
    .lead          { font-size: 0.9rem; }

    .hero-profile-img {
        width: 160px !important;
        height: 160px !important;
    }

    .navbar-brand   { font-size: 1rem; }
    .navbar-toggler { padding: 0.25rem 0.5rem; }

    footer { font-size: 0.8rem; }
}
