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

:root {
    --sage: #C8D8C0;
    --sage-light: #E2EDD9;
    --sage-dark: #A8BEA0;
    --cream: #F5F0E8;
    --white: #FAFAF7;
    --terracotta: #E07B54;
    --blush: #F9A8C9;
    --blush-light: #FFE0EC;
    --lavender: #C9B8E8;
    --charcoal: #2C2C2C;
    --mid: #5A5A5A;
    --light-text: #888;
    --window-bg: rgba(250, 250, 247, 0.93);
    --border: rgba(180, 196, 176, 0.7);
    --sparkle-pink: #FF9EB5;
}

body {
    font-family: 'Lora', serif;
    background-color: #c8d8b8;
    background-image: url('download.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--charcoal);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    position: relative;
}

/* ─── Background ─── */
.bg-deco {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* fades + tints the texture, keeps blush/lavender glow */
.bg-deco::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 80% 15%, rgba(249, 168, 201, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 10% 85%, rgba(255, 255, 255, 0.15) 0%, transparent 65%),
        radial-gradient(ellipse 35% 40% at 50% 50%, rgba(201, 184, 232, 0.12) 0%, transparent 70%),
        rgba(232, 242, 228, 0.62);
}

/* soft overall fade overlay so texture doesn't fight the cards */
.bg-deco::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(240, 248, 236, 0.50);
}

.star {
    position: fixed;
    font-size: 1rem;
    opacity: 0.4;
    animation: twinkle 3s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.cloud {
    position: fixed;
    font-size: 1.8rem;
    opacity: 0.22;
    z-index: 1;
    pointer-events: none;
    animation: floatCloud 8s ease-in-out infinite;
}

@keyframes twinkle {

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

    50% {
        opacity: .55;
        transform: scale(1.15);
    }
}

@keyframes floatCloud {

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

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

/* ─── Sidebar ─── */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 20px;
    gap: 14px;
    z-index: 100;
}

.sidebar-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 18px;
    cursor: none;
    text-decoration: none;
    color: var(--charcoal);
    transition: background .2s, transform .18s;
    position: relative;
}

.sidebar-icon:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.07) translateY(-1px);
}

.sidebar-icon.active {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 2px 12px rgba(249, 168, 201, 0.25);
}

.sidebar-icon .icon-img {
    width: 48px;
    height: 48px;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .12));
    transition: transform .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon .icon-img svg {
    width: 48px;
    height: 48px;
}

.sidebar-icon:hover .icon-img {
    transform: rotate(-5deg) scale(1.08);
}

.sidebar-icon span {
    font-family: 'Fraunces', serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--mid);
    white-space: nowrap;
}

.sidebar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blush);
    box-shadow: 0 0 6px var(--blush);
    position: absolute;
    right: 8px;
    top: 8px;
    display: none;
}

.sidebar-icon.active .sidebar-dot {
    display: block;
}

/* ─── Main content ─── */
.main {
    flex: 1;
    width: 100%;
    padding: 32px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    z-index: 10;
    min-height: 100vh;
}

.main section,
.main .footer {
    width: 100%;
    max-width: 760px;
}

/* ─── macOS window card ─── */
.window {
    background: var(--window-bg);
    border: 1.5px solid var(--border);
    border-radius: 22px;
    box-shadow:
        0 8px 40px rgba(80, 110, 80, .10),
        0 2px 8px rgba(0, 0, 0, .05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    backdrop-filter: blur(16px);
    width: 100%;
    animation: fadeUp .5s ease both;
    position: relative;
}

/* sparkle corner doodles */
.window::before {
    content: '✦';
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: .75rem;
    color: var(--blush);
    opacity: 0.5;
    pointer-events: none;
    animation: twinkle 4s ease-in-out infinite;
}

.window::after {
    content: '✧';
    position: absolute;
    bottom: 12px;
    right: 28px;
    font-size: .6rem;
    color: var(--lavender);
    opacity: 0.5;
    pointer-events: none;
    animation: twinkle 5s ease-in-out infinite 1s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.window:nth-child(2) {
    animation-delay: .1s
}

.window:nth-child(3) {
    animation-delay: .2s
}

.window:nth-child(4) {
    animation-delay: .3s
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 18px;
    background: linear-gradient(90deg, rgba(200, 216, 192, 0.4) 0%, rgba(249, 168, 201, 0.12) 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.traffic {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.t-red {
    background: #FF5F56;
}

.t-yellow {
    background: #FFBD2E;
}

.t-green {
    background: #27C93F;
}

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Mono', monospace;
    font-size: .72rem;
    color: var(--mid);
    letter-spacing: .03em;
}

.window-body {
    padding: 40px 48px;
}

/* ─── HOME ─── */
#home .window-body {
    text-align: center;
}

.home-greeting {
    font-family: 'Fraunces', serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.home-greeting .name {
    color: var(--terracotta);
    position: relative;
    display: inline-block;
}

/* underline squiggle on name */
.home-greeting .name::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blush), var(--terracotta), var(--blush));
    border-radius: 999px;
    opacity: 0.7;
}

.home-sub {
    font-family: 'Space Mono', monospace;
    font-size: .85rem;
    color: var(--mid);
    letter-spacing: .04em;
    margin-bottom: 36px;
}

.home-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 26px;
    border-radius: 999px;
    font-family: 'Fraunces', serif;
    font-size: .85rem;
    font-weight: 700;
    cursor: none;
    transition: transform .15s, box-shadow .15s, background .2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline {
    border: 1.5px dashed var(--charcoal);
    background: transparent;
    color: var(--charcoal);
}

.btn-outline:hover {
    background: var(--charcoal);
    color: var(--white);
    border-style: solid;
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.btn-fill {
    background: linear-gradient(135deg, var(--terracotta), #e8835c);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(224, 123, 84, .3);
}

.btn-fill:hover {
    transform: translateY(-3px) rotate(1deg);
    box-shadow: 0 8px 22px rgba(224, 123, 84, .4);
}

.home-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(135deg,
            transparent,
            transparent 28px,
            rgba(200, 216, 192, 0.13) 28px,
            rgba(200, 216, 192, 0.13) 29px),
        repeating-linear-gradient(45deg,
            transparent,
            transparent 40px,
            rgba(249, 168, 201, 0.05) 40px,
            rgba(249, 168, 201, 0.05) 41px);
}

/* ─── ABOUT ─── */
.about-grid {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 560px;
}

.about-avatar {
    font-size: 5rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .12));
    animation: bobble 4s ease-in-out infinite;
}

