:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-subtle: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --accent: #0f766e;
    --accent-hover: #115e59;
    --accent-contrast: #ffffff;
    --accent-soft: rgba(15, 118, 110, 0.08);
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #065f46;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --warning-text: #92400e;
    --error-text: #dc2626;
    --header-bg: rgba(250, 250, 250, 0.86);
    --backdrop-bg: rgba(15, 23, 42, 0.42);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 32px -12px rgba(15, 23, 42, 0.09);
    --shadow-drawer: 16px 0 40px -12px rgba(15, 23, 42, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
    --bg: #0b0f14;
    --surface: #111720;
    --surface-subtle: #18212e;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --border-strong: #334155;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-contrast: #042f2e;
    --accent-soft: rgba(45, 212, 191, 0.1);
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(52, 211, 153, 0.35);
    --success-text: #6ee7b7;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(251, 191, 36, 0.35);
    --warning-text: #fcd34d;
    --error-text: #f87171;
    --header-bg: rgba(11, 15, 20, 0.86);
    --backdrop-bg: rgba(2, 6, 12, 0.65);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 16px 36px -14px rgba(0, 0, 0, 0.45);
    --shadow-drawer: 20px 0 48px -12px rgba(0, 0, 0, 0.65);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.drawer-open {
    overflow: hidden;
}

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

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

h1, h2, h3, p, ul, dl, dd, figure {
    margin: 0;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 clamp(1.1rem, 4vw, 2.5rem);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.015em;
    white-space: nowrap;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.desktop-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s ease;
    position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--text);
}

.desktop-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--accent);
}

.mobile-drawer,
.nav-backdrop {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.icon-sun {
    display: none;
}

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

[data-theme="dark"] .icon-moon {
    display: none;
}

.menu-toggle {
    display: none;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 0.52rem 0.9rem;
    font-size: 0.84rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--accent-contrast);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-ghost {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--border-strong);
    background-color: var(--surface-subtle);
}

/* Sections & Step Layout */

.section {
    padding: clamp(3.5rem, 6vw, 5.25rem) 0;
    scroll-margin-top: 68px;
}

.section-border {
    border-bottom: 1px solid var(--border);
}

@media (min-width: 961px) and (pointer: fine) {
    .step-section {
        min-height: calc(100svh - 68px);
        display: flex;
        align-items: center;
    }

    .step-section > .container {
        width: 100%;
    }
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.85rem;
}

.section-heading h2 {
    font-size: clamp(1.55rem, 2.8vw, 2.05rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.22;
}

.section-heading-wide {
    margin-bottom: 2.25rem;
}

.section-subtitle {
    font-size: 0.94rem;
    color: var(--text-secondary);
    max-width: 40ch;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

/* Hero */

.hero {
    padding: clamp(1.75rem, 3.5vw, 3rem) 0;
    scroll-margin-top: 68px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(380px, 1.08fr);
    gap: clamp(2rem, 4.5vw, 3.75rem);
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.15rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-title {
    font-size: clamp(2.35rem, 4.6vw, 3.45rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.06;
    margin-bottom: 0.85rem;
}

.title-muted {
    color: var(--accent);
}

.hero-lead {
    font-size: clamp(1.12rem, 1.9vw, 1.32rem);
    font-weight: 500;
    line-height: 1.42;
    letter-spacing: -0.015em;
    color: var(--text);
    margin-bottom: 0.75rem;
    max-width: 34ch;
}

.hero-sub {
    font-size: 0.96rem;
    color: var(--text-secondary);
    max-width: 56ch;
    margin-bottom: 1.55rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.85rem;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.hero-facts dt {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.hero-facts dd {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

/* Portrait */

.portrait-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.portrait-card img {
    width: 100%;
    aspect-ratio: 5 / 4;
    max-height: min(440px, 56svh);
    object-fit: cover;
    object-position: center 42%;
}

.portrait-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.15rem;
    border-top: 1px solid var(--border);
    background-color: var(--surface);
}

.caption-role {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}

.caption-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Prose */

.prose-stack {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.prose-stack p {
    font-size: 1.02rem;
    color: var(--text-secondary);
}

/* Experience & Cards */

.section-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
}

.experience-badge {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--surface);
}

.badge-title {
    font-size: 0.88rem;
    font-weight: 600;
}

.badge-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    gap: 1.25rem;
}

.cards-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.card-index {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.04rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 0.55rem;
}

.card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects */

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.project-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
}

.pill-live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
}

.project-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1rem;
}

.project-title-row h3 {
    font-size: 1.24rem;
    margin-bottom: 0;
}

.project-domain {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    transition: opacity 0.15s ease;
}

.project-domain:hover {
    opacity: 0.8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-desc {
    font-size: 0.93rem;
}

.project-highlights {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
    border-top: 1px solid var(--border);
    padding-top: 0.95rem;
}

.project-highlights li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-highlights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.56em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent);
    opacity: 0.75;
}

.project-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-cta {
    align-self: flex-start;
}

/* Skills */

.skill-card {
    display: flex;
    flex-direction: column;
}

.skill-summary {
    margin-bottom: 1.25rem;
}

.tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag-list li {
    padding: 0.34rem 0.68rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--surface-subtle);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
}

/* Education Timeline */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline-item {
    padding: 1.5rem 1.65rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
}

.pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background-color: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
}

.timeline-inst {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-item h3 {
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 0.4rem;
}

.timeline-item p {
    font-size: 0.93rem;
    color: var(--text-secondary);
}

/* Contact */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.contact-info h2 {
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

.contact-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 44ch;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: var(--surface);
    transition: border-color 0.15s ease;
}

.contact-row-link:hover {
    border-color: var(--border-strong);
}

.contact-row-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.contact-row-value {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

.row-arrow {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.contact-row-link:hover .row-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

.contact-form-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.field label {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text);
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.72rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.94rem;
    line-height: 1.5;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
    resize: vertical;
    min-height: 112px;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input.input-validation-error,
.field textarea.input-validation-error {
    border-color: var(--error-text);
}

.field-error {
    font-size: 0.8rem;
    color: var(--error-text);
    min-height: 1em;
}

.form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-top: 0.25rem;
}

.form-alt-link {
    font-size: 0.84rem;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-alt-link:hover {
    color: var(--text);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.alert-warning {
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0 2.5rem;
}

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

.footer-name {
    font-size: 0.92rem;
    font-weight: 600;
}

.footer-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text);
}

/* Responsive */

@media (max-width: 960px) {
    .hero-grid,
    .split-layout,
    .contact-grid,
    .cards-grid-2 {
        grid-template-columns: 1fr;
    }

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

    .cards-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }

    .desktop-nav,
    .header-cta {
        display: none;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    /* Left Side Drawer (outside header — full viewport height) */
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        background-color: var(--backdrop-bg);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.24s ease, visibility 0.24s ease;
    }

    .nav-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        width: min(290px, 82vw);
        z-index: 100;
        background-color: var(--surface);
        border-right: 1px solid var(--border);
        box-shadow: var(--shadow-drawer);
        padding: 1rem 1.15rem 1.5rem;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.26s ease;
        will-change: transform;
    }

    .mobile-drawer.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 0.9rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid var(--border);
    }

    .drawer-title {
        font-size: 0.92rem;
        font-weight: 600;
        letter-spacing: -0.015em;
        color: var(--text);
    }

    .drawer-nav {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        overflow-y: auto;
    }

    .drawer-nav a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-height: 44px;
        padding: 0 0.75rem;
        border-radius: var(--radius-sm);
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-secondary);
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .drawer-nav a:hover,
    .drawer-nav a.is-active {
        background-color: var(--accent-soft);
        color: var(--accent);
    }

    .nav-num {
        font-family: var(--font-mono);
        font-size: 0.74rem;
        color: var(--text-muted);
        min-width: 1.5rem;
    }

    .drawer-nav a.is-active .nav-num {
        color: var(--accent);
    }

    .drawer-footer {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        font-size: 0.84rem;
        color: var(--text-secondary);
    }

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

    /* Compact Mobile Sections & Photo */
    .section {
        padding: 3rem 0;
        scroll-margin-top: 64px;
    }

    .hero {
        padding: 1.85rem 0 2.5rem;
        scroll-margin-top: 64px;
    }

    .hero-grid {
        gap: 1.5rem;
    }

    .hero-portrait-wrap {
        max-width: 100%;
    }

    .portrait-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.9rem;
        padding: 0.65rem 0.9rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .portrait-card img {
        width: 68px;
        height: 68px;
        flex-shrink: 0;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
        object-fit: cover;
        object-position: 54% 34%;
    }

    .portrait-caption {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.15rem;
        padding: 0;
        border-top: none;
        background-color: transparent;
    }

    .caption-meta {
        white-space: normal;
    }

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

    .cards-grid-3 {
        grid-template-columns: 1fr;
    }

    .section-header-row {
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.65rem;
    }

    .experience-badge {
        width: 100%;
    }

    .field input,
    .field textarea {
        font-size: 16px;
    }
}

@media (max-width: 540px) {
    .eyebrow {
        font-size: 0.7rem;
        padding: 0.32rem 0.68rem;
        margin-bottom: 1.15rem;
        max-width: 100%;
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 2.15rem;
    }

    .hero-lead {
        font-size: 1.08rem;
    }

    .hero-sub {
        font-size: 0.94rem;
        margin-bottom: 1.5rem;
    }

    .hero-actions {
        gap: 0.6rem;
        margin-bottom: 1.75rem;
    }

    .hero-actions .btn {
        min-height: 44px;
    }

    .hero-actions .btn-primary {
        flex: 1 1 100%;
    }

    .hero-actions .btn-ghost {
        flex: 1 1 calc(50% - 0.3rem);
    }

    .card,
    .project-card,
    .timeline-item {
        padding: 1.25rem;
    }

    .project-cta {
        width: 100%;
        min-height: 42px;
    }

    .contact-row {
        flex-wrap: wrap;
        padding: 0.85rem 1rem;
    }

    .copy-btn {
        min-height: 38px;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .form-footer .btn {
        width: 100%;
        min-height: 46px;
    }

    .form-alt-link {
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}
