:root {
    color-scheme: dark;
    --bg: #050505;
    --bg-alt: #08080a;
    --surface: #111114;
    --surface-alt: #151519;
    --surface-strong: #1b1b20;
    --text: #f4f1ec;
    --text-soft: #d6d0c7;
    --muted: #b8b3aa;
    --muted-2: #8f8880;
    --accent: #b11226;
    --accent-bright: #c5162e;
    --accent-muted: #64111d;
    --steel: #748091;
    --bronze: #b58a60;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --max: 1180px;
    --header-height: 78px;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(180deg, rgba(177, 18, 38, 0.08), rgba(5, 5, 5, 0) 28rem),
        var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    color: inherit;
}

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

.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;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    transform: translateY(-160%);
    background: var(--accent);
    color: var(--text);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem clamp(1rem, 4vw, 2.6rem);
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(5, 5, 5, 0.88);
    border-color: var(--border);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.brand-mark {
    width: 44px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    background: linear-gradient(135deg, var(--surface-strong), rgba(177, 18, 38, 0.34));
    border-radius: 8px;
    font-weight: 800;
}

.brand-text {
    display: grid;
    gap: 0.1rem;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 0.96rem;
}

.brand-text span {
    color: var(--muted);
    font-size: 0.76rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.45rem, 1.3vw, 1rem);
}

.site-nav a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.45rem 0.1rem;
    transition: color 0.2s ease;
}

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

.nav-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0;
}

.nav-cv {
    border: 1px solid var(--accent);
    color: var(--text) !important;
    background: rgba(177, 18, 38, 0.18);
    padding: 0.52rem 0.85rem !important;
    border-radius: 5px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.65rem;
}

.nav-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    min-height: 100svh;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.hero-slider,
.hero-slide {
    min-height: 100svh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.015);
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.2s ease;
    background-image:
        linear-gradient(90deg, rgba(5, 5, 5, 0.9) 0%, rgba(5, 5, 5, 0.78) 34%, rgba(5, 5, 5, 0.36) 66%, rgba(5, 5, 5, 0.76) 100%),
        linear-gradient(0deg, rgba(5, 5, 5, 0.78), rgba(5, 5, 5, 0.18)),
        var(--bg);
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    transform: scale(1);
    opacity: 0.86;
    z-index: -2;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.56) 48%, rgba(5, 5, 5, 0.78)),
        linear-gradient(0deg, rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.1) 48%, rgba(5, 5, 5, 0.45));
    z-index: -1;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    position: relative;
    /* Every active slide must fill the full viewport */
    min-height: 100svh;
}

.hero-slide.is-active::before {
    animation: kenBurns 8s ease both;
}

.hero-content {
    width: min(var(--max), calc(100% - 2rem));
    min-height: 100svh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: calc(var(--header-height) + 3rem) 0 7rem;
}