@keyframes bobble {

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

    30% {
        transform: translateY(-6px) rotate(-3deg);
    }

    60% {
        transform: translateY(-3px) rotate(2deg);
    }
}

.about-text h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--charcoal);
}

.about-text h2 .accent {
    color: var(--terracotta);
}

.about-text p {
    font-size: .9rem;
    line-height: 1.75;
    color: var(--mid);
    margin-bottom: 18px;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    margin-top: 4px;
}

.experience-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px 14px 24px;
    border-radius: 14px;
    background: rgba(200, 216, 192, 0.18);
    border: 1.5px solid var(--border);
    transition: transform .2s, box-shadow .2s, background .2s;
}

.experience-item:hover {
    transform: translateX(2px);
    background: rgba(200, 216, 192, 0.3);
    box-shadow: 0 6px 18px rgba(80, 110, 80, .1);
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--terracotta);
}

.experience-item+.experience-item {
    margin-top: 8px;
}

.exp-role {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: .98rem;
    color: var(--charcoal);
    line-height: 1.3;
}

.exp-at {
    font-weight: 400;
    color: var(--terracotta);
}

.exp-dates {
    font-family: 'Space Mono', monospace;
    font-size: .68rem;
    letter-spacing: .02em;
    color: var(--mid);
    opacity: .85;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(200, 216, 192, 0.45);
    font-family: 'Space Mono', monospace;
    font-size: .7rem;
    color: var(--charcoal);
    border: 1.5px solid var(--sage-dark);
    transition: transform .15s, background .15s, border-color .15s;
}

.chip:nth-child(3n) {
    background: rgba(249, 168, 201, 0.2);
    border-color: var(--blush);
}

.chip:nth-child(3n+1) {
    background: rgba(201, 184, 232, 0.2);
    border-color: var(--lavender);
}

.chip:hover {
    transform: translateY(-2px) rotate(-1deg);
    background: rgba(255, 255, 255, 0.7);
}

/* ─── PROJECTS ─── */
#projects .window-body {
    padding-bottom: 32px;
}

.section-heading {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--charcoal);
}

.section-heading .accent {
    color: var(--terracotta);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.project-card {
    background: rgba(200, 216, 192, 0.22);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 22px;
    transition: transform .2s, box-shadow .2s;
    cursor: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.project-main {
    flex: 1;
    min-width: 0;
}

.project-link {
    flex-shrink: 0;
}

.project-links {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* pastel shimmer strip on left edge of each card */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--blush), var(--lavender), var(--sage-dark));
    opacity: 0.7;
    border-radius: 14px 0 0 14px;
}

.project-card:nth-child(2)::before {
    background: linear-gradient(180deg, var(--lavender), var(--blush));
}

.project-card:nth-child(3)::before {
    background: linear-gradient(180deg, var(--sage-dark), var(--blush));
}

.project-card:nth-child(4)::before {
    background: linear-gradient(180deg, var(--terracotta), var(--lavender));
}

.project-card:nth-child(5)::before {
    background: linear-gradient(180deg, var(--blush), var(--sage-dark));
}

.project-card:nth-child(6)::before {
    background: linear-gradient(180deg, var(--lavender), var(--terracotta));
}

.project-card:hover {
    transform: translateY(-5px) rotate(-0.4deg);
    box-shadow: 0 12px 32px rgba(80, 110, 80, .14), 0 0 0 1.5px rgba(249, 168, 201, 0.25);
}

.project-icon {
    font-size: 2.1rem;
    margin-bottom: 0;
    display: inline-block;
    transition: transform .2s;
    flex-shrink: 0;
}

.project-card:hover .project-icon {
    transform: scale(1.15) rotate(-5deg);
}

