/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

html.work-page {
    font-size: 18px;
}

:root {
    --bg-color: #1a3c54;
    /* Dark Blue */
    --text-color: #ffffff;
    --accent-orange: #ff914d;
    --eye-white: #f0f0f0;
    --pupil-color: #1a3c54;
}

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

body {
    position: relative;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    cursor: none !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

a,
button,
.cta-btn,
.work-card {
    cursor: none !important;
}

/* Custom cursor for work cards */
.work-card {
    cursor: none !important;
}
.work-card a,
.work-card button {
    cursor: none !important;
}

a {
    text-decoration: none;
    color: inherit;
}

#wand-cursor {
    position: fixed;
    width: 80px;
    height: 80px;
    background-image: url('nowork/elderwand.png');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 999999;
    /* Adjust so top-left tip of wand image aligns with mouse */
    transform: translate(-10%, -10%);
    filter: drop-shadow(1px 1px 0 white) drop-shadow(-1px -1px 0 white) drop-shadow(1px -1px 0 white) drop-shadow(-1px 1px 0 white) drop-shadow(0 0 10px rgba(26, 60, 84, 0.25));
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
}

body.hovering-link #wand-cursor {
    transform: translate(-10%, -10%) rotate(-15deg) scale(1.1);
}

body.hovering-work-card #wand-cursor {
    background-image: none;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    filter: none;
}

body.hovering-work-card #wand-cursor::after {
    content: 'View Project';
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a3c54;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 4px 4px 0px var(--accent-orange);
    white-space: nowrap;
}

body.light-mode.hovering-work-card #wand-cursor::after {
    background: #f0f4f8;
    color: #1a3c54;
    border-color: #1a3c54;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    transition: padding 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(26, 60, 84, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-size: 1.2rem;
    font-weight: 300;
    padding: 0.5rem 1rem;
    margin: -0.5rem -1rem;
    display: inline-block;
    position: relative;
    z-index: 200;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-orange) !important;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem 2rem;
    /* Added top padding to prevent collision with header */
    position: relative;
    overflow: visible;
}

.hero-frame {
    width: 100%;
    max-width: 850px;
    /* Scaled down from 1000px */
    height: 700px;
    /* Scaled down from 850px */
    max-height: 85vh;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
}

/* Vertical Text Removed */

/* Main Box Content */
.main-box {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.title {
    font-size: 5.5rem;
    /* Scaled down from 7rem */
    font-weight: 700;
    margin-bottom: 20px;
    text-align: left;
    line-height: 0.9;
    letter-spacing: -2px;
    display: inline-block;
    min-height: 4.95rem;
    /* 5.5rem * 0.9 = 4.95rem */
}

.title.typewriter-active::after,
.role-title.typewriter-active::after {
    content: '|';
    color: var(--accent-orange);
    animation: blink-caret 0.75s step-end infinite;
    margin-left: 5px;
    font-weight: 300;
}

@keyframes blink-caret {

    from,
    to {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    flex: 1;
    align-items: center;
}

/* Text Content Area */
.text-content {
    position: relative;
    padding-top: 0;
    /* Remove padding to bring closer to title */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.arrow-decoration {
    position: relative;
    /* Changed from absolute to flow naturally */
    margin-top: -20px;
    margin-bottom: 20px;
    height: 100px;
    width: 100%;
    z-index: 10;
}

.curved-arrow {
    width: 80px;
    height: 80px;
    /* Clean rotation to point up-right at "Kaavya" */
    transform: rotate(10deg) scaleX(-1);
    position: absolute;
    left: 0;
    top: 5px;
    /* Position it overlapping the text */
}

/* Second arrow-decoration duplicate rule removed previously handled, kept original styling context */

.small-text.top-right {
    position: relative;
    text-align: left;
    width: 100%;
    font-size: 1rem;
    line-height: 1.4;
    padding-left: 50px;
    /* Space for the arrow */
    color: var(--accent-orange);
}

.bio-text {
    font-size: 1.2rem;
    /* Scaled from 1.5rem */
    line-height: 1.5;
    margin-top: 1.2rem;
    max-width: 450px;
    font-weight: 300;
}

/* CTA Button - Long and Big */
.cta-btn {
    display: block;
    width: calc(100% - 70px);
    /* Leave 35px gap on both sides */
    margin: 30px auto 0 auto;
    /* Reduced from 50px */
    padding: 1.2rem 0;
    /* Reduced from 1.5rem */
    background: var(--accent-orange);
    color: var(--bg-color);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Pop animation */
    box-shadow: 5px 5px 0px rgba(255, 255, 255, 0.1);
}

.cta-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px rgba(255, 255, 255, 0.2);
    background: #ffa06d;
}

.cta-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(255, 255, 255, 0.1);
}

.cta-btn::before {
    display: none;
    /* Remove previous gradient effect */
}

/* Visual Content (Eye) */
.visual-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.eye-container {
    position: relative;
    width: 160px;
    /* Reduced from 200px */
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.eye {
    width: 120px;
    /* Reduced from 150px */
    height: 120px;
    background: var(--accent-orange);
    border-radius: 50% 0 50% 50%;
    transform: rotate(45deg);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.pupil {
    width: 60px;
    height: 60px;
    background: var(--pupil-color);
    /* Matches bg */
    border-radius: 50%;
    position: absolute;
    transform: translate(0, 0);
    /* Centered relative to rotated parent */
    z-index: 2;
}

/* Eyelids for blinking */
.eyelid-top,
.eyelid-bottom {
    position: absolute;
    width: 100%;
    height: 50%;
    background: var(--bg-color);
    left: 0;
    transition: transform 0.1s ease;
    z-index: 3;
}

.eyelid-top {
    top: 0;
    transform-origin: top;
    transform: scaleY(0);
    animation: blinkTop 4s infinite;
}

.eyelid-bottom {
    bottom: 0;
    transform-origin: bottom;
    transform: scaleY(0);
    animation: blinkBottom 4s infinite;
}

@keyframes blinkTop {

    0%,
    48%,
    52%,
    100% {
        transform: scaleY(0);
    }

    50% {
        transform: scaleY(1);
    }
}

@keyframes blinkBottom {

    0%,
    48%,
    52%,
    100% {
        transform: scaleY(0);
    }

    50% {
        transform: scaleY(1);
    }
}

/* Sparkles */
.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    color: white;
    font-size: 1.5rem;
    animation: twinkle 2s infinite;
}

.s1 {
    top: 0;
    right: 20px;
}

.s2 {
    bottom: 20px;
    left: 20px;
    animation-delay: 1s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Bottom Title */
.role-title {
    text-align: right;
    font-size: 3.5rem;
    /* Scaled down from 4.5rem */
    font-weight: 700;
    margin-top: auto;
    /* Keep auto to push it down, button follows */
    letter-spacing: -1px;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(20px);
    /* Adjusted: pushed 10px left from 30px */
    min-height: 3.5rem;
    /* Matches font-size * line-height (1) to prevent layout shift when empty */
}

/* Flowers */
.flower {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--accent-orange);
    /* Use an SVG BG or mask */
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 C60 20 80 20 100 50 C80 80 60 80 50 100 C40 80 20 80 0 50 C20 20 40 20 50 0 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 C60 20 80 20 100 50 C80 80 60 80 50 100 C40 80 20 80 0 50 C20 20 40 20 50 0 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / contain;
    animation: rotate 10s linear infinite;
    z-index: 10;
}

/* Improved Flower Shape (Cross) */
.flower::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    transform: rotate(45deg);
}

.star {
    position: absolute;
    background: var(--accent-orange);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: rotate 10s linear infinite;
    z-index: 10;
}

.star-top-left {
    top: -30px;
    right: calc(100% + 15px);
    left: auto;
}

.polaroid-container {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.polaroid-container:hover {
    transform: scale(1.1) rotate(-5deg);
}

.polaroid-cam {
    width: 140px;
    height: auto;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.2));
}

