/* 
 * MONOCHROME SCROLLYTELLING THEME
 * Strictly Black & White. High Contrast. Cinematic.
 */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-gray: #333333;
    /* For subtle borders only */
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-display);
    line-height: 1.5;
    overflow-x: hidden;
    cursor: default;
    /* custom cursor can be added later */

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

/* 
 * Typography 
 */
h1,
h2,
h3,
.large-text {
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 10rem);
}

h2 {
    font-size: clamp(2rem, 8vw, 6rem);
}

p {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 60ch;
}

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

/*
 * Utility: Section
 * Each section takes at least full viewport height
 */
/*
 * Experiment: Scroll Snap (Presentation Mode)
 */
html {
    scroll-snap-type: y mandatory;
}

section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--accent-gray);
    position: relative;
    background-color: var(--bg-color);
    scroll-snap-align: start;
    /* Snap to top of each section */
}

/* Ensure content is centered and contained */
.container {
    max-width: 100%;
    margin: 0;
    width: 100%;
    padding: 0 2rem;
}

/* Reverting Split Screen - No Media Query needed here */

/*
 * Navigation
 * Uses mix-blend-mode to be visible on both black and white (if we invert)
 */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    z-index: 201;
    /* Above Overlay (150) */
    /* mix-blend-mode: difference; */
    /* Critical for B&W visibility - REMOVED for Blur */
    color: #fff;
    pointer-events: none;
    /* Let clicks pass through empty areas */
    /* background-color: black; */

    /* Glass Effect */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-right {
    display: flex;
    gap: 2rem;
    pointer-events: auto;
}

.nav-fixed a {
    pointer-events: auto;
}

/* 
 * Logo Shimmer Animation 
 */
.logo-text {
    background: linear-gradient(to right, #fff 20%, #666 50%, #fff 80%);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    font-weight: 800;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* 
 * Hero Section Layout 
 */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
    opacity: 0.8;
    perspective: 1200px;
    /* Natural 3D Depth */
}

/* 
 * Tech Solar System Animation 
 */
/* 
 * Tech Solar System Animation - 3D Enchanced
 */
.solar-system {
    width: 400px;
    height: 400px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    transform: rotateX(40deg);
}

.sun {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #fff, rgba(255, 255, 255, 0.2));
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.6);
    /* z-index removed for 3D occlusion */
    transform: rotateX(-40deg);
    transform-style: preserve-3d;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Increased visibility */
    border-radius: 50%;
    animation: rotateOrbit linear infinite;
    transform-style: preserve-3d;
}

/* Inner Orbit - 3 items */
.orbit-1 {
    width: 120px;
    height: 120px;
    animation-duration: 20s;
}

/* Middle Orbit 1 - 4 items */
.orbit-2 {
    width: 210px;
    height: 210px;
    animation-duration: 30s;
    animation-direction: reverse;
}

/* Middle Orbit 2 - 4 items */
.orbit-3 {
    width: 300px;
    height: 300px;
    animation-duration: 50s;
}

/* Outer Orbit - 4 items */
.orbit-4 {
    width: 390px;
    height: 390px;
    animation-duration: 70s;
    animation-direction: reverse;
}

.planet {
    position: absolute;
    width: 32px;
    height: 32px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
}

.planet svg {
    width: 100%;
    height: 100%;
}

/* 
   Positioning Planets 
   Note: Using margins instead of transform: translate for centering 
   to allow 'transform' to be used exclusively for 3D counter-rotation animations.
   Offsets adjusted for 32px planet size (16px radius).
*/

/* Orbit 1 Positions */
.orbit-1 .planet-1 {
    top: -16px;
    left: 50%;
    margin-left: -16px;
    animation: orbit-counter-rotate 20s linear infinite;
}

.orbit-1 .planet-2 {
    top: 60%;
    right: -10px;
    animation: orbit-counter-rotate 20s linear infinite;
}

.orbit-1 .planet-3 {
    top: 60%;
    left: -10px;
    animation: orbit-counter-rotate 20s linear infinite;
}

/* Orbit 2 Positions (Reverse) */
.orbit-2 .planet-1 {
    top: -16px;
    left: 50%;
    margin-left: -16px;
    animation: orbit-counter-rotate-reverse 30s linear infinite;
}

.orbit-2 .planet-2 {
    bottom: -16px;
    left: 50%;
    margin-left: -16px;
    animation: orbit-counter-rotate-reverse 30s linear infinite;
}

