/* Global Variables */
:root {
    --bg-color: #F0F4E8;
    --card-yellow: #FEDC6C;
    --card-blue: #8AC2E9;
    --card-orange: #FF9999;
    --card-green: #C8E4B2;
    --card-purple: #D3C5E5;
    --card-dark: #3D2B1F;

    --text-main: #2D2D2D;

    --font-heading: 'Dela Gothic One', cursive, sans-serif;
    --font-body: 'Outfit', sans-serif;

    --radius-lg: 40px;
    --radius-md: 24px;
    --xp-pink: #FF66A1;
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-main);
    padding-top: 100px;
    /* Space for fixed nav */
    padding-bottom: 50px;
    position: relative;
    /* Ensure z-index works */
}

/* Background Design Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Place behind everything */
    background-image: url('bg-design.png');
    /* Save your image as this name! */
    background-size: 1180px;
    background-position: center -80px;
    background-repeat: repeat;
    opacity: 0.20;
    /* Low opacity pattern */
    pointer-events: none;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 15px 40px;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease;
}

.navbar.nav-hidden {
    transform: translate(-50%, -200%);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1rem;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
}

.cta-btn {
    background: #000;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    transition: transform 0.2s;
}

.cta-btn:hover {
    transform: scale(1.05);
}

/* Sections Common */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    margin-bottom: 80px;
}

.section-badge {
    background: var(--text-main);
    color: white;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-family: var(--font-heading);
    margin-bottom: 24px;
    font-size: 1.2rem;
    transform: rotate(-1deg);
}

.hero-header {
    text-align: center;
    padding: 40px 0;
}

.hero-header h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 10px;
    color: var(--card-orange);
    text-shadow: 3px 3px 0 #000;
}

.hero-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 600;
}

.decorative-sparkle {
    font-size: 3rem;
    display: inline-block;
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    grid-auto-rows: minmax(200px, auto);
}

/* Spans */
.feature-span {
    grid-column: span 2;
}

.full-span {
    grid-column: 1 / -1;
}

/* Bento Items */
.bento-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

/* .bento-item:hover {
    border-color: var(--text-main);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
} */

.bento-item h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 10px 0;
}

.stat-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 6rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}

/* Specific Card Colors */
.profile-card {
    background: var(--card-blue);
    text-align: center;
}

.coffee {
    background: var(--card-yellow);
}

.curiosity {
    background: var(--card-green);
}

.overthinking {
    background: var(--card-purple);
    color: var(--text-main);
}

.side-quests {
    background: var(--card-orange);
    color: white;
}

.projects-card {
    background: var(--card-dark);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 12px;
    font-weight: 600;
}

.project-item ion-icon {
    color: var(--card-orange);
    font-size: 1.2rem;
}

/* Profile Extras */
.card-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 5px #0f0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    border: 4px solid white;
    z-index: 2;
    position: relative;
}

.aura-circle {
    position: absolute;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

/* XP Bar */
.xp-card {
    background: white;
    border: 2px solid var(--text-main);
}

.xp-header {
    display: flex;
    justify-content: value;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
}

.xp-track {
    background: transparent;
    height: 30px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--xp-pink);
    padding: 3px;
    /* subtle shadow */
    box-shadow: 0 4px 10px rgba(255, 102, 161, 0.2);
}

.xp-fill {
    /* Segmented Progress Bar Logic */
    background: repeating-linear-gradient(90deg,
            var(--xp-pink),
            var(--xp-pink) 10px,
            transparent 10px,
            transparent 15px);
    height: 100%;
    border-radius: 10px;
    border-right: none;
}

.xp-sub {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Debug Toggle Removed */

/* Marquee */
.marquee-strip {
    background: #F4BBD3;
    color: white;
    transform: rotate(1deg);
    padding: 15px 0;
    margin-bottom: 60px;
    white-space: nowrap;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    animation: scroll 20s linear infinite;
}

/* Lore Section Cards */
.lore-section {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--text-main);
}

.lore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.lore-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--card-yellow);
    display: inline-block;
    padding-bottom: 5px;
}

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

.pixel-list li {
    margin-bottom: 10px;
    font-weight: 600;
}