.polaroid-text {
    position: absolute;
    bottom: 22px;
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    color: var(--bg-color);
    /* Same dark blue */
    text-shadow: none;
    line-height: 1;
}

.floating-img-container {
    position: absolute;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pop-img {
    width: 140px;
    height: auto;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.2));
}

.swatch-container {
    top: 50%;
    left: calc(100% + 20px);
    transform: translateY(-50%) rotate(15deg);
}

.swatch-container:hover {
    transform: translateY(-50%) scale(1.1) rotate(5deg);
}

.ruler-container {
    top: -20px;
    right: -40px;
    transform: rotate(25deg);
}

.ruler-container:hover {
    transform: scale(1.1) rotate(15deg);
}

.box-container {
    bottom: -60px;
    left: 10%;
    transform: rotate(-10deg);
}

.box-container:hover {
    transform: scale(1.1) rotate(-5deg);
}

.creation-sticker-container {
    top: 50%;
    left: -180px;
    transform: translateY(-50%) rotate(-10deg);
}

.creation-sticker-container:hover {
    transform: translateY(-50%) scale(1.1) rotate(0deg);
}

.creation-sticker {
    width: 126px;
    height: auto;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.2));
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Works Section Placeholder */
.works-section {
    padding: 4rem 2rem;
    min-height: 50vh;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* Responsiveness & Refinements */
@media (max-width: 1024px) {
    .title {
        font-size: 4.5rem;
        /* Smoother step down from 5.5rem */
    }

    .vertical-text {
        font-size: 1rem;
        letter-spacing: 0.3rem;
    }

    .left {
        left: -2rem;
    }

    .right {
        right: -2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 0;
        background: rgba(26, 60, 84, 0.9);
        backdrop-filter: blur(10px);
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 80px;
        align-items: flex-start;
    }

    .hero-frame {
        padding: 1.5rem;
        border: none;
        /* Remove border on mobile for cleaner look or keep if requested */
        display: flex;
        flex-direction: column;
    }

    .vertical-text {
        display: none;
        /* Hide vertical text on small screens */
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: left;
    }

    .text-content {
        order: 1;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .visual-content {
        order: 2;
        margin-top: 2rem;
    }

    .title {
        font-size: 4rem;
        /* Larger on mobile */
        margin-bottom: 0.5rem;
        text-align: left;
        line-height: 1;
    }

    .small-text {
        text-align: left;
        margin: 1rem 0;
        font-size: 1rem;
        position: static;
        padding-left: 0;
    }

    .arrow-decoration {
        display: none;
    }

    .bio-text {
        max-width: 100%;
        margin-top: 1rem;
        text-align: left;
        font-size: 1.1rem;
        padding: 0;
    }

    .role-title {
        font-size: 2.5rem;
        /* Scaled down for mobile */
        text-align: center;
        margin-top: 2rem;
        width: 100%;
    }

    .cta-btn {
        width: 100%;
        text-align: center;
        margin-top: 2rem;
    }

    /* Adjust Flowers for Mobile */
    .flower {
        width: 60px;
        height: 60px;
    }

    .star-top-left {
        top: -25px;
        left: -25px;
        width: 50px;
        height: 50px;
    }

    .flower-bottom-left {
        bottom: -20px;
        left: 10px;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    /* Reset cursor for touch devices */
    #wand-cursor {
        display: none !important;
    }
    body, a, button, .cta-btn, .work-card, .work-card a, .work-card button {
        cursor: auto !important;
    }
}

/* Button Refinement (Pop-up style) */
.cta-btn {
    background: #508ca4;
    /* Lighter blue/teal for contrast */
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
    /* Hard shadow for pop effect */
    transform: translate(0, 0);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cta-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.4);
    background: #5fa8c4;
}

.cta-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4);
}