.orbit-2 .planet-3 {
    top: 50%;
    left: -16px;
    margin-top: -16px;
    animation: orbit-counter-rotate-reverse 30s linear infinite;
}

.orbit-2 .planet-4 {
    top: 50%;
    right: -16px;
    margin-top: -16px;
    animation: orbit-counter-rotate-reverse 30s linear infinite;
}

/* Orbit 3 Positions */
.orbit-3 .planet-1 {
    top: 15%;
    left: 15%;
    animation: orbit-counter-rotate 50s linear infinite;
}

.orbit-3 .planet-2 {
    top: 15%;
    right: 15%;
    animation: orbit-counter-rotate 50s linear infinite;
}

.orbit-3 .planet-3 {
    bottom: 15%;
    left: 15%;
    animation: orbit-counter-rotate 50s linear infinite;
}

.orbit-3 .planet-4 {
    bottom: 15%;
    right: 15%;
    animation: orbit-counter-rotate 50s linear infinite;
}

/* Orbit 4 Positions (Reverse) */
.orbit-4 .planet-1 {
    top: 50%;
    left: -16px;
    margin-top: -16px;
    animation: orbit-counter-rotate-reverse 70s linear infinite;
}

.orbit-4 .planet-2 {
    top: 50%;
    right: -16px;
    margin-top: -16px;
    animation: orbit-counter-rotate-reverse 70s linear infinite;
}

.orbit-4 .planet-3 {
    top: -16px;
    left: 50%;
    margin-left: -16px;
    animation: orbit-counter-rotate-reverse 70s linear infinite;
}

.orbit-4 .planet-4 {
    bottom: -16px;
    left: 50%;
    margin-left: -16px;
    animation: orbit-counter-rotate-reverse 70s linear infinite;
}

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

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

/* 
 Counter-Rotate Animations
 These keep the planets facing the viewer (vertical) and upright (not spinning with orbit)
 as the orbit rotates. 
 */
@keyframes orbit-counter-rotate {
    from {
        transform: rotateZ(360deg) rotateX(-40deg);
    }

    to {
        transform: rotateZ(0deg) rotateX(-40deg);
    }
}

@keyframes orbit-counter-rotate-reverse {
    from {
        transform: rotateZ(0deg) rotateX(-40deg);
    }

    to {
        transform: rotateZ(360deg) rotateX(-40deg);
    }
}

/* Spin the icon inside slightly for extra flare */
.planet svg {
    width: 100%;
    height: 100%;
    animation: spinSelf 20s linear infinite;
}

/* Reverted hover fill */

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

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

/* 
 * Planet Tooltip (Name on Hover)
 */
.planet {
    position: absolute;
    /* ... existing styles ... */
    /* Ensure tooltip positioning aligns */
}

/* Tooltip style */
.planet::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-display);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.planet:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.planet:hover {
    z-index: 50;
    /* Bring hovered planet to front */
    border-color: #fff;
    /* Highlight border */
    cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .solar-system {
        transform: scale(0.7);
    }
}

/* 
 * Hero Intro Animation 
 */
.reveal.active .hero-intro {
    animation: focus-in 1.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    animation-delay: 0.2s;
    /* slight delay after section reveal */
}

@keyframes focus-in {
    0% {
        letter-spacing: -0.5em;
        filter: blur(12px);
        opacity: 0;
    }

    100% {
        filter: blur(0px);
        opacity: 1;
    }
}

/* 
 * Animations / Interactivity 
 */
.hide-overflow {
    overflow: hidden;
    margin-left: -7px;
}

/* The element starts hidden (translated down) and opaque */
/* The element starts hidden (translated down) and opaque */
.reveal {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Added by JS when in view */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}





/* 
 * Project List Styles 
 */
.project-item {
    padding: 4rem 0;
    border-top: 1px solid var(--accent-gray);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: flex-start;
    transition: background 0.3s ease;
}

.project-item:hover {
    background: #111;
}

.project-title {
    font-size: clamp(2rem, 5vw, 4rem);
}

.project-cats {
    font-family: monospace;
    color: #666;
}

.project-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
    text-align: right;
}

.project-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-project {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 140px;
}

.btn-project:hover {
    background: #fff;
    color: #000;
}

/* 
 * Horizontal Scrolling Marquee 
 */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    opacity: 0.1;
}

.marquee-content {
    display: inline-block;
    animation: scroll 20s linear infinite;
    font-size: 8rem;
    font-weight: 900;
    padding: -10px;
    margin-top: -30px;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* 
 * Scroll Indicator
 */
/* 
 * Scroll Indicator
 */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 50;
    pointer-events: none;
    animation: bounce 2s infinite;
}

