/* #region Design tokens */
:root {
    --space-deep: #090A0F;
    --space-navy: #1B2735;

    --red-hi: #9d3d3d;
    --red-lo: #660d0d;
    --red-ink: #310909;
    --signal: #e2332b;

    --starlight: #f4ece8;
    --dust: #a9a3ad;

    --panel-top: rgba(23, 23, 28, 0.94);
    --panel-bottom: rgba(6, 6, 8, 0.94);
    --panel-edge: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(226, 51, 43, 0.95));

    --font: "Tomorrow", system-ui, sans-serif;
    --gutter: clamp(1rem, 4vw, 2rem);
    --container: min(1040px, 100% - 2 * var(--gutter));
    --card-pad: clamp(1.25rem, 3vw, 1.75rem);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
/* #endregion */

/* #region Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    background: var(--space-deep);
    scrollbar-color: var(--red-lo) var(--space-deep);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--starlight);
    background: var(--space-deep);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
    margin: 0;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

::selection {
    background: var(--signal);
    color: #fff;
}
/* #endregion */

/* #region Night sky */
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 45% at 10% 14%, rgba(157, 61, 61, 0.10), transparent 70%),
        radial-gradient(ellipse 45% 55% at 92% 38%, rgba(88, 76, 176, 0.09), transparent 70%),
        radial-gradient(ellipse at bottom, var(--space-navy) 0%, var(--space-deep) 100%);
}

.sky__layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
}

.star {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: var(--color, #fff);
    opacity: var(--o, 0.8);
}

.star--glow {
    box-shadow: 0 0 calc(var(--size) * 2.5) calc(var(--size) * 0.25) var(--color, #fff);
}

.star--twinkle {
    animation: twinkle var(--duration, 4s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes twinkle {
    from {
        opacity: var(--o, 0.8);
    }

    to {
        opacity: calc(var(--o, 0.8) * 0.25);
    }
}

/* The comet's head is its right end; night-sky.js rotates it around that point. */
.comet {
    position: absolute;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 200, 185, 0.28) 55%, rgba(255, 245, 240, 0.95));
    transform-origin: 100% 50%;
    pointer-events: none;
}

.comet::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -2px;
    width: 4px;
    height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 8px 2px rgba(255, 210, 195, 0.9),
        0 0 18px 5px rgba(226, 51, 43, 0.45);
}

.satellite {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #d9d4cf;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.satellite::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: #ff4b3e;
    box-shadow: 0 0 6px 2px rgba(255, 75, 62, 0.8);
    opacity: 0;
    animation: satellite-strobe 2.4s steps(1, end) infinite;
}

@keyframes satellite-strobe {
    0% {
        opacity: 1;
    }

    6% {
        opacity: 0;
    }
}
/* #endregion */

/* #region HUD surface (chamfered panel primitive) */
/*
 * Cuts the top-left and bottom-right corners. Because clip-path also clips
 * borders, outlines and shadows, the edge is drawn by ::before and the fill by
 * ::after, inset by --edge-w. --cut-in keeps the edge width constant along the
 * 45 degree cuts (cut - w * (2 - sqrt 2)).
 */
.hud {
    --cut: 16px;
    --edge-w: 1px;
    --cut-in: calc(var(--cut) - var(--edge-w) * 0.586);
    --edge: var(--panel-edge);
    --fill: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
    position: relative;
    isolation: isolate;
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.hud::before,
.hud::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hud::before {
    inset: 0;
    z-index: -2;
    background: var(--edge);
}

.hud::after {
    inset: var(--edge-w);
    z-index: -1;
    background: var(--fill);
    clip-path: polygon(var(--cut-in) 0, 100% 0, 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, 0 100%, 0 var(--cut-in));
}

/* Planet-lit panel: red light rising from below. */
.hud--panel {
    --fill:
        linear-gradient(0deg, rgba(226, 51, 43, 0.22), rgba(226, 51, 43, 0.05) 38%, transparent 62%),
        linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
}

/* Outlines are clipped on chamfered elements, so focus brightens the edge instead. */
.hud:focus-visible {
    outline: none;
    --edge: var(--starlight);
    --edge-w: 2px;
}
/* #endregion */

/* #region Header */
/* Pinned to the top of the viewport; only the controls inside take clicks. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    pointer-events: none;
}

.site-header__inner {
    width: var(--container);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    /* clip-path would cut a box-shadow, so the shadow is applied by the parent. */
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}

.site-header__inner > * {
    pointer-events: auto;
}

/* Tab hanging from the top edge: bottom corners cut, no top border. */
.profile-links {
    --cut: 12px;
    --edge: linear-gradient(180deg, rgba(255, 150, 130, 0.2), rgba(255, 150, 130, 0.6));
    --fill: linear-gradient(180deg, var(--red-hi), var(--red-lo));
    grid-column: 2;
    display: flex;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem 0.5rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.profile-links::after {
    inset: 0 var(--edge-w) var(--edge-w);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, var(--cut-in) 100%, 0 calc(100% - var(--cut-in)));
}

.profile-links__link {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    transition: background-color 0.2s var(--ease-out);
}

.profile-links__link:hover {
    background-color: rgba(0, 0, 0, 0.18);
}

.profile-links__link:focus-visible {
    outline: 2px solid var(--starlight);
    outline-offset: -4px;
}

.profile-links__icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    opacity: 0.94;
}