.eyebrow {
    margin: 0 0 0.9rem;
    color: var(--bronze);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero h1,
.hero h2,
.section h2 {
    font-family: "Playfair Display", Georgia, serif;
    letter-spacing: 0;
    line-height: 0.96;
}

.hero h1 {
    width: min(840px, 100%);
    margin: 0;
    font-size: clamp(3.2rem, 10vw, 8.2rem);
}

.hero h2 {
    width: min(840px, 100%);
    margin: 0.45rem 0 0;
    color: var(--text-soft);
    font-size: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy {
    width: min(760px, 100%);
    margin: 1.6rem 0 0;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.hero-actions,
.contact-actions,
.card-actions,
.case-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.hero-actions {
    margin-top: 2rem;
}

.btn,
.text-action,
.card-actions a,
.case-links a {
    min-width: 0;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: 1px solid transparent;
    padding: 0.72rem 1rem;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.1;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.text-action:hover,
.card-actions a:hover,
.case-links a:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    border-color: var(--accent-bright);
    color: var(--text);
    box-shadow: 0 12px 28px rgba(177, 18, 38, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
    color: var(--text);
}

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

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

.tag-row {
    margin-top: 1.3rem;
}

.tag-row span,
.chip-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    border-radius: 4px;
    padding: 0.35rem 0.58rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 1.4rem;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.45rem;
    border: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.65);
    backdrop-filter: blur(16px);
    border-radius: 8px;
}

.hero-controls button,
.hero-dots button {
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.hero-controls > button {
    width: 38px;
    height: 38px;
    border-radius: 6px;
}

.hero-controls > button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero-dots {
    display: flex;
    gap: 0.45rem;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    padding: 0;
}

.hero-dots button.is-active {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
}

.section {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 2.6rem);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section:nth-of-type(even) {
    background: rgba(255, 255, 255, 0.015);
}

.section-inner {
    width: min(var(--max), 100%);
    margin: 0 auto;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.align-start {
    align-items: start;
}

.section-heading {
    width: min(760px, 100%);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-heading.compact {
    margin-bottom: 1.4rem;
}

.section h2 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5rem);
}

.section h3 {
    line-height: 1.18;
}

.lead,
.section-heading p,
.section p {
    color: var(--text-soft);
}

.lead {
    font-size: clamp(1.06rem, 1.9vw, 1.28rem);
}

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

.fact-grid div,
.ra-fit,
.older-work,
.education-card,
.achievement-list article,
.skill-card,
.older-grid article {
    border: 1px solid var(--border);
    background: rgba(17, 17, 20, 0.74);
    border-radius: var(--radius);
}

.fact-grid div {
    padding: 1rem;
}

.fact-grid dt {
    color: var(--bronze);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fact-grid dd {
    margin: 0.25rem 0 0;
    color: var(--text-soft);
}

.image-frame {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.image-frame img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.04);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.image-frame:hover img {
    transform: scale(1.025);
    filter: saturate(1.02) contrast(1.06);
}

.image-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0) 45%, rgba(5, 5, 5, 0.72));
}

.image-frame figcaption {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.about-frame img {
    aspect-ratio: 4 / 5;
}

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

.system-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(27, 27, 32, 0.95), rgba(17, 17, 20, 0.95));
    border-radius: var(--radius);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.system-card:hover,
.skill-card:hover,
.education-card:hover,
.achievement-list article:hover,
.older-grid article:hover {
    transform: translateY(-4px);
    border-color: rgba(197, 22, 46, 0.55);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.system-card.featured {
    grid-column: span 2;
}

.system-media {
    position: relative;
    min-height: 260px;
    background: var(--surface-strong);
    overflow: hidden;
}

.system-media img,
.system-media video {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

.system-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0), rgba(5, 5, 5, 0.7));
    pointer-events: none;
}

.status-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(5, 5, 5, 0.72);
    color: var(--text);
    border-radius: 4px;
    padding: 0.35rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 800;
}

.system-media-caption {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.65rem;
    z-index: 2;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.system-placeholder {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.5rem;
    text-align: center;
    color: var(--text);
}

.system-placeholder > span:first-child {
    width: 78px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: rgba(177, 18, 38, 0.22);
    font-weight: 900;
    font-size: 1.4rem;
}

.system-placeholder small {
    color: var(--muted);
    font-weight: 700;
}

.vision-placeholder {
    background:
        linear-gradient(135deg, rgba(116, 128, 145, 0.18), rgba(177, 18, 38, 0.18)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 52px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 52px),
        var(--surface-strong);
}

.automation-placeholder {
    background:
        linear-gradient(135deg, rgba(181, 138, 96, 0.16), rgba(177, 18, 38, 0.18)),
        var(--surface-strong);
}

.visdrone-media img {
    object-position: center 44%;
    filter: saturate(0.95) contrast(1.06) brightness(0.86);
}

.visdrone-media::after {
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.08), rgba(5, 5, 5, 0.72)),
        linear-gradient(90deg, rgba(5, 5, 5, 0.22), rgba(5, 5, 5, 0));
}

.system-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.15rem;
}

.system-category {
    margin: 0;
    color: var(--bronze);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.system-body h3,
.skill-card h3,
.education-card h3,
.achievement-list h3,
.older-grid h4,
.timeline h3,
.ra-fit h3 {
    margin: 0;
    color: var(--text);
}

.system-body p,
.skill-card p,
.education-card p,
.older-grid p,
.timeline p,
.ra-fit li {
    margin: 0;
    color: var(--text-soft);
}

.system-body .chip-row {
    margin-top: auto;
}

.card-actions {
    padding-top: 0.25rem;
}

.text-action {
    background: rgba(177, 18, 38, 0.16);
    color: var(--text);
    border-color: rgba(197, 22, 46, 0.46);
}

.card-actions a,
.case-links a {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
    color: var(--text-soft);
}

.older-work {
    margin-top: 1.2rem;
    padding: 1.2rem;
}

.older-work h3 {
    margin: 0 0 1rem;
}

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

.older-grid article {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.older-grid h4 {
    font-size: 1rem;
}

.older-grid p {
    margin-top: 0.45rem;
    font-size: 0.9rem;
}

.proof-explainer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    width: fit-content;
    max-width: 100%;
    margin: -0.55rem 0 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-bright);
    border-radius: var(--radius);
    background: rgba(17, 17, 20, 0.78);
}