/* Fix "Join me..." text positioning on desktop */
@media (min-width: 769px) {
    /* Rules unified in main block mostly, just small adjustments here if needed */
}

/* Works Stack */
.works-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 210px;
    /* Extra space at the bottom */
}

#personal {
    transform: translateY(calc(-200px * var(--stack-progress, 0)));
    will-change: transform;
}

.card-wrapper {
    /* Provide enough scroll height for the effect. 
       Usually 100vh gives a full screen height of scrolling per card. */
    position: sticky;
    top: 15vh;
}

.work-card {
    background: var(--bg-color);
    /* Match background for clean stacking or use dark background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 970px;
    margin: 0 auto;

    /* Smooth transition for any JS applied transforms */
    transition: transform 0.1s linear, filter 0.1s linear, opacity 0.1s linear;
    transform-origin: top center;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.3);
    /* Hard pop style shadow matching the CTA button */
}

/* Remove old hover effect since scrolling handles transform now */

.work-image {
    width: 100%;
    height: 280px;
    background: #2a4c64;
}

.work-info {
    padding: 1.5rem;
}

.work-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.work-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.work-link {
    color: var(--accent-orange);
    font-weight: 600;
}

/* Resume Page Styles (Restored) */
.resume-page {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 60px;
    display: flex;
    justify-content: center;
}

.resume-section {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resume-glass {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 60px 40px;
    margin-bottom: 2rem;
    box-shadow: none;
}

.resume-content {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 15px;
}

.skills-group h5 {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--accent-orange);
}

.skills-group p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.95;
}

.resume-header {
    text-align: center;
    margin-bottom: 40px;
}

.resume-header h2 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0px;
    line-height: 1.1;
    text-transform: capitalize;
}

.resume-header h3 {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.resume-header hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin: 17px 0;
}

.contact-info {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.9;
}

.resume-summary {
    margin-bottom: 40px;
    text-align: justify;
}

.resume-block {
    margin-bottom: 40px;
}

.resume-block h4 {
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.resume-block hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 15px;
}

.resume-list {
    padding-left: 20px;
    margin-bottom: 15px;
    list-style-type: disc;
}

.resume-list li {
    margin-bottom: 5px;
}