.profile-links__link:hover .profile-links__icon,
.profile-links__link:focus-visible .profile-links__icon {
    opacity: 1;
    animation: hero-icon-shake 0.4s ease-in-out infinite;
}

@keyframes hero-icon-shake {
    0%,
    100% {
        transform: scale(1.15) translate3d(0, 0, 0);
    }

    25% {
        transform: scale(1.15) translate3d(1px, -1px, 0);
    }

    50% {
        transform: scale(1.15) translate3d(-1px, 1px, 0);
    }

    75% {
        transform: scale(1.15) translate3d(1px, 1px, 0);
    }
}

.back-link {
    --cut: 9px;
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s var(--ease-out);
}

.back-link:hover {
    transform: translateX(-3px);
}

.back-link__icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.25;
}
/* #endregion */

/* #region Main layout */
.page-main {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    width: var(--container);
    margin-inline: auto;
    padding-block: clamp(2.25rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4rem);
    display: grid;
    align-content: start;
    gap: clamp(3rem, 8vw, 5.5rem);
}

.section-heading {
    position: relative;
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
    padding-bottom: 0.75rem;
    font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 0 #000, 0 8px 22px rgba(226, 51, 43, 0.5);
}

.section-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--signal), rgba(226, 51, 43, 0) 70%);
}
/* #endregion */

/* #region Intro */
.intro {
    display: grid;
    grid-template-columns: clamp(180px, 22vw, 280px) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
        "photo ."
        "photo name"
        "photo panel"
        "photo .";
    column-gap: clamp(1.5rem, 4vw, 3rem);
}

.intro__photo {
    --cut: 18px;
    --edge-w: 3px;
    --edge: linear-gradient(180deg, rgba(255, 255, 255, 0.18), var(--signal));
    --fill: #000;
    grid-area: photo;
    align-self: start;
    padding: var(--edge-w);
}

.intro__photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 964 / 1102;
    object-fit: cover;
    clip-path: polygon(var(--cut-in) 0, 100% 0, 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, 0 100%, 0 var(--cut-in));
}

.intro__name {
    grid-area: name;
    font-size: clamp(2.75rem, 1rem + 4.6vw, 4.75rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-wrap: balance;
    text-shadow: 0 2px 0 #000, 0 14px 34px rgba(226, 51, 43, 0.55);
}

.intro__panel {
    grid-area: panel;
    max-width: 44rem;
    margin-top: clamp(1rem, 2.5vw, 1.5rem);
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
}

.intro__greeting {
    max-width: 62ch;
    font-size: 1.0625rem;
    line-height: 1.65;
    text-wrap: pretty;
}

/* Home variant: photo plus a heading bar, styled like a .section-heading. */
.intro--compact {
    --intro-gap: clamp(1rem, 3vw, 1.75rem);
    grid-template-columns: clamp(88px, 11vw, 124px) minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "photo bar";
    column-gap: var(--intro-gap);
    align-items: end;
}

.intro--compact .intro__photo {
    --cut: 12px;
    --edge-w: 2px;
    align-self: end;
}

.intro__bar {
    grid-area: bar;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-bottom: 1rem;
}

/* Same fading rule as .section-heading, pulled across the gap so it meets the photo frame. */
.intro__bar::after {
    content: "";
    position: absolute;
    left: calc(-1 * var(--intro-gap));
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--signal), rgba(226, 51, 43, 0) 75%);
}

