/* Vilma portfolio, v3: v2 design, made responsive and WCAG 2.1 AA.
   Palette unchanged. Two text-only shades are added so small text passes 4.5:1:
   --walnut-text (dates, tags) and --text-soft (secondary copy). */

:root {
    /* Palette (unchanged) */
    --paper: #F5F0E7;
    --paper-deep: #EDE5D6;
    --linen: #E0D1B7;
    --forest: #34593D;
    --forest-deep: #284530;
    --walnut: #8C735A;        /* large text and decoration only (3.9:1) */
    --mist: #A8BCC0;
    --ink: #2c3e50;

    /* Accessible text shades */
    --walnut-text: #76604B;   /* 5.2:1 on cream, 4.7:1 on deep cream */
    --text-soft: #536455;     /* 5.6:1 on cream, 5.1:1 on deep cream */
    --on-forest-soft: #D2D5C8;/* 5.3:1 on forest */

    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --gutter: clamp(1.25rem, 5vw, 4rem);
    --max: 1240px;
    --section-space: clamp(4rem, 10vw, 9rem);
    --nav-h: 4.5rem;

    --ease: cubic-bezier(.2, .7, .2, 1);
    --fast: .15s;
    --med: .25s;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 1rem); /* anchors and focus never hide under the sticky nav */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;      /* rem-based so browser text size settings apply */
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; touch-action: manipulation; }
a { touch-action: manipulation; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
p, h1, h2, h3, dl, dd { margin: 0; }

/* ---------- Focus (2.4.7) ---------- */
:focus-visible {
    outline: 3px solid var(--forest);
    outline-offset: 3px;
    border-radius: 2px;
}
main:focus { outline: none; }

/* ---------- Helpers ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: .75rem;
    z-index: 100;
    padding: .75rem 1.25rem;
    background: var(--forest);
    color: var(--paper);
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform var(--fast) var(--ease);
}
.skip-link:focus { transform: none; }
.skip-link:focus-visible { outline-color: var(--ink); }

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Type ---------- */
.hero-title, .section-title, .contact-title, .ill-title {
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--forest);
    text-wrap: balance;
}
.card-title, .role-title, .skill-title, .edu-degree {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--forest);
}

/* ---------- Navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--med) ease;
}
.nav.is-scrolled { border-bottom-color: var(--linen); }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--nav-h);   /* min, not fixed, so text spacing (1.4.12) can grow */
    gap: 1rem;
}
.nav-logo {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    color: var(--forest);
    text-decoration: none;
}
.nav-menu {
    display: flex;
    gap: clamp(.25rem, 1.4vw, 1.25rem);
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 .5rem;
    font-size: .9375rem;
    color: var(--text-soft);
    text-decoration: none;
    transition: color var(--fast) ease;
}
.nav-menu a::after {
    content: "";
    position: absolute;
    left: .5rem; right: .5rem; bottom: .55rem;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--med) var(--ease);
}
.nav-menu a[aria-current="true"], .nav-menu a[aria-current="page"] { color: var(--forest); font-weight: 500; }
.nav-menu a[aria-current="true"]::after, .nav-menu a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    padding: 0 1rem;
    margin-right: -.5rem;
    background: none;
    border: 1px solid var(--forest);
    border-radius: 999px;
    color: var(--forest);
    font-size: .9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--fast) ease, color var(--fast) ease, transform var(--fast) ease;
}
.nav-toggle-icon,
.nav-toggle-icon::before {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: transform var(--med) var(--ease);
}
.nav-toggle-icon { position: relative; transform: translateY(-3px); }
.nav-toggle-icon::before { content: ""; position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(-6px) rotate(-90deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 12vw, 10rem) 0 clamp(3.5rem, 8vw, 7rem); }
.hero-title {
    font-size: clamp(2.75rem, 10.5vw, 9.25rem);
    letter-spacing: -0.045em;
    line-height: .98;
}
.hero-role {
    display: block;
    margin-top: .35em;
    font-size: max(.42em, 1.6rem);   /* stays >= 24px, so the brand walnut passes as large text */
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--walnut);
    line-height: 1.15;
}
.hero-foot {
    margin-top: clamp(2.5rem, 7vw, 5.5rem);
    display: grid;
    grid-template-columns: minmax(0, 34rem) auto;
    justify-content: space-between;
    align-items: end;
    gap: 2rem 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--linen);
}
.hero-description {
    font-size: clamp(1.0625rem, 1.6vw, 1.3rem);
    line-height: 1.6;
    color: var(--text-soft);
    max-width: 34rem;
}
.hero-actions { display: flex; gap: .75rem 1rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .75rem 1.6rem;
    font-size: .975rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--forest);
    border-radius: 999px;
    transition: background-color var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease, transform var(--fast) ease;
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-quiet { color: var(--forest); }
.btn:focus-visible { outline-offset: 4px; }

