/* Oscar HO — a personal space, with room for the work. */
:root {
    color-scheme: dark;
    --bg: #06080e;
    --surface: #0b0e14;
    --text: #f5f6f9;
    --text-secondary: #d0d7e3;
    --text-muted: #bec8d8;
    --accent: #a9cdfb;
    --line: #343d4e;
    --glass-bg: rgba(10, 13, 19, 0.88);
    --glass-edge: rgba(209, 223, 240, 0.44);
    --radius: 2rem;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(6, 8, 14, 0.3), transparent 60%),
        linear-gradient(180deg, rgba(6, 8, 14, 0.08), transparent 45%, rgba(6, 8, 14, 0.24));
}

#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Even overlapping stars must leave a readable backdrop for muted text. */
    opacity: 0.44;
    pointer-events: none;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.12;
    text-wrap: balance;
    overflow-wrap: anywhere;
    min-width: 0;
}

h2 {
    font-size: clamp(2.35rem, 4.5vw, 4rem);
    font-weight: 650;
    letter-spacing: -0.04em;
}

h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
}

a {
    color: var(--accent);
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1px;
}

button,
summary,
a {
    -webkit-tap-highlight-color: rgba(154, 198, 255, 0.22);
    touch-action: manipulation;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

button[hidden],
[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid #bfddff;
    outline-offset: 5px;
}

[id] {
    scroll-margin-top: 1rem;
}

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

::selection {
    color: #fff;
    background: #335d9e;
}

.container {
    width: min(100% - 5rem, 70rem);
    margin-inline: auto;
}

.section {
    padding-block: clamp(5.5rem, 10vw, 9rem);
}

.reading-copy {
    max-width: 68ch;
    color: var(--text-secondary);
}

.reading-copy p + p {
    margin-top: 1.2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ic {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

.ic-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: fixed;
    top: 0.7rem;
    left: 1rem;
    z-index: 100;
    min-height: 44px;
    padding: 0.7rem 1.2rem;
    border-radius: 1rem;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    transform: translateY(-200%);
}

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

/* Glass stays on controls; content uses dark, readable surfaces. */
.liquid-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 36px rgba(0, 0, 0, 0.32);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .liquid-glass {
        -webkit-backdrop-filter: blur(18px) saturate(150%);
        backdrop-filter: blur(18px) saturate(150%);
    }
}

.site-header {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 50;
    padding-inline: max(1.25rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right));
}

.nav-inner {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(100%, 74rem);
    min-height: 4.25rem;
    margin-inline: auto;
    padding: 0.45rem 0.65rem 0.45rem 1.4rem;
    border-color: transparent;
    border-radius: 999px;
    transition: background-color 240ms ease, transform 450ms var(--ease-out), box-shadow 300ms ease;
}

.site-header.scrolled .nav-inner {
    background-color: rgba(8, 11, 17, 0.96);
    transform: translateY(-3px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 40px rgba(0, 0, 0, 0.3);
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
    white-space: nowrap;
}

.logo-dot,
.name-dot {
    color: var(--accent);
}

.nav-links,
.nav-controls {
    display: flex;
    align-items: center;
}

.nav-links {
    gap: 0.15rem;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: 0.85rem;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease;
}

.nav-link:hover,
.nav-link[aria-current] {
    color: #fff;
    background: #343e50;
}

.nav-link[aria-current]::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 12px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.nav-controls {
    gap: 0.25rem;
    flex-wrap: wrap;
    max-width: 100%;
    margin-left: auto;
}

.motion-toggle,
.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color 180ms ease;
}

.motion-toggle:hover:not(:disabled),
.mobile-toggle:hover {
    background: #343e50;
}

.motion-toggle:disabled {
    color: var(--text-secondary);
}

.play-icon,
[data-motion="off"] .pause-icon {
    display: none;
}

[data-motion="off"] .play-icon {
    display: block;
}

.mobile-nav {
    display: none;
}

.mobile-toggle {
    cursor: pointer;
    list-style: none;
}

.mobile-toggle .menu-line {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 260ms var(--ease-out);
}

