:root {
    --bg: #f6f7f3;
    --card: rgba(255, 255, 255, 0.82);
    --card-border: rgba(17, 24, 39, 0.08);
    --ink: #121722;
    --muted: #4d5a6f;
    --accent: #046b63;
    --accent-2: #d17c2f;
    --shadow: 0 24px 60px rgba(17, 24, 39, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --maxw: 1120px;
}

html[data-theme="dark"] {
    --bg: #0b0f16;
    --card: rgba(17, 24, 39, 0.76);
    --card-border: rgba(148, 163, 184, 0.16);
    --ink: #e5edf8;
    --muted: #a8b4c8;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 15% 10%, rgba(4, 107, 99, 0.07), transparent 30%),
        radial-gradient(circle at 85% 12%, rgba(209, 124, 47, 0.08), transparent 32%),
        linear-gradient(180deg, #f4f5f1 0%, #eef1ea 100%);
    color: var(--ink);
    font-family: "Source Sans 3", sans-serif;
    line-height: 1.5;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 15% 10%, rgba(4, 107, 99, 0.13), transparent 34%),
        radial-gradient(circle at 85% 12%, rgba(209, 124, 47, 0.12), transparent 36%),
        linear-gradient(180deg, #090d14 0%, #0f1520 100%);
    color: var(--ink);
}

a {
    color: inherit;
}

.page {
    width: min(var(--maxw), calc(100% - 2rem));
    margin: 1.2rem auto 2rem;
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

[id] {
    scroll-margin-top: 5.5rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    padding: 1.2rem;
}

.top-nav {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    padding: 0.55rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px) auto;
    grid-template-areas: "menu search logo";
    gap: 0.45rem;
    align-items: center;
    overflow: visible;
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(17, 24, 39, 0.06);
    box-shadow: 0 16px 42px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(14px);
}

.top-nav-links {
    grid-area: menu;
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    justify-content: flex-start;
}

.top-nav-links::-webkit-scrollbar {
    display: none;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav-pill:hover,
.nav-pill:focus-visible {
    color: var(--ink);
    background: rgba(4, 107, 99, 0.08);
    border-color: rgba(4, 107, 99, 0.16);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.06);
}

.top-nav .nav-pill:first-child {
    background: linear-gradient(135deg, rgba(4, 107, 99, 0.12), rgba(4, 107, 99, 0.05));
    border-color: rgba(4, 107, 99, 0.18);
    color: #184642;
}

.top-nav-search-wrap {
    grid-area: search;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    cursor: pointer;
    flex: 0 0 auto;
}

.nav-search-icon-close {
    display: none;
}

.nav-search {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 38px;
    padding: 0.3rem 0.35rem 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
}

.nav-search:focus-within {
    border-color: rgba(4, 107, 99, 0.22);
    box-shadow: 0 0 0 3px rgba(4, 107, 99, 0.08);
}

.nav-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    padding: 0;
}

.nav-search input::placeholder {
    color: #6a778c;
}

.nav-search button {
    border: 0;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    background: rgba(4, 107, 99, 0.09);
    color: #184642;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}

.nav-search button:hover,
.nav-search button:focus-visible {
    background: rgba(4, 107, 99, 0.14);
}

.nav-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: grid;
    gap: 0.25rem;
    padding: 0.35rem;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
    backdrop-filter: blur(10px);
    z-index: 20;
    max-height: min(360px, 55vh);
    overflow: auto;
}

.nav-search-results[hidden] {
    display: none !important;
}

.nav-search-result {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
    display: grid;
    gap: 0.14rem;
}

.nav-search-result:hover,
.nav-search-result:focus-visible {
    border-color: rgba(4, 107, 99, 0.18);
    background: rgba(4, 107, 99, 0.06);
    outline: none;
}

.nav-search-result-title {
    color: var(--ink);
    font-weight: 700;
    font-size: 0.9rem;
}

.nav-search-result-text {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-mark {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 38px;
    flex-shrink: 0;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.04);
    color: #121722;
}

.nav-mark:hover,
.nav-mark:focus-visible {
    border-color: rgba(4, 107, 99, 0.22);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 0 3px rgba(4, 107, 99, 0.08);
}

.nav-mark svg {
    display: block;
    width: 22px;
    height: auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 360px);
    gap: 1rem;
    align-items: start;
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.78));
    border-color: rgba(17, 24, 39, 0.06);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
}