/* Instant pressed feedback on every device */
.btn:active, .nav-toggle:active, .copy-btn:active, .role-head:active { transform: scale(.97); }

/* Hover effects only where a real pointer can hover, so they don't "stick" after a tap */
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
    .btn-quiet:hover { background: var(--forest); color: var(--paper); }
    .nav-menu a:hover { color: var(--forest); }
    .nav-menu a:hover::after { transform: scaleX(1); }
    .nav-toggle:hover { background: var(--forest); color: var(--paper); }
    .card:hover .card-frame img { transform: scale(1.03); }
    .card:hover .card-title a { text-decoration-color: currentColor; }
    .text-link:hover { text-decoration-thickness: 2px; }
    .role-head:hover .role-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
    .role-head:hover .role-icon { background: var(--paper); }
    .contact-email:hover, .contact-links a:hover { text-decoration-thickness: 2px; }
    .copy-btn:hover { background: var(--paper); color: var(--forest); }
}

/* ---------- Sections ---------- */
section { padding: var(--section-space) 0; }
.section-title {
    font-size: clamp(2.1rem, 5.5vw, 4.25rem);
    margin-bottom: clamp(2rem, 5vw, 4rem);
}
.section-hint {
    margin: calc(-1 * clamp(1.25rem, 3vw, 2.5rem)) 0 clamp(1.5rem, 3vw, 2rem);
    color: var(--text-soft);
    font-size: .975rem;
}

/* ---------- Work cards ---------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 3vw, 2.5rem);
}
.card { position: relative; }
.card.is-feature { grid-column: 1 / -1; }

.card-frame {
    overflow: hidden;
    border-radius: 6px;
    background: var(--linen);
    aspect-ratio: 2 / 1;
}
.is-feature .card-frame { aspect-ratio: 382 / 100; }
.card-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.card-title {
    margin-top: 1.1rem;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    line-height: 1.2;
}
.card-title a {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
    transition: text-decoration-color var(--fast) ease;
}
/* The whole card is clickable, but the link's name is just the project title */
.card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 6px;
}
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after {
    outline: 3px solid var(--forest);
    outline-offset: 6px;
}
.card:active .card-frame img { transform: scale(.99); transition-duration: var(--fast); }
.card-tags { margin-top: .3rem; font-size: .9375rem; color: var(--walnut-text); }

.work-more { margin-top: clamp(2.5rem, 6vw, 4.5rem); color: var(--text-soft); }
.text-link {
    color: var(--forest);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: .25em;
    text-decoration-thickness: 1px;
}

/* ---------- Illustration ---------- */
.illustration { background: var(--paper-deep); }
.ill-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem 4rem;
    align-items: end;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.ill-title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
.ill-intro { max-width: 32rem; color: var(--text-soft); }
.ill-grid { row-gap: 2.5rem; }
.ill-grid .card-title { font-size: clamp(1.15rem, 1.6vw, 1.3rem); }

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 7vw, 7rem);
    align-items: center;
}
.about-photo {
    width: 100%;
    max-width: 26rem;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 999px 999px 6px 6px;
}
.about-text .section-title { margin-bottom: 2rem; }
.about-text p { max-width: 34rem; margin-bottom: 1.25rem; color: var(--text-soft); }
.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--linen);
}
.about-stats > div { display: flex; flex-direction: column-reverse; }
.stat-number {
    font-weight: 600;
    letter-spacing: -0.03em;
    font-size: 2.6rem;
    line-height: 1.1;
    color: var(--forest);
}
.stat-label { font-size: .9375rem; color: var(--walnut-text); }