.proof-explainer span {
    color: var(--bronze);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.proof-explainer strong {
    color: var(--text);
    line-height: 1.3;
}

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

.proof-card {
    min-height: 390px;
    margin: 0;
}

.section-gallery .image-frame figcaption {
    display: grid;
    gap: 0.25rem;
}

.section-gallery .image-frame figcaption strong {
    color: var(--text);
    font-size: 0.96rem;
}

.section-gallery .image-frame figcaption span {
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.35;
}

.proof-card img {
    aspect-ratio: 16 / 10;
    min-height: 390px;
    object-position: center;
}

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

.skill-card {
    min-height: 240px;
    padding: 1.1rem;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.skill-card i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 1.1rem;
    color: var(--text);
    background: rgba(177, 18, 38, 0.2);
    border: 1px solid rgba(197, 22, 46, 0.45);
    border-radius: 8px;
}

.skill-card p {
    margin-top: 0.7rem;
    font-size: 0.92rem;
}

.timeline {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.timeline article {
    position: relative;
    padding: 0 0 0 1.3rem;
    border-left: 1px solid rgba(197, 22, 46, 0.42);
}

.timeline span,
.education-card span,
.achievement-list span {
    color: var(--bronze);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline h3 {
    margin-top: 0.1rem;
}

.timeline p {
    margin-top: 0.35rem;
}

.experience-section .section-heading {
    max-width: 920px;
}

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

.experience-card,
.experience-note {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(244, 241, 236, 0.035), rgba(17, 17, 20, 0.78)),
        rgba(17, 17, 20, 0.76);
}

.experience-card {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-left: 3px solid rgba(197, 22, 46, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.experience-card:hover,
.experience-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(197, 22, 46, 0.58);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.leadership-card {
    grid-column: span 2;
}

.experience-card-header {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
}

.org-logo,
.org-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(244, 241, 236, 0.06);
}

.org-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.34rem;
    filter: grayscale(0.15) contrast(0.96);
    opacity: 0.86;
}

.org-mark {
    color: var(--text);
    background: rgba(177, 18, 38, 0.2);
    border-color: rgba(197, 22, 46, 0.42);
    font-weight: 900;
}

.experience-card-header span {
    display: block;
    color: var(--bronze);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.experience-card-header h3 {
    margin: 0.22rem 0 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.22;
}

.experience-card-header p {
    margin: 0.25rem 0 0;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.experience-summary {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.experience-points {
    display: grid;
    gap: 0.42rem;
    margin: 0.85rem 0 0;
    padding-left: 1rem;
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.45;
}

.experience-points li::marker {
    color: var(--accent-bright);
}

.experience-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: auto;
    padding-top: 1rem;
}

.experience-gallery figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(5, 5, 5, 0.32);
}

.experience-gallery img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.02) brightness(0.9);
}

.experience-gallery figcaption {
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.6rem;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82);
}

.experience-note {
    grid-column: span 2;
    padding: 1rem;
    border-left: 3px solid rgba(181, 138, 96, 0.66);
}

.experience-note h3 {
    max-width: 620px;
    margin-top: 0.2rem;
}

.experience-note p:not(.eyebrow) {
    max-width: 800px;
    margin-top: 0.55rem;
    color: var(--text-soft);
    line-height: 1.55;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.experience-tags span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.76rem;
    font-weight: 800;
}

.ra-fit {
    padding: 1.35rem;
}

.ra-fit h3 {
    font-size: 1.5rem;
}

.ra-fit ul,
.cert-list {
    display: grid;
    gap: 0.65rem;
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
}

.ra-fit li,
.cert-list li {
    position: relative;
    padding-left: 1rem;
}

.ra-fit li::before,
.cert-list li::before {
    content: "";
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 5px;
    height: 5px;
    background: var(--accent-bright);
    border-radius: 50%;
}

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

.education-card {
    padding: 1.2rem;
}

.education-card h3 {
    margin-top: 0.35rem;
}

.education-card p {
    margin-top: 0.35rem;
}