.hero::before {
    width: 280px;
    height: 280px;
    right: -90px;
    top: -90px;
    background: radial-gradient(circle, rgba(4, 107, 99, 0.14) 0%, rgba(4, 107, 99, 0) 68%);
}

.hero::after {
    width: 240px;
    height: 240px;
    left: -80px;
    bottom: -90px;
    background: radial-gradient(circle, rgba(209, 124, 47, 0.12) 0%, rgba(209, 124, 47, 0) 70%);
}

.hero-main {
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.hero-intro {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.eyebrow {
    margin: 0 0 0.55rem;
    color: #184642;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(4, 107, 99, 0.08);
    border: 1px solid rgba(4, 107, 99, 0.14);
}

.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, #0a9f92, var(--accent));
    box-shadow: 0 0 0 4px rgba(4, 107, 99, 0.12);
}

h1,
h2,
h3 {
    font-family: "Space Grotesk", sans-serif;
    margin: 0;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2rem, 3.2vw, 3rem);
    margin-bottom: 0.45rem;
    letter-spacing: -0.02em;
    max-width: 16ch;
}

h2 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.headline {
    margin: 0;
    color: #304056;
    font-weight: 600;
    font-size: 1.03rem;
}

.summary {
    margin: 0.9rem 0 0;
    max-width: 68ch;
    color: #1e2a3a;
}

.value-statement {
    margin: 0.75rem 0 0;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(4, 107, 99, 0.075), rgba(4, 107, 99, 0.05));
    border: 1px solid rgba(4, 107, 99, 0.14);
    border-left: 4px solid rgba(4, 107, 99, 0.4);
    color: #184642;
}

.hero-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hero-tags li {
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.03);
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.proof-card {
    margin: 0;
    padding: 0.75rem 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(17, 24, 39, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.03);
    position: relative;
    overflow: hidden;
}

.proof-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(4, 107, 99, 0.4), rgba(209, 124, 47, 0.35));
}

.proof-label {
    margin: 0 0 0.2rem;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.proof-value {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.hero-side {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    position: relative;
    z-index: 1;
}

.identity-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.04);
}

.social-links-card {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.04);
}

.profile-photo {
    margin: 0;
    width: 112px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 15% 12%, rgba(4, 107, 99, 0.22), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(209, 124, 47, 0.2), transparent 40%),
        var(--photo-url);
    background-size: auto, auto, cover;
    background-position: center, center, center 22%;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1);
}

.side-title {
    margin: 0 0 0.35rem;
    color: var(--accent);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.contact-list li {
    color: var(--muted);
    line-height: 1.35;
    font-size: 0.95rem;
}

.icon-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink);
    margin-right: 0.2rem;
}

.contact-list strong {
    color: var(--ink);
}

.social-pills {
    display: grid;
    gap: 0.5rem;
}

.social-pill {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.6rem 0.75rem;
}

