:root {
    color-scheme: light;
    --font: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #fff8f5;
    --surface: #fffaf8;
    --surface-high: #f7ebe6;
    --surface-highest: #f0dfd7;
    --text: #281813;
    --text-muted: #6f5b53;
    --outline: #9a8178;
    --outline-soft: #ddc4ba;
    --primary: #8d3f58;
    --on-primary: #ffffff;
    --primary-container: #ffd9e2;
    --on-primary-container: #3b071c;
    --secondary: #76564d;
    --shadow: 0 16px 48px rgba(78, 43, 32, 0.11);
    --shadow-hover: 0 22px 60px rgba(78, 43, 32, 0.18);
    --max-width: 1180px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #19120f;
    --surface: #251a16;
    --surface-high: #30211c;
    --surface-highest: #3c2922;
    --text: #f6e6df;
    --text-muted: #d7c0b7;
    --outline: #a98c81;
    --outline-soft: #59423a;
    --primary: #ffb0c4;
    --on-primary: #57152d;
    --primary-container: #733047;
    --on-primary-container: #ffd9e2;
    --secondary: #e8bdb0;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 26px 70px rgba(0, 0, 0, 0.36);
}

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

::selection {
    background: var(--primary-container);
    color: var(--on-primary-container);
    text-shadow: none;
}

::-moz-selection {
    background: var(--primary-container);
    color: var(--on-primary-container);
    text-shadow: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 116px;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 26rem),
        radial-gradient(circle at 90% 38%, color-mix(in srgb, #ff9b6a 8%, transparent), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    transition: background-color 240ms ease, color 240ms ease;
}

.page-loader {
    display: none;
}

.js .page-loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 16px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(16px);
    transition: opacity 280ms ease, visibility 280ms ease;
}

.js .page-loader.is-hidden {
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.contained-loader {
    position: relative;
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--primary-container);
    box-shadow: 0 12px 34px color-mix(in srgb, var(--primary) 22%, transparent);
    animation: loader-container 1.5s ease-in-out infinite;
}