.mobile-nav[open]:not([data-closing]) .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

.mobile-nav[open]:not([data-closing]) .menu-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav[data-closing] .menu-line {
    transition-duration: 180ms;
}

summary::-webkit-details-marker {
    display: none;
}

.mobile-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    max-height: calc(100dvh - 8rem);
    padding: 0.7rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 1.6rem;
    transform-origin: top right;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    color: var(--text);
    text-decoration: none;
}

.mobile-menu a:hover,
.mobile-menu a[aria-current] {
    background: #343e50;
}

.mobile-menu a[aria-current] {
    text-decoration: underline;
}

.hero {
    padding-top: clamp(10rem, 17vh, 13rem);
    padding-bottom: 2rem;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 5rem;
    min-height: 35rem;
}

.hero-copy h1 {
    font-size: clamp(3.5rem, 7.4vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.03;
}

.hero-statement {
    margin-top: 1.4rem;
    color: var(--text-secondary);
    font-size: clamp(1.7rem, 3.2vw, 2.8rem);
    font-weight: 550;
    letter-spacing: -0.035em;
    line-height: 1.15;
    text-wrap: balance;
}

.hero-intro {
    max-width: 43ch;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-width: 44px;
    min-height: 48px;
    padding: 0.75rem 1.45rem;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #0b0e14;
    font-size: 0.9375rem;
    font-weight: 550;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.28);
    transition: transform 240ms var(--ease-out), background-color 180ms ease, box-shadow 240ms ease;
}

.btn-primary {
    padding-inline: 1.6rem;
    background: linear-gradient(135deg, #20262d, #090b0f 75%);
    color: #fff;
    font-weight: 650;
}

.btn::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 0;
    width: 55%;
    background: linear-gradient(110deg, transparent, rgba(230, 241, 255, 0.12), transparent);
    transform: translateX(-180%) skewX(-12deg);
    pointer-events: none;
}

.btn-secondary {
    color: var(--text);
    background: #090c12;
}

.btn.scroll-active,
.btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 30px rgba(0, 0, 0, 0.4);
}

.btn.scroll-active::before,
.btn:focus-visible::before {
    animation: beam-spin 6s linear infinite;
}

.btn.scroll-active::after,
.btn:focus-visible::after {
    animation: sheen-sweep 900ms var(--ease-out);
}

@media (hover: hover) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 30px rgba(0, 0, 0, 0.4);
    }

    .btn:hover::before {
        animation: beam-spin 6s linear infinite;
    }

    .btn:hover::after {
        animation: sheen-sweep 900ms var(--ease-out);
    }
}

.btn:active {
    transform: translateY(0);
}

.current-role {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-height: 44px;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
}

.current-role:hover strong {
    text-decoration: underline;
}

.status-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 0.55rem;
    border-radius: 50%;
    background: #a3d6c8;
}

.current-role strong {
    color: var(--text);
    font-weight: 600;
}

.current-role-detail {
    display: block;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.hero-portrait {
    width: min(100%, 21rem);
    justify-self: center;
    transform: rotate(3deg);
}

.portrait-frame {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid #8490aa;
    border-radius: 2.2rem;
    background: #171d2b;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4), 0 8px 50px rgba(75, 106, 190, 0.12);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 56%;
    user-select: none;
}

.hero-portrait figcaption {
    margin-top: 1.15rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
}

.hero-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 4.5rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

.text-link:hover {
    color: #dcecff;
    text-decoration: underline;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 6rem;
}

.about-copy {
    padding-top: 0.3rem;
    font-size: 1.0625rem;
}

.about-copy a:hover,
.reading-copy a:hover {
    color: #e0edff;
}

.interest-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 2rem;
    padding: 0;
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.interest-notes li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.interest-notes .ic {
    color: var(--accent);
}

.about-signoff span {
    display: block;
    margin-top: 0.4rem;
    color: var(--text);
}

.work-section {
    background: rgba(9, 12, 19, 0.35);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.section-heading > p {
    max-width: 31ch;
    color: var(--text-secondary);
    font-size: 1rem;
}

@property --beam-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.project-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(220, 233, 250, 0.035), transparent 40%), rgba(9, 12, 18, 0.95);
    box-shadow: inset 0 1px 0 rgba(234, 242, 255, 0.06), 0 22px 54px rgba(0, 0, 0, 0.26);
    transition: transform 450ms var(--ease-out), box-shadow 300ms ease;
}

