﻿@font-face {
    font-family: 'SweetPotatoes';
    src: url('assets/SweetPotatoes-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Nunito';
    src: url('assets/Nunito-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-header: #f6f0e4;
    --bg-hero: #f1ebd8;
    --bg-body: #ebe1ce;
    --btn-bg: #f5f2e2;
    --text-main: #422f15;
    --text-btn: #655033;
    --font-main: 'SweetPotatoes', sans-serif;
    --font-text: 'Nunito', sans-serif;
    --max-content-width: 1000px;
    --accent-color: #FF4444;
    --gold-color: #D4AF37;
    --particle-leaf-color: #7a8f5a;
    --sidebar-width-desktop: 250px;
    --sidebar-width-rail: 55px;
    --sidebar-width-drawer: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.2;
    overflow-x: hidden;
    padding-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
    font-size: 1.5rem;
}

/* HEADER */
header {
    height: auto;
    min-height: 40px;
    background-color: var(--bg-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.mini-logo {
    height: 25px;
    width: auto;
}

.nav-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    transition: opacity 0.2s;
    line-height: 40px;
    white-space: nowrap;
}

    .nav-link:hover {
        opacity: 0.7;
    }

    .nav-link.active {
        color: var(--accent-color);
    }

/* HERO SECTION */
.hero-section {
    background-color: var(--bg-hero);
    height: 400px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.main-logo-container {
    position: relative;
    z-index: 1;
    margin-top: 40px;
    text-align: center;
    transition: margin-top 0.3s ease;
    will-change: transform;
}

.main-char-logo {
    height: 240px;
    width: auto;
    filter: drop-shadow(0 10px 15px rgba(62, 43, 23, 0.2));
    cursor: pointer;
    /* The arm swings past the original viewBox during the wave gesture -
       without this it gets clipped at the SVG's edge. */
    overflow: visible;
}

/* GREETING ANIMATION - see js/logoAnimation.js (inlines the SVG so these ids are targetable).
   #ArmLGroup (the character's left arm) waves hello, #EyeRight winks along with it. */
#ArmLGroup {
    /* Fixed pivot (shoulder joint) in the SVG's own coordinate space, rather than
       transform-box: fill-box - computing a path's bbox at animation-start time
       is what was causing a brief stutter in the first frames. */
    transform-origin: 452px 355px;
}

#ArmLGroup.is-greeting {
    animation: arm-wave 1.8s cubic-bezier(0.45, 0, 0.2, 1) 1;
}

/* A damped pendulum swing: each half-swing eases smoothly in and out, with the
   amplitude tapering down so it settles instead of stopping abruptly. */
@keyframes arm-wave {
    0% {
        transform: rotate(0deg);
    }
    18% {
        transform: rotate(-16deg);
    }
    38% {
        transform: rotate(11deg);
    }
    58% {
        transform: rotate(-9deg);
    }
    76% {
        transform: rotate(4deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

#EyeRight {
    /* Fixed pivot (eye center) - see note on #ArmLGroup above. */
    transform-origin: 368px 278px;
}

#EyeRight.is-greeting {
    animation: eye-wink 1.8s ease-in-out 1;
}

@keyframes eye-wink {
    0%, 32%, 46%, 100% {
        transform: scaleY(1);
    }
    39% {
        transform: scaleY(0.1);
    }
}

/* SMILING FACE ANIMATION - #EyesGroup/#MouthGroup cross-fade into the simple
   arc-shaped #SmileyEyesGroup/#SmileyMouth, while the bow tie wiggles throughout. */
#SmileyEyesGroup,
#SmileyMouth {
    opacity: 0;
}

#EyesGroup.is-smiling,
#MouthGroup.is-smiling {
    animation: face-swap-out 2.2s ease-in-out 1;
}

#SmileyEyesGroup.is-smiling,
#SmileyMouth.is-smiling {
    animation: face-swap-in 2.2s ease-in-out 1;
}

@keyframes face-swap-out {
    0%, 15%, 85%, 100% {
        opacity: 1;
    }
    30%, 70% {
        opacity: 0;
    }
}

@keyframes face-swap-in {
    0%, 15%, 85%, 100% {
        opacity: 0;
    }
    30%, 70% {
        opacity: 1;
    }
}