.achievement-list {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.achievement-list article {
    padding: 1.2rem;
}

.achievement-list h3 {
    margin-top: 0.35rem;
}

.achievement-list p {
    margin-top: 0.55rem;
}

.cert-list a {
    color: var(--text-soft);
    text-decoration: underline;
    text-decoration-color: rgba(197, 22, 46, 0.42);
    text-underline-offset: 4px;
}

.achievement-frame img {
    aspect-ratio: 4 / 5;
    object-position: center;
}

.contact-section {
    padding-bottom: clamp(4.5rem, 8vw, 8rem);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
}

.contact-actions {
    margin-top: 1.6rem;
}

.contact-links {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    color: var(--text-soft);
}

.contact-links i {
    color: var(--bronze);
}

.contact-visual {
    position: relative;
    min-height: 500px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(197, 22, 46, 0.34);
    border-radius: var(--radius);
    background: rgba(17, 17, 20, 0.76);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.36),
        0 0 42px rgba(177, 18, 38, 0.11);
}

.contact-visual img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    object-position: center;
}

.contact-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0) 58%, rgba(5, 5, 5, 0.76));
    pointer-events: none;
}

.contact-visual figcaption {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1;
    display: grid;
    gap: 0.25rem;
}

.contact-visual figcaption strong {
    color: var(--text);
    font-size: 1rem;
}

.contact-visual figcaption span {
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.4;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem clamp(1rem, 4vw, 2.6rem);
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

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

.case-modal[hidden] {
    display: none;
}

.case-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.case-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(12px);
}

.case-panel {
    position: relative;
    width: min(1080px, 100%);
    max-height: min(86svh, 900px);
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.case-close {
    position: sticky;
    top: 0.8rem;
    left: calc(100% - 3.2rem);
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.8);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
}

.case-hero {
    padding: clamp(1.2rem, 4vw, 2.2rem);
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(177, 18, 38, 0.18), rgba(255, 255, 255, 0.02)),
        var(--surface-alt);
}

.case-hero h2 {
    margin: 0;
    width: min(760px, 100%);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
}

.case-hero p:not(.eyebrow) {
    width: min(760px, 100%);
    color: var(--text-soft);
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: clamp(1.2rem, 4vw, 2.2rem);
}

.case-grid article {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.035);
    border-radius: var(--radius);
    padding: 1rem;
}

.case-grid h3 {
    margin: 0;
}

.case-grid p {
    color: var(--text-soft);
    margin: 0.45rem 0 0;
}

.case-links {
    padding: 0 clamp(1.2rem, 4vw, 2.2rem) clamp(1.2rem, 4vw, 2.2rem);
}

@keyframes kenBurns {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.06);
    }
}

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