.loader-shape {
    width: 40px;
    height: 40px;
    border-radius: 42% 58% 63% 37% / 48% 38% 62% 52%;
    background: var(--primary);
    animation: loader-morph 1.1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.loader-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

.material-symbols-rounded {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.shell {
    width: min(var(--max-width), calc(100% - 40px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--on-primary);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 100;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 72px;
    margin-top: 16px;
    padding: 8px 12px 8px 16px;
    border: 1px solid var(--outline-soft);
    border-radius: 28px;
    background: color-mix(in srgb, var(--surface-high) 88%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(140deg, #ffb47f, #ef759b 52%, #925a9e);
    color: #32101b;
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.desktop-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-highest);
}

.nav-link.active {
    color: var(--on-primary-container);
    background: var(--primary-container);
}

.nav-link .material-symbols-rounded {
    font-size: 20px;
    transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), font-variation-settings 220ms ease;
}

.nav-link:hover .material-symbols-rounded,
.nav-link.active .material-symbols-rounded {
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
    transform: translateY(-2px) scale(1.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-picker {
    position: relative;
}

.theme-toggle,
.share-button {
    display: grid;
    width: 52px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--outline);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.share-button:hover {
    background: var(--surface-highest);
}

.theme-toggle:hover {
    transform: rotate(8deg);
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button .material-symbols-rounded {
    transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.share-button:hover .material-symbols-rounded {
    transform: rotate(-10deg) scale(1.08);
}

.theme-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 300;
    width: min(320px, calc(100vw - 32px));
    padding: 10px;
    border-radius: 26px;
    transform-origin: top right;
    animation: theme-menu-in 180ms cubic-bezier(0.2, 0, 0, 1);
}

.theme-option {
    display: grid;
    width: 100%;
    min-height: 66px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 10px 14px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.theme-option:hover,
.theme-option:focus-visible {
    background: var(--surface-highest);
    outline: none;
}

.theme-option:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.theme-option.selected {
    background: var(--primary-container);
    color: var(--on-primary-container);
}

.theme-option > .material-symbols-rounded:first-child {
    font-size: 25px;
}

.theme-option strong,
.theme-option small {
    display: block;
}

.theme-option strong {
    font-size: 0.9rem;
}

.theme-option small {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.theme-option.selected small {
    color: color-mix(in srgb, var(--on-primary-container) 72%, transparent);
}

.option-check {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.theme-option.selected .option-check {
    opacity: 1;
    transform: scale(1);
}

main {
    padding-top: 20px;
}

.surface {
    border: 1px solid var(--outline-soft);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    padding: clamp(32px, 6vw, 70px);
    border-radius: 48px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #ff8c62), var(--surface));
}

.hero::after {
    position: absolute;
    right: -40px;
    bottom: -130px;
    width: 410px;
    height: 410px;
    border-radius: 44% 56% 61% 39% / 48% 38% 62% 52%;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    content: "";
    transform: rotate(-14deg);
}

.hero-orb {
    position: absolute;
    top: 84px;
    right: clamp(50px, 10vw, 130px);
    width: clamp(88px, 11vw, 128px);
    aspect-ratio: 1;
    border-radius: 34% 66% 55% 45% / 45% 35% 65% 55%;
    background: linear-gradient(140deg, #ffb47f, #fb7f8f);
    box-shadow: 0 18px 45px rgba(255, 133, 103, 0.25);
    animation: float 7s ease-in-out infinite;
}

.material-bubbles {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.material-bubble {
    --bubble-color: var(--primary);
    --bubble-size: 48px;
    --bubble-x: 82%;
    --bubble-y: 35%;
    position: absolute;
    top: var(--bubble-y);
    left: var(--bubble-x);
    width: var(--bubble-size);
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--bubble-color) 55%, var(--outline-soft));
    border-radius: 50%;
    background: color-mix(in srgb, var(--bubble-color) 20%, var(--surface));
    box-shadow:
        inset 0 0 0 4px color-mix(in srgb, var(--bubble-color) 12%, transparent),
        0 12px 28px color-mix(in srgb, var(--bubble-color) 18%, transparent);
    cursor: pointer;
    pointer-events: auto;
    animation: bubble-drift 5.2s ease-in-out infinite;
    transition: filter 180ms ease, box-shadow 180ms ease;
}

.material-bubble::before {
    position: absolute;
    inset: 22%;
    border-radius: 42% 58% 63% 37% / 48% 38% 62% 52%;
    background: var(--bubble-color);
    content: "";
    animation: loader-morph 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    transition: filter 180ms ease;
}

.material-bubble::after {
    position: absolute;
    inset: -2px;
    border: 2px solid var(--bubble-color);
    border-radius: 50%;
    content: "";
    opacity: 0;
    transform: scale(0.7);
}

.material-bubble:hover {
    filter: saturate(1.2) brightness(1.06);
    box-shadow:
        inset 0 0 0 5px color-mix(in srgb, var(--bubble-color) 18%, transparent),
        0 16px 34px color-mix(in srgb, var(--bubble-color) 30%, transparent);
}

.material-bubble:hover::before {
    filter: brightness(1.08);
}

.material-bubble:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 4px;
}

.bubble-one {
    --bubble-color: #ee7197;
    --bubble-size: 52px;
}

.bubble-two {
    --bubble-color: #ff9f6e;
    --bubble-size: 38px;
    --bubble-x: 92%;
    --bubble-y: 68%;
    animation-delay: -1.7s;
}

.bubble-three {
    --bubble-color: #a982c1;
    --bubble-size: 44px;
    --bubble-x: 74%;
    --bubble-y: 83%;
    animation-delay: -3.1s;
}

.material-bubble.is-popping {
    animation: bubble-pop 380ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

.material-bubble.is-popping::after {
    animation: bubble-ring 380ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

.material-bubble.is-waiting {
    opacity: 0;
    pointer-events: none;
    animation: none;
}

.material-bubble.is-returning {
    animation: bubble-return 460ms cubic-bezier(0.2, 0, 0, 1) both;
}

.chip-row {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 16px;
    border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--outline-soft));
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-container) 70%, var(--surface));
    color: var(--on-primary-container);
    font-size: 0.82rem;
    font-weight: 800;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.chip:hover {
    background: var(--primary-container);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 15%, transparent);
    transform: translateY(-3px);
}

.chip-small {
    min-height: 30px;
    padding: 4px 11px;
    border-radius: 10px;
    font-size: 0.72rem;
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    margin-top: clamp(80px, 12vw, 150px);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(4.5rem, 13vw, 9.5rem);
    font-weight: 600;
    letter-spacing: -0.075em;
    line-height: 0.84;
}

.hero-tagline {
    margin: 22px 0 14px;
    background: linear-gradient(90deg, #ff9e6f, #ee6f94 55%, #a76fb0);
    background-clip: text;
    color: transparent;
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.16;
}

.hero-description {
    max-width: 680px;
    margin: 0;
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 18px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.button .material-symbols-rounded {
    transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.button-primary:hover .material-symbols-rounded {
    transform: translateY(4px);
}

.button-tonal:hover .material-symbols-rounded {
    transform: translate(4px, -2px) rotate(-8deg);
}

.button-primary {
    background: var(--primary);
    color: var(--on-primary);
}

.button-tonal {
    background: var(--primary-container);
    color: var(--on-primary-container);
}

.page-section {
    padding: clamp(70px, 10vw, 120px) 0 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.section-heading .material-symbols-rounded {
    font-size: clamp(2.3rem, 5vw, 4rem);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2.35rem, 6vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1;
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.about-card,
.skills-card,
.contact-feature,
.social-card {
    border-radius: 34px;
}

.about-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: clamp(26px, 5vw, 48px);
}

.about-icon,
.contact-icon {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 22px;
    background: var(--primary-container);
    color: var(--on-primary-container);
    transition: border-radius 260ms cubic-bezier(0.2, 0, 0, 1), transform 260ms cubic-bezier(0.2, 0, 0, 1);
}

.about-card,
.skills-card {
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.about-card:hover,
.skills-card:hover {
    border-color: var(--outline);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.about-card:hover .about-icon,
.contact-feature:hover .contact-icon {
    border-radius: 50%;
    transform: rotate(-7deg) scale(1.07);
}

.about-icon .material-symbols-rounded,
.contact-icon .material-symbols-rounded {
    font-size: 32px;
}

.about-card h3,
.skills-card h3,
.interest-card h3,
.contact-feature h3,
.social-card h3 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.about-card p:not(.eyebrow) {
    margin: 14px 0 0;
    color: var(--text-muted);
}

.skills-card {
    padding: clamp(26px, 4vw, 38px);
    background: var(--surface-high);
}

.skills-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.skills-card-head > .material-symbols-rounded {
    color: var(--primary);
    font-size: 38px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.skill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--outline-soft);
    border-radius: 12px;
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 700;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.skill:hover {
    border-color: var(--outline);
    background: var(--primary-container);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 12%, transparent);
    transform: translateY(-3px);
}

.skill .material-symbols-rounded {
    color: var(--primary);
    font-size: 19px;
    transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.skill:hover .material-symbols-rounded {
    transform: rotate(-10deg) scale(1.12);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.interest-card {
    min-height: 270px;
    padding: 28px;
    border-radius: 32px;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.interest-card:hover {
    border-color: var(--outline);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 56px;
}

.card-icon {
    font-size: 38px;
    transition: transform 280ms cubic-bezier(0.2, 0, 0, 1), font-variation-settings 220ms ease;
}

.interest-card:hover .card-icon {
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 40;
    transform: rotate(-8deg) scale(1.14);
}

.interest-card:hover .chip {
    transform: translateY(-3px) rotate(2deg);
}

.interest-card p {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.card-orange { background: color-mix(in srgb, #9a4f00 56%, var(--surface)); }
.card-plum { background: color-mix(in srgb, #783952 48%, var(--surface)); }
.card-olive { background: color-mix(in srgb, #66501c 50%, var(--surface)); }
.card-blue { background: color-mix(in srgb, #31546f 46%, var(--surface)); }
.card-pink { background: color-mix(in srgb, #7f4059 42%, var(--surface)); }
.card-gold { background: color-mix(in srgb, #745d1e 44%, var(--surface)); }

:root[data-theme="light"] .card-orange { background: #fff0e2; }
:root[data-theme="light"] .card-plum { background: #fbe8ef; }
:root[data-theme="light"] .card-olive { background: #f5efd8; }
:root[data-theme="light"] .card-blue { background: #e7f2fa; }
:root[data-theme="light"] .card-pink { background: #f9e8ef; }
:root[data-theme="light"] .card-gold { background: #faf0cf; }

.section-intro {
    max-width: 720px;
    margin: -10px 0 30px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    padding: 28px;
    border-radius: 32px;
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.project-card:hover {
    border-color: var(--outline);
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}

.project-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 42px;
}

.project-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 19px;
    background: var(--primary-container);
    color: var(--on-primary-container);
    font-size: 30px;
    transition: border-radius 260ms cubic-bezier(0.2, 0, 0, 1), font-variation-settings 220ms ease, transform 260ms cubic-bezier(0.2, 0, 0, 1);
}

.project-card:hover .project-icon {
    border-radius: 50%;
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 32;
    transform: rotate(-8deg) scale(1.08);
}

.project-card .eyebrow {
    margin-bottom: 6px;
}

.project-card h3 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.project-card > p:not(.eyebrow) {
    margin: 14px 0 22px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px;
}

.project-tags span {
    padding: 5px 10px;
    border: 1px solid var(--outline-soft);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    font-size: 0.72rem;
    font-weight: 800;
}

.project-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 9px 13px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary-container) 74%, var(--surface));
    color: var(--on-primary-container);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 180ms ease, transform 180ms ease;
}

.project-link:hover {
    background: var(--primary-container);
    transform: translateY(-2px);
}

.project-link .material-symbols-rounded {
    font-size: 19px;
    transition: transform 180ms ease;
}

.project-link:hover .material-symbols-rounded {
    transform: translate(3px, -3px);
}

.project-ai { background: color-mix(in srgb, #513a72 38%, var(--surface)); }
.project-django { background: color-mix(in srgb, #315c50 34%, var(--surface)); }
.project-profile { background: color-mix(in srgb, #794057 30%, var(--surface)); }

:root[data-theme="light"] .project-ai { background: #f3ecff; }
:root[data-theme="light"] .project-django { background: #e9f5f0; }
:root[data-theme="light"] .project-profile { background: #f9e9ef; }

.contact-feature {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: start;
    padding: clamp(28px, 5vw, 46px);
    background: linear-gradient(135deg, color-mix(in srgb, #8e4900 58%, var(--surface)), color-mix(in srgb, #6f3910 42%, var(--surface)));
    text-decoration: none;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

:root[data-theme="light"] .contact-feature {
    background: linear-gradient(135deg, #fff0df, #ffe0ca);
}

.contact-feature:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.contact-feature p {
    margin: 12px 0 22px;
    color: var(--text-muted);
}

.contact-feature strong {
    font-size: 1.15rem;
}

.contact-feature .arrow {
    transition: transform 180ms ease;
}

.contact-feature:hover .arrow {
    transform: translate(4px, -4px);
}

.social-card {
    padding: clamp(28px, 4vw, 38px);
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.social-card:hover {
    border-color: var(--outline);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.social-card:hover .social-card-loader {
    border-radius: 18px;
    box-shadow: 0 13px 30px color-mix(in srgb, var(--primary) 28%, transparent);
    animation-duration: 1.2s;
}

.social-card:hover .social-card-loader .loader-shape {
    animation-duration: 0.92s;
}

.social-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.social-card-loader {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-container);
    box-shadow: 0 9px 24px color-mix(in srgb, var(--primary) 16%, transparent);
    animation: loader-container 1.8s ease-in-out infinite;
    transition: border-radius 260ms cubic-bezier(0.2, 0, 0, 1), box-shadow 220ms ease;
}

.social-card-loader .loader-shape {
    width: 27px;
    height: 27px;
    animation-duration: 1.45s;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.social-links a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--outline-soft);
    border-radius: 14px;
    background: var(--surface-high);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 180ms ease, transform 180ms ease;
}

.social-links a:hover {
    background: var(--primary-container);
    transform: translateY(-2px);
}

.social-links .material-symbols-rounded {
    font-size: 18px;
    transition: transform 180ms ease;
}

.social-links a:hover .material-symbols-rounded {
    transform: translate(3px, -3px);
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: clamp(80px, 12vw, 150px);
    padding: 34px 0 44px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-brand p,
.footer > p {
    margin: 0;
}

.footer-brand strong {
    color: var(--text);
    font-size: 1rem;
}

.footer-brand .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.mobile-nav {
    display: none;
}

.snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 500;
    display: flex;
    width: max-content;
    max-width: calc(100vw - 32px);
    min-height: 52px;
    align-items: center;
    gap: 12px;
    padding: 7px 8px 7px 17px;
    border: 1px solid color-mix(in srgb, var(--outline-soft) 78%, transparent);
    border-radius: 18px;
    background: var(--surface-highest);
    box-shadow: var(--shadow-hover);
    color: var(--text);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 60px));
    transition: opacity 220ms ease, transform 280ms cubic-bezier(0.2, 0, 0, 1);
}

.snackbar.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.snackbar-icon {
    color: var(--primary);
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.snackbar-text {
    font-size: 0.84rem;
    font-weight: 800;
}

.snackbar-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease;
}

.snackbar-close:hover {
    background: color-mix(in srgb, var(--text) 10%, transparent);
    transform: rotate(8deg);
}

.md-ripple-surface {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.md-ripple {
    position: absolute;
    z-index: 5;
    border-radius: 50%;
    background: currentColor;
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    animation: material-ripple 560ms cubic-bezier(0.2, 0, 0, 1);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0, 0, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(4deg); }
    50% { transform: translateY(-18px) rotate(-5deg); }
}

@keyframes loader-container {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes loader-morph {
    0% {
        border-radius: 42% 58% 63% 37% / 48% 38% 62% 52%;
        transform: rotate(0deg) scale(0.9);
    }
    33% {
        border-radius: 64% 36% 42% 58% / 38% 58% 42% 62%;
        transform: rotate(120deg) scale(1.06);
    }
    66% {
        border-radius: 37% 63% 55% 45% / 62% 44% 56% 38%;
        transform: rotate(240deg) scale(0.94);
    }
    100% {
        border-radius: 42% 58% 63% 37% / 48% 38% 62% 52%;
        transform: rotate(360deg) scale(0.9);
    }
}

@keyframes material-ripple {
    0% { opacity: 0.18; transform: scale(0); }
    70% { opacity: 0.1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1); }
}

@keyframes theme-menu-in {
    0% { opacity: 0; transform: scale(0.9) translateY(-8px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bubble-drift {
    0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
    50% { transform: translate(-50%, -50%) translateY(-9px) rotate(5deg); }
}

@keyframes bubble-pop {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    45% { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
}

@keyframes bubble-ring {
    0% { opacity: 0.8; transform: scale(0.7); }
    100% { opacity: 0; transform: scale(2.1); }
}

@keyframes bubble-return {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
    65% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

    .topbar {
        grid-template-columns: 1fr auto;
    }

    .hero {
        min-height: 580px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .project-card {
        min-height: 340px;
    }

    body {
        padding-bottom: 92px;
    }

    .mobile-nav {
        position: fixed;
        right: 12px;
        bottom: 12px;
        left: 12px;
        z-index: 200;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        min-height: 72px;
        padding: 7px;
        border: 1px solid var(--outline-soft);
        border-radius: 26px;
        background: color-mix(in srgb, var(--surface-high) 92%, transparent);
        box-shadow: var(--shadow-hover);
        backdrop-filter: blur(20px);
    }

    .mobile-nav .nav-link {
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 6px 4px;
        border-radius: 19px;
        font-size: 0.62rem;
    }

    .mobile-nav .nav-link .material-symbols-rounded {
        font-size: 23px;
    }

    .snackbar {
        bottom: 98px;
    }
}

@media (max-width: 620px) {
    html {
        scroll-padding-top: 94px;
    }

    .shell {
        width: min(100% - 24px, var(--max-width));
    }

    .topbar {
        top: 8px;
        min-height: 62px;
        margin-top: 8px;
        border-radius: 23px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .theme-toggle,
    .share-button {
        width: 48px;
        height: 40px;
    }

    .header-actions {
        gap: 5px;
    }

    .theme-menu {
        right: 0;
        width: min(300px, calc(100vw - 24px));
    }

    main {
        padding-top: 12px;
    }

    .hero {
        min-height: 590px;
        padding: 24px;
        border-radius: 32px;
    }

    .hero-orb {
        top: 105px;
        right: 26px;
        width: 82px;
    }

    .material-bubbles {
        display: none;
    }

    .hero-copy {
        margin-top: 110px;
    }

    .hero h1 {
        font-size: clamp(4rem, 22vw, 6.6rem);
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .page-section {
        padding-top: 76px;
    }

    .section-heading {
        margin-bottom: 22px;
    }

    .section-heading h2 {
        font-size: 2.65rem;
    }

    .about-card {
        grid-template-columns: 1fr;
        gap: 18px;
    }

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

    .project-card {
        min-height: 0;
        padding: 24px;
    }

    .project-card-head {
        margin-bottom: 34px;
    }

    .interest-card {
        min-height: 240px;
    }

    .card-topline {
        margin-bottom: 40px;
    }

    .contact-feature {
        grid-template-columns: auto 1fr;
    }

    .contact-feature .arrow {
        display: none;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
