:root {
    /* Color Palette (Light Mode Default) */
    --bg-color: #f5f5f7;
    --tile-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --fill: #f2f2f5;
    --separator: rgba(0, 0, 0, 0.08);
    --accent: #0071e3;
    --indigo: #5856d6;
    --indigo-soft: rgba(88, 86, 214, 0.12);
    --tile-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 14px 34px -14px rgba(0, 0, 0, 0.12);
    --tile-hover-shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 22px 44px -16px rgba(0, 0, 0, 0.18);

    /* Liquid Glass */
    --glass-bg: rgba(255, 255, 255, 0.34);
    --glass-edge: rgba(0, 0, 0, 0.06);
    --glass-spec: rgba(255, 255, 255, 1);
    --glass-spec-2: rgba(255, 255, 255, 0.7);
    --glass-sheen: rgba(255, 255, 255, 0.45);
    --glass-thumb: rgba(0, 0, 0, 0.07);

    /* Map (Apple Maps-like palette) */
    --map-land: #f2f0eb;
    --map-road: #ffffff;
    --map-major: #ffe7a8;
    --map-park: #d3ebc9;
    --map-water: #a9d4f5;

    /* Contribution levels */
    --contrib-0: #ececf0;
    --contrib-wave: #dcdce2;
    --contrib-1: rgba(52, 199, 89, 0.28);
    --contrib-2: rgba(52, 199, 89, 0.5);
    --contrib-3: rgba(52, 199, 89, 0.74);
    --contrib-4: rgb(52, 199, 89);
    --chart-filter: none;

    --hdr-btn-opacity: 1;
    --hdr-btn-cursor: pointer;

    --ease-spring: cubic-bezier(0.2, 0.9, 0.25, 1);
}

:root.dark-mode {
    /* Dark Mode Palette overrides */
    --bg-color: #000000;
    --tile-bg: #1c1c1e;
    --text-primary: #f5f5f7;
    --text-secondary: #98989d;
    --fill: #2c2c2e;
    --separator: rgba(255, 255, 255, 0.12);
    --accent: #0a84ff;
    --indigo: #7d7aff;
    --indigo-soft: rgba(125, 122, 255, 0.18);
    --tile-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
    --tile-hover-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);

    --glass-bg: rgba(30, 30, 32, 0.42);
    --glass-edge: rgba(255, 255, 255, 0.16);
    --glass-spec: rgba(255, 255, 255, 0.55);
    --glass-spec-2: rgba(255, 255, 255, 0.22);
    --glass-sheen: rgba(255, 255, 255, 0.1);
    --glass-thumb: rgba(255, 255, 255, 0.16);

    --map-land: #232326;
    --map-road: #38383c;
    --map-major: #4a4a4f;
    --map-park: #22302a;
    --map-water: #1d3a57;

    --contrib-0: #2c2c2e;
    --contrib-wave: #3e3e42;
    --chart-filter: invert(1) hue-rotate(180deg) brightness(1.2);

    --hdr-btn-opacity: 0.4;
    --hdr-btn-cursor: not-allowed;
}

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

[v-cloak] {
    display: none;
}

html {
    background-color: var(--bg-color);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    color: inherit;
}

.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 72px 24px calc(140px + env(safe-area-inset-bottom));
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* Rows may grow on narrow phones, so the profile text never gets clipped */
    grid-auto-rows: minmax(168px, auto);
    gap: 14px;
}

.span-2 {
    grid-column: span 2;
}

.rows-2 {
    grid-row: span 2;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 184px;
        gap: 20px;
    }
}

/* Tiles */
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 24px;
    border-radius: 26px;
    background: var(--tile-bg);
    box-shadow: var(--tile-shadow);
    color: var(--text-primary);
    text-decoration: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.6s var(--ease-spring), box-shadow 0.6s var(--ease-spring), background-color 0.4s ease;
}

@media (min-width: 768px) {
    .tile {
        border-radius: 32px;
    }
}

a.tile:hover {
    transform: scale(1.018);
    box-shadow: var(--tile-hover-shadow);
}

a.tile:active {
    transform: scale(0.985);
}

a.tile:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.eyebrow {
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--text-secondary);
}