@media (max-width: 1180px) {
    .skills-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

@media (max-width: 980px) {
    .nav-toggle {
        display: block;
        position: fixed;
        top: 14px;
        right: 14px;
        z-index: 80;
        background: rgba(177, 18, 38, 0.86);
        border-color: rgba(244, 241, 236, 0.42);
        backdrop-filter: blur(12px);
    }

    .site-nav {
        position: fixed;
        top: var(--header-height);
        left: 1rem;
        right: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.9rem;
        background: rgba(8, 8, 10, 0.96);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        backdrop-filter: blur(18px);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-icon,
    .nav-cv {
        width: 100%;
        justify-content: flex-start;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

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

    .system-card.featured {
        grid-column: span 2;
    }

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

@media (max-width: 720px) {
    :root {
        --header-height: 70px;
    }

    body {
        font-size: 15px;
    }

    .brand-text span {
        display: none;
    }

    .hero-content {
        width: calc(100vw - 1.25rem);
        max-width: calc(100vw - 1.25rem);
        padding-top: calc(var(--header-height) + 2.5rem);
        padding-bottom: 6.5rem;
    }

    .hero-copy,
    .section p,
    .site-header {
        overflow-wrap: anywhere;
    }

    .hero-slide::before {
        background-position: center top;
    }

    .hero-slide::after {
        background:
            linear-gradient(90deg, rgba(5, 5, 5, 0.88), rgba(5, 5, 5, 0.65)),
            linear-gradient(0deg, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.28));
    }

    .hero h1 {
        font-size: clamp(3rem, 16vw, 5rem);
    }

    .hero h2 {
        font-size: clamp(2rem, 11vw, 3.4rem);
    }

    .hero-actions,
    .contact-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .hero-actions .btn,
    .contact-actions .btn {
        width: 100%;
        max-width: 100%;
    }

    .hero .tag-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero .tag-row span {
        justify-content: center;
        text-align: center;
        min-width: 0;
    }

    .hero-controls {
        width: calc(100% - 1.25rem);
        justify-content: space-between;
    }

    .section {
        padding: 4rem 0.75rem;
    }

    .systems-grid,
    .system-card.featured,
    .education-grid,
    .case-grid,
    .older-grid {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .system-card.featured {
        grid-column: auto;
    }

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

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

    .skill-card {
        min-height: auto;
    }

    .image-frame img,
    .system-media,
    .system-media img,
    .system-media video,
    .system-placeholder {
        min-height: 240px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 430px) {
    .brand-mark {
        width: 38px;
    }

    .brand-text strong {
        font-size: 0.86rem;
    }

    .tag-row span,
    .chip-row span {
        font-size: 0.73rem;
    }

    .case-modal {
        padding: 0.5rem;
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: block !important;
        position: fixed !important;
        top: 14px !important;
        right: 14px !important;
        z-index: 120 !important;
        background: rgba(177, 18, 38, 0.86) !important;
        border-color: rgba(244, 241, 236, 0.42) !important;
    }
}

/* Academic readability pass: keep the dark identity, reduce landing-page theatrics. */
.profile-hero {
    min-height: auto;
    padding: calc(var(--header-height) + 3rem) clamp(1rem, 4vw, 2.6rem) clamp(3.5rem, 7vw, 5.5rem);
    background:
        radial-gradient(circle at 82% 14%, rgba(177, 18, 38, 0.18), transparent 24rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
        var(--bg);
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.72fr);
    gap: clamp(1.4rem, 4vw, 3rem);
    align-items: start;
}

.profile-copy {
    padding-top: clamp(0.5rem, 3vw, 2rem);
}

.profile-hero h1,
.profile-hero h2,
.section h2 {
    font-family: "Inter", system-ui, sans-serif;
    letter-spacing: 0;
}

.profile-hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.98;
}

.profile-hero h2 {
    width: min(780px, 100%);
    margin: 0.85rem 0 0;
    color: var(--text-soft);
    font-size: clamp(1.35rem, 3vw, 2.35rem);
    line-height: 1.18;
    font-weight: 800;
}

.profile-hero .hero-copy {
    width: min(820px, 100%);
    margin-top: 1.2rem;
    font-size: clamp(1rem, 1.45vw, 1.12rem);
}

.profile-hero .hero-actions {
    margin-top: 1.45rem;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.profile-summary-grid article,
.profile-card,
.certificate-card {
    border: 1px solid var(--border);
    background: rgba(17, 17, 20, 0.78);
    border-radius: var(--radius);
}

.profile-summary-grid article {
    padding: 0.9rem;
}

.profile-summary-grid span,
.certificate-card span {
    display: block;
    color: var(--bronze);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-summary-grid strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--text);
    line-height: 1.35;
}

.profile-card {
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
}

.profile-card img {
    width: 100%;
    aspect-ratio: 4 / 4.7;
    object-fit: cover;
    object-position: center top;
}

.profile-card-body {
    padding: 1rem;
}

.profile-card-body h3 {
    margin: 0;
}

.profile-card-body ul {
    display: grid;
    gap: 0.45rem;
    margin: 0.8rem 0 0;
    padding-left: 1.05rem;
    color: var(--text-soft);
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.profile-links a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    color: var(--text-soft);
    font-weight: 700;
    font-size: 0.84rem;
}

.section {
    padding-top: clamp(3.5rem, 6vw, 5.5rem);
    padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.section h2 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.08;
}

.section-heading {
    margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

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

.system-card.featured {
    grid-column: span 2;
}

.system-body p {
    font-size: 0.96rem;
}

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

.older-work .section-heading {
    margin-bottom: 1rem;
}

.older-work .section-heading h3 {
    margin: 0;
    font-size: 1.45rem;
}

.older-work .section-heading p {
    margin: 0.35rem 0 0;
}

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

.older-grid article {
    overflow: hidden;
    padding: 0;
}

.older-grid img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.older-placeholder {
    min-height: 150px;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-align: center;
}

.older-placeholder span {
    width: 58px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(197, 22, 46, 0.44);
    border-radius: 8px;
    background: rgba(177, 18, 38, 0.18);
    font-weight: 900;
}

.older-placeholder small {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.data-placeholder {
    background:
        linear-gradient(135deg, rgba(181, 138, 96, 0.12), rgba(177, 18, 38, 0.14)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 42px),
        var(--surface-strong);
}

.older-grid h4,
.older-grid p {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

.older-grid h4 {
    margin-top: 0.85rem;
}

.older-grid p {
    padding-bottom: 0.95rem;
}

.certification-section {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(177, 18, 38, 0.08), rgba(5, 5, 5, 0) 58%),
        rgba(255, 255, 255, 0.012);
}

.credential-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.4rem;
}

.credential-heading p {
    max-width: 820px;
}

.credential-summary {
    flex: 0 0 auto;
    min-width: 138px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(197, 22, 46, 0.42);
    border-radius: var(--radius);
    background: rgba(17, 17, 20, 0.82);
    text-align: center;
}

.credential-summary strong {
    display: block;
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
}

.credential-summary span {
    display: block;
    margin-top: 0.28rem;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.certificate-carousel {
    --cert-gap: 1rem;
}

.certificate-viewport {
    overflow: hidden;
    border-radius: var(--radius);
}

.certificate-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2rem) / 3);
    gap: var(--cert-gap);
    transition: transform 0.5s ease;
    will-change: transform;
}

.certificate-card {
    position: relative;
    min-height: 252px;
    display: flex;
    flex-direction: column;
    padding: 1.05rem;
    overflow: hidden;
    border-left: 3px solid rgba(197, 22, 46, 0.78);
    background:
        linear-gradient(135deg, rgba(244, 241, 236, 0.055), rgba(17, 17, 20, 0.84)),
        rgba(17, 17, 20, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.certificate-card::after {
    content: "VERIFIED";
    position: absolute;
    right: -1.9rem;
    bottom: 1.15rem;
    transform: rotate(-38deg);
    color: rgba(244, 241, 236, 0.06);
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    pointer-events: none;
}

.certificate-card:hover,
.certificate-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(197, 22, 46, 0.75);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.certificate-mark {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.certificate-mark i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(197, 22, 46, 0.42);
    border-radius: 50%;
    background: rgba(177, 18, 38, 0.18);
    color: var(--text);
}

.certificate-mark span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.25rem 0.52rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.certificate-card h3 {
    min-height: 52px;
    margin: 0.38rem 0 0;
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.22;
}

.certificate-card p {
    margin: 0.55rem 0 1rem;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.45;
}

.certificate-card p strong {
    color: var(--text);
}

.certificate-card a {
    width: fit-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    border: 1px solid rgba(197, 22, 46, 0.48);
    border-radius: 5px;
    padding: 0.48rem 0.72rem;
    color: var(--text);
    background: rgba(177, 18, 38, 0.18);
    font-size: 0.82rem;
    font-weight: 900;
}

.certificate-card a::after {
    content: "\f35d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.74rem;
}

.certificate-card.highlight {
    border-color: rgba(181, 138, 96, 0.68);
    background:
        linear-gradient(180deg, rgba(181, 138, 96, 0.16), rgba(17, 17, 20, 0.78)),
        rgba(17, 17, 20, 0.78);
}

.certificate-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.1rem;
}

.certificate-controls button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(17, 17, 20, 0.8);
    color: var(--text);
    cursor: pointer;
}

.certificate-controls button:hover,
.certificate-controls button:focus-visible {
    border-color: rgba(197, 22, 46, 0.68);
    background: rgba(177, 18, 38, 0.22);
}

.certificate-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.certificate-dots button {
    width: 9px;
    height: 9px;
    min-height: 9px;
    padding: 0;
    border-radius: 50%;
    border-color: rgba(244, 241, 236, 0.24);
    background: rgba(244, 241, 236, 0.18);
}

.certificate-dots button.is-active {
    width: 28px;
    border-radius: 999px;
    border-color: rgba(197, 22, 46, 0.72);
    background: var(--accent);
}

.contact-section h2 {
    max-width: 780px;
}

@media (max-width: 1180px) {
    .certificate-track {
        grid-auto-columns: calc((100% - 1rem) / 2);
    }

    .credential-heading {
        align-items: start;
    }
}

@media (max-width: 720px) {
    .credential-heading {
        display: grid;
    }

    .credential-summary {
        width: 100%;
        min-width: 0;
    }

    .certificate-track {
        grid-auto-columns: 100%;
    }

    .certificate-card {
        min-height: 236px;
    }
}

@media (max-width: 980px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-card {
        position: static;
    }

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

@media (max-width: 720px) {
    .profile-hero {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .profile-layout,
    .profile-copy,
    .profile-summary-grid,
    .profile-hero .hero-actions,
    .profile-hero .tag-row {
        width: 100%;
        max-width: calc(100vw - 1.5rem);
        overflow-wrap: anywhere;
    }

    .profile-hero h1 {
        font-size: clamp(2.15rem, 10vw, 2.75rem);
        line-height: 1.04;
    }

    .profile-hero h2 {
        font-size: clamp(1.15rem, 6vw, 1.45rem);
        line-height: 1.24;
    }

    .profile-hero .hero-copy {
        font-size: 0.98rem;
    }

    .profile-summary-grid,
    .systems-grid,
    .system-card.featured,
    .older-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .profile-hero .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ─── Balanced hero: two-column layout, cinematic background, framed portrait ─── */

.balanced-hero {
    --hero-image-opacity: 0.62;
    --hero-overlay-dark: 0.72;
    --hero-panel-opacity: 0.78;
    min-height: 100svh;
    background: var(--bg);
}

.balanced-hero .hero-slide::before {
    opacity: var(--hero-image-opacity);
}

.balanced-hero .hero-slide::after {
    background:
        linear-gradient(90deg, rgba(5,5,5,0.94), rgba(5,5,5,0.72) 42%, rgba(5,5,5,0.44) 68%, rgba(5,5,5,0.82)),
        linear-gradient(0deg, rgba(5,5,5,0.94), rgba(5,5,5,0.14) 54%, rgba(5,5,5,0.42));
}

/* All slides: restore original single-column centred layout (untouched visual) */
.balanced-hero .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: calc(var(--header-height) + 3rem) 0 7rem;
}

/* Text panel */
.hero-content-panel {
    width: 100%;
    padding: clamp(1.1rem, 2.5vw, 1.7rem);
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 3px solid rgba(197,22,46,0.85);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(17,17,20,0.78), rgba(5,5,5,0.54)),
        rgba(5,5,5,0.62);
    box-shadow: 0 26px 70px rgba(0,0,0,0.42);
    backdrop-filter: blur(10px);
}

.balanced-hero .hero-content-panel {
    background:
        linear-gradient(135deg, rgba(17,17,20,var(--hero-panel-opacity)), rgba(5,5,5,0.66)),
        rgba(5,5,5,0.5);
}

/* Typography */
.balanced-hero h1 {
    font-size: clamp(3rem, 5.5vw, 6rem);
}

.balanced-hero h2 {
    font-family: "Inter", system-ui, sans-serif;
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    line-height: 1.1;
    font-weight: 800;
}

.balanced-hero .hero-copy {
    font-size: clamp(0.94rem, 1.3vw, 1.1rem);
    margin-top: 1rem;
}

/* Info stat cards row */
.hero-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.hero-info-grid article {
    min-height: 82px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255,255,255,0.045);
}

.hero-info-grid span {
    display: block;
    color: var(--bronze);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-info-grid strong {
    display: block;
    margin-top: 0.22rem;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.3;
}

/* Portrait card — only visible on slide 1 (other slides use the bg image as their visual) */
.hero-visual-card {
    position: relative;
    width: min(320px, 100%);
    justify-self: center;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    border-left: 2px solid rgba(197,22,46,0.45);
    border-radius: 10px;
    background: var(--surface);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.5),
        0 0 28px rgba(177,18,38,0.14);
}

/* Hide portrait card completely from all slides */
.balanced-hero .hero-visual-card {
    display: none !important;
}

.hero-visual-card img {
    width: 100%;
    /* Compact landscape rectangle */
    aspect-ratio: 4 / 3;
    object-fit: cover;
    /* Focus on the face */
    object-position: 50% 20%;
    filter: saturate(0.92) contrast(1.06) brightness(0.88);
}

.hero-visual-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(5,5,5,0.75));
}

.hero-visual-card figcaption {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 1;
    color: var(--text-soft);
    font-size: 0.76rem;
    line-height: 1.35;
}

/* ≤ 980px: on slide 1, collapse to single column and hide portrait card */
@media (max-width: 980px) {
    .balanced-hero .hero-slide:first-child .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: calc(var(--header-height) + 2rem) 0 6rem;
    }

    .hero-visual-card {
        display: none;
    }

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

/* ≤ 720px: full mobile layout */
@media (max-width: 720px) {
    .balanced-hero {
        --hero-image-opacity: 0.48;
        --hero-overlay-dark: 0.82;
        --hero-panel-opacity: 0.82;
    }

    .balanced-hero .hero-content {
        display: flex;
        flex-direction: column;
        width: min(100%, calc(100vw - 1.5rem));
        max-width: calc(100vw - 1.5rem);
        margin-inline: auto;
        padding-inline: 0;
        padding-top: calc(var(--header-height) + 1.5rem);
        padding-bottom: 5rem;
    }

    .hero-content-panel {
        width: 100%;
        max-width: 100%;
        padding: 0.95rem;
    }

    .balanced-hero h1 {
        font-size: clamp(2.7rem, 14vw, 4rem);
    }

    .balanced-hero h2 {
        font-size: clamp(1.05rem, 4.9vw, 1.34rem);
        line-height: 1.18;
    }

    .balanced-hero .hero-copy {
        font-size: 0.98rem;
    }

    .hero-info-grid {
        grid-template-columns: 1fr;
    }

    .hero-info-grid article {
        min-height: auto;
    }

    .hero-info-grid strong,
    .balanced-hero .hero-copy {
        overflow-wrap: anywhere;
    }
}

/* Organized systems section: compact cards, equal rhythm, easier scanning. */
#systems .section-heading {
    max-width: 820px;
    margin-bottom: 1.35rem;
}