.scroll-indicator.hidden {
    opacity: 0;
}

.scroll-indicator .text {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    color: #888;
}

.scroll-indicator .arrow {
    color: #fff;
    opacity: 0.8;
}

.scroll-indicator .arrow svg {
    display: block;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* 
 * Back to Top Button
 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #fff;
    color: #000;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 99;
}

.back-to-top:hover {
    transform: scale(1.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 
 * Resume Section 
 */
#resume {
    background-color: #050505;
    /* Slightly distinctive background */
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.resume-header {
    border-bottom: 1px solid var(--accent-gray);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.resume-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.resume-links a {
    color: #888;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.resume-links a:hover {
    color: #fff;
}

.resume-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 768px) {
    .resume-grid {
        grid-template-columns: 1fr 1.5fr;
        /* 40% - 60% split */
    }
}

.resume-block {
    margin-bottom: 3rem;
}

.resume-block h3 {
    font-size: 1.2rem;
    color: #666;
    /* Subdued header */
    margin-bottom: 1.5rem;
    border-left: 2px solid white;
    padding-left: 1rem;
}

.resume-item {
    margin-bottom: 2rem;
}

.resume-item h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #fff;
}

.sub-text {
    font-family: monospace;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    margin-bottom: 0.8rem;
    color: #ccc;
}

.skills-list strong {
    color: #fff;
}

.list-dots {
    list-style: none;
    padding-left: 1rem;
}

.list-dots li {
    position: relative;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-size: 1rem;
}

.list-dots li::before {
    content: '•';
    position: absolute;
    left: -1rem;
    color: #666;
}

.btn-download {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: black;
    font-weight: 800;
    border: 1px solid white;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: black;
    color: white;
}

/*
 * RESPONSIVE & MOBILE STYLES
 */
@media (max-width: 768px) {

    /* Typography */
    html {
        font-size: 14px;
        /* Slightly smaller base font */
    }

    h1 {
        font-size: clamp(3rem, 15vw, 5rem);
        /* Adjust hero title */
    }

    .project-title {
        font-size: 2.5rem;
    }

    /* Navigation */
    .nav-fixed {
        padding: 1rem;
    }

    .nav-right {
        gap: 1rem;
    }

    /* Marquee */
    .marquee-content {
        font-size: 4rem;
        margin-top: -10px;
    }

    /* Projects */
    .project-item {
        display: flex;
        /* Fallback or keep flex for stack */
        flex-direction: column;
        gap: 1.5rem;
        padding: 3rem 0;
    }

    .project-cats {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
        color: #888;
    }

    .project-right {
        align-items: flex-start;
        width: 100%;
        gap: 1.5rem;
    }

    .project-buttons {
        flex-direction: row;
        width: 100%;
    }

    .btn-project {
        width: 100%;
        text-align: center;
    }

    /* Resume */
    .resume-grid {
        gap: 2rem;
    }

    .resume-links {
        display: block;
        /* If we kept it, but we moved it */
    }

    /* Contact */
    .big-links a {
        font-size: 2rem;
        /* Smaller big links */
    }
}

/* 
 * Big Links for Profiles/Contact 
 */

.big-links a {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    display: inline-block;
}

/* 
 * Profiles Grid & Cards
 */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
    transition: transform 0.4s ease;
}

.profile-card:hover .card-icon svg {
    transform: scale(1.1);
}

.profile-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.profile-card p {
    font-size: 1rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 100%;
}

.card-link-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    display: inline-block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.profile-card:hover .card-link-text {
    border-bottom-color: #fff;
}

/* LeetCode Header & Stats */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

/* Override default card-icon margin when inside header */
.card-header .card-icon {
    margin-bottom: 0;
}

.leetcode-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 0.8rem 1.5rem;
    /* Broader padding */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 160px;
    /* Broader width */
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.leetcode-stats:hover {
    border-color: rgba(255, 161, 22, 0.3);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.4;
    width: 100%;
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 0.2rem;
}

/* Gradient Separator Line */
.stat-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.stat-value {
    font-size: 1.8rem;
    /* Larger, more impactful */
    font-weight: 900;
    color: #FFA116;
    /* LeetCode Orange */
    text-shadow: 0 0 20px rgba(255, 161, 22, 0.15);
    /* Soft glow */
    line-height: 1;
    font-variant-numeric: tabular-nums;
    /* Better alignment for numbers */
}

/* 
 * Multi-Column Footer 
 */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--accent-gray);
}