.npc-avatars {
    display: flex;
    gap: 10px;
    font-size: 2rem;
    cursor: help;
}

.npc:hover {
    transform: scale(1.2);
}

/* Whatsup Section */
.building-card {
    background: var(--card-green);
    border: 2px dashed var(--text-main);
}

.progress-pill {
    display: inline-block;
    background: var(--text-main);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.fixation-card {
    background: #FFEE8C;
    text-align: center;
}

.large-text {
    display: block;
    font-size: 2rem;
    font-family: var(--font-heading);
    margin-top: 10px;
    transform: rotate(-2deg);
}

.media-card {
    background: var(--card-purple);
}

.media-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: 600;
}

.quote-card {
    background: var(--card-dark);
    color: white;
    text-align: center;
}

.quote-card blockquote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.4;
}

.gpa-card {
    background: var(--card-purple);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mood-card {
    background: var(--xp-pink);
    color: white;
    text-align: center;
}

.mood-emoji {
    font-size: 4rem;
    margin: 10px 0;
}

.gpa-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.sem-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sem-label {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.7;
    text-transform: uppercase;
}

.sem-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.sem-divider {
    height: 40px;
    width: 2px;
    background: rgba(0, 0, 0, 0.1);
}

.cgpa-summary {
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
}

.sem-value.loading {
    animation: pulse 1.5s infinite;
}

/* Animations */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
    }
}

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

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

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

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


/* Footer */
footer {
    text-align: center;
    padding: 20px;
    opacity: 0.6;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 6px 10px;
        top: 10px;
        width: 96%;
        gap: 5px;
    }

    .logo {
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-links {
        gap: 6px;
    }

    .nav-links a {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .cta-btn {
        padding: 5px 10px;
        font-size: 0.6rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .feature-span,
    .full-span {
        grid-column: auto;
    }

    .hero-header h1 {
        font-size: 2.5rem;
    }
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-color);
    padding: 40px;
    border-radius: var(--radius-md);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 3px solid var(--text-main);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.modal-btn:hover {
    transform: scale(1.05);
}

.linkedin {
    background: #0077b5;
    color: white;
}

.substack {
    background: #FF6719;
    color: white;
}

.close-text {
    background: none;
    border: none;
    margin-top: 20px;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
}

/* Quote Animation */
@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.float-in {
    animation: floatUp 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Bonsai Skill Tree */
.bonsai-card {
    background: var(--card-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bonsai-container {
    width: 120px;
    height: 120px;
    margin: 10px 0;
}

.bonsai-svg {
    width: 100%;
    height: 100%;
    transform-origin: bottom center;
}

.tree-trunk,
.branch {
    stroke-linecap: round;
}

.blossoms circle {
    transform-origin: center;
    transform: scale(0);
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grow-stage-1 .blossoms circle:nth-child(-n+3) {
    transform: scale(1);
}

.grow-stage-2 .blossoms circle:nth-child(-n+6) {
    transform: scale(1);
}

.grow-stage-3 .blossoms circle:nth-child(-n+9) {
    transform: scale(1);
}

.grow-stage-4 .blossoms circle:nth-child(-n+13) {
    transform: scale(1);
}

.grow-stage-5 .blossoms circle:nth-child(-n+18) {
    transform: scale(1);
}

.grow-stage-6 .blossoms circle:nth-child(-n+21) {
    transform: scale(1);
}

.grow-stage-7 .blossoms circle:nth-child(-n+24) {
    transform: scale(1);
}

.grow-stage-8 .blossoms circle:nth-child(-n+27) {
    transform: scale(1);
}

.grow-stage-9 .blossoms circle:nth-child(-n+29) {
    transform: scale(1);
}

.grow-stage-10 .blossoms circle:nth-child(-n+30) {
    transform: scale(1);
}

.glow-blossom {
    animation: bloomGlow 2s infinite alternate;
}

@keyframes bloomGlow {
    from {
        filter: drop-shadow(0 0 2px #FF69B4);
    }

    to {
        filter: drop-shadow(0 0 8px #FF69B4);
    }
}

@keyframes sway {

    0%,
    100% {
        transform: rotate(-2deg);
    }

    50% {
        transform: rotate(2deg);
    }
}