/* Portfolio — "Hive" design (Robin Van Gijseghem) */

:root {
    --bg: oklch(0.16 0.02 255);
    --panel: oklch(0.2 0.025 255);
    --ink: oklch(0.95 0.01 230);
    --muted: oklch(0.74 0.03 240);
    --line: oklch(0.36 0.04 245);
    --accent: oklch(0.82 0.13 205);
    --accent-2: oklch(0.82 0.13 300);

    --font-display: 'Chakra Petch', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;

    --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    --notch-lg: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
    --notch-lg-inner: polygon(0 0, calc(100% - 27.5px) 0, 100% 27.5px, 100% 100%, 27.5px 100%, 0 calc(100% - 27.5px));
    --notch-sm: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    --notch-sm-inner: polygon(7.4px 0, 100% 0, 100% calc(100% - 7.4px), calc(100% - 7.4px) 100%, 0 100%, 0 7.4px);
    --notch-btn: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    --notch-btn-inner: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
}

@keyframes pf-spin { to { transform: rotate(360deg); } }
@keyframes pf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.pf {
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
}

.pf a {
    color: inherit;
    text-decoration: none;
}

.pf h1, .pf h2, .pf h3 {
    font-family: var(--font-display);
}

/* Nav */
.pf-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px clamp(20px, 5vw, 72px);
    background: color-mix(in oklch, var(--bg) 86%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.pf-nav__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-nav__mark {
    width: 38px;
    height: 44px;
    display: grid;
    place-items: center;
    clip-path: var(--hex);
    background: var(--accent);
    color: var(--bg);
    font: 700 14px var(--font-display);
}

.pf-nav__name {
    font: 600 17px var(--font-display);
    letter-spacing: .03em;
}

.pf-nav__links {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.6vw, 28px);
    flex-wrap: wrap;
    font: 500 12px var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.pf-nav__links a:not(.pf-nav__contact):hover {
    color: var(--accent);
}

.pf-lang {
    display: flex;
    padding: 1px;
    gap: 1px;
    background: var(--line);
    clip-path: var(--notch-sm);
}

.pf-lang button {
    cursor: pointer;
    border: 0;
    padding: 6px 10px;
    background: var(--bg);
    color: var(--muted);
    font: 500 11px var(--font-mono);
    letter-spacing: .1em;
}

.pf-lang button[aria-pressed="true"] {
    background: var(--accent);
    color: var(--bg);
}

a.pf-nav__contact {
    padding: 8px 16px;
    clip-path: var(--notch-sm);
    background: var(--accent);
    color: var(--bg);
}

/* Hero */
.pf-hero {
    position: relative;
    padding: clamp(56px, 8vw, 112px) clamp(20px, 5vw, 72px) clamp(80px, 10vw, 136px);
}

.pf-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2256%22 height=%2297%22%3E%3Cpath d=%22M28 65L0 49V16L28 0l28 16v33L28 65v32%22 fill=%22none%22 stroke=%22%2388a898%22 stroke-opacity=%22.22%22/%3E%3C/svg%3E');
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 75% 45%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 75% 45%, #000 20%, transparent 75%);
    pointer-events: none;
}

.pf-hero__grid {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: clamp(48px, 6vw, 80px);
    align-items: center;
}

.pf-hero__content {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.pf-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 500 12px var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.pf-status__dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    transform: rotate(45deg);
    animation: pf-pulse 2.4s ease-in-out infinite;
}

.pf-kicker {
    font: 500 13px var(--font-mono);
    letter-spacing: .08em;
    color: var(--accent-2);
}

.pf-hero h1 {
    margin: 0;
    font: 700 clamp(44px, 6.6vw, 88px)/1 var(--font-display);
    letter-spacing: -.01em;
    text-wrap: balance;
}

.pf-hero h1 span {
    color: var(--accent);
}

.pf-hero__sub {
    margin: 0;
    max-width: 34em;
    font-size: clamp(17px, 1.4vw, 19px);
    color: var(--muted);
    text-wrap: pretty;
}

.pf-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
}

a.pf-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    clip-path: var(--notch-btn);
    background: var(--accent);
    color: var(--bg);
    font: 600 16px var(--font-display);
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: transform .2s;
}

.pf-btn:hover {
    transform: translateX(4px);
}

.pf-btn--outline {
    display: inline-flex;
    padding: 1.5px;
    clip-path: var(--notch-btn);
    background: var(--line);
    transition: background .2s;
}

.pf-btn--outline:hover {
    background: var(--accent-2);
}

.pf-btn--outline span {
    display: inline-flex;
    padding: 14.5px 26.5px;
    clip-path: var(--notch-btn-inner);
    background: var(--bg);
    font: 600 16px var(--font-display);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Portrait */
.pf-portrait {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: .866;
    justify-self: center;
}

.pf-portrait__ring {
    position: absolute;
    inset: -9%;
    pointer-events: none;
}

.pf-portrait__ring div:first-child {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--line);
    animation: pf-spin 80s linear infinite;
}