#BowTieGroup {
    /* Fixed pivot (bow tie center). */
    transform-origin: 319px 434px;
}

#BowTieGroup.is-smiling {
    animation: bowtie-wiggle 2.2s ease-in-out 1;
}

@keyframes bowtie-wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(-15deg);
    }
    35% {
        transform: rotate(12deg);
    }
    50% {
        transform: rotate(-11deg);
    }
    65% {
        transform: rotate(8deg);
    }
    80% {
        transform: rotate(-4deg);
    }
}

/* LOVING FACE ANIMATION - reuses the same smiley eyes/mouth swap above, adds soft
   blush cheeks, and floats 3 heart particles up past the character like rising smoke,
   each popping like a soap bubble (a quick overshoot in scale, then vanish) at the top. */
#EyesGroup.is-loving,
#MouthGroup.is-loving {
    animation: face-swap-out 3.3s ease-in-out 1;
}

#SmileyEyesGroup.is-loving,
#SmileyMouth.is-loving {
    animation: face-swap-in 3.3s ease-in-out 1;
}

#BlushGroup {
    opacity: 0;
}

#BlushGroup.is-loving {
    animation: face-swap-in 3.3s ease-in-out 1;
}

#HeartsGroup .heart-particle {
    opacity: 0;
}

#Heart1.is-loving {
    animation: heart-rise 2.6s linear 1;
}

#Heart2.is-loving {
    animation: heart-rise 2.6s linear 1;
    animation-delay: 0.35s;
}

#Heart3.is-loving {
    animation: heart-rise 2.6s linear 1;
    animation-delay: 0.7s;
}

/* Horizontal sway is a true sine wave (densely-sampled points + linear
   interpolation, not a handful of hand-picked turns with easing). Vertical
   rise starts at zero speed and constantly accelerates (quadratic in time),
   so the heart is drifting slowly at the bottom and rushing fastest right as
   it vanishes at the top. Scales in from 0 (no sudden pop-in), then overshoots
   past full size and vanishes at the top for the final soap-bubble pop. */
@keyframes heart-rise {
    0.00% {
        transform: translate(0.0px, 0.0px) scale(0.00);
        opacity: 1;
    }
    2.83% {
        transform: translate(5.0px, -0.5px) scale(0.27);
        opacity: 1;
    }
    5.67% {
        transform: translate(8.7px, -2.0px) scale(0.87);
        opacity: 1;
    }
    8.50% {
        transform: translate(10.0px, -4.6px) scale(1.51);
        opacity: 1;
    }
    11.33% {
        transform: translate(8.7px, -8.2px) scale(1.88);
        opacity: 1;
    }
    14.17% {
        transform: translate(5.0px, -12.8px) scale(1.90);
        opacity: 1;
    }
    17.00% {
        transform: translate(0.0px, -18.4px) scale(1.90);
        opacity: 1;
    }
    19.83% {
        transform: translate(-5.0px, -25.0px) scale(1.90);
        opacity: 1;
    }
    22.67% {
        transform: translate(-8.7px, -32.7px) scale(1.90);
        opacity: 1;
    }
    25.50% {
        transform: translate(-10.0px, -41.4px) scale(1.90);
        opacity: 1;
    }
    28.33% {
        transform: translate(-8.7px, -51.1px) scale(1.90);
        opacity: 1;
    }
    31.17% {
        transform: translate(-5.0px, -61.8px) scale(1.90);
        opacity: 1;
    }
    34.00% {
        transform: translate(-0.0px, -73.6px) scale(1.90);
        opacity: 1;
    }
    36.83% {
        transform: translate(5.0px, -86.4px) scale(1.90);
        opacity: 1;
    }
    39.67% {
        transform: translate(8.7px, -100.2px) scale(1.90);
        opacity: 1;
    }
    42.50% {
        transform: translate(10.0px, -115.0px) scale(1.90);
        opacity: 1;
    }
    45.33% {
        transform: translate(8.7px, -130.8px) scale(1.90);
        opacity: 1;
    }
    48.17% {
        transform: translate(5.0px, -147.7px) scale(1.90);
        opacity: 1;
    }
    51.00% {
        transform: translate(0.0px, -165.6px) scale(1.90);
        opacity: 1;
    }
    53.83% {
        transform: translate(-5.0px, -184.5px) scale(1.90);
        opacity: 1;
    }
    56.67% {
        transform: translate(-8.7px, -204.4px) scale(1.90);
        opacity: 1;
    }
    59.50% {
        transform: translate(-10.0px, -225.4px) scale(1.90);
        opacity: 1;
    }
    62.33% {
        transform: translate(-8.7px, -247.4px) scale(1.90);
        opacity: 1;
    }
    65.17% {
        transform: translate(-5.0px, -270.4px) scale(1.90);
        opacity: 1;
    }
    68.00% {
        transform: translate(-0.0px, -294.4px) scale(1.90);
        opacity: 1;
    }
    70.83% {
        transform: translate(5.0px, -319.4px) scale(1.90);
        opacity: 1;
    }
    73.67% {
        transform: translate(8.7px, -345.5px) scale(1.90);
        opacity: 1;
    }
    76.50% {
        transform: translate(10.0px, -372.6px) scale(1.90);
        opacity: 1;
    }
    79.33% {
        transform: translate(8.7px, -400.7px) scale(1.90);
        opacity: 1;
    }
    82.17% {
        transform: translate(5.0px, -429.8px) scale(1.90);
        opacity: 1;
    }
    85.00% {
        transform: translate(0.0px, -460.0px) scale(1.90);
        opacity: 1;
    }
    90% {
        transform: translate(0px, -500px) scale(2.4);
        opacity: 1;
    }
    100% {
        transform: translate(0px, -510px) scale(0);
        opacity: 0;
    }
}

