:root {
    --bg: #fafafa;
    --card: #ffffff;
    --text: #0a0a0a;
    --muted: #737373;
    --border: #e5e5e5;
    --accent: #0669a4;

    --radius: 14px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);

    --transition: all 0.25s ease;
    --font: 'Inter', sans-serif;

    --navbar-height: 56px;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════
   STICKY TOP BAR
   ═══════════════════════════════════════════════════════════════ */

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    display: grid;
    grid-template-columns: 150px 1fr 150px;
    align-items: center;

    padding: 0 1.5rem;
    height: var(--navbar-height);

    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);

    transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.top-bar.scrolled {
    height: 44px;
    background: rgba(250, 250, 250, 0.97);
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

/* ── Left slot ── */
.top-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* ── Centre slot ── */
.side-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.side-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 5px;
    border-radius: 6px;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease;
}

.side-nav a:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

.side-nav a.active {
    color: var(--text);
    font-weight: 800;
}

.side-nav a.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* ── Right slot ── */
.top-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.flags {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flag-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
}

.lang-flag {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lang-flag:hover {
    transform: scale(1.1);
}

.scroll-top-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-decoration: none;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, background 0.2s ease,
                color 0.2s ease, transform 0.2s ease,
                box-shadow 0.2s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: var(--text);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cta-mini {
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--text);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cta-mini:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}


/* ═══════════════════════════════════════════════════════════════
   HAMBURGER MENU (mobile)
   ═══════════════════════════════════════════════════════════════ */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.hamburger:hover {
    background: rgba(0,0,0,0.05);
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    z-index: 999;

    background: rgba(250, 250, 250, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);

    flex-direction: column;
    padding: 0.75rem 1.5rem 1rem;
    gap: 0.25rem;

    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease;
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--text);
}


/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.hero {
    text-align: center;
    padding: calc(var(--navbar-height) + 3rem) 1.5rem 4rem;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0,0,0,0.04), transparent 60%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.profile-img-wrapper {
    display: inline-block;
    border-radius: 50%;
    padding: 3px;
    margin-bottom: 1.8rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.profile-img-wrapper:hover {
    transform: scale(1.03);
}

.profile-img {
    width: 360px;
    height: 360px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 4px solid white;
    margin-bottom: 0;
    box-shadow: none;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--muted);
    margin-top: 0.6rem;
    font-size: 1.25rem;
    font-weight: 500;
}

.hero-text {
    max-width: 1000px;
    margin: 1.4rem auto 2rem;
    color: var(--accent);
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 700;
}

.cta-button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 999px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: none;
}

.cta-button:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 105, 164, 0.25);
}


/* ═══════════════════════════════════════════════════════════════
   MOBILE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .profile-img {
        width: 200px;
        height: 200px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-text {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .side-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    .top-bar {
        grid-template-columns: auto 1fr auto;
    }
}


/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.section {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    position: relative;

    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section:not(:last-child)::after {
    content: "";
    display: block;
    height: 1px;
    background: var(--border);
    margin-top: 2.5rem;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.section h3 {
    font-size: 1.2rem;
    color: var(--accent);
}

h4.capa {
    margin-left: 2rem;
    margin-bottom: 0.2rem;
}

.section p {
    color: var(--muted);
}


/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */

.portfolio-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.date {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
    margin-left: 0.3rem;
}


/* ═══════════════════════════════════════════════════════════════
   TIMELINE (Experience & Education)
   ═══════════════════════════════════════════════════════════════ */

.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 0.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.95rem;
    top: 1.6rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--card);
    border: 2.5px solid var(--accent);
    box-shadow: 0 0 0 3px var(--bg);
    transition: background 0.2s ease;
}

