/* ==========================================================================
   Rebecca Kukshtel — personal site
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */

:root {
    color-scheme: light dark;

    --bg:           #FBFBF8;
    --bg-raised:    #FFFFFF;
    --ink:          #10201D;
    --ink-soft:     #4A5C58;
    --ink-faint:    #8A9995;
    --accent:       #03A688;
    --accent-deep:  #025E73;
    --rule:         rgba(16, 32, 29, 0.10);
    --frame:        rgba(16, 32, 29, 0.08);
    --shadow:
        0 1px 2px rgba(16, 32, 29, 0.04),
        0 10px 30px -14px rgba(16, 32, 29, 0.18);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
                 Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --page:    1080px;
    --measure: 58ch;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:          #0B1412;
        --bg-raised:   #111D1A;
        --ink:         #E8F0EE;
        --ink-soft:    #A6B7B2;
        --ink-faint:   #6D807B;
        --accent:      #3FD1B0;
        --accent-deep: #7FD0E0;
        --rule:        rgba(232, 240, 238, 0.13);
        --frame:       rgba(232, 240, 238, 0.10);
        --shadow:
            0 1px 2px rgba(0, 0, 0, 0.40),
            0 12px 34px -16px rgba(0, 0, 0, 0.75);
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink-soft);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--accent-deep);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

strong { color: var(--ink); font-weight: 600; }

img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   Main / hero
   -------------------------------------------------------------------------- */

main {
    flex: 1;
    width: 100%;
    max-width: var(--page);
    margin: 0 auto;
    padding: clamp(3.5rem, 9vw, 7.5rem) 2rem clamp(3rem, 7vw, 5.5rem);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}

.hero-portrait img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--frame);
    box-shadow: var(--shadow);
    background: var(--bg-raised);
}

.hero-content { max-width: var(--measure); }

h1 {
    font-size: clamp(2.1rem, 4.6vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.032em;
    font-weight: 700;
    color: var(--ink);
    text-wrap: balance;
}

.pronunciation {
    margin-top: 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.5rem;
    padding: 0.45rem 0.95rem 0.45rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
    text-wrap: balance;
}

.status-pill::after {
    content: "→";
    color: var(--accent-deep);
    transition: transform 0.2s ease;
}

.status-pill:hover { color: var(--ink); border-color: var(--accent); }
.status-pill:hover::after { transform: translateX(3px); }

.status-dot {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
    animation: statusPulse 2.4s ease-out infinite;
}

@keyframes statusPulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
    70%  { box-shadow: 0 0 0 0.5rem transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.scratched {
    color: var(--ink-faint);
    text-decoration-line: line-through;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 0.11em;
}

.scratched strong { color: inherit; }

.lede-update {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    color: var(--ink-soft);
}

.lede-update a { text-decoration: underline; text-underline-offset: 0.18em; }

.lede {
    margin-top: 1.75rem;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink);
    letter-spacing: -0.008em;
    text-wrap: pretty;
}

.hero-content p + p { margin-top: 1.1rem; }

.hero-content p { text-wrap: pretty; }

.hero-content .hero-links,
.notfound .hero-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    font-size: 0.9rem;
}

.hero-links a {
    font-weight: 500;
    color: var(--ink);
}

.hero-links a[target="_blank"]::after {
    content: " ↗";
    color: var(--ink-faint);
    font-size: 0.85em;
}

.hero-links a + a { margin-left: 1.4rem; }

.hero-links a.link-forward::after {
    content: " →";
    color: var(--ink-faint);
}

.hero-links a:not([target="_blank"]):not(.link-forward)::before {
    content: "← ";
    color: var(--ink-faint);
}

.hero-links a:hover,
.hero-links a:hover::after,
.hero-links a:hover::before { color: var(--accent); }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
    max-width: var(--measure);
    padding: clamp(1rem, 6vw, 4rem) 0;
}

.notfound-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
    margin-bottom: 0.9rem;
}

.notfound h1 { margin-bottom: 0.9rem; }

/* --------------------------------------------------------------------------
   Resume
   -------------------------------------------------------------------------- */

.resume {
    max-width: 780px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.55;
}

.breadcrumb {
    margin-bottom: 1.75rem;
    font-size: 0.85rem;
}