.sentence-container {
    margin-top: 10px;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

    .sentence-container h2 {
        font-size: 2rem;
        color: var(--text-main);
        transition: opacity 0.1s linear;
        will-change: opacity;
    }

.creative-patch {
    padding: 2rem 1rem 4rem 1rem;
    will-change: opacity;
}

.section-header-align {
    max-width: 610px;
    margin: 0 auto 0.5rem auto;
    text-align: left;
    padding-left: 0;
}

.creative-patch h2 {
    font-size: 1.4rem;
    color: var(--text-main);
}

.cards-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.card {
    width: 130px;
    height: 150px;
    background-color: var(--btn-bg);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    box-shadow: -1px 6px 7px 1px rgba(0,0,0,0.35);
}

    .card:hover {
        transform: translateY(-6px) scale(1.04) rotate(-1deg);
        box-shadow: -1px 10px 18px 1px rgba(0,0,0,0.3), 0 0 0 2px var(--gold-color);
    }

.card-img {
    width: 80%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 5px;
}

.card h3 {
    font-size: 1.4rem;
    color: var(--text-btn);
    margin-top: 5px;
}

/* SIDEBAR COMMON STYLES */
#sidebar-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    z-index: 900;
}

.sidebar-toggle {
    display: none; /* Hidden on Desktop */
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 10px;
    margin-bottom: 10px;
    margin-left: 5px;
    transition: color 0.2s;
}

    .sidebar-toggle:hover {
        color: var(--accent-color);
    }

.sidebar-spacer {
    height: 25px;
    width: 100%;
    flex-shrink: 0;
}

.sidebar-title {
    font-family: var(--font-main);
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 10px;
    margin-left: 10px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.5s ease;
    white-space: nowrap;
}

.sidebar-cards-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    overflow: hidden;
    align-items: center;
}

.sidebar-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 60px;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    border-radius: 10px;
    transform: translateX(-300px);
    opacity: 0;
    border-left: 5px solid transparent;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

    .sidebar-card:hover {
        background-color: rgba(255, 255, 255, 0.4);
        transform: translateX(0px) !important;
        box-shadow: 0 0 0 2px var(--gold-color);
    }

    .sidebar-card .card-img {
        width: 30px;
        height: 30px;
        margin-bottom: 0;
        margin-right: 0;
        flex-shrink: 0;
    }

    .sidebar-card h3 {
        font-family: var(--font-main) !important;
        font-size: 1.2rem !important;
        color: var(--text-btn) !important;
        margin-top: 0 !important;
        white-space: nowrap;
        opacity: 0;
        display: none;
        transition: opacity 0.2s ease;
    }

