/*
 * Public website styles (homepage, privacy), on top of base.css.
 * Design: .claude/plans/public-website.md
 */

/* ---------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */
.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 32px;
    padding-block: 12px;
}


.site-header__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 28px;
    font-family: var(--font-mono);
    font-size: 14.5px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--nav);
    text-decoration: none;
}

.nav a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.nav .nav__portal {
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text);
}

.nav .nav__portal:hover {
    text-decoration: none;
    border-color: var(--input-border);
}

.site-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 959px) {
    .site-header--menu .menu-toggle {
        display: inline-flex;
    }

    .site-header--menu .site-header__end {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding-block: 4px 16px;
    }

    .site-header--open .site-header__end {
        display: flex;
    }

    .site-header--menu .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        font-size: 16px;
    }

    .site-header--menu .nav a {
        min-height: 52px;
        border-bottom: 1px solid var(--border);
    }

    .site-header--menu .nav .nav__portal {
        justify-content: center;
        min-height: 50px;
        margin-top: 20px;
        border-bottom-color: var(--border-strong);
    }

    .site-header--menu .site-controls {
        justify-content: space-between;
    }
}

/* ---------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------ */
.section {
    border-top: 1px solid var(--border);
    transition: background-color .25s ease;
}

.section--alt {
    background: var(--bg-alt);
}

.section__inner {
    padding-block: var(--section-space);
}

.split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px 64px;
}

.split--top {
    align-items: flex-start;
}

.split > * {
    flex: 1 1 440px;
    min-width: 0;
}

.label {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
}

.heading {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.text {
    max-width: 36em;
    color: var(--body);
}

.text + .text {
    margin-top: 16px;
}

/* ---------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------ */
.hero {
    padding-block: clamp(56px, 8vw, 104px) clamp(56px, 8vw, 96px);
    gap: 56px 64px;
}

.hero > :first-child {
    flex-basis: 480px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 6px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--body);
}

.pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.hero__role {
    margin-bottom: 16px;
}

.hero__title {
    font-family: var(--font-mono);
    font-size: clamp(30px, 4.4vw, 58px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.hero__lede {
    max-width: 34em;
    margin-top: 24px;
    font-size: clamp(17px, 1.5vw, 20px);
    color: var(--body);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* ---------------------------------------------------------------------
 * Code window (also used for the whoami card)
 * ------------------------------------------------------------------ */
.code-window {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--code-border);
    border-radius: 12px;
    background: var(--code-bg);
    box-shadow: var(--shadow);
    font-family: var(--font-mono);
    color: var(--code-text);
    /* Sizes the code to the window, see .code-window__body */
    container-type: inline-size;
}

.code-window__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--code-border);
    background: var(--code-bar);
}

.code-window__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--code-dot);
}

.code-window__file {
    margin-left: 8px;
    overflow: hidden;
    font-size: 12.5px;
    color: var(--code-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-window__body {
    margin: 0;
    padding: 20px 24px;
    overflow-x: auto;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.75;
}

/* Not the browser's monospace font: the code is in JetBrains Mono like the rest of the window */
.code-window__body code {
    font-family: inherit;
}

/* Next to the hero text the window is a little narrower than the longest line (57 characters
   of 0.6em, plus 48px padding). The font gets just small enough instead of a scrollbar that
   cuts off the end of the line. Phones keep 14px and scroll. */
@container (min-width: 440px) {
    .code-window__body {
        font-size: min(14px, (100cqi - 48px) / 34.4);
    }
}

.code-window__terminal {
    margin: 0;
    padding: 16px 24px 20px;
    overflow-x: auto;
    border-top: 1px solid var(--code-border);
    background: var(--code-term);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--code-muted);
}

.code-window__prompt {
    padding: 12px 20px;
    border-bottom: 1px solid var(--code-border);
    font-size: 13px;
    color: var(--text);
}

[data-theme="light"] .code-window__prompt {
    color: var(--code-text);
}

.tok-k { color: var(--syn-keyword); }
.tok-t { color: var(--syn-type); }
.tok-f { color: var(--syn-fn); }
.tok-v { color: var(--syn-var); }
.tok-c { color: var(--syn-const); }
.tok-ok { color: var(--code-accent); }
.tok-cmd { color: var(--code-text); }

.term-key {
    display: inline-block;
    min-width: 14ch;
    color: var(--syn-type);
}

.yaml {
    margin: 0;
    padding: 16px 20px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.85;
}

.yaml__row {
    display: flex;
    white-space: nowrap;
}

.yaml__key {
    flex: 0 0 12ch;
    color: var(--syn-type);
}

.yaml__value {
    min-width: 0;
    margin: 0;
    color: var(--code-text);
    /* A long value (the list) wraps on phones instead of running out of the card */
    white-space: normal;
}

.yaml__value--list {
    color: var(--syn-var);
}

/* ---------------------------------------------------------------------
 * About
 * ------------------------------------------------------------------ */
.about__text {
    flex-basis: 520px;
}

.about__text .heading {
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13.5px;
}

.tag {
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--chip-bg);
    color: var(--chip-text);
}

.tag__hash {
    color: var(--accent);
}

/* ---------------------------------------------------------------------
 * Services
 * ------------------------------------------------------------------ */
.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px 48px;
    margin: 12px 0 40px;
}

.section-head .heading {
    margin-top: 0;
}

.section-head__text {
    max-width: 30em;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color .2s ease;
}

.card:hover {
    border-color: var(--input-border);
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: var(--accent);
}

.card__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--heading);
}

.card__text {
    font-size: 15.5px;
    color: var(--muted);
}

/* ---------------------------------------------------------------------
 * Contact
 * ------------------------------------------------------------------ */
.contact__intro .heading {
    margin-bottom: 16px;
}

.details {
    margin: 36px 0 0;
    font-family: var(--font-mono);
    font-size: 14px;
}

.details__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.details dt {
    width: 10ch;
    color: var(--muted);
}

.details dd {
    margin: 0;
    color: var(--text);
}

.details a {
    text-underline-offset: 4px;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 14.5px;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--text);
}

/* Honeypot: hidden from people, visible to naive bots */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------ */
.site-footer {
    border-top: 1px solid var(--border);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 32px;
    padding-block: 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--nav);
}

/* ---------------------------------------------------------------------
 * Text pages (privacy)
 * ------------------------------------------------------------------ */
.prose {
    max-width: 44em;
    padding-block: var(--section-space);
}

.prose .heading {
    margin-bottom: 24px;
}

.prose h2 {
    margin: 40px 0 12px;
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--heading);
}

.prose p,
.prose ul {
    margin: 0 0 16px;
    color: var(--body);
}

.prose li + li {
    margin-top: 6px;
}