.intro--compact .intro__name {
    font-size: clamp(2rem, 1.1rem + 2.6vw, 3rem);
    line-height: 1.05;
    text-shadow: 0 2px 0 #000, 0 8px 22px rgba(226, 51, 43, 0.5);
}

/* Mirrors .back-link. The right margin matches the project card padding so it lines up with their buttons. */
.intro__more {
    --cut: 9px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    margin-right: var(--card-pad);
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-out);
}

.intro__more:hover {
    transform: translateX(3px);
}

.intro__more-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.25;
}
/* #endregion */

/* #region Projects */
.project-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

/* Inline padding stays at --card-pad so buttons line up with .intro__more; block padding is tighter. */
.project-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
        "thumb head  action"
        "thumb blurb action";
    align-items: start;
    column-gap: clamp(1rem, 2.5vw, 1.5rem);
    row-gap: 0.375rem;
    padding: calc(var(--card-pad) * 0.7) var(--card-pad);
}

.project-card__thumb {
    --cut: 10px;
    --edge: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(226, 51, 43, 0.85));
    --fill:
        radial-gradient(circle at 50% 120%, rgba(226, 51, 43, 0.32), transparent 70%),
        linear-gradient(180deg, #1c1316, #0a0708);
    grid-area: thumb;
    display: grid;
    place-items: center;
    width: 72px;
    aspect-ratio: 1;
    padding: 10px;
}

.project-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-card__head {
    grid-area: head;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
}

.project-card__title {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--signal);
    text-shadow: 0 1px 0 #000;
}

.project-card__date {
    font-size: 0.9375rem;
    color: var(--dust);
}

/* Date and tech stack share one line beside the title. */
.project-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.875rem;
}

.project-card__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-card__tech {
    width: 22px;
    height: 22px;
}

.project-card__blurb {
    grid-area: blurb;
    max-width: 68ch;
    line-height: 1.5;
    text-wrap: pretty;
}

/* Holds the GitHub button and, when a live_url is given, the "View Live" button. */
.project-card__actions {
    grid-area: action;
    align-self: center;
    display: grid;
    gap: 0.625rem;
}
/* #endregion */

/* #region Buttons */
.btn {
    --cut: 9px;
    --edge: linear-gradient(180deg, rgba(255, 160, 140, 0.7), rgba(49, 9, 9, 0.9));
    --fill: linear-gradient(180deg, #b0342f, #6e1010);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: filter 0.2s var(--ease-out), transform 0.1s var(--ease-out);
}

.btn:hover {
    filter: brightness(1.18);
}

.btn:active {
    transform: translateY(1px);
}

.btn__icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* Secondary "View Live" button: dark chamfered body with a signal-red edge. */
.btn--live {
    --edge-w: 1.5px;
    --edge: linear-gradient(180deg, rgba(160, 90, 80, 0.6), var(--red-lo));
    --fill:
        linear-gradient(0deg, rgba(226, 51, 43, 0.12), transparent 70%),
        linear-gradient(180deg, #0e090a, #040303);
    color: var(--starlight);
}

.btn--live:hover {
    filter: brightness(1.3);
}
/* #endregion */

/* #region Footer and planet */
.site-footer {
    position: relative;
    z-index: 1;
    height: clamp(200px, 24vw, 320px);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40px);
    mask-image: linear-gradient(to bottom, transparent, #000 40px);
}

/* Faint red haze in the atmosphere above the horizon. */
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 50% 100%, rgba(226, 51, 43, 0.14), transparent 70%);
    pointer-events: none;
}

.planet {
    position: absolute;
    top: clamp(70px, 9vw, 130px);
    left: 50%;
    width: max(165vw, 900px);
    aspect-ratio: 1;
    transform: translateX(-50%);
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #3a0b0a 0%, #1d0606 14%, #0d0303 32%);
    box-shadow:
        0 0 24px 3px rgba(226, 51, 43, 0.6),
        0 0 90px 24px rgba(226, 51, 43, 0.16);
}

/* Banded noise texture; it scrolls one tile width so the loop is seamless. */
.planet__surface {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(100% + 480px);
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .03' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .12 0 0 0 0 .09 1.9 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 480px 480px;
    animation: planet-spin 120s linear infinite;
}

@keyframes planet-spin {
    to {
        transform: translateX(-480px);
    }
}

/* Shading toward the night side, then the lit rim on top. */
.planet::before,
.planet::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.planet::before {
    background: linear-gradient(180deg, transparent 0, rgba(10, 2, 2, 0.7) 220px);
}