.sidebar-copyright {
    margin-top: auto;
    padding: 20px 10px;
    font-family: var(--font-text);
    font-size: 0.75rem;
    color: var(--text-main);
    line-height: 1.4;
    width: 100%;
    opacity: 1 !important;
    display: block !important;
    transition: none;
    text-align: center;
}

/* --- ACTIVE STATE / OPEN --- */
body.sidebar-active .sidebar-title {
    opacity: 1;
    transform: translateX(0);
}

body.sidebar-active .sidebar-card {
    transform: translateX(0);
    opacity: 1;
}

.no-transition .sidebar-title,
.no-transition .sidebar-card {
    transition: none !important;
}

body.sidebar-active .sidebar-card:nth-child(1) {
    transition-delay: 0.1s;
}

body.sidebar-active .sidebar-card:nth-child(2) {
    transition-delay: 0.2s;
}

body.sidebar-active .sidebar-card:nth-child(3) {
    transition-delay: 0.3s;
}

body.sidebar-active .sidebar-card:nth-child(4) {
    transition-delay: 0.4s;
}

.page-home #sidebar-menu,
.page-home .sidebar-toggle {
    display: none !important;
}

.page-home .hero-section,
.page-home .content-wrapper {
    padding-left: 0 !important;
    width: 100% !important;
}

/* ABOUT & CONTACT PAGE: STICKY SIDEBAR (Desktop Standard) */
#sidebar-menu.sidebar-sticky-mode {
    width: var(--sidebar-width-desktop);
    min-width: var(--sidebar-width-desktop);
    position: sticky;
    top: 60px;
    margin-top: 25px;
    padding-top: 0;
    height: calc(100vh - 85px);

    overflow-y: auto;
    z-index: 900;
    padding-left: 10px;
    margin-right: 40px;
}

    #sidebar-menu.sidebar-sticky-mode .sidebar-card {
        width: 220px;
        padding: 0 15px;
        justify-content: flex-start;
    }

        #sidebar-menu.sidebar-sticky-mode .sidebar-card .card-img {
            margin-right: 15px;
        }

        #sidebar-menu.sidebar-sticky-mode .sidebar-card h3 {
            display: block;
            opacity: 1;
        }

.about-wrapper {
    font-family: var(--font-text);
    color: var(--text-main);
    padding: 0 0 4rem 0;
    width: 100%;
}

.about-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    margin: 0;
    position: relative;
}

/* ACTIVE STATE DESKTOP */
body.sidebar-active .sidebar-card.active-card {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateX(0);
    opacity: 1;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    pointer-events: none;
}

    body.sidebar-active .sidebar-card.active-card h3 {
        color: var(--accent-color) !important;
    }

/* PROJECT PREVIEW */
.project-preview-container {
    max-width: 900px;
    margin: 0 auto 4rem auto;
    padding: 0 1rem;
}

.preview-box {
    display: flex;
    background-color: var(--btn-bg);
    border-radius: 30px;
    box-shadow: -1px 6px 7px 1px rgba(0,0,0,0.35);
    overflow: hidden;
    min-height: 250px;
    margin-bottom: 40px;
}

.preview-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

    .preview-text h2 {
        font-size: 2.5rem;
        color: var(--accent-color);
        margin-bottom: 1rem;
    }

.loading-bar-deco {
    width: 60%;
    height: 10px;
    background-color: #dcd6c5;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30%;
    background-color: var(--gold-color);
    border-radius: 5px;
}

.preview-image {
    flex: 1.5;
    position: relative;
    overflow: hidden;
}

    .preview-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(10deg);
    color: var(--accent-color);
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
    pointer-events: none;
    text-align: center;
    width: 100%;
}

/* CV STYLING */
.cv-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    flex: 1;
    min-width: 0;
    max-width: 1100px;
    background-color: #fcfaf5;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin: 0 auto;
}

.cv-sidebar {
    flex: 1;
    min-width: 250px;
    border-right: 2px solid rgba(66, 47, 21, 0.1);
    padding-right: 20px;
}

.cv-block {
    margin-bottom: 30px;
}

    .cv-block h3 {
        font-family: var(--font-main);
        font-size: 1.6rem;
        color: var(--accent-color);
        margin-bottom: 15px;
        border-bottom: 2px solid var(--gold-color);
        display: inline-block;
    }