.nav-inner::before,
.btn::before,
.project-card::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--beam-angle), #353d49, #aebdce 55deg, #343d4b 115deg,
            #343d4b 230deg, #d6dfe9 285deg, #353d49);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.nav-inner::before {
    padding: 1.5px;
    /* Matching halves keep the reflection visible across the loop boundary. */
    background: linear-gradient(90deg, #43505f 0%, #a6b8ce 18%, #f4f8ff 25%,
            #a6b8ce 32%, #43505f 50%, #a6b8ce 68%, #f4f8ff 75%, #a6b8ce 82%, #43505f 100%);
    background-size: 200% 100%;
    background-position: 100% 50%;
}

.nav-inner::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent 0%, rgba(224, 236, 252, 0.09) 25%,
            transparent 50%, rgba(224, 236, 252, 0.09) 75%, transparent 100%);
    background-size: 200% 100%;
    background-position: 100% 50%;
    pointer-events: none;
}

.project-card::before {
    z-index: 4;
}

[data-motion="on"] .nav-inner::before,
[data-motion="on"] .nav-inner::after {
    animation: nav-reflection 7s linear infinite;
}

.project-card::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: 50%;
    background: linear-gradient(105deg, transparent, rgba(225, 236, 250, 0.09), transparent);
    transform: translateX(-180%) skewX(-12deg);
    pointer-events: none;
}

.project-card.scroll-active,
.project-card:focus-within {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 0 rgba(234, 242, 255, 0.1), 0 28px 58px rgba(0, 0, 0, 0.4);
}

.project-card.scroll-active::before,
.project-card:focus-within::before {
    background: conic-gradient(from var(--beam-angle), #3e4856, #e2ebf5 55deg, #3e4856 115deg,
            #3e4856 245deg, #b9cbdf 305deg, #3e4856);
    animation: beam-spin 6s linear infinite;
}

.project-card.scroll-active::after {
    animation: sheen-sweep 900ms var(--ease-out);
}

@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: inset 0 1px 0 rgba(234, 242, 255, 0.1), 0 28px 58px rgba(0, 0, 0, 0.4);
    }

    .project-card:hover::before {
        background: conic-gradient(from var(--beam-angle), #3e4856, #e2ebf5 55deg, #3e4856 115deg,
                #3e4856 245deg, #b9cbdf 305deg, #3e4856);
        animation: beam-spin 6s linear infinite;
    }

    .project-card:hover::after {
        animation: sheen-sweep 900ms var(--ease-out);
    }
}

@keyframes beam-spin {
    to { --beam-angle: 360deg; }
}

@keyframes nav-reflection {
    from { background-position: 100% 50%; }
    to { background-position: 0% 50%; }
}

@keyframes sheen-sweep {
    to { transform: translateX(300%) skewX(-12deg); }
}

.project-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    margin-bottom: 1.6rem;
}