.experience-item {
    margin-bottom: 30px;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.experience-header .company {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
}

.experience-header .date {
    font-weight: 600;
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
}

.role-location {
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
    text-transform: uppercase;
}

.intern-subitem {
    margin-top: 15px;
    padding-left: 15px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.resume-cta {
    width: auto;
    min-width: 250px;
    margin: 20px 0;
    padding: 1rem 2.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .resume-glass {
        padding: 30px 20px;
    }

    .resume-header h2 {
        font-size: 2.5rem;
    }

    .resume-header h3 {
        font-size: 1.1rem;
    }

    .experience-header {
        flex-direction: column;
    }

    .experience-header .date {
        margin-top: 5px;
        font-size: 0.8rem;
    }
}

/* PDF Export Overrides */
body.pdf-export-mode {
    background: #f0f0f0 !important; /* Light grey background for the "desk" */
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-x: visible !important;
}

body.pdf-export-mode .resume-section {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- High-Fidelity PDF Export Overrides --- */
body.pdf-export-mode .resume-glass {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important; /* Critical: remove blur */
    -webkit-backdrop-filter: none !important;
    transform: none !important; /* Critical: remove any JS-driven scaling */
    width: 100% !important;
    margin: 0 !important;
}

/* Ensure the header and other UI elements don't get in the way during preview */
body.pdf-export-mode .header {
    background: rgba(255, 255, 255, 0.9) !important;
}

body.pdf-export-mode .nav-link, 
body.pdf-export-mode .logo {
    color: #000 !important;
}

body.pdf-export-mode .experience-item,
body.pdf-export-mode .resume-block {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* --- Professional PDF Style Overrides --- */
body.pdf-export-mode .resume-content {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    width: 100% !important;
    font-family: 'Outfit', sans-serif !important;
}

/* Force B&W and High Contrast */
body.pdf-export-mode .resume-content *,
body.pdf-export-mode .resume-header h2,
body.pdf-export-mode .resume-header h3,
body.pdf-export-mode .contact-info a {
    color: #000000 !important;
    text-shadow: none !important;
    background: transparent !important;
}

/* Match the Second PDF's Header Style */
body.pdf-export-mode .resume-header h2 {
    font-size: 28pt !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    margin-bottom: 5px !important;
}

body.pdf-export-mode .resume-header h3 {
    font-size: 14pt !important;
    font-weight: 500 !important;
    letter-spacing: 2px !important;
}

/* Ensure bullet points look like the dots in your sample */
body.pdf-export-mode .resume-list {
    list-style-type: disc !important;
    padding-left: 20px !important;
}

body.pdf-export-mode .resume-list li {
    margin-bottom: 4px !important;
    color: #000000 !important;
}

/* Thick Black Dividers */
body.pdf-export-mode hr {
    border: none !important;
    border-top: 1.5pt solid #000000 !important;
    opacity: 1 !important;
    margin: 10px 0 !important;
}

/* Clean up Experience Layout */
body.pdf-export-mode .experience-header {
    display: flex !important;
    justify-content: space-between !important;
    font-weight: 700 !important;
}

body.pdf-export-mode .intern-subitem {
    border-left-color: rgba(0, 0, 0, 0.15) !important;
}

body.pdf-export-mode a {
    text-decoration: none;
}

/* --- Case Study Page Styles --- */

.case-study-page {
    padding-top: 80px; /* offset for header */
    padding-left: 40px;
    padding-right: 40px;
}

.cs-hero {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background-color: var(--bg-color);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0 40px;
}

.cs-hero-image {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.8;
}

.cs-section {
    padding: 5rem 2rem;
}

.pt-0 {
    padding-top: 0;
}

.divider-top {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.cs-heading {
    color: var(--accent-orange);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-align: center;
}

.cs-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
}

@media (max-width: 900px) {
    .cs-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Sidebar Info */
.cs-meta-block {
    margin-bottom: 2.5rem;
}

.cs-meta-block h4 {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.cs-meta-block p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.5;
}

/* Main Content Typography */
.cs-content-block { margin-bottom: 4rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }

.cs-text p {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.cs-text strong {
    color: var(--text-color);
    font-weight: 600;
}

.cs-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.cs-list li {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Persona Wire & Clipboards */
.wire-container {
    position: relative;
    padding-top: 60px;
    margin: 2rem auto;
    max-width: 1200px;
}

.curved-wire {
    position: absolute;
    top: 25px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1;
}

.personas-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .personas-grid {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
}

.clipboard-card {
    background: rgba(26, 60, 84, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    width: 100%;
    max-width: 340px;
    padding: 2.5rem 1.5rem 2rem;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.clipboard-card:hover {
    transform: scale(1.02) translateY(-5px) !important;
}

.tilt-left {
    transform: rotate(-3deg);
}

.tilt-right {
    transform: rotate(2deg);
}

.clip {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background: linear-gradient(135deg, #d4d4d4, #8a8a8a);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0 2px 2px rgba(255,255,255,0.8);
    z-index: 10;
}

.clip::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 8px;
    border-radius: 4px;
    background: #555;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.handwritten-title {
    font-family: 'Shadows Into Light', cursive;
    color: var(--accent-orange);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.cs-meta {
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.persona-section {
    margin-bottom: 1.5rem;
}

.persona-section h4 {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.persona-section p, .persona-section ul {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
}

.persona-section ul {
    padding-left: 1.2rem;
}

.persona-quote {
    font-style: italic;
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(255,255,255,0.2);
}

/* Horizontal Scroll Section -> Continuous Marquee */
.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
    padding-bottom: 1rem;
}

.marquee-content {
    display: inline-flex;
    gap: 2rem;
    /* Time based on typical scroll speed desired. 30s is a good smooth pace */
    animation: scroll-marquee 30s linear infinite;
}

/* Pause animation when user hovers over the images */
.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Shift exactly by one set's width (5 items + 5 gaps) */
        /* Total width is 10 items + 9 gaps. Half is 5 items + 4.5 gaps. We shift by 50% + 0.5 gap (half of 2rem) */
        transform: translateX(calc(-50% - 1rem));
    }
}

.scroll-screen {
    flex: 0 0 auto;
    height: clamp(250px, 50vh, 400px);
    width: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    object-fit: contain;
}

@media (max-width: 768px) {
    .scroll-screen {
        height: clamp(200px, 40vh, 300px);
    }
}

/* UX Breakdown Section */
.ux-breakdown-wrapper {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.ux-breakdown-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.ux-image-container {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.ux-image-container img {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 8px solid rgba(255, 255, 255, 0.1);
    display: block;
}

/* Highlights Overlay on Image */
.ux-highlight {
    position: absolute;
    border: 3px solid var(--accent-orange);
    background: rgba(255, 145, 77, 0.2);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.95);
    pointer-events: none;
    z-index: 10;
}

/* Base positions */
.ux-highlight[data-highlight="search"] {
    top: 29.5%;
    left: 10%;
    width: 80%;
    height: 5%;
}

.ux-highlight[data-highlight="card"] {
    top: 35.5%;
    left: 10%;
    width: 80%;
    height: 15.5%;
}

.ux-highlight[data-highlight="hierarchy"] {
    top: 42.5%;
    left: 38%;
    width: 48%;
    height: 3%;
}

.ux-highlight[data-highlight="cta"] {
    top: 46%;
    left: 38%;
    width: 48%;
    height: 4%;
}

/* Hover triggers via :has() */
.ux-breakdown-wrapper:has(.ux-point[data-target="search"]:hover) .ux-highlight[data-highlight="search"],
.ux-breakdown-wrapper:has(.ux-point[data-target="card"]:hover) .ux-highlight[data-highlight="card"],
.ux-breakdown-wrapper:has(.ux-point[data-target="hierarchy"]:hover) .ux-highlight[data-highlight="hierarchy"],
.ux-breakdown-wrapper:has(.ux-point[data-target="cta"]:hover) .ux-highlight[data-highlight="cta"] {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 145, 77, 0.4);
}

.ux-breakdown-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 500px;
    background: var(--accent-orange);
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
}

.ux-breakdown-points {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ux-point {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: none !important;
}

.ux-point:hover,
.ux-point.auto-hover-sim {
    transform: translateX(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 4px 4px 0px rgba(255, 145, 77, 0.2);
}

.ux-point-icon {
    font-size: 1.5rem;
    background: rgba(255, 145, 77, 0.1);
    color: var(--accent-orange);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.ux-point-content h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ux-point-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

.ux-point-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .ux-breakdown-wrapper {
        flex-direction: column;
    }
    .ux-point:hover {
        transform: translateY(-5px) translateX(0);
    }
    .ux-image-container {
        max-width: 280px;
    }
}

/* UX Tabs */
.ux-tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ux-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: none !important;
    transition: all 0.3s ease;
}

.ux-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.ux-tab.active {
    background: var(--accent-orange);
    color: var(--bg-color);
    border-color: var(--accent-orange);
    font-weight: 600;
}

/* Screen Content Visibility */
.ux-screen-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
    text-align: center; /* For footer note */
}

.ux-screen-content.active {
    display: block;
}

.ux-breakdown-wrapper {
    text-align: left; /* Reset from screen-content center */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer Note */
.ux-footer-note {
    font-size: 1.1rem;
    color: var(--accent-orange);
    margin-top: 3rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: rgba(255, 145, 77, 0.05);
    padding: 1rem 2rem;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(255, 145, 77, 0.1);
}

/* Base positions for NEW screens (Approximate) */
.ux-highlight[data-highlight="detail-pulsating"] { top: 15%; left: 20%; width: 60%; height: 10%; }
.ux-highlight[data-highlight="detail-tap"] { top: 28%; left: 10%; width: 80%; height: 12%; }
.ux-highlight[data-highlight="detail-visual"] { top: 45%; left: 10%; width: 80%; height: 25%; }
.ux-highlight[data-highlight="detail-category"] { top: 72%; left: 30%; width: 40%; height: 5%; }
.ux-highlight[data-highlight="detail-pitch"] { top: 80%; left: 10%; width: 80%; height: 10%; }

.ux-highlight[data-highlight="intensity-metrics"] { top: 30%; left: 15%; width: 70%; height: 15%; }
.ux-highlight[data-highlight="intensity-bars"] { top: 48%; left: 15%; width: 70%; height: 20%; }
.ux-highlight[data-highlight="intensity-microcopy"] { top: 70%; left: 20%; width: 60%; height: 5%; }
.ux-highlight[data-highlight="intensity-overlay"] { top: 5%; left: 5%; width: 90%; height: 90%; }

.ux-highlight[data-highlight="login-visual"] { top: 15%; left: 10%; width: 80%; height: 30%; }
.ux-highlight[data-highlight="login-purpose"] { top: 48%; left: 20%; width: 60%; height: 10%; }
.ux-highlight[data-highlight="login-inputs"] { top: 62%; left: 10%; width: 80%; height: 18%; }
.ux-highlight[data-highlight="login-layout"] { top: 5%; left: 5%; width: 90%; height: 85%; }

/* Hover triggers for new screens */
.ux-breakdown-wrapper:has(.ux-point[data-target="detail-pulsating"]:hover) .ux-highlight[data-highlight="detail-pulsating"],
.ux-breakdown-wrapper:has(.ux-point[data-target="detail-tap"]:hover) .ux-highlight[data-highlight="detail-tap"],
.ux-breakdown-wrapper:has(.ux-point[data-target="detail-visual"]:hover) .ux-highlight[data-highlight="detail-visual"],
.ux-breakdown-wrapper:has(.ux-point[data-target="detail-category"]:hover) .ux-highlight[data-highlight="detail-category"],
.ux-breakdown-wrapper:has(.ux-point[data-target="detail-pitch"]:hover) .ux-highlight[data-highlight="detail-pitch"],
.ux-breakdown-wrapper:has(.ux-point[data-target="intensity-metrics"]:hover) .ux-highlight[data-highlight="intensity-metrics"],
.ux-breakdown-wrapper:has(.ux-point[data-target="intensity-bars"]:hover) .ux-highlight[data-highlight="intensity-bars"],
.ux-breakdown-wrapper:has(.ux-point[data-target="intensity-microcopy"]:hover) .ux-highlight[data-highlight="intensity-microcopy"],
.ux-breakdown-wrapper:has(.ux-point[data-target="intensity-overlay"]:hover) .ux-highlight[data-highlight="intensity-overlay"],
.ux-breakdown-wrapper:has(.ux-point[data-target="login-visual"]:hover) .ux-highlight[data-highlight="login-visual"],
.ux-breakdown-wrapper:has(.ux-point[data-target="login-purpose"]:hover) .ux-highlight[data-highlight="login-purpose"],
.ux-breakdown-wrapper:has(.ux-point[data-target="login-inputs"]:hover) .ux-highlight[data-highlight="login-inputs"],
.ux-breakdown-wrapper:has(.ux-point[data-target="login-layout"]:hover) .ux-highlight[data-highlight="login-layout"],
.ux-highlight.auto-highlight-sim {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 145, 77, 0.4);
}

/* Carousel Container & Arrows */
.ux-carousel-container {
    position: relative;
    padding: 0 5rem; /* Space for arrows */
}

.ux-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-orange);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none !important;
    transition: all 0.3s ease;
    z-index: 20;
}

.ux-nav-arrow:hover {
    background: var(--accent-orange);
    color: var(--bg-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 145, 77, 0.3);
}

.prev-arrow {
    left: 0;
}

.next-arrow {
    right: 0;
}

@media (max-width: 900px) {
    .ux-carousel-container {
        padding: 0;
    }
    .ux-nav-arrow {
        top: auto;
        bottom: -60px; /* Place arrows below content on mobile */
        transform: none;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .ux-nav-arrow:hover {
        transform: scale(1.1);
    }
    .prev-arrow {
        left: 30%;
    }
    .next-arrow {
        right: 30%;
    }
}

/* --- Lightbox Modal --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow: hidden;
}
.lightbox-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
    object-fit: contain;
}
@keyframes zoomIn {
    from {transform:scale(0.9); opacity:0;}
    to {transform:scale(1); opacity:1;}
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}
.work-page .lightbox-close {
    font-size: 42px;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-orange);
    text-decoration: none;
}
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.work-page .lightbox-prev, .work-page .lightbox-next {
    font-size: 26px;
}
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: var(--accent-orange);
    color: #111;
}
.lightbox-prev {
    left: 5%;
}
.lightbox-next {
    right: 5%;
}
#lightbox-caption {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

/* --- Global Responsiveness Fixes --- */
@media (max-width: 1024px) {
    .case-study-page {
        padding-left: 20px;
        padding-right: 20px;
    }
    .cs-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .header .nav-content {
        padding: 0 1rem;
    }
    .header .nav-content > div {
        gap: 0.5rem !important;
        min-width: auto !important;
    }
    .nav-link {
        font-size: 0.95rem;
        padding: 0.5rem;
        margin: 0;
    }
    .logo {
        font-size: 1.1rem;
    }
    .case-study-page {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-top: 70px !important;
    }
    .cs-hero {
        padding: 0 !important;
        min-height: 250px !important;
        height: 35vh !important;
    }
    .cs-section {
        padding: 3rem 1rem !important;
    }
    .cs-heading {
        font-size: 1.3rem !important;
    }
    .cs-text p, .cs-list li {
        font-size: 1rem !important;
    }
    .personas-grid {
        gap: 2rem !important;
    }
    .clipboard-card {
        max-width: 100% !important;
        padding: 2.5rem 1.5rem 1.5rem !important;
        transform: none !important; /* Disable tilt on mobile for better fit */
    }
    .clipboard-card:hover {
        transform: translateY(-2px) !important;
    }
    .ux-tabs-container {
        gap: 0.5rem !important;
    }
    .ux-tab {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
    .ux-point {
        padding: 1.2rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    .marquee-content {
        gap: 1rem !important;
    }
}

/* Case Study Two-Column Images Layout */
.cs-two-images {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    align-items: center;
    width: 100%;
}
.cs-half-img {
    width: calc(50% - 1rem);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
@media (max-width: 768px) {
    .cs-two-images {
        flex-direction: column;
        gap: 1rem;
    }
    .cs-half-img {
        width: 100% !important;
    }
}

/* Hobbies Grid */
.hobbies-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1rem;
    padding-top: 2rem;
}

.hobby-card {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    aspect-ratio: 1;
    margin: 0;
}

.hobby-card:hover {
    transform: translateY(-5px);
    z-index: 10;
    margin: 0 10px; /* Dynamic spacing to push other cards away */
}

.placeholder-card {
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Vinyl Card Specifics */
.vinyl-card {
    cursor: pointer;
}

.vinyl-container {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    height: auto;
    margin-bottom: 1.5rem;
}

.vinyl-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vinyl-record {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    object-fit: contain;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
    transform: translateY(0) rotate(0deg);
}

.vinyl-card:hover .vinyl-cover {
    transform: translateY(10px);
}

.vinyl-card:hover .vinyl-record {
    opacity: 1;
    transform: translateY(-70px) rotate(180deg);
}

.hobby-info {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: 0.1s;
}

.vinyl-card:hover .hobby-info {
    opacity: 1;
    transform: translateY(0);
}

.hobby-info h3 {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-color);
}

/* HP Card Specifics */
.hp-card {
    cursor: pointer;
}

.hp-container {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    height: auto;
    margin-bottom: 1.5rem;
}

.hp-book {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    z-index: 2;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hp-char {
    position: absolute;
    width: 90px;
    height: 90px;
    object-fit: contain;
    z-index: 3; /* Move to front so they emerge from the pages */
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    top: 75%; /* Start from the book pages */
    left: 50%;
    transform: translate(-50%, -50%) scale(0.2); /* Start tiny */
}

.hp-card:hover .hp-book {
    transform: translateY(10px);
}

.hp-card:hover .hp-char {
    opacity: 1;
}

.hp-card:hover .dumbledore {
    transform: translate(-50%, -225%) scale(1); /* Center Top */
}

.hp-card:hover .lupin {
    transform: translate(30%, -200%) scale(1.4) rotate(15deg); /* Right Top, scaled up */
}

.hp-card:hover .snape {
    transform: translate(-130%, -200%) scale(1) rotate(-15deg); /* Left Top */
}

.hp-card:hover .hobby-info {
    opacity: 1;
    transform: translateY(0);
}

/* Photo Stack Card Specifics */
.photo-card {
    cursor: pointer;
}

.photo-container {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    height: auto;
    margin-bottom: 1.5rem;
}

.photo-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-side {
    position: absolute;
    width: 140px;
    height: 140px;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
}

.photo-card:hover .photo-main {
    transform: scale(1.05);
}

.photo-card:hover .left-photo {
    opacity: 1;
    transform: translate(-160%, -50%) rotate(-15deg) scale(1.05);
}

.photo-card:hover .right-photo {
    opacity: 1;
    transform: translate(60%, -50%) rotate(15deg) scale(1.05);
}

.photo-card:hover .hobby-info {
    opacity: 1;
    transform: translateY(0);
}

/* Certifications Section */
.certifications-section {
    margin: 4rem auto 2rem;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    padding: 0 1rem;
}

.certifications-section h2 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.cert-cards {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: nowrap;
}

.cert-card {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-width: 450px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.cert-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* --- Comprehensive Responsiveness --- */

/* 15-inch and 13-inch Laptops */
@media (max-width: 1440px) {
    .title { font-size: 4.8rem; }
    .role-title { font-size: 3rem; }
    .hero-frame { max-width: 95%; }
    .ux-breakdown-wrapper { padding: 0 1rem; }
}

@media (max-width: 1280px) {
    .title { font-size: 4.2rem; }
    .role-title { font-size: 2.8rem; }
    .bio-text { font-size: 1.1rem; }
    .works-stack { gap: 40px; }
    .ux-carousel-container { padding: 0 2rem; }
}

/* Tablets Landscape & Portrait */
@media (max-width: 1024px) {
    .title { font-size: 3.8rem; }
    .role-title { font-size: 2.5rem; }
    .resume-glass { padding: 40px 30px; }
    .hobbies-grid, .cert-cards { padding-left: 1rem; padding-right: 1rem; }
    .hobby-card:hover { margin: 0 5px; transform: translateY(-5px); z-index: 10; }
    .ux-breakdown-wrapper { flex-direction: column; align-items: center; }
    .ux-image-container { max-width: 80%; }

    /* Hide floating hero elements and wire */
    .creation-sticker-container,
    .swatch-container,
    .ruler-container,
    .box-container,
    .polaroid-container,
    .curved-wire {
        display: none !important;
    }

    /* Stack hobbies vertically */
    .hobbies-grid {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    .hobby-card {
        width: 100%;
        max-width: 320px;
        aspect-ratio: 1;
        flex: none;
    }
}

@media (max-width: 768px) {
    .title { font-size: 3.2rem; }
    .role-title { font-size: 2.2rem; }
    .bio-text { font-size: 1rem; }
    .resume-header h2 { font-size: 2.2rem; }
    .ux-image-container { max-width: 100%; }
    .clipboard-card { max-width: 100%; }

    /* Hero Frame Constraints for smaller devices */
    .hero-frame {
        height: auto !important;
        max-height: none !important;
        padding: 1.5rem;
        border: none;
        display: flex;
        flex-direction: column;
    }

    /* Adjust hobbies photo fan-out for touch/smaller screens to prevent off-screen clipping */
    .photo-card:hover .left-photo {
        opacity: 1;
        transform: translate(-95%, -50%) rotate(-15deg) scale(1.05) !important;
    }
    .photo-card:hover .right-photo {
        opacity: 1;
        transform: translate(-5%, -50%) rotate(15deg) scale(1.05) !important;
    }

    /* Certifications responsive stacking */
    .cert-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .cert-card {
        max-width: 100%;
        width: 100%;
    }

    /* Loader Screen responsive fixes */
    .footprints-container {
        width: 100% !important;
        max-width: 320px !important;
        height: 100px !important;
        bottom: 20% !important;
    }
    .footprint {
        width: 24px !important;
        height: 48px !important;
    }
    #loader-screen .quote-text {
        font-size: 1.2rem !important;
        line-height: 1.5 !important;
        max-width: 90% !important;
    }
}

/* Mobile Screens */
@media (max-width: 480px) {
    /* Keep navigation horizontal on mobile by overriding column stack */
    .title { font-size: 2.6rem; min-height: 2.8rem; }
    .role-title { font-size: 1.8rem; min-height: 2rem; transform: translateX(0); text-align: center; }
    .hero { padding-top: 90px; }
    .cta-btn { padding: 1rem 0; font-size: 1rem; width: 100%; margin-top: 1.5rem; }
    .resume-header h2 { font-size: 1.8rem; }
    .resume-glass { padding: 20px 15px; }
    .experience-header .company { font-size: 0.95rem; }
    .cs-heading { font-size: 1.2rem; }
    .cs-hero { min-height: 200px !important; }
    .ux-tab { padding: 0.5rem 0.6rem !important; font-size: 0.8rem !important; }
    
    .eye-container { width: 120px; height: 120px; }
    .eye { width: 90px; height: 90px; }
    .pupil { width: 45px; height: 45px; }
}

/* --- Light Mode --- */
body.light-mode {
    --bg-color: #f0f4f8;
    --text-color: #1a3c54;
    --accent-orange: #e66c17;
    --eye-white: #ffffff;
    --pupil-color: #000000;
}

body.light-mode::before {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

body.light-mode .header.scrolled {
    background: rgba(240, 244, 248, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Light mode borders */
body.light-mode .hero-frame {
    border: 2px solid #1a3c54;
}

body.light-mode .work-card,
body.light-mode .resume-glass {
    border: 1px solid #1a3c54;
}

body.light-mode .work-card {
    box-shadow: 8px 8px 0px rgba(230, 108, 23, 0.25);
}

body.light-mode .hobby-card {
    border: none;
}

/* CTA Button Shadow in Light Mode */
body.light-mode .cta-btn {
    box-shadow: 4px 4px 0px rgba(230, 108, 23, 0.25);
}
body.light-mode .cta-btn:hover {
    box-shadow: 6px 6px 0px rgba(230, 108, 23, 0.25);
}
body.light-mode .cta-btn:active {
    box-shadow: 2px 2px 0px rgba(230, 108, 23, 0.25);
}

/* Light Mode overrides for elements with white text on white-ish bg */
body.light-mode .cs-meta-block p,
body.light-mode .cs-text p,
body.light-mode .cs-list li,
body.light-mode .cs-meta,
body.light-mode .ux-point-content p,
body.light-mode .ux-tab {
    color: #1a3c54 !important;
}

body.light-mode .ux-tab {
    border-color: rgba(26, 60, 84, 0.2);
    background: rgba(26, 60, 84, 0.05);
}

body.light-mode .ux-tab:hover {
    background: rgba(26, 60, 84, 0.1);
    color: #1a3c54;
}

body.light-mode .ux-tab.active {
    background: var(--accent-orange);
    color: var(--bg-color); /* #f0f4f8 */
    border-color: var(--accent-orange);
}

body.light-mode .ux-point {
    background: rgba(26, 60, 84, 0.03);
    border-color: rgba(26, 60, 84, 0.1);
}

body.light-mode .ux-point:hover {
    background: rgba(26, 60, 84, 0.08);
    border-color: rgba(26, 60, 84, 0.2);
}

/* Light Mode Toggle Button */
#light-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100000;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#light-mode-toggle:hover {
    transform: scale(1.05);
}

#light-mode-toggle .lumos-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    opacity: 0.9;
    transition: all 0.3s ease;
    pointer-events: none;
}

#light-mode-toggle .bulb-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.2);
    border: none;
    transition: all 0.3s ease;
}

/* Sparkly animation */
@keyframes sparkle-burst {
    0% { transform: scale(0) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 5px white); }
    100% { transform: scale(1.5) rotate(180deg); opacity: 0; filter: drop-shadow(0 0 15px white); }
}

#light-mode-toggle::before {
    content: '✨';
    position: absolute;
    top: -15px;
    left: -15px;
    font-size: 1.5rem;
    opacity: 0;
    pointer-events: none;
    color: white;
}
#light-mode-toggle::after {
    content: '✨';
    position: absolute;
    bottom: -10px;
    right: 45px;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    color: white;
}

#light-mode-toggle:hover::before {
    animation: sparkle-burst 0.8s ease-out infinite;
}
#light-mode-toggle:hover::after {
    animation: sparkle-burst 0.8s ease-out infinite;
    animation-delay: 0.4s;
}

/* When active (Light mode is ON) */
body.light-mode #light-mode-toggle .lumos-text {
    color: #e66c17;
    text-shadow: none;
}

body.light-mode #light-mode-toggle .bulb-icon {
    background: transparent;
    color: #e66c17;
    box-shadow: 0 0 30px rgba(230, 108, 23, 0.8), inset 0 0 15px rgba(230, 108, 23, 0.5);
}

body.light-mode #light-mode-toggle::before,
body.light-mode #light-mode-toggle::after {
    color: #e66c17;
}

/* Magic Cursor Sparkle Trail */
.cursor-sparkle {
    position: fixed;
    pointer-events: none;
    color: #ffffff;
    font-size: 14px;
    z-index: 999998;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: sparkle-trail 2s forwards ease-out;
}
.work-page .cursor-sparkle {
    font-size: 16px;
}

body.light-mode .cursor-sparkle {
    color: #1a3c54;
    text-shadow: 0 0 5px rgba(26, 60, 84, 0.8);
}

@keyframes sparkle-trail {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(0) rotate(90deg); opacity: 0; }
}

/* --- Light Mode Work Card Text --- */
body.light-mode .work-card h3,
body.light-mode .work-card p,
body.light-mode .work-card .work-link {
    color: #1a3c54 !important;
}

/* --- WIP Cursor Text --- */
body.hovering-wip-card #wand-cursor {
    background-image: none;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    filter: none;
}

body.hovering-wip-card #wand-cursor::after {
    content: 'Work in Progress';
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a3c54;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 4px 4px 0px var(--accent-orange);
    white-space: nowrap;
}