/* ---------- Experience ---------- */
.experience { background: var(--paper-deep); }
.roles { border-top: 1px solid var(--linen); }
.role { border-bottom: 1px solid var(--linen); }
.role-heading { font: inherit; }
.role-head {
    width: 100%;
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr) auto;
    gap: .35rem 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: transform var(--fast) ease;
}
.role-head:focus-visible { outline-offset: 2px; }
.role-year { font-size: .9375rem; color: var(--walnut-text); font-variant-numeric: tabular-nums; }
.role-title {
    display: block;
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    line-height: 1.25;
}
.role-company { display: block; margin-top: .2rem; color: var(--text-soft); font-size: .9375rem; }

/* Plus / minus in a 44px circle: a clear, large tap target with visible state */
.role-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--forest);
    border-radius: 50%;
    transition: background-color var(--fast) ease, transform var(--med) var(--ease);
}
.role-icon::before, .role-icon::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 14px;
    margin-left: -7px;
    border-top: 2px solid var(--forest);   /* border, not background, so it shows in Windows high contrast */
    margin-top: -1px;
    transition: transform var(--med) var(--ease);
}
.role-icon::after { transform: rotate(90deg); }
.role-head[aria-expanded="true"] .role-icon { background: var(--forest); }
.role-head[aria-expanded="true"] .role-icon::before,
.role-head[aria-expanded="true"] .role-icon::after { border-top-color: var(--paper); }
.role-head[aria-expanded="true"] .role-icon::after { transform: rotate(0deg); }

.role-body {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;   /* collapsed text is hidden from screen readers too */
    transition: grid-template-rows var(--med) var(--ease), visibility 0s linear var(--med);
}
.role.is-open .role-body {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows var(--med) var(--ease), visibility 0s;
}
.role-body-inner { overflow: hidden; padding-left: calc(11rem + 1.5rem); }
.role-points { margin: 0 0 1.75rem; padding-left: 1.1rem; max-width: 42rem; color: var(--text-soft); }
.role-points li { margin-bottom: .45rem; padding-left: .25rem; }
.role-points li::marker { color: var(--walnut); }

/* ---------- Skills ---------- */
.skills { border-top: 1px solid var(--linen); }
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
}
.skill-title {
    font-size: 1.3rem;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--linen);
}
.skill-list { list-style: none; margin: 0; padding: 0; }
.skill-list li { padding: .35rem 0; color: var(--text-soft); }

/* ---------- Education ---------- */
.education { border-top: 1px solid var(--linen); }
.edu-list { border-top: 1px solid var(--linen); }
.edu-item {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: .35rem 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--linen);
}
.edu-degree { font-size: clamp(1.15rem, 2.2vw, 1.6rem); line-height: 1.25; }
.edu-school { margin-top: .2rem; color: var(--text-soft); }

/* ---------- Contact ---------- */
.contact { background: var(--forest); color: var(--paper); }
.contact .contact-title { color: var(--paper); font-size: clamp(2.6rem, 7vw, 5.75rem); }
.contact-intro .contact-description { margin-top: clamp(1rem, 2.5vw, 1.75rem); }
.contact :focus-visible { outline-color: var(--linen); }
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem 3rem;
    align-items: end;   /* both columns finish on the same line */
}
.contact-description { max-width: 30rem; color: var(--on-forest-soft); }
.contact-email-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.contact-email {
    font-size: clamp(1.15rem, 2.6vw, 2rem);
    letter-spacing: -0.035em;
    color: var(--paper);
    text-decoration: underline;
    text-underline-offset: .22em;
    text-decoration-thickness: 1px;
    overflow-wrap: anywhere;
    display: inline-block;
    padding-block: .45rem;   /* comfortable tap height */
}
.copy-btn {
    min-height: 44px;
    padding: 0 1.1rem;
    background: none;
    border: 1px solid var(--linen);
    border-radius: 999px;
    color: var(--paper);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--fast) ease, color var(--fast) ease, transform var(--fast) ease;
}
.copy-btn.is-done { background: var(--paper); color: var(--forest); }
.contact-status { min-height: 1.25em; margin-top: .3rem; font-size: .9rem; color: var(--linen); }
.contact-links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1.25rem; }
.contact-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--paper);
    font-size: .975rem;
    text-decoration: underline;
    text-decoration-color: var(--mist);
    text-underline-offset: .3em;
    text-decoration-thickness: 1px;
}