.project-visual {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.project-feature .project-visual {
    aspect-ratio: auto;
    min-height: 31rem;
}

.project-visual svg {
    width: 100%;
    height: 100%;
    min-height: 0;
    justify-self: center;
    transition: transform 600ms var(--ease-out);
}

.project-visual figcaption {
    width: 100%;
    padding: 0.7rem 1.5rem 1.3rem;
    color: #c0cada;
    font-size: 0.75rem;
}

.uav-visual {
    background: radial-gradient(ellipse at 36% 40%, #152a32, #0a121b 75%);
}

.haptic-visual {
    background: radial-gradient(ellipse at 50% 55%, #2b203b, #110e1c 75%);
}

.audiosense-visual {
    background: radial-gradient(ellipse at 50% 55%, #1a2f4a, #0b1422 75%);
}

.project-card.scroll-active .project-visual svg {
    transform: scale(1.035);
}

@media (hover: hover) {
    .project-card:hover .project-visual svg {
        transform: scale(1.035);
    }
}

.project-content {
    position: relative;
    z-index: 3;
    padding: 2.5rem;
    background: linear-gradient(150deg, rgba(21, 26, 34, 0.6), rgba(7, 10, 15, 0.9));
}

.project-domain {
    margin-top: 0.85rem;
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 550;
}

.project-content h3 {
    font-size: clamp(1.9rem, 3vw, 2.65rem);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.project-content h3 span {
    display: block;
    margin-top: 0.6rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    letter-spacing: 0.03em;
}

.project-description {
    margin-top: 1.3rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.75;
}

.project-recognition {
    margin-top: 1rem;
    color: #c5dfdc;
    font-size: 0.8125rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    margin-block: 1.2rem;
    padding: 0;
    list-style: none;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.project-date {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.project-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
    align-items: stretch;
}

.project-pair > .project-card {
    display: flex;
    flex-direction: column;
}

.project-pair .project-visual {
    flex-shrink: 0;
}

.project-pair .project-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-pair .project-details {
    margin-top: auto;
}

.project-details summary,
.entry-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px;
    border-radius: 0.3rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}

.project-details summary:hover,
.entry-details summary:hover {
    color: #e2efff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.project-details {
    border-top: 1px solid var(--line);
    padding-top: 0.3rem;
}

.disclosure-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 400;
    transition: transform 240ms var(--ease-out);
}

details[open] > summary .disclosure-icon {
    transform: rotate(45deg);
}

.detail-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.75rem;
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.75;
}

.detail-list li::marker {
    color: var(--text-muted);
}

.experience-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 7rem;
}

.experience-intro > p {
    max-width: 27ch;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.experience-entry {
    padding-block: 2rem;
    border-bottom: 1px solid var(--line);
}

.experience-entry:first-child {
    padding-top: 0;
}

.entry-date {
    margin-bottom: 0.65rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.experience-entry h3 {
    max-width: 29ch;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.entry-organisation {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.entry-details {
    margin-top: 0.6rem;
}

.background-section {
    background: rgba(11, 14, 22, 0.45);
}

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

.group-title {
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.group-description {
    margin-top: 0.7rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.education-list {
    display: grid;
    gap: 1.8rem;
    margin-top: 1.8rem;
    padding: 0;
    list-style: none;
}

.education-list p:not(.entry-date),
.skills-list dd {
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.education-list p.qualification {
    color: #b4d7ce;
    font-size: 0.8125rem;
}

.skills-list {
    display: grid;
    gap: 1.4rem;
    margin-top: 1.8rem;
}

.skills-list dt {
    font-weight: 600;
    line-height: 1.4;
}

.recognition-columns {
    margin-top: 4.5rem;
    padding-top: 4.5rem;
    border-top: 1px solid var(--line);
}

.recognition-list,
.credential-list {
    display: grid;
    gap: 1.4rem;
    margin-block: 1.8rem 1rem;
    padding: 0;
    list-style: none;
}

.recognition-list > li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.recognition-mark {
    color: #dccd9e;
    font-size: 1.2rem;
    line-height: 1.4;
}

.recognition-list p,
.credential-list p {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.community-section {
    margin-top: 4.5rem;
    padding-top: 4.5rem;
    border-top: 1px solid var(--line);
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 2.5rem;
    margin-top: 2rem;
}

.community-grid .entry-organisation {
    min-height: 3.1rem;
    font-size: 0.875rem;
}

.language-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 4.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.language-strip h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.language-strip ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
}

.language-strip li > span:last-child {
    margin-left: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.language-strip li > span[lang] {
    margin-right: 0.35rem;
}

.contact-layout {
    text-align: center;
}

.contact-layout h2 {
    font-size: clamp(2.7rem, 5.5vw, 4.75rem);
}

.contact-layout > p {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    max-width: 100%;
    margin-top: 1.8rem;
    color: var(--accent);
    font-size: clamp(1.15rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.contact-email:hover {
    color: #e0edff;
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.8rem;
    margin-top: 2rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
}

.social-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer {
    padding-block: 1rem max(2rem, env(safe-area-inset-bottom));
    background: #090c13;
    border-top: 1px solid var(--line);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    padding-top: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer-bottom .text-link {
    color: var(--text-muted);
}

.footer-control {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: inherit;
}

.footer-control[aria-pressed="true"] {
    color: var(--accent);
    text-decoration: underline;
}

.back-to-top {
    position: fixed;
    z-index: 30;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--text);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 200ms ease, transform 200ms var(--ease-out), visibility 200ms;
}

.back-to-top.show,
.back-to-top:focus-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #35425a;
}

@media (max-width: 1040px) {
    .nav-link {
        padding-inline: 0.6rem;
    }

    .hero-layout {
        gap: 3rem;
    }

    .about-layout,
    .experience-layout,
    .background-columns {
        gap: 3.5rem;
    }
}

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

    .mobile-nav {
        display: block;
    }

    .hero-layout {
        min-height: 30rem;
        gap: 2rem;
    }

    .hero-copy h1 {
        font-size: clamp(3.2rem, 7.5vw, 5.5rem);
    }

    .project-content {
        padding: 2rem;
    }

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

    .project-feature .project-visual {
        aspect-ratio: 16 / 8;
        min-height: 0;
    }

    .project-feature .project-visual svg {
        width: 72%;
    }

    .project-feature .project-content {
        display: block;
        padding: 2.5rem;
        min-width: 0;
    }

    .project-feature .project-content h3 br {
        display: none;
    }

    .community-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .community-grid .entry-organisation {
        min-height: 0;
    }
}

@media (max-width: 639px) {
    .container {
        width: calc(100% - 2.5rem);
    }

    .site-header {
        top: max(0.75rem, env(safe-area-inset-top));
        padding-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
    }

    .nav-inner {
        min-height: 3.8rem;
        gap: 0.2rem;
        padding: 0.3rem 0.35rem 0.3rem 1rem;
    }

    .nav-logo {
        font-size: 1rem;
    }

    .motion-toggle,
    .mobile-toggle {
        padding-inline: 0.6rem;
        font-size: 0.75rem;
    }

    .hero {
        padding-top: 8rem;
    }

    .hero-layout {
        grid-template-columns: minmax(0, 1fr) clamp(76px, 25vw, 112px);
        min-height: 0;
        gap: 0 1rem;
        align-items: center;
    }

    .hero-copy {
        display: contents;
    }

    .hero-copy h1 {
        grid-column: 1;
        grid-row: 1;
        font-size: clamp(1.75rem, 9.5vw + 0.25rem, 3.5rem);
    }

    .hero-statement {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 2rem;
        font-size: clamp(1.8rem, 7vw, 2.65rem);
    }

    .hero-intro {
        grid-column: 1 / -1;
        grid-row: 3;
        max-width: 37ch;
        font-size: 1rem;
    }

    .hero-actions {
        grid-column: 1 / -1;
        grid-row: 4;
        gap: 0.65rem;
        margin-top: 1.6rem;
    }

    .hero-actions .btn {
        padding-inline: 1.2rem;
        font-size: 0.875rem;
    }

    .current-role {
        grid-column: 1 / -1;
        grid-row: 5;
        justify-self: start;
        margin-top: 1.6rem;
    }

    .hero-portrait {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
    }

    .hero-portrait figcaption {
        display: none;
    }

    .portrait-frame {
        border-radius: 1.2rem;
    }

    .hero-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
        margin-top: 3rem;
    }

    .section {
        padding-block: 5rem;
    }

    .about-layout,
    .experience-layout,
    .background-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.8rem;
    }

    .about-copy {
        font-size: 1rem;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.2rem;
        margin-bottom: 2.5rem;
    }

    .section-heading > p br {
        display: none;
    }

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

    .project-card {
        --radius: 1.6rem;
    }

    .project-content,
    .project-feature .project-content {
        padding: 1.6rem;
    }

    .project-feature .project-visual {
        aspect-ratio: 1.2;
    }

    .project-feature .project-visual svg {
        width: 100%;
    }

    .project-visual figcaption {
        padding: 0.7rem 1.2rem 1rem;
    }

    .project-content h3 {
        font-size: 2rem;
    }

    .back-to-top {
        display: none;
    }

    .recognition-columns,
    .community-section {
        margin-top: 3rem;
        padding-top: 3rem;
    }

    .language-strip {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 3rem;
    }

    .language-strip ul {
        flex-direction: column;
        gap: 0.6rem;
    }

    .contact-layout {
        text-align: left;
    }

    .social-links {
        justify-content: flex-start;
        gap: 0.3rem 1.4rem;
    }
}

@media (max-width: 359px) {
    .motion-label {
        display: none;
    }

    .container {
        width: calc(100% - 2rem);
    }
}

/* The pause control covers both the canvas and decorative CSS/WAAPI motion. */
html[data-motion="off"] {
    scroll-behavior: auto;
}

[data-motion="off"] *,
[data-motion="off"] *::before,
[data-motion="off"] *::after {
    animation: none !important;
    transition: none !important;
}

[data-motion="off"] .project-card,
[data-motion="off"] .project-visual svg,
[data-motion="off"] .btn {
    transform: none !important;
}

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

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

    .project-card,
    .project-visual svg,
    .btn {
        transform: none !important;
    }
}

html[data-transparency="solid"] {
    --glass-bg: #1a202d;
    --glass-edge: #7f91ae;
}

html[data-transparency="solid"] .liquid-glass,
html[data-transparency="solid"] .site-header.scrolled .nav-inner {
    background: #1a202d;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    :root {
        --glass-bg: #1a202d;
        --glass-edge: #9fb1cc;
        --text-secondary: #e4e8ef;
        --text-muted: #c4ccda;
        --line: #67748b;
    }

    .liquid-glass,
    .site-header.scrolled .nav-inner {
        background: #1a202d;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (forced-colors: active) {
    :root {
        --bg: Canvas;
        --surface: Canvas;
        --text: CanvasText;
        --text-secondary: CanvasText;
        --text-muted: CanvasText;
        --accent: LinkText;
        --line: CanvasText;
    }

    #starfield,
    body::before,
    .nav-inner::before,
    .nav-inner::after,
    .btn::before,
    .btn::after,
    .project-card::before,
    .project-card::after,
    .project-visual[aria-hidden="true"] {
        display: none;
    }

    .liquid-glass,
    .site-header.scrolled .nav-inner,
    .btn,
    .project-card {
        border: 1px solid ButtonText;
        background: Canvas;
        color: CanvasText;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    :focus-visible {
        outline-color: Highlight;
    }
}

@media print {
    :root {
        --bg: #fff;
        --surface: #fff;
        --text: #111;
        --text-secondary: #222;
        --text-muted: #333;
        --accent: #164a7b;
        --line: #bbb;
    }

    #starfield,
    body::before,
    .site-header,
    .back-to-top,
    .project-visual,
    .hero-portrait,
    .hero-actions,
    .footer-control {
        display: none !important;
    }

    html {
        scroll-padding-top: 0;
    }

    .hero,
    .section {
        padding-block: 1.5rem;
        background: #fff;
    }

    .hero-layout,
    .about-layout,
    .experience-layout,
    .background-columns,
    .project-feature,
    .project-pair {
        display: block;
        min-height: 0;
    }

    .project-card {
        margin-bottom: 1rem;
        border: 1px solid #bbb;
        break-inside: avoid;
        box-shadow: none;
    }

    .project-card::before,
    .project-card::after,
    .btn::before,
    .btn::after {
        display: none;
    }

    .project-content,
    .project-feature .project-content {
        padding: 1rem;
    }

    .section-heading {
        margin-bottom: 1.5rem;
    }

    .recognition-columns,
    .community-section {
        margin-top: 2rem;
        padding-top: 2rem;
    }
}