body.light-mode.hovering-wip-card #wand-cursor::after {
    background: #f0f4f8;
    color: #1a3c54;
    border-color: #1a3c54;
}

/* --- Harry Potter Loader --- */
#loader-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #1a3c54;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-family: 'Outfit', sans-serif;
    animation: fadeOutLoader 1s ease 8s forwards;
}

@keyframes fadeOutLoader {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

#loader-screen .loader-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loader-screen .quote-text {
    font-size: 1.8rem;
    font-style: italic;
    text-align: center;
    max-width: 800px;
    padding: 20px;
    opacity: 0;
    animation: quoteFade 6s ease 1s forwards;
}

#loader-screen .quote-author {
    display: block;
    margin-top: 20px;
    font-size: 1.2rem;
    font-style: normal;
    font-weight: 600;
}

@keyframes quoteFade {
    0% { opacity: 0; transform: translateY(20px); filter: blur(10px); }
    20% { opacity: 1; transform: translateY(0); filter: blur(0); }
    80% { opacity: 1; transform: translateY(0); filter: blur(0); }
    100% { opacity: 0; transform: translateY(-20px); filter: blur(10px); }
}

.footprints-container {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 150px;
}

.footprint {
    position: absolute;
    width: 40px;
    height: 80px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    transform: rotate(90deg);
}