#systems .section-heading h2 {
    font-size: clamp(2rem, 3.4vw, 3rem);
}

#systems .section-heading p {
    max-width: 760px;
}

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

#systems .system-card,
#systems .system-card.featured {
    grid-column: auto;
}

#systems .system-card.featured {
    border-color: rgba(197, 22, 46, 0.42);
    box-shadow: inset 3px 0 0 rgba(197, 22, 46, 0.86);
}

#systems .system-media,
#systems .system-placeholder {
    min-height: 150px;
    height: 150px;
}

#systems .system-media img,
#systems .system-media video {
    min-height: 150px;
    height: 150px;
}

#systems .system-placeholder > span:first-child {
    width: 56px;
    font-size: 1.05rem;
}

#systems .status-badge {
    top: 0.55rem;
    right: 0.55rem;
    min-height: 26px;
    padding: 0.28rem 0.5rem;
    font-size: 0.7rem;
}

#systems .system-body {
    gap: 0.55rem;
    padding: 0.9rem;
}

#systems .system-category {
    font-size: 0.7rem;
}

#systems .system-body h3 {
    font-size: 1.02rem;
    line-height: 1.2;
}

#systems .system-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.48;
}

#systems .chip-row {
    gap: 0.32rem;
}

#systems .chip-row span {
    min-height: 25px;
    padding: 0.25rem 0.42rem;
    font-size: 0.68rem;
}