.project-name {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 3px;
    color: var(--charcoal);
}

.project-desc {
    font-size: .78rem;
    color: var(--mid);
    line-height: 1.45;
    margin-bottom: 8px;
    max-width: 640px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-family: 'Space Mono', monospace;
    font-size: .62rem;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(224, 123, 84, 0.1);
    color: var(--terracotta);
    border: 1px solid rgba(224, 123, 84, 0.28);
    transition: background .15s;
}

.tag:hover {
    background: rgba(224, 123, 84, 0.2);
}

.project-link {
    margin-top: 0;
    display: inline-block;
    white-space: nowrap;
    font-family: 'Fraunces', serif;
    font-size: .78rem;
    font-weight: 700;
    color: var(--terracotta);
    text-decoration: none;
    transition: letter-spacing .15s;
}

.project-link:hover {
    letter-spacing: .03em;
    text-decoration: underline;
}

.project-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mid);
    transition: color .15s, transform .15s;
}

.project-link-icon:hover {
    color: var(--terracotta);
    transform: scale(1.1);
}

/* ─── CONTACT ─── */
.contact-intro {
    font-size: .9rem;
    color: var(--mid);
    line-height: 1.7;
    margin-bottom: 28px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(200, 216, 192, 0.22);
    border: 1.5px solid var(--border);
    text-decoration: none;
    color: var(--charcoal);
    transition: background .2s, transform .15s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}

.contact-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--blush), var(--lavender));
    opacity: 0;
    transition: opacity .2s;
}

.contact-row:hover {
    background: rgba(255, 255, 255, 0.68);
    transform: translateX(8px);
    box-shadow: 0 4px 14px rgba(200, 216, 192, .2);
}

.contact-row:hover::before {
    opacity: 1;
}

.contact-row .c-icon {
    font-size: 1.5rem;
}

.contact-row .c-label {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: .85rem;
}

.contact-row .c-val {
    font-family: 'Space Mono', monospace;
    font-size: .75rem;
    color: var(--mid);
    margin-top: 2px;
}

/* ─── Dark mode ─── */
body.dark {
    --sage: #3a4f38;
    --sage-light: #1e2b1d;
    --sage-dark: #4a6448;
    --cream: #1a1f19;
    --white: #1e251d;
    --terracotta: #e8835c;
    --blush: #d4789a;
    --blush-light: #3a2030;
    --lavender: #9b8dc0;
    --charcoal: #e8e8e4;
    --mid: #a8a89e;
    --light-text: #666;
    --window-bg: rgba(28, 36, 27, 0.96);
    --border: rgba(74, 100, 72, 0.55);
    background-color: #1a2619;
}

body.dark .bg-deco::before {
    background:
        radial-gradient(ellipse 55% 45% at 80% 15%, rgba(180, 100, 140, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 10% 85%, rgba(20, 30, 20, 0.5) 0%, transparent 65%),
        rgba(15, 22, 14, 0.55);
}

body.dark .bg-deco::after {
    background: rgba(10, 18, 10, 0.45);
}


body.dark .home-bg {
    background: repeating-linear-gradient(135deg,
            transparent, transparent 28px,
            rgba(74, 100, 72, 0.1) 28px,
            rgba(74, 100, 72, 0.1) 29px);
}

/* ─── Top bar ─── */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    gap: 16px;
    z-index: 50;
    pointer-events: none;
}

.theme-toggle {
    font-size: 1.6rem;
    cursor: none;
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid rgba(249, 168, 201, 0.4);
    border-radius: 14px;
    padding: 6px 10px;
    line-height: 1;
    transition: background .2s, transform .15s, box-shadow .2s;
    backdrop-filter: blur(10px);
    pointer-events: all;
    box-shadow: 0 2px 10px rgba(249, 168, 201, 0.15);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 16px rgba(249, 168, 201, 0.3);
}

body.dark .theme-toggle {
    background: rgba(50, 65, 48, 0.7);
    border-color: rgba(180, 120, 150, 0.3);
}

body.dark .theme-toggle:hover {
    background: rgba(74, 100, 72, 0.85);
}

/* ─── Footer ─── */
.footer {
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: .68rem;
    color: var(--light-text);
    padding: 10px 0 4px;
}

/* ─── Sparkle cursor ─── */
*,
*::before,
*::after {
    cursor: none !important;
}

#wand-cursor {
    position: fixed;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 99999;
}

.sparkle-particle {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    animation: sparkle-fade 0.7s ease-out forwards;
}

@keyframes sparkle-fade {
    0% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }

    100% {
        opacity: 0;
        transform: scale(0) translate(var(--dx), var(--dy));
    }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-icon span {
        display: none;
    }

    .main {
        padding: 20px 16px 60px;
    }

    .window-body {
        padding: 28px 22px;
    }

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

    .project-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .project-link {
        margin-top: 4px;
    }

    .project-links {
        margin-top: 4px;
        align-items: flex-start;
    }

    .home-greeting {
        font-size: 2rem;
    }

    .topbar {
        left: 0;
    }

    .theme-toggle {
        font-size: 1.3rem;
        padding: 5px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}