/* Ramboia Variable Font */
@font-face {
    font-family: 'Ramboia';
    src: url('ramboia-font-family/RamboiaTestVF.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ramboia';
    src: url('ramboia-font-family/RamboiaTestVF-Italic.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --font-primary: 'Ramboia', serif;
    --color-bg: #cde8ca;
    --color-text: #1a1a1a;
    --color-accent: #000000;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.5s ease;
}

main {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    text-align: center;
    position: relative;
    /* Ensure main container allows absolute positioning of children relative to it if needed */
}

/* Profile Picture Styling */
.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    /* Space between pic and name */
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 55;
    /* Higher than name */
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Name Title Styling */
.name {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    margin-bottom: 4rem;
    line-height: 1;
    color: var(--color-text);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    z-index: 50;
    position: relative;
    width: 100%;
}

/* State: Section Active - Move Name to Top Left */
body.section-active .name {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    right: auto;
    font-size: 1.5rem;
    margin-bottom: 0;
    cursor: pointer;
    text-align: left;
    opacity: 0.9;
    width: auto;
    transform: none;
}

/* State: Section Active - Move Profile Pic to Top Right */
body.section-active .profile-pic {
    position: fixed;
    top: 1rem;
    right: 2rem;
    left: auto;
    width: 50px;
    height: 50px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    cursor: pointer;
    box-shadow: none;
    transform: none;
    z-index: 60;
}

body.section-active .name:hover,
body.section-active .profile-pic:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Info Grid Styling */
.info-grid {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    gap: 2rem;
    flex-wrap: wrap;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: translateX(0);
}

/* State: Hidden Home Content (Slide Out Left) */
.hidden {
    opacity: 0;
    transform: translateX(-100px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.info-item {
    flex: 1;
    min-width: 200px;
}

.label {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.info-item p,
.contact-link {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text);
    text-decoration: none;
}

.social-row {
    margin-top: 0.5rem;
    font-size: 1rem;
}

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

.social-row a:hover {
    border-bottom-color: var(--color-text);
}

.contact-link {
    display: inline-block;
    transition: transform 0.2s ease;
    border-bottom: 1px solid transparent;
}

.contact-link:hover {
    border-bottom-color: var(--color-text);
    opacity: 0.8;
}

/* Scramble Text */
.scramble-text {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Navigation */
.side-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
}

.nav-item {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.0);
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text);
    stroke-width: 1.5px;
}

.tooltip {
    position: absolute;
    right: 60px;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(10px);
    white-space: nowrap;
    font-family: var(--font-primary);
}

.nav-item:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Sections Container */
.sections-container {
    /* No fixed size needed here */
}

/* Content Section Layout */
.content-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 40;
    /* Below nav, above bg */

    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;

    /* Layout for content */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Initial state for slide-in */
    transform: translateX(50px);
}

.content-section.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.section-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1200px;
    padding: 6rem 2rem 2rem 2rem;
    /* Top padding for header space */
    height: 100%;
    gap: 4rem;
}

.section-title {
    flex: 0 0 200px;
    /* Fixed width for title on left */
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 300;
    /* Lighter weight as requested */
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-align: left;
    /* Make sticky if list is long */
    position: sticky;
    top: 6rem;
    height: fit-content;
    white-space: nowrap;
}

.section-content {
    flex: 1;
    text-align: left;
    overflow-y: auto;
    /* Allow scrolling for content */
    padding-right: 1rem;
    /* Hide scrollbar visually but allow scroll */
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 4rem;
    /* Bottom spacing */
    display: flex;
    flex-direction: column;
    gap: 3rem;
    /* Spacing between resume items */
}

.section-content::-webkit-scrollbar {
    display: none;
}

/* Resume Item Styling */
.resume-item h3 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.resume-item p {
    font-size: 1.15rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.resume-item .year,
.resume-item .tag {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.6;
    margin-left: 0.5rem;
}

.resume-item .role {
    font-style: italic;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.resume-item .links a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

/* Responsive */
@media (max-width: 900px) {
    .section-layout {
        flex-direction: column;
        padding-top: 5rem;
        gap: 2rem;
    }

    .section-title {
        font-size: 2rem;
        position: relative;
        top: 0;
        margin-bottom: 0;
        flex: none;
        /* Auto height */
    }

    .section-content {
        overflow-y: visible;
        height: auto;
    }

    .content-section {
        overflow-y: auto;
        /* Scroll whole section on mobile */
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .name {
        font-size: 15vw;
    }

    .info-grid {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .info-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 1rem;
        width: 100%;
        text-align: center;
    }

    .info-item:last-child {
        border-bottom: none;
    }

    /* When section active on mobile */
    body.section-active .name {
        left: 1.5rem;
        top: 1.5rem;
    }

    .side-nav {
        right: 1rem;
    }
}