#systems .card-actions {
    gap: 0.45rem;
}

#systems .text-action,
#systems .card-actions a {
    min-height: 34px;
    padding: 0.48rem 0.65rem;
    font-size: 0.78rem;
}

#systems .older-work {
    margin-top: 1rem;
    padding: 1rem;
}

@media (max-width: 1120px) {
    #systems .systems-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #systems .systems-grid {
        grid-template-columns: 1fr;
    }

    #systems .system-media,
    #systems .system-placeholder,
    #systems .system-media img,
    #systems .system-media video {
        height: 180px;
        min-height: 180px;
    }
}

/* Final skill layout: ten capability cards read as two balanced rows on desktop. */
#skills .skills-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    #skills .skills-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    #skills .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #skills .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Final experience layout rules. */
@media (max-width: 1180px) {
    #experience .experience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #experience .leadership-card,
    #experience .experience-note {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    #experience .experience-grid,
    #experience .experience-gallery {
        grid-template-columns: 1fr;
    }

    #experience .leadership-card,
    #experience .experience-note {
        grid-column: auto;
    }

    #experience .experience-card-header {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    #experience .org-logo,
    #experience .org-mark {
        width: 50px;
        height: 50px;
    }
}

/* Final mobile safety pass: keep the hero panel inside the phone viewport. */
@media (max-width: 720px) {
    .balanced-hero .hero-content {
        width: min(100%, calc(100vw - 1.5rem));
        max-width: calc(100vw - 1.5rem);
        margin-inline: auto;
        padding-inline: 0;
    }

    .balanced-hero .hero-content-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .balanced-hero h1,
    .balanced-hero h2,
    .balanced-hero .hero-copy,
    .hero-info-grid strong {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}


/* Final contact mobile pass: stack text and image instead of squeezing columns. */
@media (max-width: 720px) {
    #contact .contact-layout {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 1.4rem;
    }

    #contact h2,
    #contact .lead,
    #contact .contact-links,
    #contact .contact-links a {
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    #contact .contact-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    #contact .contact-visual {
        width: 100%;
        min-height: 360px;
    }

    #contact .contact-visual img {
        min-height: 360px;
        object-position: center top;
    }
}