.title {
    font-size: 21px;
    line-height: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tile-link .title {
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .tile-link:not(.span-2) .title {
        font-size: 19px;
        line-height: 24px;
    }
}

@media (max-width: 767px) {
    .tile-link .title {
        font-size: 17px;
        line-height: 22px;
    }
}

.sub {
    font-size: 15px;
    line-height: 20px;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
}

.glyph {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.go {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fill);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.go svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Private accounts: a small lock before "Private" in the subtitle */
.private {
    white-space: nowrap;
}

.lock {
    width: 11px;
    height: 11px;
    margin: 0 4px 0 1px;
    vertical-align: -1px;
}

/* Old account tag beside a title */
.tag {
    display: inline-flex;
    align-items: center;
    height: 19px;
    margin-left: 3px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--fill);
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: 2px;
}

.tile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Profile */
.tile-profile {
    padding: 28px;
}

@media (min-width: 768px) {
    .tile-profile {
        padding: 32px;
    }
}

.avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--fill);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.name {
    font-size: 34px;
    line-height: 38px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.bio {
    margin-top: 12px;
    max-width: 420px;
    font-size: 17px;
    line-height: 24px;
    letter-spacing: -0.015em;
    color: var(--text-secondary);
}

.bio a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}

.bio a:hover {
    text-decoration: underline;
}

.places {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.place {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    color: var(--text-secondary);
}

.emoji {
    font-size: 17px;
    line-height: 1;
}

.disclaimer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--separator);
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .name {
        font-size: 48px;
        line-height: 52px;
    }

    .bio {
        font-size: 19px;
        line-height: 27px;
    }
}