.cv-list {
    list-style: none;
    font-size: 1rem;
    line-height: 1.6;
}

    .cv-list li {
        margin-bottom: 8px;
    }

.cv-content-list {
    list-style-type: disc;
    padding-left: 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-top: 5px;
}

    .cv-content-list li {
        margin-bottom: 6px;
    }

        .cv-content-list li::marker {
            color: var(--gold-color);
        }

.cv-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .cv-tags li {
        background-color: var(--btn-bg);
        padding: 5px 10px;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text-btn);
        border: 1px solid rgba(0,0,0,0.05);
    }

.cv-main {
    flex: 2;
    min-width: 300px;
    overflow-wrap: break-word;
}

.cv-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--gold-color);
    padding-bottom: 15px;
}

    .cv-header h2 {
        font-family: var(--font-main);
        font-size: 2.5rem;
        color: var(--text-main);
        line-height: 1;
        margin-bottom: 5px;
    }

.subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: #655033;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    background-color: var(--btn-bg);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-color);
}

.cv-main h3 {
    font-family: var(--font-main);
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.cv-timeline {
    position: relative;
    border-left: 3px solid #dcd6c5;
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-entry {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -39px;
    top: 5px;
    width: 15px;
    height: 15px;
    background-color: var(--gold-color);
    border: 3px solid #fcfaf5;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #dcd6c5;
}

.timeline-date {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.timeline-entry h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--text-main);
}

.timeline-company {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #655033;
    margin-bottom: 10px;
    font-style: italic;
}

.project-note {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 8px;
    font-style: italic;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.philosophy-tagline {
    font-family: var(--font-main);
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.philosophy-item {
    margin-bottom: 20px;
}

    .philosophy-item h4 {
        font-family: var(--font-main);
        font-size: 1.2rem;
        color: var(--text-btn);
        margin-bottom: 8px;
    }

    .philosophy-item p {
        line-height: 1.6;
        color: #444;
    }

.crisis-story {
    margin-top: 10px;
    background-color: #fff;
    padding: 20px;
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .crisis-story h4 {
        font-family: var(--font-main);
        color: var(--accent-color);
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 1.2rem;
    }

    .crisis-story p {
        line-height: 1.6;
        color: #444;
        margin-bottom: 10px;
    }

    .crisis-story p:last-child {
        margin-bottom: 0;
    }

.achievement-card {
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-top: 4px solid var(--gold-color);
}

    .achievement-card h5 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        color: var(--text-main);
        font-weight: 800;
    }

    .achievement-card p {
        font-size: 0.95rem;
        color: #666;
    }

.cv-contact-btn {
    display: inline-block;
    margin-top: 10px;
    background-color: var(--btn-bg);
    color: var(--text-btn);
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: -1px 3px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

    .cv-contact-btn:hover {
        transform: scale(1.1);
        background-color: #fff;
        color: var(--accent-color);
    }

/* CONTACT PAGE */
.contact-container {
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 15px;
}

    .contact-header h2 {
        font-family: var(--font-main);
        font-size: 2.5rem;
        color: var(--text-main);
    }

.contact-methods {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0077B5;
    color: white;
    font-family: var(--font-text);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 30px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 119, 181, 0.3);
}

    .linkedin-btn:hover {
        background-color: #005582;
        transform: translateY(-2px);
        box-shadow: 0 6px 10px rgba(0, 119, 181, 0.4);
    }

.contact-separator {
    border: none;
    border-top: 2px solid rgba(66, 47, 21, 0.1);
    margin: 10px 0 20px 0;
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group label {
        font-weight: 700;
        margin-bottom: 8px;
        font-size: 1rem;
        color: var(--text-main);
    }

        .form-group label .required {
            color: var(--accent-color);
        }

    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        border-radius: 10px;
        border: 2px solid rgba(66, 47, 21, 0.1);
        background-color: #fff;
        font-family: var(--font-text);
        font-size: 1rem;
        color: var(--text-main);
        transition: border-color 0.2s, box-shadow 0.2s;
        width: 100%;
    }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--gold-color);
            box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
        }

    .form-group textarea {
        min-height: 200px;
        resize: vertical;
    }

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}

    .char-counter.limit-near {
        color: #e67e22;
    }

    .char-counter.limit-reached {
        color: var(--accent-color);
        font-weight: bold;
    }

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--text-main);
    color: white;
    font-family: var(--font-main);
    font-size: 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

    .submit-btn:hover {
        background-color: var(--text-btn);
        transform: translateY(-2px);
    }

    .submit-btn:active {
        transform: translateY(0);
    }

    .submit-btn:disabled {
        background-color: #ccc;
        cursor: not-allowed;
        transform: none;
    }