.pf-portrait__ring div:last-child {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top-color: var(--accent);
    animation: pf-spin 24s linear infinite reverse;
}

.pf-portrait__shadow {
    position: absolute;
    inset: 0;
    transform: translate(22px, 18px);
    clip-path: var(--hex);
    background: var(--accent-2);
}

.pf-portrait__shadow--bg {
    transform: translate(22px, 18px) scale(.985);
    background: var(--bg);
}

.pf-portrait__frame {
    position: absolute;
    inset: 0;
    clip-path: var(--hex);
    background: var(--panel);
    overflow: hidden;
}

.pf-portrait__frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 50%;
}

.pf-portrait__badge {
    position: absolute;
    left: -24px;
    bottom: 12%;
    padding: 14px 24px;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    background: var(--panel);
    border-left: 4px solid var(--accent);
    font: 500 15px var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    pointer-events: none;
}

/* Sections */
.pf-section {
    padding: clamp(64px, 8vw, 112px) clamp(20px, 5vw, 72px);
    scroll-margin-top: 70px;
}

.pf-section__inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 52px;
}

.pf-section__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-eyebrow {
    font: 500 12px var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
}

.pf-section h2 {
    margin: 0;
    font: 700 clamp(34px, 4.5vw, 56px)/1.05 var(--font-display);
    text-wrap: balance;
}

/* Services */
.pf-services {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 32px;
}

.pf-services::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 32px;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px);
    opacity: .55;
}

.pf-service {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-service__num {
    width: 56px;
    height: 64px;
    display: grid;
    place-items: center;
    clip-path: var(--hex);
    background: var(--accent);
    color: var(--bg);
    font: 700 17px var(--font-display);
}

.pf-service h3 {
    margin: 6px 0 0;
    font: 600 23px/1.2 var(--font-display);
}

.pf-service p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
    text-wrap: pretty;
}

/* Work */
.pf-work__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 48px;
}

.pf-work__note {
    margin: 0;
    max-width: 26em;
    font-size: 15px;
    color: var(--muted);
    text-wrap: pretty;
}

.pf-work__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
    gap: 24px;
}

.pf-card {
    padding: 1px;
    clip-path: var(--notch-lg);
    background: var(--line);
    transition: background .3s, transform .3s;
}