.timeline-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.timeline-item:hover::before {
    background: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════════ */

.testimonial {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.testimonial::before {
    content: "\201C";
    position: absolute;
    top: 0.2rem;
    right: 1.2rem;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.1;
    font-family: Georgia, serif;
    pointer-events: none;
}

.testimonial:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}


/* ═══════════════════════════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════════════════════════ */

.skills-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skills-list li {
    background: #f1f5f9;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #334155;
    cursor: default;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.skills-list li:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER (merged contact + footer)
   ═══════════════════════════════════════════════════════════════ */

footer {
    position: relative;
    background: #0f0f0f;
    color: rgba(255,255,255,0.55);
    text-align: center;
    padding: 4rem 2rem 2.5rem;
    margin-top: 1rem;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), #a8d4f0, transparent);
}

footer h2 {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.8rem;
    letter-spacing: -0.3px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.copy-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.copy-btn:hover {
    color: white;
    transform: translateY(-1px);
}

.copy-btn::after {
    content: " ⧉";
    font-size: 0.8rem;
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

.copy-btn:hover::after {
    opacity: 1;
}

.footer-linkedin {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-linkedin:hover {
    color: white;
    border-color: white;
}

.footer-availability {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.25);
    margin: 0;
}

.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--text);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ═══════════════════════════════════════════════════════════════
   ACCORDION
   ═══════════════════════════════════════════════════════════════ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-btn {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    background: var(--text);
    color: white;
    transform: translateY(-1px);
}

.section-content {
    overflow: hidden;
    height: 0;
    transition: height 0.4s ease;
}


/* ═══════════════════════════════════════════════════════════════
   PERSONAL CAROUSEL
   ═══════════════════════════════════════════════════════════════ */

.carousel-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 2rem 0;
}

.carousel {
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    position: relative;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.carousel-img.active {
    display: block;
    animation: fadeZoom 0.8s ease;
}

@keyframes fadeZoom {
    from { opacity: 0; transform: scale(1.1); }
    to   { opacity: 1; transform: scale(1); }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(6px);
    padding: 0.6rem 1rem;
    border-radius: 50%;
    cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

.personal-content {
    margin-top: 1rem;
    text-align: left;
    width: 100%;
}

.personal-content ul {
    margin-top: 0.5rem;
    padding-left: 18px;
}

.personal-content li {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeSlideIn 1s ease forwards;
}

@keyframes fadeSlideIn {
    to { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO CAROUSEL
   ═══════════════════════════════════════════════════════════════ */

.portfolio-carousel-wrapper {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.portfolio-carousel {
    position: relative;
    min-height: 230px;
}

.portfolio-slide {
    display: none;
    width: 100%;
}

.portfolio-slide.active {
    display: block;
    animation: fadeSlide 0.4s ease;
}

.portfolio-slide .portfolio-item {
    min-height: 230px;
    padding: 1.8rem 2rem;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--radius);
}

.portfolio-slide .portfolio-item p {
    max-width: 88%;
    margin: 0 auto;
}

.portfolio-carousel .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.portfolio-carousel .prev { left: -70px; }
.portfolio-carousel .next { right: -70px; }

.portfolio-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.portfolio-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.25s ease;
}

.portfolio-dot.active {
    background: var(--text);
    transform: scale(1.15);
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — 900px
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .portfolio-carousel-wrapper {
        max-width: 100%;
        padding: 0;
    }

    .portfolio-carousel {
        min-height: unset;
    }

    .portfolio-carousel .carousel-btn {
        width: 36px;
        height: 36px;
        top: 4.5rem;
        transform: none;
    }

    .portfolio-carousel .prev {
        left: 6px;
    }

    .portfolio-carousel .next {
        right: 6px;
    }

    .portfolio-slide .portfolio-item {
        min-height: unset;
        padding: 1.5rem 3.2rem;
        justify-content: flex-start;
    }

    .carousel {
        height: 280px;
    }

    .carousel-btn {
        top: 50%;
        transform: translateY(-50%);
        padding: 0.4rem 0.7rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   LOCATION / FLAGS (inline, inside cards)
   ═══════════════════════════════════════════════════════════════ */

.flag-icon {
    width: 16px;
    height: 16px;
    object-fit: cover;
    vertical-align: middle;
}

.location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* ═══════════════════════════════════════════════════════════════
   CONCEPT ICONS (portfolio cards)
   ═══════════════════════════════════════════════════════════════ */

.concept-icon {
    width: 72px;
    height: 72px;
    object-fit: cover;
    display: block;
    margin: 0 auto 1rem auto;
}


/* ═══════════════════════════════════════════════════════════════
   MUSIC PLAYER
   ═══════════════════════════════════════════════════════════════ */

.music-player {
    margin-top: 1rem;
    text-align: center;
}

.music-player audio {
    width: 100%;
    max-width: 320px;
}