/* Brand-tinted glyphs */
.glyph-linkedin { color: #0077b5; }
.glyph-instagram { color: #8a3ab9; }
.glyph-reddit { color: #ff4500; }

:root.dark-mode .glyph-linkedin { color: #4aa3e8; }
:root.dark-mode .glyph-instagram { color: #b46ef0; }

.tile-header .glyph {
    width: 26px;
    height: 26px;
}

/* Map */
.tile-map {
    display: block;
    padding: 0;
    background: var(--map-land);
}

.tile-map {
    isolation: isolate;
}

.map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

.map-live {
    background: transparent;
}

.tile-map:not(.satellite) .leaflet-tile-pane {
    filter: saturate(0.75) brightness(1.02);
}

:root.dark-mode .tile-map:not(.satellite) .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9) saturate(0.5);
}

.map-live .leaflet-control-attribution {
    margin: 0 14px 10px 0;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    color: #3a3a3c;
    font: 500 9px/1.5 -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.map-live .leaflet-control-attribution a {
    color: inherit;
}

.tile-map-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.tile-map-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

.tile-map .map-pin,
.tile-map .map-label {
    z-index: 2;
    pointer-events: none;
}

.tile-map .map-switch {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: flex;
    gap: 2px;
    padding: 3px;
}

.map-switch button {
    position: relative;
    z-index: 1;
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.map-switch button:hover,
.map-switch button.active {
    color: var(--text-primary);
}

.map-switch button.active {
    background: var(--glass-thumb);
    box-shadow: inset 0 0 0 0.5px var(--glass-edge);
}

/* Satellite imagery is dark: switch the glass to a dark tint so text stays legible */
.tile-map.satellite .glass {
    --glass-bg: rgba(20, 20, 22, 0.38);
    --glass-edge: rgba(255, 255, 255, 0.18);
    --glass-spec: rgba(255, 255, 255, 0.55);
    --glass-spec-2: rgba(255, 255, 255, 0.22);
    --glass-sheen: rgba(255, 255, 255, 0.12);
    --glass-thumb: rgba(255, 255, 255, 0.2);
    --text-primary: #fff;
    --text-secondary: rgba(255, 255, 255, 0.78);
    color: #fff;
}

.map-park {
    fill: var(--map-park);
}

.map-water {
    fill: none;
    stroke: var(--map-water);
    stroke-width: 9;
    stroke-linecap: round;
}

.map-road,
.map-street,
.map-major {
    fill: none;
    stroke: var(--map-road);
    stroke-linecap: round;
}

.map-road {
    stroke-width: 5;
}

.map-street {
    stroke-width: 2;
}

.map-major {
    stroke: var(--map-major);
    stroke-width: 9;
}

.map-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0a84ff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(0, 0, 0, 0.25);
}

.map-pin::before {
    content: '';
    position: absolute;
    inset: -26px;
    border-radius: 50%;
    background: rgba(10, 132, 255, 0.16);
    animation: pulse 2.8s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.tile-map .map-label {
    position: absolute;
    left: 16px;
    bottom: 16px;
    border-radius: 22px;
    padding: 12px 18px 13px;
}

.map-place {
    font-size: 19px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* GitHub contributions */
.tile-github {
    gap: 16px;
}

.tile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 40px;
}

.tile-header .title {
    font-size: 19px;
}

.contrib {
    flex: 1;
    display: grid;
    grid-template-rows: repeat(7, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 3px;
}

@media (min-width: 768px) {
    .contrib {
        gap: 4px;
    }
}

.contrib span {
    border-radius: 3px;
    background: var(--contrib-0);
}

.contrib .lvl-1 { background: var(--contrib-1); }
.contrib .lvl-2 { background: var(--contrib-2); }
.contrib .lvl-3 { background: var(--contrib-3); }
.contrib .lvl-4 { background: var(--contrib-4); }

/* Skeleton: a soft highlight sweeps diagonally across the empty grid, like a loading row in iOS */
.contrib-loading span {
    animation: contribWave 1.8s ease-in-out infinite;
    animation-delay: calc(var(--wave, 0) * 40ms);
}

@keyframes contribWave {
    0%, 55%, 100% { background: var(--contrib-0); }
    25% { background: var(--contrib-wave); }
}

/* The real squares fade in where the skeleton was */
.contrib:not(.contrib-loading) span {
    animation: contribIn 0.5s ease-out both;
}

@keyframes contribIn {
    from { opacity: 0; }
}

.contrib-fallback {
    flex: 1;
    display: flex;
    align-items: center;
}

.contrib-fallback img {
    width: 100%;
    height: auto;
    display: block;
    filter: var(--chart-filter);
}

/* Email: a compose sheet */
.tile-compose {
    padding: 24px 28px;
}

.send {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--tile-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 0;
    border-top: 1px solid var(--separator);
    font-size: 15px;
    line-height: 20px;
    letter-spacing: -0.01em;
}

.field-label {
    min-width: 62px;
    font-weight: 500;
    color: var(--text-secondary);
}

.field-value {
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Latest side project */
.tile-project {
    box-shadow: inset 0 0 0 1px rgba(88, 86, 214, 0.36), 0 1px 1px rgba(0, 0, 0, 0.02), 0 18px 40px -16px rgba(88, 86, 214, 0.38);
}

a.tile-project:hover {
    box-shadow: inset 0 0 0 1px rgba(88, 86, 214, 0.5), 0 1px 1px rgba(0, 0, 0, 0.02), 0 24px 48px -16px rgba(88, 86, 214, 0.46);
}

:root.dark-mode .tile-project {
    box-shadow: inset 0 0 0 1px rgba(125, 122, 255, 0.5), 0 0 44px -14px rgba(125, 122, 255, 0.42);
}

:root.dark-mode a.tile-project:hover {
    box-shadow: inset 0 0 0 1px rgba(125, 122, 255, 0.64), 0 0 52px -12px rgba(125, 122, 255, 0.5);
}

.tile-project .go {
    background: var(--indigo-soft);
    color: var(--indigo);
}

.project-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: -5px 0 0 -5px;
}

.project-shot {
    position: absolute;
    top: 30px;
    right: 66px;
    width: 168px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 14px 30px -10px rgba(40, 40, 90, 0.35);
}

.project-shot-dark,
:root.dark-mode .project-shot-light {
    display: none;
}

:root.dark-mode .project-shot-dark {
    display: block;
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 14px 30px -10px rgba(0, 0, 0, 0.7);
}

.project-text {
    position: relative;
    max-width: 230px;
}

.project-new {
    color: var(--indigo);
}

.project-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 9px 0 7px;
    border-radius: 999px;
    background: var(--fill);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.pill svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 767px) {
    .project-shot {
        top: 60px;
        right: 18px;
        width: 112px;
        border-radius: 12px;
    }

    .project-text {
        max-width: calc(100% - 136px);
    }

    .tile-project .sub {
        display: none;
    }
}

/* The email sheet closes the grid on a row of its own */
@media (min-width: 768px) {
    .span-row-lg {
        grid-column: 1 / -1;
    }
}

/* Liquid Glass material */
.glass {
    position: relative;
    border-radius: 999px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px) saturate(190%) brightness(1.06);
    -webkit-backdrop-filter: blur(10px) saturate(190%) brightness(1.06);
    box-shadow:
        inset 0 0 0 0.5px var(--glass-edge),
        inset 1.5px 1.5px 1px -1px var(--glass-spec),
        inset -1px -1px 1px -1px var(--glass-spec-2),
        0 12px 36px -10px rgba(0, 0, 0, 0.28),
        0 2px 6px rgba(0, 0, 0, 0.06);
}

.glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(90% 120% at 30% 0%, var(--glass-sheen), rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: 0;
}

.map-label > * {
    position: relative;
    z-index: 1;
}

/* Floating controls */
.controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(28px + env(safe-area-inset-bottom));
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    pointer-events: none;
}

.controls .glass {
    display: flex;
    padding: 4px;
    pointer-events: auto;
}

.theme-switch {
    gap: 2px;
}

.switch-btn,
.hdr-btn {
    position: relative;
    z-index: 1;
    min-width: 48px;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.switch-btn svg {
    width: 19px;
    height: 19px;
}

#theme-dark svg {
    width: 17px;
    height: 17px;
}

.switch-btn:hover,
.switch-btn.active {
    color: var(--text-primary);
}

.switch-bg {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    border-radius: 999px;
    background: var(--glass-thumb);
    box-shadow: inset 0 0 0 0.5px var(--glass-edge);
    transition: transform 0.45s var(--ease-spring), width 0.45s var(--ease-spring);
    z-index: 0;
}

.hdr-btn {
    letter-spacing: 0.02em;
    opacity: var(--hdr-btn-opacity);
    cursor: var(--hdr-btn-cursor);
}

.hdr-btn:hover {
    color: var(--text-primary);
}

.hdr-btn.active {
    background: #fff;
    color: #000;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.9);
}

:root.dark-mode .hdr-btn:hover,
:root.dark-mode .hdr-btn:active {
    color: var(--text-secondary);
}

@media (hover: none) and (pointer: coarse) {
    :root.dark-mode .hdr-btn {
        pointer-events: none;
    }
}

/* HDR Mode (light mode only) */
.bento-grid.hdr-active .tile {
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.5);
    animation: hdrTileGlow 3s ease-in-out infinite alternate;
}

.bento-grid.hdr-active .avatar {
    filter: brightness(1.2) contrast(1.1) saturate(1.2);
    animation: hdrGlow 3s ease-in-out infinite alternate;
}

@keyframes hdrGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.2);
    }

    100% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 1), 0 0 80px rgba(255, 255, 255, 0.6);
    }
}