/* ---------- Footer + frog ---------- */
.footer {
    position: relative;
    overflow: hidden;           /* the frog hides below this edge until it jumps up */
    background: var(--forest-deep);
    color: var(--linen);
    font-size: .9rem;
}
.footer-inner { display: flex; align-items: center; min-height: 84px; padding-block: 1rem; }
.footer p { margin: 0; max-width: calc(100% - 6rem); }
.frog {
    position: absolute;
    right: clamp(1.25rem, 8vw, 7rem);
    bottom: 0;
    width: 64px;
    height: 69px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
/* Only the picture moves; the button stays put, so hovering never makes it jitter */
.frog-img {
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(10%);
    filter: invert(93%) sepia(12%) saturate(300%) hue-rotate(5deg);
    transition: transform var(--med) var(--ease);
}
.frog:focus-visible { outline-color: var(--linen); outline-offset: 2px; }
.frog.is-hidden .frog-img { transform: translateY(110%); }
.frog.is-jumping .frog-img { animation: frog-jump .7s cubic-bezier(.3, .7, .4, 1) both; }
.frog.is-hopping .frog-img { animation: frog-hop .45s var(--ease); }
@media (hover: hover) and (pointer: fine) {
    .frog:hover .frog-img { transform: translateY(4%); }
}
@keyframes frog-jump {
    0%   { transform: translateY(110%); }
    55%  { transform: translateY(-16%); }
    78%  { transform: translateY(14%); }
    100% { transform: translateY(10%); }
}
@keyframes frog-hop {
    0%, 100% { transform: translateY(10%); }
    45% { transform: translateY(-14%); }
}

/* ---------- One gentle load moment (hero only) ---------- */
.hero-foot { animation: rise .6s var(--ease) .55s both; }

/* Title: letters ripple from light to bold on load (weight wave), then lift toward the cursor */
.hero-name { display: block; }
.js .hero-name:not(.is-split) { visibility: hidden; }
.hero-name .w { display: inline-block; white-space: nowrap; }
.hero-name .ch { display: inline-block; transition: transform .25s var(--ease), color .25s ease; }
.hero-title.is-intro .ch { animation: name-wave .7s cubic-bezier(.3, .6, .2, 1) both; animation-delay: calc(var(--i) * 45ms); }
.hero-title.is-intro .hero-role { animation: rise .7s var(--ease) .55s both; }
@keyframes name-wave { from { font-weight: 300; opacity: .25; } to { font-weight: 600; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-foot { grid-template-columns: 1fr; align-items: start; }
    .about-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 20rem; }
    .ill-head { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        padding: .5rem var(--gutter) 1.25rem;
        background: var(--paper);
        border-bottom: 1px solid var(--linen);
        box-shadow: 0 12px 24px -16px rgba(44, 62, 80, .25);
        /* closed state: hidden from everyone, including keyboard and screen readers */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity var(--fast) ease, transform var(--fast) ease, visibility 0s linear var(--fast);
    }
    .nav-menu.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity var(--fast) ease, transform var(--fast) ease, visibility 0s;
    }
    .nav-menu li + li { border-top: 1px solid var(--linen); }
    .nav-menu a { display: flex; min-height: 52px; padding: 0; font-size: 1.0625rem; }
    .nav-menu a::after { left: 0; right: auto; width: 1.5rem; bottom: .7rem; }
    .nav:has(.nav-menu.is-open) { background: var(--paper); border-bottom-color: var(--linen); }

    .work-grid { grid-template-columns: 1fr; }
    .is-feature .card-frame { aspect-ratio: 2 / 1; }
    .ill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .role-head { grid-template-columns: minmax(0, 1fr) auto; padding: 1.25rem 0; }
    .role-year { grid-column: 1; grid-row: 1; }
    .role-main { grid-column: 1; grid-row: 2; }
    .role-icon { grid-column: 2; grid-row: 1 / 3; }
    .role-body-inner { padding-left: 0; }
    .edu-item { grid-template-columns: 1fr; }
    .ill-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-actions .btn { flex: 1 1 12rem; }
    .about-stats { gap: 2rem; }
}

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