.right-foot {
    margin-top: 50px;
}

.fp1 { left: 0%; animation: walk 2s linear 1.5s forwards; }
.fp2 { left: 16%; animation: walk 2s linear 2.5s forwards; }
.fp3 { left: 32%; animation: walk 2s linear 3.5s forwards; }
.fp4 { left: 48%; animation: walk 2s linear 4.5s forwards; }
.fp5 { left: 64%; animation: walk 2s linear 5.5s forwards; }
.fp6 { left: 80%; animation: walk 2s linear 6.5s forwards; }

@keyframes walk {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* --- Background Scroll Footprints --- */
#scroll-footprints-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

main {
    position: relative;
    z-index: 2;
}

.bg-footprint {
    position: absolute;
    width: 24px;
    height: 48px;
    pointer-events: none;
    z-index: 1;
}

.bg-footprint .footprint-svg {
    width: 100%;
    height: 100%;
    color: #ffffff;
    fill: currentColor;
    opacity: 0;
    transform: scale(0.8);
    animation: footprint-life 8s ease-in-out forwards;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.75)) drop-shadow(0 2px 4px rgba(26, 60, 84, 0.25));
}

body.light-mode .bg-footprint .footprint-svg {
    color: #1a3c54;
    filter: drop-shadow(0 0 2px rgba(26, 60, 84, 0.15)) drop-shadow(0 1px 2px rgba(26, 60, 84, 0.1));
}

@keyframes footprint-life {
    0% {
        opacity: 0;
        transform: scale(0.75);
    }
    15% {
        opacity: 0.16;
        transform: scale(1);
    }
    80% {
        opacity: 0.16;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.85);
    }
}