@keyframes hdrTileGlow {
    0% {
        box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.4);
    }

    100% {
        box-shadow: 0 8px 32px rgba(255, 255, 255, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.8);
    }
}

/* True HDR Display Support */
@media (dynamic-range: high) {
    .hdr-btn.active {
        background-color: color(display-p3 1 1 1);
        box-shadow: 0 0 16px color(display-p3 1 1 1);
    }

    .bento-grid.hdr-active .tile {
        background: color(display-p3 1 1 1);
        animation: hdrTileGlowP3 3s ease-in-out infinite alternate;
    }

    .bento-grid.hdr-active .avatar {
        filter: brightness(1.4) contrast(1.2) saturate(1.3);
        animation: hdrGlowP3 3s ease-in-out infinite alternate;
    }

    @keyframes hdrGlowP3 {
        0% {
            box-shadow: 0 0 30px color(display-p3 1 1 1 / 0.7), 0 0 60px color(display-p3 1 1 1 / 0.3);
        }

        100% {
            box-shadow: 0 0 60px color(display-p3 1 1 1), 0 0 120px color(display-p3 1 1 1 / 0.8);
        }
    }

    @keyframes hdrTileGlowP3 {
        0% {
            box-shadow: 0 8px 40px color(display-p3 1 1 1 / 0.4), inset 0 0 30px color(display-p3 1 1 1 / 0.6), 0 0 30px color(display-p3 1 1 1 / 0.5);
        }

        100% {
            box-shadow: 0 8px 40px color(display-p3 1 1 1 / 0.5), inset 0 0 30px color(display-p3 1 1 1 / 0.7), 0 0 60px color(display-p3 1 1 1 / 0.9);
        }
    }
}

/* Enter animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

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

.bento-grid.animate-in .tile {
    opacity: 0;
    animation: fadeIn 0.7s var(--ease-spring) forwards;
}

.bento-grid.animate-in .tile:nth-child(1) { animation-delay: 0.05s; }
.bento-grid.animate-in .tile:nth-child(2) { animation-delay: 0.1s; }
.bento-grid.animate-in .tile:nth-child(3) { animation-delay: 0.15s; }
.bento-grid.animate-in .tile:nth-child(4) { animation-delay: 0.2s; }
.bento-grid.animate-in .tile:nth-child(5) { animation-delay: 0.25s; }
.bento-grid.animate-in .tile:nth-child(6) { animation-delay: 0.3s; }
.bento-grid.animate-in .tile:nth-child(7) { animation-delay: 0.35s; }
.bento-grid.animate-in .tile:nth-child(8) { animation-delay: 0.4s; }
.bento-grid.animate-in .tile:nth-child(9) { animation-delay: 0.45s; }
.bento-grid.animate-in .tile:nth-child(10) { animation-delay: 0.5s; }
.bento-grid.animate-in .tile:nth-child(11) { animation-delay: 0.55s; }
.bento-grid.animate-in .tile:nth-child(12) { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .bento-grid.animate-in .tile {
        opacity: 1;
    }
}