.form-status {
    text-align: center;
    margin-top: 15px;
    font-weight: 700;
    min-height: 1.2em;
}

    .form-status.success {
        color: #27ae60;
    }

    .form-status.error {
        color: var(--accent-color);
    }

.form-success-container {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    color: #27ae60;
    margin-bottom: 20px;
}

.form-success-container h3 {
    font-family: var(--font-main);
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.form-success-container p {
    font-family: var(--font-text);
    font-size: 1.1rem;
    color: #666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* EXPANDABLE PROJECTS */
.project-expandable {
    display: flex;
    flex-direction: column;
    background-color: var(--btn-bg);
    border-radius: 30px;
    box-shadow: -1px 6px 7px 1px rgba(0,0,0,0.35);
    overflow: hidden;
    min-height: 400px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
    width: 100%;
}

.project-left {
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
    background-color: var(--btn-bg);
}

.project-title {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: var(--font-main);
}

.project-summary {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-family: var(--font-text);
}

.project-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(66, 47, 21, 0.1);
    animation: fadeIn 0.5s ease;
    font-family: var(--font-text);
}

    .project-details h4 {
        font-family: var(--font-main);
        font-size: 1.2rem;
        color: var(--text-btn);
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .project-details p,
    .project-details li {
        font-family: var(--font-text);
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        text-align: justify;
    }

    .project-future-section {
        margin-top: 20px;
        background-color: #fff;
        padding: 15px;
        border-left: 4px solid var(--accent-color);
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .project-future-section h4 {
        color: var(--accent-color) !important;
        margin-top: 0 !important;
    }

    .project-future-section p {
        font-style: italic;
        color: #444;
    }

.project-toggle-btn {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--gold-color);
    font-family: var(--font-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-top: 20px;
    text-decoration: underline;
    transition: color 0.2s;
}

    .project-toggle-btn:hover {
        color: var(--accent-color);
    }

.project-right {
    width: 100%;
    background-color: #000;
    position: relative;
    overflow: hidden;
    min-height: 560px;
}
.hidden-content {
    display: none;
}

.project-media iframe,
.media-container iframe {
    width: 100%; 
    height: auto;
    aspect-ratio: 16 / 9;
    display: block; 
    border: none;
}

/* --- CAROUSEL STYLES --- */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    user-select: none; 
}

.carousel-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        cursor: pointer;
        display: block;
    }

    .carousel-slide iframe {
        width: 100%;
        height: auto; 
        aspect-ratio: 16 / 9; 
        border: none;
        align-self: center;
    }

/* --- NAVIGATION ARROWS (DESKTOP) --- */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 40px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0; 
    transition: opacity 0.3s ease, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.project-right:hover .carousel-nav-btn {
    opacity: 1;
}

.carousel-nav-btn:hover {
    background-color: rgba(212, 175, 55, 0.8); /* Gold color */
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}


@media (hover: none) and (pointer: coarse) {
    .carousel-nav-btn {
        display: none !important;
    }
}

/* --- DOTS INDICATORS --- */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

    .carousel-dot.active {
        background-color: var(--gold-color);
        transform: scale(1.2);
    }

/* --- TESTIMONIALS CAROUSEL --- */
.testimonial-carousel {
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.testimonial-carousel .carousel-slide {
    background-color: #fff;
    padding: 30px 60px;
    box-sizing: border-box;
    border-top: 4px solid var(--gold-color);
}

.testimonial-carousel:hover .carousel-nav-btn {
    opacity: 1;
}

.testimonial-card {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
}

.testimonial-quote {
    margin: 0;
    font-family: var(--font-text);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    max-height: 150px;
    overflow-y: auto;
}

.testimonial-author {
    margin-top: 15px;
}

    .testimonial-author strong {
        display: block;
        font-family: var(--font-main);
        font-size: 1.1rem;
        color: var(--accent-color);
    }

    .testimonial-role {
        display: block;
        margin-top: 2px;
        font-size: 0.85rem;
        color: var(--text-btn);
    }

    .testimonial-context {
        display: block;
        margin-top: 2px;
        font-size: 0.75rem;
        color: #999;
    }

@media (max-width: 600px) {
    .testimonial-carousel .carousel-slide {
        padding: 25px 30px;
    }
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .lightbox-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2010;
    line-height: 1;
    transition: transform 0.2s;
}

    .lightbox-close:hover {
        transform: scale(1.1);
        color: var(--accent-color);
    }

/* Mobile adjustments */
@media (max-width: 900px) {
    .project-expandable {
        flex-direction: column;
    }

    .project-right {
        width: 100%;
        min-height: 250px;
        height: 250px;
    }
}


@media (max-width: 1200px) {
    header {
        height: auto;
        min-height: 40px;
        flex-wrap: wrap;
        padding: 5px 1rem;
        justify-content: center;
        gap: 10px;
    }

    .nav-left, .nav-right {
        gap: 10px;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    /* LOGO & HERO FIXES */
    .hero-section {
        height: 400px;
        padding-bottom: 40px;
        padding-left: calc(var(--sidebar-width-rail) + 10px);
        z-index: 1;
    }

    .main-logo-container {
        margin-top: 40px;
    }

    .main-char-logo {
        height: 200px;
    }

    .cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }

    .card {
        width: 100%;
    }

    /* RESPONSIVE LAYOUT */
    .about-wrapper {
        padding: 0 1rem 4rem 1rem;
        padding-left: calc(var(--sidebar-width-rail) + 10px);
    }

    .about-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .cv-container {
        flex-direction: column;
        padding: 20px;
        margin-right: 0;
        width: 100%;
    }

    .cv-sidebar {
        width: 100%;
        flex: none;
        border-right: none;
        border-bottom: 2px solid rgba(66, 47, 21, 0.1);
        padding-right: 0;
        padding-bottom: 20px;
    }

    .cv-main {
        width: 100%;
        flex: none;
    }

    /* SIDEBAR: RAIL MODE MOBILE */
    #sidebar-menu,
    #sidebar-menu.sidebar-sticky-mode {
        display: flex !important;
        flex-direction: column;
        position: fixed !important;
        top: 0;
        padding-top: 0;
        bottom: 0;
        height: auto !important;
        left: 0;
        width: var(--sidebar-width-rail) !important;
        min-width: unset;
        background-color: var(--bg-body);
        border-right: 1px solid rgba(0,0,0,0.05);
        z-index: 900;
        margin: 0;
        padding-left: 0;
        align-items: center;
        overflow: visible;
        pointer-events: auto !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .sidebar-spacer {
        display: none;
    }

    /* BURGER */
    .sidebar-toggle {
        display: block;
        position: absolute;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 910;
    }

    .sidebar-title {
        display: none;
    }

    .sidebar-copyright {
        display: block !important;
        font-size: 0.5rem;
        text-align: center;
        padding: 10px 2px;
        word-wrap: break-word;
    }

    .sidebar-cards-container {
        align-items: center;
        margin-top: 130px;
    }

    #sidebar-menu.sidebar-sticky-mode .sidebar-card,
    #sidebar-menu .sidebar-card {
        display: flex !important;
        flex-direction: row;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 8px;
        background-color: transparent;
        border: 2px solid transparent;
        margin-bottom: 8px;
        overflow: hidden !important;
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }

    .sidebar-card:hover {
        background-color: rgba(0,0,0,0.05);
        transform: none !important;
    }

    #sidebar-menu.sidebar-sticky-mode .sidebar-card .card-img,
    #sidebar-menu .sidebar-card .card-img {
        margin: 0;
        width: 24px;
        height: 24px;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #sidebar-menu.sidebar-sticky-mode .sidebar-card h3,
    #sidebar-menu .sidebar-card h3 {
        display: none !important;
        opacity: 0 !important;
        width: 0 !important;
    }

    /* ACTIVE STATE IN RAIL MODE (Closed) */
    #sidebar-menu .sidebar-card.active-card,
    #sidebar-menu.sidebar-sticky-mode .sidebar-card.active-card {
        background-color: #ffffff;
        border-left: 4px solid var(--accent-color) !important;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transform: none;
        width: 44px !important;
        height: 44px;
        pointer-events: none;
        border: none;
    }

        #sidebar-menu .sidebar-card.active-card .card-img,
        #sidebar-menu.sidebar-sticky-mode .sidebar-card.active-card .card-img {
            filter: drop-shadow(0 2px 2px rgba(255, 68, 68, 0.2));
        }

    /* SIDEBAR: DRAWER MODE (Expanded) */
    #sidebar-menu.sidebar-expanded,
    #sidebar-menu.sidebar-sticky-mode.sidebar-expanded {
        width: var(--sidebar-width-drawer) !important;
        align-items: flex-start;
        padding-left: 20px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.15);
        background-color: var(--bg-body);
    }

        #sidebar-menu.sidebar-expanded .sidebar-title {
            display: block;
            margin-top: 10px;
            margin-left: 5px;
            opacity: 1;
            transform: none;
        }

        #sidebar-menu.sidebar-expanded .sidebar-cards-container {
            align-items: flex-start;
            padding-left: 0;
            margin-top: 30px;
        }

        #sidebar-menu.sidebar-expanded .sidebar-toggle {
            position: relative;
            top: auto;
            left: auto;
            transform: none;
            margin-top: 60px;
            margin-left: 5px;
        }

        #sidebar-menu.sidebar-expanded .sidebar-copyright {
            display: block;
            white-space: normal;
            padding-left: 10px;
            font-size: 0.75rem;
            margin-bottom: 10px;
            animation: fadeIn 0.3s ease;
        }

        #sidebar-menu.sidebar-expanded .sidebar-card,
        #sidebar-menu.sidebar-sticky-mode.sidebar-expanded .sidebar-card {
            width: 200px !important;
            height: 50px;
            justify-content: flex-start;
            padding-left: 10px;
            background-color: transparent;
            border-radius: 10px;
            margin-bottom: 5px;
            overflow: visible !important;
        }

            #sidebar-menu.sidebar-expanded .sidebar-card .card-img,
            #sidebar-menu.sidebar-sticky-mode.sidebar-expanded .sidebar-card .card-img {
                margin-right: 15px;
            }

            #sidebar-menu.sidebar-expanded .sidebar-card h3,
            #sidebar-menu.sidebar-sticky-mode.sidebar-expanded .sidebar-card h3 {
                display: block !important;
                opacity: 1 !important;
                width: auto !important;
                animation: fadeIn 0.3s ease forwards;
                font-size: 1.1rem !important;
            }

            /* ACTIVE STATE IN DRAWER MODE (Expanded) */
            #sidebar-menu.sidebar-expanded .sidebar-card.active-card,
            #sidebar-menu.sidebar-sticky-mode.sidebar-expanded .sidebar-card.active-card {
                width: 200px !important;
                background-color: rgba(255, 255, 255, 0.8);
                border-left: 4px solid var(--accent-color) !important;
                border-radius: 10px; /* Fully rounded */
            }
}

@media (max-width: 900px) {
    .project-expandable {
        flex-direction: column;
    }

    .project-right {
        order: -1;
        min-height: 200px;
    }

    .media-main {
        min-height: 200px;
    }
}

/* A11Y Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

#sidebar-placeholder {
    display: none;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--accent-color);
    background-color: #fff0f0;
}

@media print {
    #sidebar-menu, .nav-right, .hero-section {
        display: none !important;
    }

    .cv-container {
        box-shadow: none;
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* HERO AMBIENT PARTICLES - js/heroParticles.js. pointer-events:none is required
   so this never intercepts the mascot SVG's mouseenter/click gesture replay. */
.hero-particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* SCROLL REVEAL - js/scrollReveal.js toggles .is-visible via IntersectionObserver.
   Deliberately plays regardless of prefers-reduced-motion, same call as the
   mascot gestures (see js/main.js). */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

    .reveal.is-visible {
        opacity: 1;
        transform: none;
    }

/* CURSOR TRAIL - js/cursorTrail.js, Tech Lab / CGI pages only.
   z-index 500 keeps it below the sticky header (1000) and lightbox (2000). */
.cursor-trail-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 500;
}