.social-pill-text {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.social-pill-text > span {
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
}

.social-pill small {
    color: var(--muted);
}

.social-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.social-pill:hover,
.social-pill:focus-visible {
    border-color: rgba(4, 107, 99, 0.18);
    background: rgba(4, 107, 99, 0.04);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(17, 24, 39, 0.05);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    flex: 1 1 calc(50% - 0.3rem);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #078f83 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(4, 107, 99, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    border-color: rgba(17, 24, 39, 0.12);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
    border-color: rgba(4, 107, 99, 0.16);
    background: rgba(255, 255, 255, 0.98);
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.search-hit {
    outline: 2px solid rgba(4, 107, 99, 0.42);
    outline-offset: 3px;
    box-shadow: 0 0 0 8px rgba(4, 107, 99, 0.08);
    transition: outline-color 160ms ease, box-shadow 160ms ease;
}

.theme-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #121722;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: rgba(4, 107, 99, 0.22);
    box-shadow: 0 0 0 3px rgba(4, 107, 99, 0.08), 0 12px 28px rgba(17, 24, 39, 0.14);
}

.theme-toggle-label {
    font-weight: 700;
    font-size: 0.9rem;
}

.theme-icon {
    width: 16px;
    height: 16px;
    display: none;
    flex: 0 0 auto;
}

html[data-theme="light"] .theme-icon-moon,
html:not([data-theme]) .theme-icon-moon {
    display: block;
}

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

html[data-theme="dark"] .theme-toggle {
    background: rgba(15, 23, 42, 0.9);
    color: #e5edf8;
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .top-nav,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero-intro,
html[data-theme="dark"] .proof-card,
html[data-theme="dark"] .identity-card,
html[data-theme="dark"] .social-links-card,
html[data-theme="dark"] .social-pill,
html[data-theme="dark"] .actions,
html[data-theme="dark"] .nav-mark,
html[data-theme="dark"] .hero-tags li,
html[data-theme="dark"] .case-card,
html[data-theme="dark"] .experience-card,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .skill-group,
html[data-theme="dark"] .language-list li {
    background: rgba(17, 24, 39, 0.7);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

html[data-theme="dark"] .nav-search,
html[data-theme="dark"] .nav-search-toggle {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.16);
    color: #d9e4f3;
}

html[data-theme="dark"] .nav-search-results {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .nav-search-result {
    background: rgba(17, 24, 39, 0.55);
}

html[data-theme="dark"] .nav-search-result:hover,
html[data-theme="dark"] .nav-search-result:focus-visible {
    border-color: rgba(4, 107, 99, 0.22);
    background: rgba(4, 107, 99, 0.12);
}

html[data-theme="dark"] .nav-search-result-title {
    color: #e5edf8;
}

html[data-theme="dark"] .nav-search-result-text {
    color: #a8b4c8;
}

html[data-theme="dark"] .nav-search input {
    color: #e5edf8;
}

html[data-theme="dark"] .nav-search input::placeholder {
    color: #93a3bb;
}

html[data-theme="dark"] .nav-search button {
    background: rgba(4, 107, 99, 0.2);
    color: #c7f0ea;
}

html[data-theme="dark"] .nav-search button:hover,
html[data-theme="dark"] .nav-search button:focus-visible {
    background: rgba(4, 107, 99, 0.28);
}

html[data-theme="dark"] .nav-pill {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.14);
    color: #b7c4d8;
}

html[data-theme="dark"] .nav-pill:hover,
html[data-theme="dark"] .nav-pill:focus-visible {
    color: #eef4ff;
    background: rgba(4, 107, 99, 0.18);
    border-color: rgba(4, 107, 99, 0.26);
}

html[data-theme="dark"] .top-nav .nav-pill:first-child {
    color: #c7f0ea;
    background: linear-gradient(135deg, rgba(4, 107, 99, 0.22), rgba(4, 107, 99, 0.08));
    border-color: rgba(4, 107, 99, 0.28);
}

html[data-theme="dark"] .headline,
html[data-theme="dark"] .summary {
    color: #c9d4e4;
}

html[data-theme="dark"] .value-statement {
    color: #d0efe9;
    background: linear-gradient(180deg, rgba(4, 107, 99, 0.16), rgba(4, 107, 99, 0.1));
    border-color: rgba(4, 107, 99, 0.24);
    border-left-color: rgba(4, 107, 99, 0.42);
}

html[data-theme="dark"] .side-title,
html[data-theme="dark"] .case-kicker,
html[data-theme="dark"] .timeline-meta {
    color: #8fe0d7;
}

html[data-theme="dark"] .icon-label,
html[data-theme="dark"] .social-pill-text > span,
html[data-theme="dark"] .contact-list strong {
    color: #e5edf8;
}

html[data-theme="dark"] .social-pill small,
html[data-theme="dark"] .contact-list li,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .proof-label,
html[data-theme="dark"] .case-label,
html[data-theme="dark"] .section-note,
html[data-theme="dark"] .language-list small,
html[data-theme="dark"] .footer p,
html[data-theme="dark"] .bullets li,
html[data-theme="dark"] .job-meta {
    color: #a8b4c8;
}

html[data-theme="dark"] .btn-secondary {
    background: rgba(15, 23, 42, 0.92);
    color: #e5edf8;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-secondary:focus-visible {
    background: rgba(22, 32, 50, 0.95);
    border-color: rgba(4, 107, 99, 0.26);
}

html[data-theme="dark"] .tag {
    background: rgba(4, 107, 99, 0.14);
    border-color: rgba(4, 107, 99, 0.22);
    color: #bce8e2;
}

html[data-theme="dark"] .nav-mark {
    color: #eef4ff;
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .nav-mark:hover,
html[data-theme="dark"] .nav-mark:focus-visible {
    background: rgba(22, 32, 50, 0.95);
    border-color: rgba(4, 107, 99, 0.24);
    box-shadow: 0 0 0 3px rgba(4, 107, 99, 0.14);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.section-header-wrap {
    align-items: flex-start;
}

.section-note {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.bullets {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.45rem;
}

.bullets.compact {
    gap: 0.32rem;
    font-size: 0.96rem;
}

.bullets li {
    color: var(--muted);
}

.case-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.95rem;
    display: grid;
    align-content: start;
    gap: 0.7rem;
}

.case-kicker {
    margin: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-summary {
    margin-top: -0.2rem;
}

.case-block {
    border-top: 1px solid rgba(17, 24, 39, 0.06);
    padding-top: 0.55rem;
}

.case-block p {
    margin: 0;
}

.case-label {
    margin: 0 0 0.18rem;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline {
    display: grid;
    gap: 0.95rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.9rem;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.timeline-meta {
    font-weight: 700;
    color: var(--accent);
    font-family: "Space Grotesk", sans-serif;
}

.muted {
    margin: 0;
    color: var(--muted);
}

.stack {
    display: grid;
    gap: 0.9rem;
}

.experience-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: rgba(255, 255, 255, 0.68);
    padding: 0.95rem;
}

.job-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.job-meta {
    display: grid;
    justify-items: end;
    gap: 0.15rem;
    color: var(--muted);
    text-align: right;
    font-size: 0.92rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.skill-group {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(17, 24, 39, 0.06);
}

.skill-group h3 {
    margin-bottom: 0.6rem;
}

.tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag {
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    border: 1px solid rgba(4, 107, 99, 0.16);
    background: rgba(4, 107, 99, 0.06);
    font-size: 0.9rem;
    color: #184642;
}

.language-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.language-list li {
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    padding: 0.7rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.65);
}

.language-list small {
    color: var(--muted);
    font-weight: 600;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

@media (max-width: 980px) {
    .hero,
    .grid-2,
    .grid-3,
    .skills-grid,
    .case-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .job-head,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-photo {
        width: 96px;
        aspect-ratio: 1 / 1;
        background-position: center 22%;
    }

    .identity-card {
        grid-template-columns: 96px 1fr;
    }

    .proof-grid {
        grid-template-columns: 1fr;
    }

    .job-meta {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .page {
        width: calc(100% - 1rem);
        margin-top: 0.5rem;
        margin-bottom: 1rem;
        gap: 0.7rem;
    }

    .card {
        padding: 1rem;
        border-radius: 18px;
    }

    .hero {
        padding: 1rem;
    }

    .hero-intro {
        padding: 0.85rem 0.9rem;
        border-radius: 16px;
    }

    .top-nav {
        top: 0.35rem;
        padding: 0.45rem;
        gap: 0.35rem;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas: "menu search logo";
        align-items: center;
    }

    .top-nav-links {
        gap: 0.35rem;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .nav-pill {
        padding: 0.4rem 0.62rem;
        font-size: 0.86rem;
    }

    .nav-mark {
        display: inline-flex;
        min-width: 40px;
        min-height: 36px;
        justify-self: end;
    }

    .top-nav-search-wrap {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
    }

    .nav-search-toggle {
        display: inline-flex;
        width: 36px;
        height: 36px;
    }

    .nav-search {
        display: none;
        min-height: 36px;
        padding: 0.22rem 0.28rem 0.22rem 0.5rem;
        width: 100%;
    }

    .nav-search button {
        padding: 0.34rem 0.6rem;
        font-size: 0.84rem;
    }

    .top-nav.search-open {
        grid-template-columns: 1fr;
        grid-template-areas: "search";
    }

    .top-nav.search-open .nav-mark,
    .top-nav.search-open .top-nav-links {
        display: none;
    }

    .top-nav.search-open .top-nav-search-wrap {
        width: 100%;
        justify-content: stretch;
        gap: 0.35rem;
    }

    .top-nav.search-open .nav-search {
        display: inline-flex;
        width: 100%;
    }

    .top-nav.search-open .nav-search-results {
        top: calc(100% + 0.25rem);
    }

    .top-nav.search-open .nav-search-icon-open {
        display: none;
    }

    .top-nav.search-open .nav-search-icon-close {
        display: block;
    }

    .identity-card {
        grid-template-columns: 82px 1fr;
        gap: 0.7rem;
        padding: 0.7rem;
    }

    .profile-photo {
        width: 82px;
    }

    .hero-tags {
        gap: 0.35rem;
    }

    .actions {
        padding: 0.15rem;
        gap: 0.45rem;
    }

    .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .theme-toggle {
        right: 0.75rem;
        bottom: 0.75rem;
        padding: 0.55rem 0.7rem;
    }

    .theme-toggle-label {
        font-size: 0.86rem;
    }

    .hero-tags li {
        font-size: 0.84rem;
    }

    .actions {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }
}