#contact {
    position: relative;
    padding-bottom: 4rem;
    /* Ensure space for copyright */
}

.footer-copyright {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    text-align: center;
    border-top: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.65rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-copyright p {
    max-width: none;
    width: 100%;
    margin: 0;
    font-size: inherit;
    color: inherit;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 
 * Project Detail Pages 
 */
.project-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.project-link:hover .project-title {
    color: #fff;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    /* Assuming project-item was flex or block, keep existing layout */
    width: 100%;
    /* Keep existing project-item styles by inheriting or simply not overriding if they are on .project-item */
}

/* Ensure hover effect works on the title when the card is hovered */
.project-card-link:hover .project-title {
    color: #fff;
}

.project-detail-section {
    padding-top: 5rem;
    min-height: 80vh;
}



.project-detail-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #fff;
    color: #000;
    padding: 1rem 2rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.3s ease;
    border: 1px solid #fff;
    display: inline-block;
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    padding: 1rem 2rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    background-color: #fff;
    color: #000;
}

.project-detail-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.big-cats span {
    font-size: 1.2rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 500;
}

.project-detail-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 4rem;
}

.detail-block h3 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.detail-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ddd;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.detail-list {
    list-style: none;
}

.detail-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #ddd;
    line-height: 1.6;
}

.detail-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-gray);
}

.footer-heading {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links li a {
    color: #888;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
}

.footer-links li a:hover {
    color: #fff;
}

.footer-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 columns on mobile */
        gap: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        /* 1 column on very small screens */
        gap: 3rem;
    }
}

/* 
 * Hamburger Menu & Overlay 
 */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 200;
    /* Above overlay */
    position: relative;
    pointer-events: auto;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Hamburger Turn to X Animation */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 150;
    /* Below hamburger, above everything else */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1), visibility 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

#nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.overlay-menu {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
}

.overlay-link {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    transition: color 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
}

#nav-overlay.open .overlay-link {
    opacity: 1;
    transform: translateY(0);
}

#nav-overlay.open .overlay-link:nth-child(1) {
    transition-delay: 0.1s;
}

#nav-overlay.open .overlay-link:nth-child(2) {
    transition-delay: 0.2s;
}

#nav-overlay.open .overlay-link:nth-child(3) {
    transition-delay: 0.3s;
}

#nav-overlay.open .overlay-link:nth-child(4) {
    transition-delay: 0.4s;
}

#nav-overlay.open .overlay-link:nth-child(5) {
    transition-delay: 0.5s;
}

/* Slot Machine styles */
.slot-digit {
    display: inline-block;
    position: relative;
    height: 1.2em;
    width: 0.6em;
    /* Narrowed width for digits */
    overflow: hidden;
    vertical-align: bottom;
}

.slot-strip {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    will-change: transform;
    line-height: 1.2em;
    /* Must match container height */
}

/* Symbol like + */
.slot-symbol {
    display: inline-block;
    vertical-align: bottom;
    padding-left: 0.1em;
}

.overlay-link:hover {
    color: #fff;
}

@keyframes rotate-text {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile adjust for footer badge */
@media (max-width: 768px) {
    .footer-bottom-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .rotating-badge-container {
        margin-top: 2rem;
        align-self: flex-end;
        /* Places it to the right on mobile too, or use center */
    }
}

/* 
 * WRITINGS PAGE STYLES 
 */
.writings-list {
    display: flex;
    flex-direction: column;
}

.writing-item {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    gap: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    align-items: center;
    border-radius: 12px;
}

.writing-item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.writing-item:hover {
    padding-left: 2rem;
    /* Reset padding shift from previous style */
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.writing-image-container {
    width: 250px;
    height: 160px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.writing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.writing-item:hover .writing-image {
    transform: scale(1.05);
}

.writing-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.writing-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 800px;
}

.writing-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.writing-platform {
    border: 1px solid #444;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #888;
}

.writing-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.writing-item:hover .writing-title {
    color: #fff;
    /* text-decoration: underline; */
}

.writing-desc {
    font-size: 1rem;
    color: #888;
    margin-top: 0.5rem;
    line-height: 1.5;
    max-width: 90%;
}

.writing-arrow {
    font-size: 2rem;
    color: #444;
    transition: all 0.3s ease;
}

.writing-item:hover .writing-arrow {
    color: #fff;
    transform: translateX(10px) rotate(-45deg);
}

/* Mobile adjust */
@media (max-width: 768px) {
    .writing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .writing-right {
        align-self: flex-end;
    }

}