/* Foundation */
:root {
    color-scheme: light;
    --paper: #ffffff;
    --sky: #82c8e5;
    --soft-sky: #e6f5fb;
    --ink: #111111;
    --rule: 2px solid var(--ink);
    --hard-shadow: 6px 6px 0 var(--ink);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
}

a {
    color: inherit;
}

/* Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px clamp(12px, 3vw, 36px);
    border-bottom: var(--rule);
    background: rgb(255 255 255 / 84%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.retro-nav {
    position: relative;
    display: flex;
    width: min(100%, 1320px);
    min-height: 76px;
    align-items: stretch;
    justify-content: space-between;
    margin: 0 auto;
    border: 3px solid var(--ink);
    background: var(--paper);
    box-shadow: var(--hard-shadow);
}

.brand {
    display: flex;
    min-width: 250px;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--sky);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid var(--paper);
    background: var(--ink);
    color: var(--sky);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 1;
}

.brand-note {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
}

.nav-links {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    position: relative;
    display: grid;
    min-width: 92px;
    height: 100%;
    place-items: center;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 140ms ease, color 140ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    outline: none;
    background: var(--sky);
    color: var(--ink);
}

.nav-links a:focus-visible {
    box-shadow: inset 0 0 0 2px var(--ink);
}

/* Hero */
#main-content {
    width: 100%;
}

.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100svh - 106px);
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.55fr);
    width: min(100%, 1320px);
    min-height: calc(100svh - 106px);
    align-content: center;
    align-items: center;
    row-gap: clamp(0.75rem, 2vh, 1.25rem);
    column-gap: clamp(2rem, 4vw, 3.5rem);
    margin: 0 auto;
    padding-block: clamp(2rem, 7vh, 4rem);
    padding-right: clamp(20px, 7vw, 96px);
    padding-left: clamp(20px, 4vw, 56px);
}

.hero-copy {
    max-width: 1000px;
}

.hero h1 {
    max-width: 950px;
    margin: 0;
    font-size: clamp(2.75rem, 7vh, 5.25rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.04;
}

.hero h1 span {
    display: block;
}

.hero h1 span + span {
    text-decoration: underline;
    text-decoration-color: var(--sky);
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.08em;
}

.hero-portrait {
    position: relative;
    display: grid;
    width: min(100%, clamp(297px, 29.7vw, 432px), clamp(297px, 45.9vh, 405px));
    aspect-ratio: 4 / 5;
    justify-self: end;
    place-items: center;
    margin: 0;
}

.hero-portrait-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    background: transparent;
    mix-blend-mode: multiply;
    object-fit: contain;
    opacity: 0;
    transition: opacity 180ms ease;
}

.hero-portrait.has-video .hero-portrait-video {
    visibility: visible;
    opacity: 1;
}

