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

html, body {
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000002;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 60%, rgba(0, 120, 255, 0.35) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Dotted Surface
   ============================================ */
#dotted-surface {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px 60px;
}

/* Progressive blur behind navbar — full blur at top, fading to none */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    bottom: -20px;
    z-index: -1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
    transition: opacity 0.4s ease;
}

.hamburger {
    display: none;
}

.mobile-menu {
    display: none;
}

.nav-logo {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    animation: nav-enter-logo 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes nav-enter-logo {
    to { opacity: 1; }
}

.nav-logo img {
    height: 48px;
    width: auto;
    display: block;
}

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

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 1000px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-20px);
    animation: nav-enter cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-link:nth-child(1) { animation-delay: 0.2s; animation-duration: 0.5s; }
.nav-link:nth-child(2) { animation-delay: 0.25s; animation-duration: 0.45s; }
.nav-link:nth-child(3) { animation-delay: 0.3s; animation-duration: 0.4s; }
.nav-link:nth-child(4) { animation-delay: 0.35s; animation-duration: 0.35s; }

@keyframes nav-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: #1180f9;
    background: rgba(17, 128, 249, 0.08);
}

/* Nav exit */
.nav-exiting .nav-link {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
}

.nav-exiting .nav-link:nth-child(4) { transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important; transition-delay: 0s !important; }
.nav-exiting .nav-link:nth-child(3) { transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important; transition-delay: 0.05s !important; }
.nav-exiting .nav-link:nth-child(2) { transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important; transition-delay: 0.1s !important; }
.nav-exiting .nav-link:nth-child(1) { transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important; transition-delay: 0.15s !important; }

/* ============================================
   About Layout
   ============================================ */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 100px 80px 60px;
    max-width: 1100px;
    margin: 0 auto;
    z-index: 1;
}

/* ============================================
   Hero Row — Photo + Bio
   ============================================ */
.about-hero {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    padding-top: 1rem;
}

.about-photo-wrapper {
    flex-shrink: 0;
    width: 300px;
}

.about-photo {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.about-intro {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.about-bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 1);
    text-align: left;
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-section-title {
    font-family: 'Gabarito', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* ============================================
   Skills & Tools
   ============================================ */
.skills-row {
    display: flex;
    gap: 48px;
}

.skills-row > .skills-group {
    flex: 1;
    min-width: 0;
}

.skills-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skills-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}

.skills-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pill {
    padding: 10px 20px;
    border-radius: 1000px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.skill-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

/* ============================================
   Education — side by side cards
   ============================================ */
.education-row {
    display: flex;
    gap: 1rem;
}

.education-card {
    flex: 1;
    min-width: 0;
    position: relative;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.education-degree {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
}

.education-school {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Experience — detailed cards
   ============================================ */
.exp-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exp-card {
    display: flex;
    gap: 32px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.exp-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.exp-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.exp-date {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exp-role {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.exp-company {
    font-size: 1.125rem;
    color: #0082FA;
    font-weight: 500;
}

.exp-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.exp-image {
    flex-shrink: 0;
    width: 160px;
    align-self: stretch;
    border-radius: 8px;
    overflow: hidden;
}

.exp-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ============================================
   Entrance Animations
   ============================================ */
.about-enter {
    opacity: 0;
    transform: translateY(24px);
    animation: about-fade-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0.3s) forwards;
}

@keyframes about-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Social Links — bottom right corner
   ============================================ */
.social-links {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
}

.social-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 1);
    font-size: 24px;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    opacity: 0;
    animation: social-enter cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.social-link:nth-child(1) { animation-delay: 0.4s; animation-duration: 1.0s; }
.social-link:nth-child(2) { animation-delay: 0.5s; animation-duration: 0.9s; }
.social-link:nth-child(3) { animation-delay: 0.6s; animation-duration: 0.8s; }

@keyframes social-enter {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.social-link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

/* Tooltip — appears to the left on hover */
.social-link::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-link:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}


/* ============================================
   Page Exit
   ============================================ */
.page-exit-active .about-layout,
.page-exit-active .social-links {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.page-exit-active #dotted-surface {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.page-exit-active .nav-logo {
    opacity: 0 !important;
    transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
    .navbar {
        padding: 16px 40px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 13px;
    }

    .about-layout {
        gap: 48px;
        padding: 90px 60px 40px;
    }

    .about-photo-wrapper {
        width: 260px;
    }
}

@media (max-width: 900px) {
    .navbar {
        padding: 12px 24px;
    }

    .nav-logo {
        left: 24px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 12px;
    }

    .nav-logo img {
        height: 40px;
    }

    .about-layout {
        gap: 32px;
        padding: 80px 24px 24px;
    }

    .about-hero {
        gap: 24px;
    }

    .social-links {
        bottom: 24px;
        right: 24px;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 2rem;
        z-index: 110;
    }

    .nav-logo {
        left: 16px;
    }

    .nav-links {
        display: none !important;
    }

    /* Hamburger button */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        padding: 8px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 110;
        opacity: 0;
        animation: nav-enter-logo 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .hamburger.is-open .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.is-open .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-open .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-logo img {
        height: 3rem;
    }

    /* Mobile menu overlay */
    .mobile-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        position: fixed;
        inset: 0;
        z-index: 105;
        background: rgba(0, 0, 2, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .mobile-menu.menu-open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-link {
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        font-size: 24px;
        color: #fff;
        text-decoration: none;
        padding: 1rem 3rem;
        border-radius: 1000px;
        transition: color 0.2s ease, background 0.2s ease;
        opacity: 0;
        transform: translateY(20px);
    }

    .mobile-menu.menu-open .mobile-menu-link {
        animation: nav-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .mobile-menu.menu-open .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }
    .mobile-menu.menu-open .mobile-menu-link:nth-child(2) { animation-delay: 0.15s; }
    .mobile-menu.menu-open .mobile-menu-link:nth-child(3) { animation-delay: 0.2s; }

    /* Close animation — links slide down + fade out, overlay fades simultaneously */
    .mobile-menu.menu-closing {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
    }

    .mobile-menu.menu-closing .mobile-menu-link {
        opacity: 1;
        transform: translateY(0);
        animation: menu-exit 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .mobile-menu.menu-closing .mobile-menu-link:nth-child(3) { animation-delay: 0s; }
    .mobile-menu.menu-closing .mobile-menu-link:nth-child(2) { animation-delay: 0.05s; }
    .mobile-menu.menu-closing .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }

    @keyframes menu-exit {
        from { opacity: 1; transform: translateY(0); }
        to { opacity: 0; transform: translateY(12px); }
    }

    .mobile-menu-link:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-menu-link.active {
        color: #1180f9;
        background: rgba(17, 128, 249, 0.08);
    }

    /* Nav exit — fade hamburger */
    .nav-exiting .hamburger {
        opacity: 0 !important;
        transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .social-links {
        bottom: 16px;
        right: 16px;
        gap: 8px;
    }

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .about-hero {
        flex-direction: column;
        align-items: center;
    }

    .education-row {
        flex-direction: column;
        gap: 16px;
    }

    .exp-description {
        display: none;
    }

    .exp-image {
        width: 80px;
    }

    .skills-row {
        flex-direction: column;
        gap: 24px;
    }

    .about-photo-wrapper {
        width: 100%;
    }

    .about-photo {
        border-radius: 8px;
    }

    .about-intro {
        text-align: center;
    }
}