.planet::after {
    box-shadow:
        inset 0 10px 24px -6px rgba(255, 120, 90, 0.55),
        inset 0 40px 80px -20px rgba(226, 51, 43, 0.25);
}

.site-footer__text {
    position: relative;
    z-index: 1;
    padding: 0 var(--gutter) clamp(1.25rem, 3vw, 2rem);
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: center;
    color: #e05a4f;
    text-shadow: 0 1px 2px #000;
}
/* #endregion */

/* #region Fonts */
.tomorrow-thin {
    font-family: "Tomorrow", sans-serif;
    font-weight: 100;
    font-style: normal;
}

.tomorrow-extralight {
    font-family: "Tomorrow", sans-serif;
    font-weight: 200;
    font-style: normal;
}

.tomorrow-light {
    font-family: "Tomorrow", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.tomorrow-regular {
    font-family: "Tomorrow", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.tomorrow-medium {
    font-family: "Tomorrow", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.tomorrow-semibold {
    font-family: "Tomorrow", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.tomorrow-bold {
    font-family: "Tomorrow", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.tomorrow-extrabold {
    font-family: "Tomorrow", sans-serif;
    font-weight: 800;
    font-style: normal;
}

.tomorrow-black {
    font-family: "Tomorrow", sans-serif;
    font-weight: 900;
    font-style: normal;
}

.tomorrow-thin-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 100;
    font-style: italic;
}

.tomorrow-extralight-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 200;
    font-style: italic;
}

.tomorrow-light-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 300;
    font-style: italic;
}

.tomorrow-regular-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.tomorrow-medium-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 500;
    font-style: italic;
}

.tomorrow-semibold-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 600;
    font-style: italic;
}

.tomorrow-bold-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 700;
    font-style: italic;
}

.tomorrow-extrabold-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 800;
    font-style: italic;
}

.tomorrow-black-italic {
    font-family: "Tomorrow", sans-serif;
    font-weight: 900;
    font-style: italic;
}
/* #endregion */

/* #region Utilities */
.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
/* #endregion */

/* #region Responsive */
@media (max-width: 900px) {
    .intro--compact {
        grid-template-columns: clamp(88px, 26vw, 124px) minmax(0, 1fr);
    }

    .intro--compact .intro__photo {
        position: relative;
        align-self: stretch;
    }

    /* Let the stacked heading set the height, rather than the image's intrinsic size. */
    .intro--compact .intro__photo img {
        position: absolute;
        inset: var(--edge-w);
        width: calc(100% - 2 * var(--edge-w));
        height: calc(100% - 2 * var(--edge-w));
    }

    .intro__bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .intro__more {
        margin-right: 0;
    }

    .project-card {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas:
            "thumb head"
            "thumb blurb"
            ".     action";
    }

    .project-card__actions {
        grid-auto-flow: column;
        justify-self: start;
        margin-top: 0.375rem;
    }
}

@media (max-width: 720px) {
    .project-card {
        grid-template-columns: 56px minmax(0, 1fr);
        grid-template-areas:
            "thumb  head"
            "blurb  blurb"
            "action action";
        column-gap: 0.875rem;
        row-gap: 0.75rem;
    }

    .project-card__thumb {
        --cut: 8px;
        width: 56px;
        padding: 8px;
    }

    .project-card__head {
        align-self: center;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .project-card__actions {
        grid-auto-columns: minmax(0, 1fr);
        align-self: stretch;
        justify-self: stretch;
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .intro:not(.intro--compact) {
        grid-template-columns: clamp(84px, 28vw, 128px) minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "photo name"
            "panel panel";
        column-gap: 1rem;
        row-gap: 1.5rem;
    }

    .intro__photo {
        --cut: 12px;
        --edge-w: 2px;
    }

    .intro__name {
        align-self: center;
        font-size: clamp(1.875rem, 9vw, 3.25rem);
    }

    .intro__panel {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .site-header__inner:has(.back-link) {
        grid-template-columns: auto 1fr;
    }

    .site-header__inner:has(.back-link) .profile-links {
        justify-self: end;
        padding-inline: 0.5rem;
    }

    .profile-links__link {
        width: 44px;
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .planet__surface,
    .profile-links__link:hover .profile-links__icon,
    .profile-links__link:focus-visible .profile-links__icon {
        animation: none;
    }
}
/* #endregion */