/* Windows high contrast: keep icons, borders and focus visible */
@media (forced-colors: active) {
    .btn, .nav-toggle, .copy-btn, .role-icon { border-color: ButtonText; }
    .nav-toggle-icon, .nav-toggle-icon::before { background: ButtonText; }
    .role-icon::before, .role-icon::after { border-top-color: ButtonText; }
    .card-link:focus-visible::after { outline: 3px solid Highlight; }
    .frog img { filter: none; }
}

/* Sections receive focus from in-page links; the scroll position already shows where you are */
[tabindex="-1"]:focus { outline: none; }

/* Work sections on white, so white-background images blend in */
.work, .illustration { background: #fff; }
.illustration { border-top: 1px solid var(--linen); }
.card-frame { background: #fff; }

/* ---------- Project-page nav: Home set apart, projects grouped by category ---------- */
.nav-home { padding-right: clamp(.5rem, 1.5vw, 1.25rem); margin-right: clamp(.25rem, 1vw, .75rem); border-right: 1px solid var(--linen); }
.nav-group { display: flex; align-items: center; }
.nav-sub { display: flex; list-style: none; margin: 0; padding: 0; gap: clamp(0rem, .6vw, .5rem); }
.nav-cat {
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--walnut-text);          /* quiet label, still 5.2:1 */
    margin: 0 clamp(.6rem, 1.2vw, 1rem) 0 clamp(1rem, 2.5vw, 2rem);
    white-space: nowrap;
}
@media (max-width: 860px) {
    .nav-home { border-right: 0; padding-right: 0; margin-right: 0; }
    .nav-group { display: block; border-top: 1px solid var(--linen); padding-top: .9rem; margin-top: .25rem; }
    .nav-cat { display: block; margin: 0 0 .1rem; }
    .nav-sub { display: block; }
    .nav-menu .nav-sub li { border-top: 0; }
    .nav-menu .nav-group + .nav-group { margin-top: .5rem; }
}
.nav-menu .nav-home a { gap: .4rem; }

/* Download resume button (contact section, on forest green) */
/* Contact actions: small, quiet pills (Copy email, LinkedIn, resume share one style) */
.contact-links, .contact-actions .contact-links { align-items: center; gap: .625rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.copy-btn,
.contact-links a {
    position: relative;
    display: inline-flex; align-items: center; gap: .45rem;
    min-height: 34px; padding: 0 .95rem;
    background: none;
    border: 1px solid color-mix(in srgb, var(--paper) 45%, transparent);
    border-radius: 999px;
    color: var(--paper);
    font-size: .8125rem; font-weight: 500; letter-spacing: .005em; line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease, transform var(--fast) ease;
}
.contact-links a svg { width: 14px; height: 14px; flex: none; }
/* Keep a 44px tap area around the smaller visual pill */
.copy-btn::before,
.contact-links a::before { content: ""; position: absolute; inset: -5px -2px; }
.copy-btn:active, .contact-links a:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
    .copy-btn:hover,
    .contact-links a:hover { background: var(--paper); border-color: var(--paper); color: var(--forest); text-decoration: none; }
}

/* "Go to project" links inside Experience roles */
.role-link {
    display: inline-flex; align-items: center; gap: .35rem;
    min-height: 44px; margin: -.75rem 0 1.25rem;
    color: var(--forest); font-size: .9375rem; font-weight: 500;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.role-link span[aria-hidden] { transition: transform var(--fast) ease; text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
    .role-link:hover { text-decoration-thickness: 2px; }
    .role-link:hover span[aria-hidden] { transform: translateX(3px); }
}