.hero-portrait-placeholder {
    display: grid;
    gap: 1rem;
    justify-items: center;
    padding: 1rem;
    color: var(--ink);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.hero-portrait-placeholder strong {
    display: grid;
    place-items: center;
    color: var(--sky);
    font-size: clamp(4rem, 9vw, 6rem);
    letter-spacing: -0.1em;
    text-shadow: 3px 3px 0 var(--ink);
}

.hero-portrait.has-video .hero-portrait-placeholder {
    visibility: hidden;
    opacity: 0;
}

.hero-subhead {
    max-width: 700px;
    margin: clamp(1rem, 2.5vh, 1.5rem) 0 0;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    line-height: 1.6;
    color: var(--ink);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-top: clamp(1.25rem, 2.5vh, 1.75rem);
}

.hero-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 1.1rem;
    border: 1.5px solid var(--ink);
    background: var(--sky);
    box-shadow: 4px 4px 0 var(--ink);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.hero-button--secondary {
    background: var(--paper);
}

.hero-button:not(:disabled):hover,
.hero-button:not(:disabled):focus-visible {
    transform: translate(-2px, -2px);
    background: var(--soft-sky);
    box-shadow: 6px 6px 0 var(--ink);
}

.hero-button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.hero-button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

/* Core stack */
.core-stack {
    display: grid;
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    border-top: 1px solid rgb(17 17 17 / 20%);
    gap: 1.25rem;
}

.core-stack h2 {
    margin: 0;
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tech-icons img {
    display: block;
    width: clamp(36px, 3vw, 44px);
    height: clamp(36px, 3vw, 44px);
    object-fit: contain;
    filter: grayscale(1) brightness(0.35);
    transition: filter 180ms ease, transform 180ms ease;
}

.tech-icons img:hover {
    filter: none;
    transform: translateY(-4px);
}

/* Stack */
.stack-section {
    padding: clamp(3rem, 6vw, 5rem) clamp(20px, 5vw, 56px);
    background: var(--ink);
    color: var(--paper);
}

.stack-inner {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.stack-heading {
    margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.stack-heading p {
    margin: 0 0 0.5rem;
    color: var(--sky);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.stack-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    letter-spacing: -0.07em;
    line-height: 1;
}

.stack-symbols {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.stack-categories {
    padding: clamp(1rem, 3vw, 1.75rem);
    border: 1px solid rgb(255 255 255 / 28%);
    background: rgb(255 255 255 / 62%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.stack-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding-block: 1.25rem;
}

.stack-category h3 {
    width: 100%;
    margin: 0;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.45;
    text-align: center;
}

.stack-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.85rem clamp(1rem, 2.5vw, 1.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.stack-item {
    display: inline-flex;
    align-items: center;
    color: var(--paper);
    transition: color 140ms ease, transform 140ms ease;
}

.stack-item > img {
    display: block;
    width: clamp(32px, 3vw, 40px);
    height: clamp(32px, 3vw, 40px);
    object-fit: contain;
    filter: grayscale(1) brightness(0.35);
    transition: filter 160ms ease, transform 180ms ease;
}

.stack-generic-icon {
    display: block;
    width: clamp(32px, 3vw, 40px);
    height: clamp(32px, 3vw, 40px);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--ink);
    transition: color 140ms ease, transform 180ms ease;
}

.stack-item:hover,
.stack-item:focus-within {
    color: var(--sky);
    transform: translateY(-2px);
}

.stack-item:hover:not(.stack-item--progress) > img,
.stack-item:focus-within:not(.stack-item--progress) > img {
    filter: none;
}

.stack-item:hover > img,
.stack-item:focus-within > img,
.stack-item:hover .stack-generic-icon,
.stack-item:focus-within .stack-generic-icon {
    transform: scale(1.12);
}

.stack-item--progress {
    position: relative;
}

/* Certifications */
.cert-section {
    padding: clamp(3.5rem, 7vw, 6rem) clamp(16px, 4vw, 36px);
    background: linear-gradient(90deg, var(--paper) 0 50%, var(--ink) 50% 100%);
}

.cert-inner {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.cert-heading {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto clamp(1.75rem, 4vw, 3rem);
    padding: 0.75rem 1.25rem;
    border: 1.5px solid var(--ink);
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--sky);
    color: var(--ink);
    text-align: center;
}

.cert-heading p {
    margin: 0 0 0.3rem;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.cert-heading h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.06em;
    line-height: 1;
}

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

.cert-column {
    display: grid;
    min-width: 0;
    grid-template-rows: repeat(2, minmax(228px, 1fr));
    gap: clamp(0.75rem, 1.5vw, 1rem);
    padding: clamp(0.65rem, 1.5vw, 1rem);
}

.cert-card {
    display: grid;
    min-width: 0;
    height: 100%;
    grid-template-columns: clamp(60px, 6vw, 72px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(0.65rem, 1.5vw, 0.9rem);
    padding: clamp(0.8rem, 1.8vw, 1.15rem);
    border: 1.5px solid;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 5px 5px 0 rgb(130 200 229 / 55%);
}

.cert-card--light {
    border-color: rgb(17 17 17 / 42%);
    background: rgb(255 255 255 / 68%);
    color: var(--ink);
}

.cert-card--dark {
    border-color: rgb(255 255 255 / 45%);
    background: rgb(255 255 255 / 12%);
    color: var(--paper);
}

.cert-badge-slot {
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    place-items: center;
    margin: 0;
    padding: 0.35rem;
    border: 0;
    background: var(--paper);
    color: var(--ink);
}

.cert-badge-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert-badge-slot--empty {
    align-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    text-align: center;
}

.cert-placeholder-icon {
    width: 46%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-linejoin: miter;
    stroke-width: 1.5;
}

.cert-badge-slot--empty span {
    font-size: 0.45rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.cert-badge-slot--fcc .fa-free-code-camp {
    font-size: 1.65rem;
    line-height: 1;
}

.cert-badge-slot--fcc span {
    font-size: 0.4rem;
    letter-spacing: 0;
}

.cert-details {
    min-width: 0;
}

.cert-details h3 {
    margin: 0 0 0.6rem;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.35;
}

.cert-details p {
    margin: 0.35rem 0 0;
    font-size: clamp(0.68rem, 0.8vw, 0.74rem);
    line-height: 1.6;
}

.cert-details strong {
    font-weight: 800;
}

.cert-verified {
    font-weight: 800;
}

.cert-card--light .cert-verified {
    color: var(--ink);
}

.cert-card--dark .cert-verified {
    color: var(--sky);
}

.cert-verify-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    margin-top: 0.45rem;
    color: inherit;
    font-size: 0.62rem;
    font-weight: 800;
    text-underline-offset: 0.2em;
}

.cert-verify-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.cert-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0 clamp(0.75rem, 2vw, 1.5rem);
}

.cert-action {
    display: flex;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border: 1.5px solid;
    box-shadow: 3px 3px 0 rgb(130 200 229 / 55%);
    color: var(--ink);
    font-size: clamp(0.6rem, 0.75vw, 0.68rem);
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cert-action--learn {
    border-color: rgb(17 17 17 / 42%);
    background: rgb(255 255 255 / 68%);
}

.cert-action--all {
    border-color: rgb(255 255 255 / 45%);
    background: var(--sky);
}

.cert-action-copy {
    display: grid;
    gap: 0.2rem;
}

.cert-action-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cert-action-arrow {
    flex: 0 0 auto;
    font-size: 1.2rem;
    transition: transform 140ms ease;
}

.cert-action:hover .cert-action-arrow,
.cert-action:focus-visible .cert-action-arrow {
    transform: translateX(4px);
}

.cert-action:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.cert-page-header {
    padding: 1rem clamp(16px, 4vw, 36px);
    background: var(--paper);
}

.cert-page-header-inner {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.cert-page-back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border: var(--rule);
    background: var(--sky);
    box-shadow: 4px 4px 0 var(--ink);
    font-size: 0.65rem;
    font-weight: 800;
    text-decoration: none;
}

.cert-archive-section {
    padding: clamp(3rem, 6vw, 5rem) clamp(16px, 4vw, 36px);
    background: linear-gradient(90deg, var(--paper) 0 50%, var(--ink) 50% 100%);
}

.cert-archive-inner {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.cert-archive-heading {
    width: fit-content;
    max-width: 100%;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1.1rem, 2.5vw, 1.75rem);
    border: 1.5px solid var(--ink);
    background: var(--paper);
    box-shadow: 6px 6px 0 var(--sky);
    color: var(--ink);
}

.cert-archive-heading p:first-child {
    margin: 0 0 0.7rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.cert-archive-heading h1 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 3.25rem);
    letter-spacing: -0.07em;
    line-height: 1.08;
}

.cert-archive-intro {
    margin: 0.8rem 0 0;
    font-size: clamp(0.65rem, 0.9vw, 0.75rem);
    line-height: 1.6;
}

.cert-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, clamp(220px, 23vw, 270px));
    grid-template-areas:
        "javascript javascript code-scanning introduction-git"
        "javascript javascript linux-essentials linux-essentials"
        "python python linux-essentials linux-essentials"
        "freecodecamp freecodecamp linux-unhatched linux-unhatched";
    grid-auto-flow: dense;
    gap: clamp(0.85rem, 1.5vw, 1.25rem);
}

.cert-bento-card {
    display: flex;
    min-width: 0;
    grid-column: span 1;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 6px 6px 0 rgb(130 200 229 / 55%);
}

.cert-bento-card--feature {
    grid-column: span 2;
    grid-row: span 2;
}

.cert-bento-card--medium {
    grid-column: span 2;
}

.cert-bento-card--javascript {
    grid-area: javascript;
}

.cert-bento-card--linux-essentials {
    grid-area: linux-essentials;
}

.cert-bento-card--linux-unhatched {
    grid-area: linux-unhatched;
}

.cert-bento-card--python {
    grid-area: python;
}

.cert-bento-card--freecodecamp {
    grid-area: freecodecamp;
}

.cert-bento-card--code-scanning {
    grid-area: code-scanning;
}

.cert-bento-card--introduction-git {
    grid-area: introduction-git;
}

.cert-bento-card--medium .cert-bento-open {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

.cert-bento-card--medium .cert-bento-copy {
    align-content: center;
}

.cert-bento-card--python .cert-bento-open {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.cert-bento-card--python .cert-bento-copy {
    align-self: stretch;
}

.cert-bento-card--python .cert-bento-copy > span:not(.cert-bento-kicker) {
    font-size: 0.58rem;
}

.cert-bento-card--light {
    border-color: rgb(17 17 17 / 48%);
    background: rgb(255 255 255 / 90%);
    color: var(--ink);
}

.cert-bento-card--dark {
    border-color: rgb(255 255 255 / 48%);
    background: rgb(255 255 255 / 14%);
    color: var(--paper);
}

.cert-bento-open {
    display: grid;
    width: 100%;
    min-width: 0;
    flex: 1;
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: stretch;
    gap: 0.7rem;
    padding: 0.75rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.cert-bento-card--feature .cert-bento-open {
    gap: 1rem;
    padding: 1rem;
}

.cert-bento-image,
.cert-bento-placeholder {
    display: grid;
    width: 100%;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    padding: 0.45rem;
    border: 1px solid rgb(17 17 17 / 28%);
    background: var(--paper);
    color: var(--ink);
}

.cert-bento-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.cert-bento-placeholder {
    align-content: center;
    gap: 0.5rem;
    color: var(--ink);
    text-align: center;
}

.cert-bento-placeholder .fa {
    font-size: clamp(2.25rem, 5vw, 4rem);
}

.cert-bento-placeholder span {
    font-size: 0.52rem;
    font-weight: 800;
}

.cert-bento-copy {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 0.35rem;
}

.cert-bento-copy strong {
    font-size: clamp(0.78rem, 1vw, 0.95rem);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cert-bento-copy > span:not(.cert-bento-kicker) {
    font-size: 0.55rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.cert-bento-kicker {
    color: inherit;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.cert-bento-card--feature .cert-bento-copy strong {
    font-size: clamp(1.05rem, 1.7vw, 1.5rem);
}

.cert-bento-card--feature .cert-bento-copy > span:not(.cert-bento-kicker) {
    font-size: 0.68rem;
}

.cert-bento-verify {
    display: block;
    min-height: 40px;
    align-content: center;
    padding: 0.45rem 0.75rem;
    border-top: 1px solid currentColor;
    color: inherit;
    font-size: 0.55rem;
    font-weight: 800;
    text-decoration: none;
    text-underline-offset: 0.2em;
}

.cert-bento-verify:hover {
    text-decoration: underline;
}

.cert-bento-profile {
    display: flex;
    min-width: 0;
    width: fit-content;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    max-width: 100%;
    margin: clamp(1.25rem, 3vw, 2rem) auto 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--ink);
    background: var(--sky);
    color: var(--ink);
    font-size: 0.58rem;
    font-weight: 800;
    text-decoration: none;
}

.cert-bento-profile:hover {
    background: var(--soft-sky);
}

.cert-bento-open:focus-visible,
.cert-bento-verify:focus-visible,
.cert-bento-profile:focus-visible,
.cert-viewer button:focus-visible,
.cert-viewer-verify:focus-visible {
    outline: 2px solid var(--sky);
    outline-offset: 3px;
}

.cert-viewer {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    border: 0;
    background: var(--ink);
    color: var(--paper);
}

.cert-viewer::backdrop {
    background: rgb(0 0 0 / 92%);
}

.cert-viewer-shell {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 4vw, 3.5rem);
}

.cert-viewer-header {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cert-viewer-counter {
    color: var(--sky);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.cert-viewer-close {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgb(255 255 255 / 55%);
    background: transparent;
    color: var(--paper);
    cursor: pointer;
    font: inherit;
    font-size: 0.65rem;
    font-weight: 800;
}

.cert-viewer-close span {
    font-size: 1.2rem;
}

.cert-viewer-stage {
    display: grid;
    flex: 1;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    min-height: 0;
    padding-block: 1rem;
    touch-action: pan-y;
}

.cert-viewer-arrow {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 55%);
    background: transparent;
    color: var(--paper);
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
}

.cert-viewer-arrow:hover,
.cert-viewer-close:hover {
    background: var(--sky);
    color: var(--ink);
}

.cert-viewer-figure {
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    gap: 0.75rem;
    margin: 0;
}

.cert-viewer-image {
    display: block;
    width: min(100%, 1100px);
    height: min(66svh, 760px);
    object-fit: contain;
}

.cert-viewer-image[hidden],
.cert-viewer-placeholder[hidden] {
    display: none;
}

.cert-viewer-placeholder {
    display: grid;
    width: min(100%, 820px);
    min-height: min(60svh, 620px);
    align-content: center;
    justify-items: center;
    gap: 1rem;
    padding: clamp(1.5rem, 5vw, 4rem);
    border: 1.5px solid rgb(255 255 255 / 38%);
    background: rgb(255 255 255 / 8%);
    text-align: center;
}

.cert-viewer-placeholder-mark {
    color: var(--sky);
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.07em;
}

.cert-viewer-placeholder p,
.cert-viewer-note {
    margin: 0;
    color: rgb(255 255 255 / 72%);
    font-size: 0.62rem;
    line-height: 1.6;
    text-align: center;
}

.cert-viewer-details {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(255 255 255 / 30%);
}

.cert-viewer-details h2 {
    margin: 0.3rem 0;
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.3;
}

.cert-viewer-details p:not(.cert-card-kicker) {
    margin: 0;
    color: rgb(255 255 255 / 72%);
    font-size: 0.62rem;
    line-height: 1.5;
}

.cert-viewer-verify {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    flex: 0 0 auto;
    color: var(--sky);
    font-size: 0.62rem;
    font-weight: 800;
    text-underline-offset: 0.2em;
}

.cert-viewer:focus {
    outline: none;
}

.cert-page-back:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Projects */
.projects-section {
    padding: clamp(3.5rem, 7vw, 6rem) clamp(16px, 4vw, 36px);
    background: linear-gradient(90deg, var(--ink) 0 50%, var(--paper) 50% 100%);
}

.projects-inner {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.projects-heading {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto clamp(1.75rem, 4vw, 3rem);
    padding: 0.75rem 1.25rem;
    border: 1.5px solid var(--ink);
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--sky);
    text-align: center;
}

.projects-heading p {
    margin: 0 0 0.3rem;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.projects-heading h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.06em;
    line-height: 1;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.project-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    gap: 1rem;
    padding: clamp(1.25rem, 2.4vw, 2rem);
    border: 1.5px solid;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 6px 6px 0 rgb(130 200 229 / 55%);
}

.project-card--dark {
    border-color: rgb(255 255 255 / 45%);
    background: rgb(255 255 255 / 12%);
    color: var(--paper);
}

.project-card--light {
    border-color: rgb(17 17 17 / 42%);
    background: rgb(17 17 17 / 6%);
    color: var(--ink);
}

.project-badge {
    margin: 0;
    color: var(--sky);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.project-card--light .project-badge {
    color: var(--ink);
}

.project-card h3 {
    margin: 0;
    font-size: clamp(1.05rem, 1.55vw, 1.4rem);
    line-height: 1.3;
}

.project-copy {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-tags li {
    padding: 0.3rem 0.45rem;
    border: 1px solid currentColor;
    font-size: 0.56rem;
    font-weight: 700;
    line-height: 1.3;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: auto;
}

.project-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    border: 1px solid currentColor;
    color: inherit;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
}

.project-link[aria-disabled="true"] {
    cursor: pointer;
    opacity: 0.55;
}

.project-card--dark .project-link--primary {
    border-color: var(--ink);
    background: var(--sky);
    color: var(--ink);
}

.project-card--light .project-link--primary {
    background: var(--ink);
    color: var(--paper);
}

.project-link:hover,
.project-link:focus-visible {
    background: var(--soft-sky);
    color: var(--ink);
}

.project-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.project-status {
    margin: auto 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid currentColor;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Contact */
.contact-section {
    padding: clamp(3.5rem, 7vw, 6rem) clamp(16px, 4vw, 36px);
    background: var(--paper);
    color: var(--ink);
}

.contact-inner {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.contact-heading {
    margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.contact-heading p {
    margin: 0 0 0.5rem;
    color: var(--sky);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.contact-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    letter-spacing: -0.07em;
    line-height: 1;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: stretch;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.contact-channels,
.contact-form-panel {
    min-width: 0;
    padding: clamp(1.1rem, 2.5vw, 2rem);
    border: 1.5px solid rgb(17 17 17 / 42%);
    background: var(--paper);
    box-shadow: 6px 6px 0 rgb(130 200 229 / 55%);
    color: var(--ink);
}

.contact-channels h3,
.contact-form-heading h3 {
    margin: 0;
    font-size: clamp(0.95rem, 1.3vw, 1.2rem);
    line-height: 1.4;
}

.contact-intro-copy {
    margin: 0.7rem 0 1.2rem;
    font-size: 0.68rem;
    line-height: 1.7;
}

.contact-link-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-link-tile {
    display: grid;
    min-width: 0;
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.55rem 0.7rem;
    border: 1.5px solid rgb(17 17 17 / 55%);
    background: var(--soft-sky);
    box-shadow: 3px 3px 0 rgb(130 200 229 / 45%);
    color: var(--ink);
    text-decoration: none;
    transition: background-color 140ms ease, transform 140ms ease;
}

.contact-link-tile:hover,
.contact-link-tile:focus-visible {
    background: var(--sky);
    transform: translate(-1px, -1px);
}

.contact-link-tile strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(0.57rem, 0.78vw, 0.68rem);
    line-height: 1.45;
}

.contact-link-label {
    grid-column: 1;
    color: rgb(17 17 17 / 70%);
    font-size: 0.53rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.contact-link-tile strong + .contact-link-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.contact-link-main {
    display: grid;
    min-width: 0;
    grid-column: 1;
    gap: 0.2rem;
    color: inherit;
    text-decoration: none;
}

.contact-email-tile {
    grid-template-columns: minmax(0, 1fr) auto;
}

.copy-email-button {
    min-height: 34px;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.58rem;
    font-weight: 800;
}

.copy-email-button:hover,
.copy-email-button:focus-visible {
    background: var(--ink);
    color: var(--paper);
}

.contact-link-tile:focus-visible,
.copy-email-button:focus-visible,
.feedback-field input:focus-visible,
.feedback-field select:focus-visible,
.feedback-field textarea:focus-visible,
.feedback-submit:focus-visible,
.feedback-submit-row a:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid var(--sky);
    outline-offset: 3px;
}

.copy-email-status {
    min-height: 1.2em;
    margin: 0.7rem 0 0;
    font-size: 0.58rem;
    line-height: 1.5;
}

.contact-form-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}

.form-status-pill {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 0.2rem 0.55rem;
    background: var(--sky);
    color: var(--ink);
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.feedback-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.feedback-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 0.4rem;
    font-size: 0.62rem;
    font-weight: 800;
}

.feedback-field--wide {
    grid-column: 1 / -1;
}

.field-required,
.field-optional {
    color: rgb(17 17 17 / 62%);
    font-size: 0.52rem;
    font-weight: 600;
}

.feedback-field input,
.feedback-field select,
.feedback-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.7rem;
    border: 1.5px solid rgb(17 17 17 / 48%);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 0.65rem;
    font-weight: 500;
}

.feedback-field textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.feedback-field input::placeholder,
.feedback-field textarea::placeholder {
    color: rgb(17 17 17 / 58%);
    opacity: 1;
}

.feedback-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 0.1rem;
}

.feedback-submit {
    min-height: 44px;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid var(--ink);
    background: var(--sky);
    color: var(--ink);
    cursor: not-allowed;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 800;
}

.feedback-submit:not(:disabled) {
    cursor: pointer;
}

.feedback-submit:not(:disabled):hover {
    background: var(--ink);
    color: var(--paper);
}

.feedback-submit:disabled {
    cursor: wait;
    opacity: 0.62;
}

.feedback-status {
    margin: 0;
    padding: 0;
    font-size: 0.6rem;
    line-height: 1.6;
}

.feedback-status:not(:empty) {
    padding: 0.55rem 0.7rem;
    border-left: 3px solid var(--sky);
}

.feedback-status:empty {
    display: none;
}

.feedback-submit-row p {
    margin: 0;
    font-size: 0.58rem;
    line-height: 1.5;
}

.feedback-submit-row a {
    font-weight: 800;
    text-underline-offset: 0.2em;
}

.site-footer {
    padding: 1.1rem clamp(16px, 4vw, 36px);
    border-top: 2px solid var(--sky);
    background: var(--paper);
    color: var(--ink);
}

.site-footer-inner {
    display: flex;
    width: min(100%, 1120px);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
}

.site-footer p {
    margin: 0;
    font-size: 0.58rem;
    line-height: 1.6;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer a {
    min-height: 40px;
    align-content: center;
    color: var(--ink);
    font-size: 0.58rem;
    font-weight: 800;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Responsive layout */
@media (max-width: 850px) {
    html {
        scroll-padding-top: 88px;
    }

    #main-content > section {
        min-height: calc(100svh - 88px);
    }

    #main-content > .stack-section {
        min-height: auto;
    }

    .site-header {
        padding: 10px 12px;
    }

    .retro-nav {
        min-height: 66px;
    }

    .hero {
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        min-height: calc(100svh - 88px);
        row-gap: clamp(1.75rem, 4svh, 2.5rem);
        padding-block: clamp(2.25rem, 6svh, 3.5rem);
    }

    .hero h1 {
        font-size: clamp(2.4rem, 8.5vw, 3.5rem);
        line-height: 1.12;
    }

    .hero-subhead {
        max-width: 36ch;
        margin-top: 1.5rem;
        font-size: clamp(1rem, 2.4vw, 1.15rem);
        line-height: 1.75;
    }

    .hero-actions {
        margin-top: 1.75rem;
    }

    .hero-portrait {
        display: none;
    }

    .core-stack {
        grid-column: auto;
        gap: 1.1rem;
        padding-top: 1.25rem;
    }

    .projects-section {
        background: linear-gradient(180deg, var(--ink) 0 50%, var(--paper) 50% 100%);
    }

    .cert-section {
        background: var(--ink);
    }

    .cert-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .cert-column--light {
        position: relative;
        isolation: isolate;
        color: var(--ink);
    }

    .cert-column--light::before {
        position: absolute;
        z-index: -1;
        top: 0;
        bottom: -2.5rem;
        left: 50%;
        width: 100vw;
        background: rgb(255 255 255 / 88%);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        content: "";
        transform: translateX(-50%);
    }

    .cert-column--dark {
        background: transparent;
        color: var(--paper);
    }

    .cert-archive-section {
        background: var(--ink);
    }

    .cert-bento-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: repeat(4, clamp(200px, 28vw, 240px));
    }

    .cert-bento-card--feature {
        grid-column: span 2;
        grid-row: span 2;
    }

    .cert-viewer-shell {
        padding: 0.75rem;
    }

    .cert-viewer-stage {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        gap: 0.35rem;
    }

    .cert-viewer-arrow {
        width: 36px;
        height: 44px;
    }

    .cert-viewer-image {
        height: min(58svh, 560px);
    }

    .cert-viewer-details {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-channels,
    .contact-form-panel {
        padding: clamp(1rem, 4vw, 1.5rem);
    }

    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .feedback-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .feedback-field--wide {
        grid-column: auto;
    }

    .stack-category {
        gap: 0.5rem;
    }

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

    .project-card--dark,
    .project-card--light {
        border-color: rgb(17 17 17 / 55%);
        background: rgb(255 255 255 / 82%);
        color: var(--ink);
    }

    .project-card--dark .project-badge,
    .project-card--light .project-badge {
        color: var(--ink);
    }

    .project-card--dark .project-link--primary,
    .project-card--light .project-link--primary {
        border-color: var(--ink);
        background: var(--sky);
        color: var(--ink);
    }

    .brand {
        min-width: 0;
        padding: 8px 12px;
    }

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

    .nav-toggle {
        display: flex;
        min-width: 98px;
        min-height: 44px;
        align-self: center;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 0 12px;
        border: var(--rule);
        background: var(--soft-sky);
        cursor: pointer;
        color: var(--ink);
        font-family: inherit;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .nav-toggle:focus-visible {
        outline: 3px solid var(--sky);
        outline-offset: 3px;
    }

    .menu-icon {
        display: grid;
        width: 20px;
        gap: 4px;
    }

    .menu-icon i {
        display: block;
        height: 2px;
        background: var(--ink);
        transition: transform 140ms ease;
    }

    .retro-nav.menu-open .menu-icon i:first-child {
        transform: translateY(6px) rotate(45deg);
    }

    .retro-nav.menu-open .menu-icon i:nth-child(2) {
        opacity: 0;
    }

    .retro-nav.menu-open .menu-icon i:last-child {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 13px);
        right: 0;
        display: none;
        width: min(300px, calc(100vw - 24px));
        border: 3px solid var(--ink);
        background: var(--paper);
        box-shadow: var(--hard-shadow);
    }

    .retro-nav.menu-open .nav-links {
        display: grid;
    }

    .nav-links a {
        min-width: 0;
        min-height: 50px;
        justify-items: start;
        padding: 0 16px;
    }
}

@media (max-width: 560px) {
    .cert-bento-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-template-areas: none;
        grid-auto-rows: minmax(230px, auto);
    }

    .cert-bento-card {
        grid-area: auto;
        grid-column: span 1;
    }

    .cert-bento-card--feature,
    .cert-bento-card--medium {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .cert-bento-card--medium .cert-bento-open {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0.7rem;
    }

    .cert-bento-card--medium .cert-bento-copy {
        align-content: start;
    }

    .cert-bento-card {
        min-height: 230px;
    }

    .cert-bento-card--feature {
        min-height: 320px;
    }

    .cert-bento-image,
    .cert-bento-placeholder {
        min-height: 100px;
    }

    .cert-bento-card--feature .cert-bento-image,
    .cert-bento-card--feature .cert-bento-placeholder {
        min-height: 180px;
    }
}

@media (max-width: 420px) {
    .site-header {
        padding-inline: 8px;
    }

    .brand {
        gap: 8px;
        padding-inline: 9px;
    }

    .brand-copy {
        min-width: 0;
    }

    .brand-name {
        font-size: clamp(16px, 6vw, 21px);
        white-space: nowrap;
    }

    .brand-note {
        font-size: 8px;
        overflow-wrap: anywhere;
    }

    .nav-toggle {
        min-width: 88px;
        gap: 8px;
        padding-inline: 8px;
    }

    .hero-inner {
        padding-inline: 18px;
    }

    .hero h1 {
        font-size: clamp(2rem, 9.5vw, 2.6rem);
    }

    .cert-bento-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-auto-rows: auto;
    }

    .cert-bento-card,
    .cert-bento-card--feature,
    .cert-bento-card--medium,
    .cert-bento-profile {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .cert-bento-card,
    .cert-bento-card--feature {
        min-height: 270px;
    }

    .cert-bento-card--feature {
        min-height: 340px;
    }

    .cert-bento-image,
    .cert-bento-placeholder {
        min-height: 140px;
    }

    .cert-bento-card--feature .cert-bento-image,
    .cert-bento-card--feature .cert-bento-placeholder {
        min-height: 200px;
    }

    .tech-icons {
        gap: 1.15rem;
    }

    .tech-icons img {
        width: 34px;
        height: 34px;
    }

}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
