@font-face {
    font-family: "Schibsted Grotesk";
    src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #08090a;
    --ink: #f7f8f8;
    --muted: #8a8f98;
    --faint: #62666d;
    --line: rgba(255, 255, 255, 0.08);
    --surface: rgba(255, 255, 255, 0.025);
    --glow: rgba(110, 196, 160, 0.16);
    color-scheme: dark;
}

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

html {
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 5vw, 4.5rem);
    background: var(--bg);
    color: var(--ink);
    font-family: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Faint glow for pages without a photo backdrop. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 55% at 15% -10%, var(--glow), transparent 70%);
}

/* Mountain photo across the top of the page, sinking into the background. */
.backdrop {
    position: absolute;
    inset: 0 0 auto;
    height: max(70vh, 32rem);
    overflow: hidden;
    pointer-events: none;
}

.backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    filter: saturate(0.85) brightness(0.8);
}

.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 9, 10, 0.55), rgba(8, 9, 10, 0) 60%),
        linear-gradient(180deg, rgba(8, 9, 10, 0.2) 0%, rgba(8, 9, 10, 0.55) 55%, var(--bg) 100%);
}

.backdrop ~ main {
    justify-content: flex-start;
    padding-top: max(calc(70vh - 15rem), 17rem);
}

main,
footer {
    position: relative;
    z-index: 1;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 72rem;
}

.name {
    margin: 0;
    font-size: clamp(3.5rem, 17vw, 10.5rem);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.05em;
    color: var(--ink);
    background: linear-gradient(170deg, #ffffff 35%, rgba(255, 255, 255, 0.42) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.06em;
}

.name span {
    display: block;
}

.headline {
    margin: clamp(1.25rem, 3vw, 2rem) 0 0;
    max-width: 36rem;
    color: var(--muted);
    font-size: clamp(1.25rem, 2.4vw, 1.625rem);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.links {
    margin: 1.75rem 0 0;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 24px -8px rgba(110, 196, 160, 0.35);
    transition: background-color 0.15s ease;
}

.links a:hover {
    background: #d9dcdc;
}

.links svg {
    width: 1rem;
    height: 1rem;
}

a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.intro {
    margin-top: clamp(1.5rem, 3.5vw, 2.5rem);
    padding-top: clamp(1.5rem, 3.5vw, 2.5rem);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

.intro .headline {
    margin: 0;
}

.about {
    max-width: 36rem;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), var(--surface));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #d0d6e0;
}

.about p {
    margin: 0 0 0.875rem;
}

.focus-title {
    margin: 1.5rem 0 0.75rem;
    color: var(--faint);
    font-size: 0.875rem;
    font-weight: 500;
}

.focus {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.focus li {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font-size: 0.875rem;
}

footer {
    margin-top: clamp(3rem, 8vh, 6rem);
    color: var(--faint);
    font-size: 0.8125rem;
}

footer p {
    margin: 0;
}

/* One entrance: the name, then the rest, resolve out of a soft blur. */
@media (prefers-reduced-motion: no-preference) {
    .backdrop img {
        animation: settle 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    @keyframes settle {
        from {
            opacity: 0;
            transform: scale(1.04);
        }
    }

    .name,
    .intro,
    main > .headline,
    main > .links {
        animation: reveal 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .intro,
    main > .headline,
    main > .links {
        animation-delay: 0.18s;
    }

    @keyframes reveal {
        from {
            opacity: 0;
            filter: blur(10px);
            transform: translateY(0.5rem);
        }
    }
}

@media (max-width: 720px) {
    .intro {
        grid-template-columns: 1fr;
    }
}