.breadcrumb a { color: var(--ink-soft); }

.breadcrumb a::before {
    content: "← ";
    color: var(--ink-faint);
}

.breadcrumb a:hover,
.breadcrumb a:hover::before { color: var(--accent); }

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}

.resume-tagline {
    margin-top: 0.6rem;
    font-size: 1.05rem;
    color: var(--ink);
}

.resume-contact {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    font-size: 0.85rem;
}

.resume-download {
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    border: 1px solid var(--accent-deep);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.resume-download::before { content: "↓ "; }

.resume-download:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
}

.resume-section { margin-top: 2rem; }

.resume h2 {
    margin-bottom: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.resume p, .resume li { text-wrap: pretty; }

.role + .role { margin-top: 1.4rem; }

.role-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.role h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.role-title {
    font-weight: 400;
    color: var(--ink-soft);
}

.role-title::before { content: " · "; color: var(--ink-faint); }

.role-dates {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
}

.resume ul { padding-left: 1.1rem; }

.resume li + li { margin-top: 0.35rem; }

.resume li::marker { color: var(--ink-faint); }

.skills {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.25rem;
}

.skills dt {
    font-weight: 600;
    color: var(--ink);
}

.resume .education { list-style: none; padding-left: 0; }

@media (max-width: 640px) {
    .resume-header { flex-direction: column; }
    .role-head { flex-direction: column; gap: 0; }
    .role-title { display: block; }
    .role-title::before { content: none; }
    .skills { grid-template-columns: 1fr; }
    .skills dd { margin-bottom: 0.5rem; }
}

/* --------------------------------------------------------------------------
   Print (also used to render the resume PDF)
   -------------------------------------------------------------------------- */

@page {
    size: letter;
    margin: 0.55in 0.6in;
}

@media print {
    :root {
        color-scheme: light;
        --bg:          #FFFFFF;
        --ink:         #10201D;
        --ink-soft:    #33433F;
        --ink-faint:   #6D7C78;
        --accent-deep: #025E73;
        --rule:        rgba(16, 32, 29, 0.18);
    }

    body { min-height: 0; display: block; }
    main { padding: 0; max-width: none; }
    .site-footer, .resume-download, .breadcrumb { display: none; }

    .resume { max-width: none; font-size: 9.6pt; line-height: 1.4; }
    .resume h1 { font-size: 21pt; letter-spacing: -0.01em; }
    .resume-tagline { margin-top: 0.3rem; font-size: 11pt; }
    .resume-contact { margin-top: 0.4rem; font-size: 8.8pt; }
    .resume-header { padding-bottom: 0.8rem; }
    .resume-section { margin-top: 1rem; }
    .resume h2 { margin-bottom: 0.45rem; font-size: 8pt; }
    .role + .role { margin-top: 0.75rem; }
    .role h3 { font-size: 10.4pt; }
    .role-dates { font-size: 9pt; }
    .resume li + li { margin-top: 0.15rem; }
    .skills { gap: 0.15rem 1rem; }
    .role-head, .resume h2 { break-after: avoid; }
    .resume li { break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   Footer + wandering cat
   -------------------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--rule);
    overflow: hidden;
}

.ascii-cat-track {
    overflow: hidden;
    padding: 1.1rem 0 0.4rem;
}

.ascii-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.15;
    color: var(--ink-faint);
    white-space: pre;
    width: fit-content;
    opacity: 0.75;
    animation: catWalk 46s linear infinite;
}

@keyframes catWalk {
    from { transform: translateX(-140px); }
    to   { transform: translateX(calc(100vw + 140px)); }
}

.colophon {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0.6rem 2rem 2rem;
    font-size: 0.8rem;
    color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
    .ascii-cat { animation: none; margin-left: 2rem; }
    .status-dot { animation: none; }
    * { transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   Narrow screens
   -------------------------------------------------------------------------- */

@media (max-width: 800px) {
    main { padding: 3rem 1.25rem 3rem; }

    .hero {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .hero-portrait {
        width: 100%;
        max-width: 520px;
        margin-inline: auto;
    }

    .colophon { padding: 0.6rem 1.25rem 1.75rem; }
}
