/* ===== CSS VARIABLES: EARTH TONE PALETTE ===== */
:root {
    --bg-primary: #faf8f6;
    --bg-secondary: #f5f2f0;
    --text-dark: #2b241f;
    --text-muted: #4f463f;

    --accent-primary: #c4a582;
    --accent-light: #dcc9b6;
    --accent-dark: #8b7355;

    --card-bg: #fffdfb;
    --border-color: #d9c7b5;

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== LAYOUT STRUCTURE ===== */
.layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 100vh;
    gap: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2.5rem;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-avatar {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
}

.sidebar-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.sidebar-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.sidebar-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar-nav {
    flex: 1;
    min-width: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--text-dark);
    background-color: rgba(196, 165, 130, 0.08);
}

.nav-item.active {
    color: var(--accent-primary);
    background-color: rgba(196, 165, 130, 0.12);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

/* ===== SCROLL PROGRESS INDICATOR ===== */
.scroll-progress {
    height: 2px;
    background-color: var(--border-color);
    border-radius: 1px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-primary);
    width: 0%;
    transition: width 0.1s ease-out;
    border-radius: 1px;
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-footer {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-download {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-download:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-email {
    background-color: transparent;
    color: var(--accent-primary);
    border: 1.5px solid var(--accent-primary);
}

.btn-email:hover {
    background-color: rgba(196, 165, 130, 0.06);
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    overflow-y: auto;
    padding: 3rem 2.5rem;
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 4rem;
    scroll-margin-top: 80px;
    animation: fadeInUp 0.6s ease forwards;
}

.section-content {
    padding: 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-primary);
}

.section-intro {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 680px;
}

/* ===== ABOUT SECTION ===== */
.about-intro {
    margin-bottom: 2.5rem;
}

.about-intro > p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.highlight-card {
    background-color: var(--card-bg);
    padding: 1.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.highlight-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.highlight-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.highlight-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== EDUCATION & PLATFORMS SUBSECTIONS ===== */
.education-subsection,
.platforms-subsection {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.subsection-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.subsection-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.education-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.education-school {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.platforms-role {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.8rem;
}

.platforms-list {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-weight: 500;
    line-height: 1.6;
}

.platforms-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.platform-list-items {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.platform-list-items li {
    color: var(--text-muted);
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.6;
}

.platform-list-items li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.experience-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.experience-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.experience-header {
    margin-bottom: 1rem;
}

.job-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.company {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.duration {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.description,
.platform-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    line-height: 1.75;
}

.role-scope {
    font-size: 0.92rem;
    color: var(--text-dark);
    margin: 0.4rem 0 1rem 0;
    line-height: 1.7;
}

.role-scope strong {
    color: var(--text-dark);
    font-weight: 700;
    margin-right: 0.3rem;
}

.contributions {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contributions li {
    font-size: 0.92rem;
    color: var(--text-muted);
    padding-left: 1.8rem;
    position: relative;
    line-height: 1.7;
}

.contributions li::before {
    content: "▸";
    position: absolute;
    left: 0.6rem;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ===== CONSOLIDATED EXPERIENCE / ACCORDION ===== */
.consolidated-platforms-card .platforms-built {
    margin-top: 1.8rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-color);
}

.consolidated-platforms-card .subsection-subtitle {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.platforms-accordion-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.nested-role-accordion {
    margin-top: 1.25rem;
}

.nested-role-accordion .platform-accordion-item {
    margin-top: 0.75rem;
}

.platform-accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.45);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.platform-accordion-item:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.platform-accordion-item.is-open {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    background-color: var(--card-bg);
}

.platform-accordion-toggle {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
    padding: 1rem 1.1rem;
    color: inherit;
}

.platform-accordion-toggle:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

.platform-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.platform-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.2px;
}

.platform-label {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.platform-toggle-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.platform-toggle-icon::before,
.platform-toggle-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.55rem;
    height: 1.5px;
    background-color: var(--accent-primary);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.platform-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.platform-accordion-item.is-open .platform-toggle-icon {
    border-color: var(--accent-primary);
    background-color: rgba(196, 165, 130, 0.08);
}

.platform-accordion-item.is-open .platform-toggle-icon::after {
    opacity: 0;
}

.platform-accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 1.1rem;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

.platform-accordion-item.is-open .platform-accordion-content {
    opacity: 1;
    padding-bottom: 1.15rem;
}

.platform-features {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 0.9rem;
    font-weight: 600;
}

.consolidated-platforms-card .platform-accordion-content .contributions {
    gap: 0.55rem;
}

.consolidated-platforms-card .platform-accordion-content .contributions li {
    font-size: 0.9rem;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.2rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 2.2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-list li {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-left: 1.6rem;
    position: relative;
    line-height: 1.7;
}

.skill-list li::before {
    content: "◆";
    position: absolute;
    left: 0.3rem;
    color: var(--accent-primary);
    font-size: 0.65rem;
    top: 0.55rem;
}

/* ===== TOOLS SECTION ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.tool-category {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tool-category:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-category h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    letter-spacing: -0.3px;
}

.tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    background-color: rgba(255, 255, 255, 0.75);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: default;
    line-height: 1;
    white-space: nowrap;
}

.tool-badge:hover {
    background-color: rgba(196, 165, 130, 0.08);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* ===== REFERENCE SECTION ===== */
.reference-intro,
.contact-intro {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.reference-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.reference-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.reference-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.reference-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.reference-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ===== CONTACT SECTION ===== */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.contact-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

.contact-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.contact-card-static:hover {
    cursor: default;
    transform: none;
}

.contact-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(196, 165, 130, 0.1);
    border-radius: 10px;
    color: var(--accent-primary);
}

.contact-icon svg {
    width: 26px;
    height: 26px;
}

.contact-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.7rem;
}

.contact-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 5rem;
}

.footer-content {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-light);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 900px) {
    .platforms-accordion-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 290px 1fr;
    }

    .sidebar {
        padding: 2.5rem 1.5rem;
        gap: 2rem;
    }

    .sidebar-name {
        font-size: 1.4rem;
    }

    .main-content {
        padding: 3rem 2rem;
    }

    .section {
        margin-bottom: 4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid,
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .platform-list-items {
        grid-template-columns: 1fr;
    }

    .experience-card {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .platform-accordion-toggle,
    .platform-accordion-content {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }
}

@media (max-width: 600px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: auto;
        z-index: 1000;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .sidebar-header {
        padding-bottom: 1rem;
    }

    .sidebar-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .sidebar-name {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }

    .sidebar-title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .sidebar-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .sidebar.open .sidebar-nav {
        max-height: 400px;
    }

    .nav-list {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 0.6rem 1rem;
    }

    .nav-item.active {
        border-left: none;
        border-bottom-color: var(--accent-primary);
    }

    .scroll-progress {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 2rem 1.25rem;
        max-width: 100%;
    }

    .section {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .highlights-grid,
    .skills-grid,
    .tools-grid,
    .contact-methods {
        grid-template-columns: 1fr;
    }

    .platform-pills,
    .tool-badges {
        gap: 0.5rem;
    }

    .pill,
    .tool-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }

    .experience-card,
    .highlight-card,
    .skill-category,
    .tool-category,
    .reference-card,
    .contact-card {
        padding: 1.8rem;
    }

    .footer {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 380px) {
    .sidebar-name {
        font-size: 1rem;
    }

    .sidebar-title {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .job-title {
        font-size: 1rem;
    }

    .experience-card,
    .highlight-card,
    .skill-category,
    .tool-category,
    .reference-card,
    .contact-card {
        padding: 1.4rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .pill,
    .tool-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }
}