.pf-card:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.pf-card__inner {
    height: 100%;
    box-sizing: border-box;
    clip-path: var(--notch-lg-inner);
    background: var(--panel);
    padding: 30px 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-card__domain {
    font: 500 11px var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.pf-card h3 {
    margin: 0;
    font: 600 26px/1.15 var(--font-display);
}

.pf-card p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
    text-wrap: pretty;
}

.pf-card__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.pf-tag {
    padding: 4px 10px;
    border: 1px solid var(--line);
    font: 500 11px var(--font-mono);
    letter-spacing: .06em;
}

/* About */
.pf-about {
    background: var(--panel);
    clip-path: polygon(0 56px, 100% 0, 100% calc(100% - 56px), 0 100%);
    padding: clamp(120px, 13vw, 170px) clamp(20px, 5vw, 72px);
    scroll-margin-top: 20px;
}

.pf-about__grid {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
}

.pf-about__text {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pf-about__text p {
    margin: 0;
    color: var(--muted);
    text-wrap: pretty;
}

.pf-skills {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pf-skill-group {
    display: grid;
    grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.pf-skill-group__label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.pf-skill-group__icon {
    width: 14px;
    height: 16px;
    flex: none;
    clip-path: var(--hex);
    background: var(--accent-2);
}

.pf-skill-group__title {
    font: 600 16px var(--font-display);
}

.pf-skill-group__items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-skill-item {
    padding: 5px 12px;
    background: var(--bg);
    font: 500 12px var(--font-mono);
    letter-spacing: .04em;
}

/* Path / timeline */
.pf-path__inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.pf-timeline {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--line);
    margin-left: 6px;
}

.pf-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
    gap: 6px 32px;
    padding: 0 0 40px 36px;
}

.pf-timeline__dot {
    position: absolute;
    left: -7px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--bg);
    border: 1.5px solid var(--accent);
    transform: rotate(45deg);
}

.pf-timeline__when {
    font: 500 13px/1.9 var(--font-mono);
    letter-spacing: .06em;
    color: var(--accent-2);
}

.pf-timeline__role {
    margin: 0;
    font: 600 21px/1.3 var(--font-display);
}

.pf-timeline__org {
    color: var(--muted);
    font-weight: 500;
}

.pf-timeline__note {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
    text-wrap: pretty;
}

/* Contact */
.pf-contact-wrap {
    padding: 0 clamp(20px, 5vw, 72px) clamp(72px, 9vw, 120px);
    scroll-margin-top: 70px;
}

.pf-contact {
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 64px) 0, 100% 64px, 100% 100%, 64px 100%, 0 calc(100% - 64px));
    background: var(--panel);
    padding: clamp(48px, 7vw, 96px) clamp(28px, 6vw, 88px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pf-contact h2 {
    margin: 0;
    max-width: 13em;
    font: 700 clamp(36px, 5.6vw, 76px)/1 var(--font-display);
    text-wrap: balance;
}

.pf-contact p {
    margin: 0;
    max-width: 30em;
    font-size: 18px;
    color: var(--muted);
}

.pf-contact__links {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 32px;
}

.pf-contact__email {
    display: inline-flex;
    gap: 12px;
    white-space: nowrap;
    font: 600 clamp(20px, 2.4vw, 30px) var(--font-display);
    color: var(--accent);
    border-bottom: 2px solid currentColor;
    padding-bottom: 4px;
}

.pf-contact__email:hover {
    opacity: .75;
}

.pf-contact__phone {
    font: 500 15px var(--font-mono);
    letter-spacing: .06em;
    color: var(--muted);
}

.pf-contact__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.pf-social {
    display: inline-flex;
    padding: 1.5px;
    background: var(--line);
    clip-path: var(--notch-sm);
}

.pf-social span {
    padding: 9px 17px;
    background: var(--panel);
    clip-path: var(--notch-sm-inner);
    font: 500 12px var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background .2s, color .2s;
}

.pf-social:hover span {
    background: var(--accent);
    color: var(--bg);
}

.pf-contact__hex {
    position: absolute;
    right: clamp(24px, 6vw, 88px);
    bottom: clamp(24px, 5vw, 64px);
    width: clamp(80px, 12vw, 150px);
    aspect-ratio: .866;
    clip-path: var(--hex);
    background: var(--accent);
    opacity: .1;
    pointer-events: none;
}

/* Footer */
.pf-footer {
    padding: 28px clamp(20px, 5vw, 72px);
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font: 500 11px var(--font-mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.pf-footer__legal {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    text-transform: none;
    letter-spacing: .04em;
}

.pf-footer__legal p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

.pf-footer__legal a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pf-footer__legal a:hover {
    color: var(--accent);
}

.pf-footer__notrack {
    color: var(--accent);
}

/* Contact: regions served */
.pf-contact p.pf-contact__regions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
}

/* Long-form documents (legal notice, privacy) */
.pf-doc {
    display: block;
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px);
}

.pf-doc__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.pf-doc h1 {
    margin: 0;
    font: 700 clamp(36px, 5vw, 60px)/1.05 var(--font-display);
    text-wrap: balance;
}

.pf-doc__intro {
    margin: 0;
    font-size: clamp(17px, 1.4vw, 19px);
    color: var(--muted);
    text-wrap: pretty;
}

.pf-doc__facts {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: 10px 24px;
    margin: 0 0 40px;
    padding: 28px 32px;
    background: var(--panel);
    clip-path: var(--notch-sm);
}

.pf-doc__facts dt {
    font: 500 12px/1.9 var(--font-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.pf-doc__facts dd {
    margin: 0;
}

.pf-doc__section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.pf-doc__section h2 {
    margin: 0;
    font: 600 24px/1.2 var(--font-display);
}

.pf-doc__section p {
    margin: 0;
    color: var(--muted);
    text-wrap: pretty;
}

.pf-doc a:not(.pf-btn) {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pf-doc__updated {
    margin: 0;
    font: 500 12px var(--font-mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

@media (max-width: 560px) {
    .pf-doc__facts {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .pf-doc__facts dd {
        margin-bottom: 10px;
    }
}

/* Accessibility: skip link, keyboard focus, reduced motion */

/* Keep focused elements clear of the sticky nav (WCAG 2.4.11). */
html {
    scroll-padding-top: 88px;
}

.pf-skip {
    position: absolute;
    left: 16px;
    top: -200px;
    z-index: 100;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--bg);
    font: 600 14px var(--font-display);
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
}

.pf-skip:focus {
    top: 12px;
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* <main> (skip link) and the page <h1> (Blazor's FocusOnNavigate) only receive focus
   programmatically, to set the reading position; they aren't controls and need no ring. */
main[tabindex="-1"]:focus,
.pf h1:focus {
    outline: none;
}

.pf :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* clip-path cuts off anything drawn outside the element, outlines included, so
   notched elements and controls inside notched containers get an inset ring in
   their own text colour instead. */
.pf a.pf-btn:focus-visible,
.pf a.pf-nav__contact:focus-visible,
.pf .pf-lang button:focus-visible,
.pf .cook-servings button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -5px;
}

.pf .pf-btn--outline:focus-visible,
.pf .pf-social:focus-visible,
.pf a.pf-card:focus-visible {
    outline: none;
    background: var(--accent);
}

.pf .pf-btn--outline:focus-visible span,
.pf .pf-social:focus-visible span,
.pf a.pf-card:focus-visible .pf-card__inner {
    outline: 2px solid var(--accent);
    outline-offset: -6px;
}

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

    .pf-btn:hover,
    .pf-card:hover {
        transform: none;
    }
}
