@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/vazirmatn/vazirmatn-arabic-400-normal.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/vazirmatn/vazirmatn-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("../fonts/vazirmatn/vazirmatn-arabic-500-normal.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("../fonts/vazirmatn/vazirmatn-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url("../fonts/vazirmatn/vazirmatn-arabic-600-normal.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url("../fonts/vazirmatn/vazirmatn-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url("../fonts/vazirmatn/vazirmatn-arabic-700-normal.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url("../fonts/vazirmatn/vazirmatn-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 800;
    src: url("../fonts/vazirmatn/vazirmatn-arabic-800-normal.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 800;
    src: url("../fonts/vazirmatn/vazirmatn-latin-800-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+2212, U+FEFF, U+FFFD;
}

:root,
html[data-theme="light"] {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-alt: #edf1f7;
    --text: #11141a;
    --text-soft: #545e70;
    --muted: #7c8698;
    --line: #d9dfe9;
    --line-strong: #c4ccd9;
    --accent: #3d57bd;
    --accent-hover: #30479f;
    --accent-soft: #e8ecfa;
    --accent-ink: #ffffff;
    --success: #11835f;
    --danger: #c73e50;
    --header: rgba(245, 247, 251, .9);
    --shadow: 0 24px 70px rgba(24, 36, 64, .1);
    --radius: 12px;
    --radius-lg: 20px;
    --font-fa: "Vazirmatn", Tahoma, Arial, sans-serif;
}

html[data-theme="dark"] {
    --bg: #0d0f14;
    --surface: #151820;
    --surface-alt: #1a1e27;
    --text: #f4f6fa;
    --text-soft: #abb3c1;
    --muted: #778191;
    --line: #292e39;
    --line-strong: #3a414f;
    --accent: #7890ff;
    --accent-hover: #94a6ff;
    --accent-soft: #20294f;
    --accent-ink: #0c1022;
    --success: #48c79b;
    --danger: #ff7a8b;
    --header: rgba(13, 15, 20, .9);
    --shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body.portfolio-body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font-fa);
    font-size: 1rem;
    line-height: 1.85;
    direction: rtl;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.portfolio-body *,
body.portfolio-body *::before,
body.portfolio-body *::after {
    box-sizing: border-box;
}

body.portfolio-body a {
    color: inherit;
    text-decoration: none;
}

body.portfolio-body button,
body.portfolio-body input,
body.portfolio-body textarea {
    color: inherit;
    font: inherit;
}

img { max-width: 100%; }

.site-shell {
    min-height: 100vh;
    position: relative;
}

.site-shell::before {
    content: "";
    position: fixed;
    top: 0;
    left: clamp(20px, 4vw, 72px);
    bottom: 0;
    width: 1px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--accent) 0 18%, var(--line) 18% 100%);
    opacity: .5;
}

.skip-link {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
    padding: 10px 16px;
    transform: translateY(-150%);
    border-radius: 8px;
    color: var(--accent-ink) !important;
    background: var(--accent);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    background: transparent;
    transition: background .2s ease, border-color .2s ease;
}

.has-scrolled .site-header {
    border-color: var(--line);
    background: var(--header);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-nav,
.page-section,
.footer-inner,
.footer-bottom {
    width: min(1240px, calc(100% - 64px));
    margin-inline: auto;
}

.site-nav {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--text);
    border-radius: 50%;
    color: var(--text);
    font-size: .78rem;
    font-weight: 800;
    direction: ltr;
}

.brand-copy {
    display: grid;
    line-height: 1.35;
}

.brand-copy strong {
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.brand-copy small {
    color: var(--muted);
    font-size: .72rem;
    direction: ltr;
    text-align: right;
}

.nav-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.nav-links,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 8px;
    color: var(--text-soft) !important;
    font-size: .88rem;
    font-weight: 520;
    transition: color .18s ease, background .18s ease;
}

.site-nav-link:hover {
    color: var(--text) !important;
    background: var(--surface-alt);
}

.site-nav-link.active {
    color: var(--accent) !important;
}

.nav-actions { gap: 8px; }

.local-weather {
    min-width: 142px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.local-weather-trigger {
    min-width: 142px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text-soft);
    background: transparent;
    cursor: pointer;
    text-align: right;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.local-weather-trigger:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface);
}

.weather-symbol {
    width: 24px;
    flex: 0 0 24px;
    color: var(--accent);
    font-size: 1rem;
    line-height: 1;
    text-align: center;
}

.weather-copy {
    min-width: 0;
    display: grid;
    line-height: 1.35;
}

.weather-copy strong,
.weather-copy small {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-copy strong {
    color: var(--text);
    font-size: .8rem;
    font-weight: 700;
}

.weather-copy small {
    color: var(--muted);
    font-size: .75rem;
}

.weather-source {
    color: var(--muted) !important;
    font-size: .68rem;
    direction: ltr;
    white-space: nowrap;
}

.weather-source:hover { color: var(--accent) !important; }

.local-weather[data-weather-state="loading"] .weather-symbol {
    animation: weather-pulse .8s ease-in-out infinite alternate;
}

.local-weather[data-weather-state="error"] .weather-symbol { color: var(--danger); }

@keyframes weather-pulse {
    to { opacity: .35; transform: translateY(-1px); }
}

.icon-button,
.nav-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text-soft);
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.icon-button:hover,
.nav-toggle:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface);
}

.nav-toggle { display: none; }

.nav-cta,
.btn-primary,
.btn-signal,
.btn-ghost,
.btn-text {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.nav-cta,
.btn-primary,
.btn-signal {
    color: var(--accent-ink) !important;
    background: var(--accent);
}

.nav-cta:hover,
.btn-primary:hover,
.btn-signal:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-ghost {
    color: var(--text) !important;
    border-color: var(--line-strong);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--text);
    background: var(--surface);
}

.btn-text {
    min-height: auto;
    padding: 8px 0;
    border-radius: 0;
    color: var(--text) !important;
    border-bottom-color: var(--line-strong);
}

.btn-text:hover {
    color: var(--accent) !important;
    border-bottom-color: var(--accent);
}

.icon-button:focus-visible,
.nav-toggle:focus-visible,
.nav-cta:focus-visible,
.btn-primary:focus-visible,
.btn-signal:focus-visible,
.btn-ghost:focus-visible,
.btn-text:focus-visible,
.site-nav-link:focus-visible,
.text-link:focus-visible,
.project-card-new:focus-visible,
.filter-chip:focus-visible,
.direct-links a:focus-visible,
.about-socials a:focus-visible,
.footer-links a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
    outline-offset: 3px;
}

.local-weather-trigger:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
    outline-offset: 3px;
}

.site-main { min-height: calc(100vh - 180px); }
.page-section { position: relative; }

.hero {
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: center;
    gap: clamp(52px, 8vw, 120px);
    padding-block: 118px 62px;
}

.hero-copy { min-width: 0; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 28px;
    color: var(--text-soft);
    font-size: .88rem;
    font-weight: 500;
}

.status-dot,
.availability i,
.status-line i,
.footer-signal i {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    display: inline-block;
    border-radius: 50%;
    background: var(--success);
}

.hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.3rem, 3.8vw, 3.75rem);
    font-weight: 800;
    line-height: 1.42;
    letter-spacing: -.035em;
}

.hero h1 span {
    display: inline;
    color: var(--accent);
}

.hero-lead {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 2;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.hero-facts {
    max-width: 760px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 48px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
}

.hero-facts > div {
    padding-inline: 22px;
    border-left: 1px solid var(--line);
}

.hero-facts > div:first-child { padding-right: 0; }
.hero-facts > div:last-child { border-left: 0; }
.hero-facts dt { color: var(--muted); font-size: .75rem; }
.hero-facts dd {
    margin: 3px 0 0;
    color: var(--text);
    font-size: .96rem;
    font-weight: 700;
    direction: ltr;
    text-align: right;
}

.hero-profile {
    width: 100%;
    max-width: 340px;
    justify-self: end;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.portrait-wrap {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface-alt);
}

.portrait-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: grayscale(18%) contrast(1.02);
    transition: filter .3s ease, transform .4s ease;
}

.hero-profile:hover .portrait-wrap img {
    filter: grayscale(0) contrast(1);
    transform: scale(1.012);
}

.portrait-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px 4px 2px;
    color: var(--muted);
    font-size: .75rem;
    direction: ltr;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--success);
    direction: rtl;
}

.availability i { width: 6px; height: 6px; }

.stack-strip {
    min-height: 94px;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stack-label,
.eyebrow,
.project-type {
    color: var(--accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    direction: ltr;
    text-align: right;
}

.stack-items {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    direction: ltr;
}

.stack-items span {
    position: relative;
    color: var(--text);
    font-size: .92rem;
    font-weight: 600;
}

.stack-items span:not(:last-child)::after {
    content: "·";
    position: absolute;
    left: -15px;
    color: var(--line-strong);
}

.section-block { padding-block: clamp(78px, 9vw, 112px); }

.section-heading {
    margin-bottom: 54px;
}

.editorial-heading {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr);
    align-items: start;
    gap: clamp(40px, 8vw, 120px);
}

.eyebrow { margin: 0 0 12px; }

.section-heading h2,
.closing-cta h2,
.story-card h2,
.education-card h2,
.skill-group-header h2,
.project-meta h2,
.project-story h2,
.contact-sidebar h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.7rem, 2.8vw, 2.75rem);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.045em;
}

.section-intro p,
.section-summary {
    max-width: 680px;
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 2;
}

.text-link,
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--text) !important;
    font-size: .88rem;
    font-weight: 620;
}

.text-link:hover,
.back-link:hover {
    color: var(--accent) !important;
    border-bottom-color: var(--accent);
}

.project-list {
    display: grid;
    border-bottom: 1px solid var(--line);
}

.project-card-new {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 62px minmax(300px, .92fr) minmax(0, 1.08fr);
    align-items: stretch;
    gap: clamp(28px, 4vw, 58px);
    padding-block: 38px;
    border-top: 1px solid var(--line);
    transition: background .2s ease;
}

.project-card-new.is-clickable { cursor: pointer; }

.project-card-new:hover {
    background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.project-card-index {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font: 700 .72rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    direction: ltr;
}

.project-card-index i {
    width: 1px;
    flex: 1;
    min-height: 70px;
    display: block;
    background: var(--line);
}

.project-media {
    position: relative;
    min-width: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    align-self: center;
    border: 1px solid var(--line);
    background: var(--surface-alt);
}

.project-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s ease;
}

.project-card-new:hover .project-media img { transform: scale(1.025); }

.project-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 30px;
    color: var(--text);
    background:
        linear-gradient(90deg, transparent 49.8%, var(--line) 50%, transparent 50.2%),
        linear-gradient(var(--surface-alt), var(--surface));
    text-align: center;
}

.project-placeholder span {
    color: var(--accent);
    font: 700 .76rem ui-monospace, monospace;
}

.project-placeholder strong {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 700;
}

.media-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    color: #fff;
    background: rgba(12, 15, 22, .78);
    font-size: .7rem;
}

.project-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 10px;
}

.project-type { margin: 0 0 12px; }

.project-card-body h3 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.04em;
}

.project-description {
    max-width: 590px;
    margin: 16px 0 20px;
    color: var(--text-soft);
    font-size: .95rem;
    line-height: 1.95;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 0;
    direction: ltr;
}

.tech-tags span {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 570;
}

.tech-tags span:not(:last-child)::after {
    content: "/";
    margin-inline: 9px;
    color: var(--line-strong);
}

.project-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: auto;
    padding-top: 22px;
    color: var(--text);
    font-size: .84rem;
    font-weight: 600;
}

.project-card-action i {
    color: var(--accent);
    transition: transform .18s ease;
}

.project-card-new:hover .project-card-action i { transform: translateX(-5px); }

.expertise-section { border-bottom: 1px solid var(--line); }

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.expertise-item {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-left: 1px solid var(--line);
}

.expertise-item:last-child { border-left: 0; }

.expertise-item > span,
.principle-number {
    color: var(--accent);
    font: 700 .74rem/1 var(--font-fa);
    direction: ltr;
}

.expertise-item h3 {
    margin: 46px 0 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.expertise-item p {
    margin: 14px 0 18px;
    color: var(--text-soft);
    font-size: .9rem;
    line-height: 2;
}

.expertise-points {
    display: grid;
    gap: 8px;
    margin: 0 0 26px;
    padding: 0;
    color: var(--text-soft);
    font-size: .875rem;
    line-height: 1.8;
    list-style: none;
}

.expertise-points li {
    position: relative;
    padding-right: 14px;
}

.expertise-points li::before {
    content: "";
    position: absolute;
    top: .72em;
    right: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.expertise-item small {
    margin-top: auto;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
    direction: ltr;
    text-align: right;
}

.perspective-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr);
    align-items: start;
    gap: clamp(50px, 9vw, 130px);
    border-bottom: 1px solid var(--line);
}

.perspective-section h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(1.75rem, 2.7vw, 2.6rem);
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: -.035em;
}

.perspective-copy p {
    margin: 0;
    color: var(--text-soft);
    line-height: 2.15;
}

.approach-section { border-bottom: 1px solid var(--line); }

.approach-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.approach-list li {
    min-height: 260px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 54px;
    padding: 28px 30px;
    border-left: 1px solid var(--line);
}

.approach-list li:last-child { border-left: 0; }
.approach-list > li > span {
    color: var(--accent);
    font: 700 .72rem ui-monospace, monospace;
}

.approach-list h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.approach-list p {
    margin: 12px 0 0;
    color: var(--text-soft);
    font-size: .9rem;
    line-height: 1.95;
}

.closing-cta {
    min-height: 370px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 20px;
    margin-bottom: 110px;
    padding: 60px;
    color: #fff;
    background: #11141a;
    text-align: center;
}

html[data-theme="dark"] .closing-cta {
    color: #10131a;
    background: #6495ED;
}

.closing-cta .eyebrow { color: #91a4ff; }
.closing-cta h2 {
    max-width: 760px;
    color: inherit;
}

.page-hero {
    padding-block: 150px 68px;
    border-bottom: 1px solid var(--line);
}

.compact-hero > div { max-width: 990px; }

.page-hero h1,
.project-detail-hero h1,
.empty-state h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.2rem, 4vw, 3.85rem);
    font-weight: 800;
    line-height: 1.38;
    letter-spacing: -.045em;
}

.page-hero p:not(.eyebrow),
.project-detail-lead {
    max-width: 780px;
    margin: 24px 0 0;
    color: var(--text-soft);
    font-size: 1.02rem;
    line-height: 2;
}

.bento-card {
    position: relative;
    border-top: 1px solid var(--line);
    background: transparent;
}

.about-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
    gap: clamp(40px, 8vw, 110px);
    padding-block: 80px 120px;
}

.about-profile-card {
    position: sticky;
    top: 110px;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.about-photo {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--surface-alt);
}

.about-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    animation: bio-swap-in .35s ease both;
}

.about-identity { padding: 22px 6px 16px; }

.status-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--success);
    font-size: .75rem;
    direction: ltr;
}

.about-identity h2 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.about-identity p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .75rem;
    direction: ltr;
    text-align: right;
}

.about-socials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.about-socials a,
.direct-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    color: var(--text-soft) !important;
    font-size: .78rem;
}

.about-socials a:hover,
.direct-links a:hover {
    color: var(--accent) !important;
    border-color: var(--accent);
}

.about-content { display: grid; gap: 70px; }
.story-card,
.education-card { padding-top: 34px; }

.card-index {
    position: absolute;
    top: 36px;
    left: 0;
    color: var(--muted);
    font: 700 .68rem ui-monospace, monospace;
}

.story-card h2 { max-width: 760px; }

.story-text {
    max-width: 840px;
    margin: 24px 0 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 2.15;
    white-space: pre-line;
    animation: bio-swap-in .35s ease both;
}

.story-controls {
    max-width: 840px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.story-position {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font: 600 .72rem/1 var(--font-fa);
    direction: ltr;
}

.story-position b {
    color: var(--accent);
    font-weight: 800;
}

.story-position i {
    width: 42px;
    height: 1px;
    background: var(--line-strong);
}

.story-control-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-control-buttons button {
    min-width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text-soft);
    background: transparent;
    font: 700 .86rem/1 var(--font-fa);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.story-control-buttons button:hover,
.story-control-buttons button:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.story-control-buttons .story-autoplay {
    min-width: 66px;
    font-size: .72rem;
}

@keyframes bio-swap-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.principle-card {
    min-height: 250px;
    padding: 28px 24px;
    border-left: 1px solid var(--line);
}

.principle-card:last-child { border-left: 0; }
.principle-number { display: inline-block; margin-bottom: 58px; }
.principle-card h3 { margin: 0; font-size: 1.05rem; }
.principle-card p { margin: 12px 0 0; color: var(--text-soft); font-size: .84rem; line-height: 1.95; }

.education-card {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 50px;
    align-items: start;
}

.education-list { display: grid; }
.education-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.education-list span { color: var(--muted); font-size: .78rem; }
.education-list strong { font-size: .9rem; font-weight: 700; }

.skill-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px 60px;
    padding-block: 80px 120px;
}

.skill-group { padding-top: 26px; }

.skill-group-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 20px;
    padding-bottom: 24px;
}

.skill-group-header h2 { font-size: 1.55rem; }
.skill-group-header .eyebrow { margin-bottom: 4px; }
.skill-group-header p {
    max-width: 480px;
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: .875rem;
    line-height: 1.9;
}

.skill-count {
    color: var(--muted);
    font: 700 .72rem ui-monospace, monospace;
}

.skills-list {
    display: grid;
    border-bottom: 1px solid var(--line);
}

.skill-row {
    min-height: 118px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-block: 18px;
    border-top: 1px solid var(--line);
}

.skill-row-content {
    min-width: 0;
    display: grid;
    gap: 9px;
}

.skill-row-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-icon-wrap {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: var(--surface);
}

.skill-icon-wrap img { width: 22px; height: 22px; object-fit: contain; }
.skill-icon-wrap span { color: var(--accent); font-size: .76rem; font-weight: 700; }
.skill-row-main strong { font-size: .9rem; font-weight: 700; direction: ltr; }
.skill-row-content > p {
    max-width: 460px;
    margin: 0;
    padding-right: 48px;
    color: var(--text-soft);
    font-size: .875rem;
    line-height: 1.85;
}

.key-badge {
    flex: 0 0 auto;
    padding: 3px 8px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: .75rem;
    font-weight: 600;
}

.projects-content { padding-block: 54px 120px; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 48px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text-soft);
    background: transparent;
    font-size: .76rem;
    cursor: pointer;
}

.filter-chip:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.filter-chip.active {
    color: var(--accent-ink);
    border-color: var(--accent);
    background: var(--accent);
}

.project-detail-hero { padding-block: 150px 58px; }
.back-link { margin: 0 0 34px; }
.project-detail-hero h1 { max-width: 980px; }
.project-detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.project-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr);
    gap: 60px;
    padding-bottom: 120px;
}

.project-showcase {
    min-height: 460px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-alt);
}

.project-showcase img,
.project-showcase video {
    width: 100%;
    height: 100%;
    min-height: 460px;
    display: block;
    object-fit: cover;
    background: #000;
}

.project-detail-placeholder {
    width: 100%;
    min-height: 460px;
    display: grid;
    place-content: center;
    gap: 12px;
    color: var(--accent);
    text-align: center;
}

.project-detail-placeholder span { font: 700 .8rem ui-monospace, monospace; }
.project-detail-placeholder i { font-size: 2rem; }
.project-meta { padding-top: 28px; }
.project-meta h2 { margin-bottom: 24px; font-size: 1.45rem; }
.tech-tags-large { gap: 8px; }
.tech-tags-large span {
    padding: 6px 9px;
    border: 1px solid var(--line);
    color: var(--text-soft);
}
.tech-tags-large span::after { display: none; }

.project-story {
    grid-column: 1 / -1;
    padding-top: 42px;
}

.project-story p:last-child {
    max-width: 920px;
    margin: 24px 0 0;
    color: var(--text-soft);
    line-height: 2.15;
    white-space: pre-line;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(270px, .7fr) minmax(0, 1.3fr);
    align-items: start;
    gap: clamp(50px, 8vw, 110px);
    padding-block: 80px 120px;
}

.contact-sidebar { padding-top: 28px; }
.contact-form-panel {
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid var(--line);
    background: var(--surface);
}

.contact-sidebar > p:not(.eyebrow) {
    margin: 14px 0 30px;
    color: var(--text-soft);
    font-size: .9rem;
    line-height: 2;
}

.direct-links { display: grid; gap: 8px; }
.direct-links a { justify-content: space-between; padding-inline: 14px; }
.direct-links a span { display: inline-flex; align-items: center; gap: 8px; }

.contact-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.85;
}

.contact-note .status-dot { margin-top: 7px; }
.signal-form { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-group { display: grid; gap: 8px; }
.field-group label { color: var(--text-soft); font-size: .8rem; font-weight: 500; }

.signal-input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: none;
    color: var(--text);
    background: var(--bg);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.signal-input::placeholder { color: var(--muted); opacity: .78; }
.signal-input:hover { border-color: var(--line-strong); }
.signal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    background: var(--surface);
}

.signal-textarea {
    min-height: 170px;
    padding-top: 13px;
    resize: vertical;
    line-height: 1.85;
}

.validation-message { color: var(--danger); font-size: .72rem; }

.contact-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid;
    font-size: .78rem;
}

.form-status.success { color: var(--success); border-color: color-mix(in srgb, var(--success) 32%, transparent); background: color-mix(in srgb, var(--success) 8%, transparent); }
.form-status.error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.submit-button { width: 100%; margin-top: 4px; cursor: pointer; }
.submit-button:disabled { opacity: .58; cursor: not-allowed; transform: none; }

.mini-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid color-mix(in srgb, var(--accent-ink) 32%, transparent);
    border-top-color: var(--accent-ink);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    min-height: 460px;
    display: grid;
    place-items: center;
    align-content: center;
    padding-block: 80px;
    text-align: center;
}

.empty-state h1 { margin-bottom: 16px; }
.empty-state p { max-width: 600px; margin: 0 0 24px; color: var(--text-soft); line-height: 1.95; }
.inline-empty { min-height: 180px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compact-section { min-height: 65vh; }

.page-loader {
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--muted);
}

.page-loader span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: loaderBounce 1s ease-in-out infinite;
}

.page-loader span:nth-child(2) { animation-delay: .12s; }
.page-loader span:nth-child(3) { animation-delay: .24s; }
.page-loader p { margin: 0 10px 0 0; font-size: .78rem; }

@keyframes loaderBounce {
    0%, 100% { transform: translateY(0); opacity: .35; }
    50% { transform: translateY(-7px); opacity: 1; }
}

.site-footer {
    padding-block: 50px 28px;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.footer-title { font-size: 1rem; font-weight: 700; }
.footer-inner p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.footer-links { display: flex; gap: 8px; }

.footer-links a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--text-soft) !important;
}

.footer-links a:hover { color: var(--accent) !important; border-color: var(--accent); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .72rem;
}

.footer-signal { display: inline-flex; align-items: center; gap: 8px; direction: ltr; }
.footer-signal i { width: 5px; height: 5px; }

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: .78rem;
}

#blazor-error-ui .reload { margin-inline: 12px; color: var(--accent) !important; }
#blazor-error-ui .dismiss { cursor: pointer; color: var(--muted) !important; }

body.is-enhanced [data-reveal="true"] {
    opacity: 0;
    translate: 0 14px;
    transition: opacity .45s ease, translate .45s ease;
}

body.is-enhanced [data-reveal="true"].is-revealed {
    opacity: 1;
    translate: 0 0;
}

@media (max-width: 1040px) {
    .nav-toggle { display: grid; }
    .nav-panel {
        display: none;
        position: absolute;
        top: 72px;
        right: 32px;
        left: 32px;
        padding: 18px;
        border: 1px solid var(--line);
        background: var(--surface);
        box-shadow: var(--shadow);
    }
    .nav-panel.is-open { display: grid; gap: 16px; }
    .nav-links { display: grid; gap: 3px; }
    .site-nav-link { justify-content: flex-start; }
    .nav-actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
    .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 130px; }
    .hero-profile { width: min(390px, 100%); justify-self: start; }
    .project-card-new { grid-template-columns: 48px minmax(260px, .85fr) minmax(0, 1.15fr); gap: 28px; }
    .about-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 50px; }
    .principles-grid { grid-template-columns: 1fr; border-bottom: 0; }
    .principle-card { min-height: auto; border-left: 0; border-bottom: 1px solid var(--line); }
    .principle-card > i { margin-bottom: 28px; }
}

@media (max-width: 780px) {
    .site-nav,
    .page-section,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 32px, 1240px);
    }
    .site-shell::before { display: none; }
    .site-nav { min-height: 68px; }
    .brand-copy small { display: none; }
    .nav-panel { top: 64px; right: 16px; left: 16px; }
    .hero { gap: 56px; padding-block: 112px 64px; }
    .hero h1 { font-size: clamp(2.15rem, 8.5vw, 3.05rem); }
    .hero-lead { font-size: 1rem; }
    .hero-facts { grid-template-columns: 1fr; gap: 0; }
    .hero-facts > div {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }
    .hero-facts dd { margin: 0; }
    .stack-strip { grid-template-columns: 1fr; gap: 10px; padding-block: 22px; }
    .editorial-heading { grid-template-columns: 1fr; gap: 24px; }
    .expertise-grid { grid-template-columns: 1fr; }
    .expertise-item { min-height: auto; border-left: 0; border-bottom: 1px solid var(--line); }
    .expertise-item:last-child { border-bottom: 0; }
    .expertise-item h3 { margin-top: 34px; }
    .perspective-section { grid-template-columns: 1fr; gap: 32px; }
    .section-heading { margin-bottom: 38px; }
    .project-card-new { grid-template-columns: 34px minmax(0, 1fr); gap: 18px; }
    .project-card-index { grid-row: 1 / 3; }
    .project-media { grid-column: 2; width: 100%; }
    .project-card-body { grid-column: 2; padding-top: 0; }
    .project-card-action { margin-top: 14px; }
    .approach-list { grid-template-columns: 1fr; }
    .approach-list li { min-height: auto; gap: 34px; border-left: 0; border-bottom: 1px solid var(--line); }
    .closing-cta { min-height: 360px; margin-bottom: 70px; padding: 40px 24px; }
    .page-hero { padding-block: 122px 54px; }
    .about-layout { grid-template-columns: 1fr; padding-top: 56px; }
    .about-profile-card { position: static; max-width: 420px; }
    .about-content { gap: 54px; }
    .education-card { grid-template-columns: 1fr; }
    .skill-groups { grid-template-columns: 1fr; gap: 52px; padding-top: 56px; }
    .project-detail-grid { grid-template-columns: 1fr; gap: 44px; }
    .project-story { grid-column: auto; }
    .contact-layout { grid-template-columns: 1fr; padding-top: 56px; }
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .site-nav,
    .page-section,
    .footer-inner,
    .footer-bottom { width: min(100% - 24px, 1240px); }
    .brand-mark { width: 38px; height: 38px; }
    .local-weather { width: 100%; order: 3; }
    .local-weather-trigger { min-width: 0; flex: 1; }
    .weather-copy strong,
    .weather-copy small { max-width: none; }
    .hero-kicker { font-size: .78rem; }
    .hero-actions { display: grid; justify-items: start; }
    .hero-profile { padding: 8px; }
    .portrait-caption { display: grid; gap: 4px; }
    .stack-items { gap: 8px 20px; }
    .section-block { padding-block: 76px; }
    .project-card-new { grid-template-columns: 1fr; gap: 18px; padding-block: 28px; }
    .project-card-index { display: none; }
    .project-media,
    .project-card-body { grid-column: 1; }
    .project-card-body h3 { font-size: 1.65rem; }
    .approach-list li { padding-inline: 4px; }
    .page-hero h1,
    .project-detail-hero h1 { font-size: clamp(2rem, 9.5vw, 3rem); }
    .story-controls { align-items: flex-start; }
    .about-profile-card { padding: 8px; }
    .principle-card { padding-inline: 4px; }
    .skill-group-header h2 { font-size: 1.35rem; }
    .skill-row { display: grid; }
    .skill-row-content > p { padding-right: 0; }
    .key-badge { width: max-content; margin-right: 48px; }
    .project-showcase,
    .project-showcase img,
    .project-showcase video,
    .project-detail-placeholder { min-height: 260px; }
    .contact-form-panel { padding: 24px 18px; }
    .footer-inner,
    .footer-bottom { display: grid; }
    .footer-bottom { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* --------------------------------------------------------------------------
   Chromatic editorial layout — inspired by a focused sidebar résumé pattern
   -------------------------------------------------------------------------- */

:root,
html[data-theme="light"] {
    --bg: #f6f3ed;
    --surface: #fffdf8;
    --surface-alt: #ede8df;
    --text: #171820;
    --text-soft: #555868;
    --muted: #7b7e8c;
    --line: #d8d2c8;
    --line-strong: #bdb5a9;
    --accent: #3457f1;
    --accent-hover: #2444d5;
    --accent-soft: #e9edff;
    --accent-ink: #ffffff;
    --success: #08795d;
    --danger: #c13f52;
    --sidebar: #3457f1;
    --sidebar-text: #ffffff;
    --blue: #3457f1;
    --coral: #ff725e;
    --lime: #d8f56d;
    --violet: #8069ff;
    --sky: #7bd8ff;
    --shadow: 0 28px 80px rgba(28, 31, 49, .14);
    --rail-width: 292px;
    --radius: 16px;
    --radius-lg: 28px;
}

html[data-theme="dark"] {
    --bg: #111218;
    --surface: #191b23;
    --surface-alt: #22252f;
    --text: #f5f1e9;
    --text-soft: #c0bdc3;
    --muted: #8d8c96;
    --line: #343640;
    --line-strong: #4c4e5b;
    --accent: #8ea0ff;
    --accent-hover: #a9b5ff;
    --accent-soft: #282f55;
    --accent-ink: #10121d;
    --success: #58d6ad;
    --danger: #ff8594;
    --sidebar: #171b31;
    --sidebar-text: #f8f6f0;
    --shadow: 0 28px 80px rgba(0, 0, 0, .35);
}

body.portfolio-body {
    direction: rtl;
    font-size: 1.025rem;
    background:
        radial-gradient(circle at 78% 4%, color-mix(in srgb, var(--sky) 18%, transparent), transparent 25rem),
        var(--bg);
}

html[dir="ltr"] body.portfolio-body { direction: ltr; }

.site-shell::before,
.site-header { display: none; }

.site-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1000;
    width: var(--rail-width);
    overflow-y: auto;
    color: var(--sidebar-text);
    background:
        radial-gradient(circle at 20% 0, rgba(255, 255, 255, .2), transparent 18rem),
        var(--sidebar);
    box-shadow: 14px 0 44px rgba(30, 42, 104, .13);
    scrollbar-width: thin;
}

html[dir="rtl"] .site-sidebar { box-shadow: -14px 0 44px rgba(30, 42, 104, .13); }

.site-main,
.site-footer { margin-inline-start: var(--rail-width); }

.site-main { min-height: 100vh; padding-block: 34px; }

.site-nav {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 34px 28px 26px;
    margin: 0;
}

.nav-head { display: block; }

.brand {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 14px;
    color: var(--sidebar-text) !important;
    text-align: center;
}

.brand-mark {
    width: 104px;
    height: 104px;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: #eef2fb;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center top;
}

.brand-copy { justify-items: center; line-height: 1.55; }
.brand-copy strong { color: #fff; font-size: 1.16rem; font-weight: 800; }
.brand-copy small { color: rgba(255, 255, 255, .74); font-size: .82rem; text-align: center; }

.nav-panel {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 24px;
    margin-top: 26px;
}

.nav-intro {
    padding: 16px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.nav-intro span {
    color: var(--lime);
    font-size: .8rem;
    font-weight: 750;
}

.nav-intro p {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: .84rem;
    line-height: 1.8;
}

.nav-links {
    display: grid;
    gap: 3px;
}

.site-nav-link {
    min-height: 46px;
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .72) !important;
    font-size: .94rem;
    font-weight: 570;
}

.site-nav-link span {
    color: rgba(255, 255, 255, .42);
    font: 700 .62rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    direction: ltr;
}

.site-nav-link:hover { color: #fff !important; background: rgba(255, 255, 255, .09); }
.site-nav-link.active { color: #171820 !important; background: var(--lime); }
.site-nav-link.active span { color: rgba(23, 24, 32, .56); }

.nav-actions {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-top: 8px;
}

.local-weather { min-width: 0; display: grid; gap: 5px; }
.local-weather-trigger {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 10px;
    border-color: rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .07);
}

.local-weather-trigger:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .12);
}

.weather-symbol { color: var(--lime); }
.weather-copy strong { color: #fff; font-size: .86rem; }
.weather-copy small { color: rgba(255, 255, 255, .66); font-size: .78rem; }
.weather-source { justify-self: end; color: rgba(255, 255, 255, .48) !important; }
.weather-source:hover { color: var(--lime) !important; }

.nav-tools { display: grid; grid-template-columns: 1fr 44px; gap: 8px; }

.language-switch,
.nav-tools .icon-button {
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    color: rgba(255, 255, 255, .62);
    background: rgba(255, 255, 255, .07);
}

.language-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 12px;
    cursor: pointer;
    direction: ltr;
    font-size: .82rem;
    font-weight: 750;
}

.language-switch i { width: 1px; height: 15px; background: rgba(255, 255, 255, .22); }
.language-switch .active { color: var(--lime); }
.language-switch:hover,
.nav-tools .icon-button:hover { border-color: rgba(255, 255, 255, .5); color: #fff; background: rgba(255, 255, 255, .12); }

.nav-socials { display: flex; gap: 8px; direction: ltr; }
.nav-socials a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: rgba(255, 255, 255, .75) !important;
    font-size: .72rem;
    font-weight: 750;
}
.nav-socials a:hover { color: #171820 !important; border-color: var(--lime); background: var(--lime); }

.nav-toggle { display: none; }

.site-main .page-section,
.site-footer .footer-inner,
.site-footer .footer-bottom {
    width: min(1120px, calc(100% - 80px));
    margin-inline: auto;
}

.color-panel {
    border: 1px solid color-mix(in srgb, currentColor 13%, transparent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.color-blue { color: #fff; background: var(--blue); }
.color-coral { color: #171820; background: var(--coral); }
.color-lime { color: #171820; background: var(--lime); }
.color-violet { color: #fff; background: var(--violet); }

.hero {
    min-height: calc(100vh - 68px);
    grid-template-columns: minmax(0, 1fr) minmax(270px, 34%);
    gap: clamp(40px, 6vw, 78px);
    padding: clamp(54px, 7vw, 86px);
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    inset-inline-end: -180px;
    inset-block-start: -210px;
    background: rgba(216, 245, 109, .22);
}

.hero::after {
    width: 240px;
    height: 240px;
    inset-inline-start: -120px;
    inset-block-end: -150px;
    background: rgba(255, 114, 94, .32);
}

.hero-copy,
.hero-profile { position: relative; z-index: 1; }
.hero-kicker { margin-bottom: 22px; color: rgba(255, 255, 255, .8); }
.hero .status-dot { background: var(--lime); box-shadow: 0 0 0 6px rgba(216, 245, 109, .14); }

.hero h1 {
    max-width: 720px;
    color: #fff;
    font-size: clamp(2.25rem, 4.25vw, 4.15rem);
    line-height: 1.32;
}

.hero h1 span { display: block; color: var(--lime); }
.hero-lead { max-width: 700px; color: rgba(255, 255, 255, .8); font-size: 1rem; line-height: 2; }

.hero .btn-primary {
    color: #171820 !important;
    background: var(--lime);
}
.hero .btn-primary:hover { background: #e4ff82; }
.hero .btn-text { color: #fff !important; border-bottom-color: rgba(255, 255, 255, .45); }

.hero-facts { margin-top: 40px; border-top-color: rgba(255, 255, 255, .24); }
.hero-facts > div { border-left-color: rgba(255, 255, 255, .24); }
.hero-facts dt { color: rgba(255, 255, 255, .6); }
.hero-facts dd { color: #fff; }

.hero-profile {
    max-width: 330px;
    padding: 10px;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 18px 20px 0 rgba(216, 245, 109, .95);
    transform: rotate(1.5deg);
}

html[dir="rtl"] .hero-profile { transform: rotate(-1.5deg); }
.portrait-wrap { aspect-ratio: 3 / 4; border-radius: 15px 15px 8px 8px; }
.portrait-wrap img { object-fit: contain; object-position: center top; filter: none; }
.hero-profile:hover .portrait-wrap img { transform: scale(1.008); filter: none; }
.portrait-caption { color: #6b6f7e; }
.availability { color: #08795d; }

.stack-strip {
    min-height: 88px;
    grid-template-columns: 150px minmax(0, 1fr);
    margin-top: 24px !important;
    padding: 20px 30px;
    border: 0;
    box-shadow: none;
}
.stack-label { color: #171820; }
.stack-items span { color: #171820; }
.stack-items span:not(:last-child)::after { color: rgba(23, 24, 32, .3); }

.section-block { padding-block: clamp(72px, 8vw, 104px); }
.section-summary,
.page-hero p:not(.eyebrow),
.hero-lead { font-size: 1.04rem; }
.story-text { font-size: 1.04rem; }
.skill-row-content > p { font-size: .92rem; }
.field-group label { font-size: .86rem; }
.section-heading h2,
.closing-cta h2,
.story-card h2,
.education-card h2,
.skill-group-header h2,
.contact-sidebar h2 { font-size: clamp(1.6rem, 2.5vw, 2.45rem); }
.page-hero h1,
.empty-state h1 { font-size: clamp(2rem, 3.5vw, 3.45rem); }

.expertise-section { border-bottom: 0; }
.expertise-grid { gap: 14px; border: 0; }
.expertise-item {
    min-height: 420px;
    padding: 30px;
    border: 0;
    border-radius: 20px;
    color: #171820;
    transition: transform .25s ease, box-shadow .25s ease;
}
.expertise-item:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.expertise-blue { background: #c9d5ff; }
.expertise-coral { background: #ffb6aa; }
.expertise-violet { background: #cec6ff; }
.expertise-item > span { color: #2e3d9f; }
.expertise-item h3 { margin-top: 42px; }
.expertise-item p,
.expertise-points,
.expertise-item small { color: #454856; }
.expertise-points li::before { background: #171820; }

.perspective-section {
    width: min(1120px, calc(100% - 80px)) !important;
    padding: clamp(48px, 6vw, 78px);
    border: 0;
}
.perspective-section h2,
.perspective-section .eyebrow,
.perspective-copy p,
.perspective-section .text-link { color: #171820 !important; }
.perspective-section .text-link { border-bottom-color: rgba(23, 24, 32, .4); }

.approach-section { border-bottom: 0; }
.approach-list { gap: 12px; border: 0; }
.approach-list li {
    min-height: 250px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}
.approach-list li:nth-child(1) { border-top: 6px solid var(--blue); }
.approach-list li:nth-child(2) { border-top: 6px solid var(--coral); }
.approach-list li:nth-child(3) { border-top: 6px solid var(--violet); }

.closing-cta {
    width: min(1120px, calc(100% - 80px)) !important;
    min-height: 380px;
    margin-bottom: 80px !important;
    padding: 54px;
}
.closing-cta::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    inset-inline-start: 8%;
    inset-block-start: -90px;
    border-radius: 50%;
    background: var(--lime);
    opacity: .9;
}
.closing-cta > * { position: relative; z-index: 1; }
.closing-cta .eyebrow { color: var(--lime); }
.closing-cta h2 { color: #fff; }
.closing-cta > p:not(.eyebrow) { max-width: 650px; margin: 0; color: rgba(255, 255, 255, .76); }
.closing-cta .btn-primary { color: #171820 !important; background: var(--lime); }

.page-hero {
    margin-top: 0 !important;
    padding: 76px 0 58px;
    border-bottom: 1px solid var(--line);
}
.page-hero::before {
    content: "";
    position: absolute;
    width: 64px;
    height: 10px;
    inset-inline-start: 0;
    inset-block-start: 44px;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--blue) 0 33%, var(--coral) 33% 66%, var(--lime) 66%);
}

.about-layout { grid-template-columns: 300px minmax(0, 1fr); gap: clamp(42px, 6vw, 82px); padding-block: 64px 110px; }
.about-profile-card { top: 34px; border: 0; border-radius: 22px; box-shadow: 12px 14px 0 var(--lime); }
.about-photo { aspect-ratio: 3 / 4; border-radius: 14px; background: #edf0f7; }
.about-photo img { object-fit: contain; object-position: center top; }
.about-socials a { border-radius: 8px; }
.story-card { padding: 34px 30px 30px; border: 0; border-radius: 20px; background: color-mix(in srgb, var(--sky) 28%, var(--surface)); }
.card-index { inset-inline-end: 26px; inset-inline-start: auto; }
.principles-grid { gap: 12px; border: 0; }
.principle-card {
    min-height: 260px;
    padding: 28px;
    border: 0;
    border-radius: 18px;
}
.principle-card:nth-child(1) { background: color-mix(in srgb, var(--lime) 52%, var(--surface)); }
.principle-card:nth-child(2) { background: color-mix(in srgb, var(--coral) 38%, var(--surface)); }
.principle-card:nth-child(3) { background: color-mix(in srgb, var(--violet) 30%, var(--surface)); }
.education-card { padding: 34px; border: 0; border-radius: 20px; background: var(--surface); box-shadow: inset 0 6px 0 var(--blue); }

.skill-groups { gap: 26px; padding-block: 64px 110px; }
.skill-group {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}
.skill-group:nth-child(4n + 1) { box-shadow: inset 0 7px 0 var(--blue); }
.skill-group:nth-child(4n + 2) { box-shadow: inset 0 7px 0 var(--coral); }
.skill-group:nth-child(4n + 3) { box-shadow: inset 0 7px 0 var(--lime); }
.skill-group:nth-child(4n) { box-shadow: inset 0 7px 0 var(--violet); }
.skill-row-content > p { padding-inline-start: 48px; padding-right: 0; }
.key-badge { border-radius: 999px; }

.contact-layout { gap: clamp(40px, 6vw, 80px); padding-block: 64px 110px; }
.contact-sidebar { padding: 30px; border: 0; border-radius: 20px; color: #171820; background: var(--lime); }
.contact-sidebar h2,
.contact-sidebar .eyebrow,
.contact-sidebar > p:not(.eyebrow),
.contact-sidebar .contact-note { color: #171820; }
.contact-sidebar .direct-links a { border-color: rgba(23, 24, 32, .24); color: #171820 !important; background: rgba(255, 255, 255, .32); }
.contact-sidebar .direct-links a:hover { border-color: #171820; background: #fff; }
.contact-sidebar .contact-note { border-top-color: rgba(23, 24, 32, .22); }
.contact-form-panel { border: 0; border-radius: 20px; box-shadow: var(--shadow); }

.site-footer { padding-block: 44px 26px; background: var(--surface); }

html[dir="ltr"] .brand-copy small,
html[dir="ltr"] .stack-label,
html[dir="ltr"] .eyebrow { text-align: left; }
html[dir="ltr"] .hero-facts dd,
html[dir="ltr"] .about-identity p,
html[dir="ltr"] .expertise-item small { text-align: left; }
html[dir="ltr"] .hero-facts > div { border-left: 0; border-right: 1px solid rgba(255, 255, 255, .24); }
html[dir="ltr"] .hero-facts > div:last-child { border-right: 0; }
html[dir="ltr"] .expertise-points li { padding-right: 0; padding-left: 14px; }
html[dir="ltr"] .expertise-points li::before { right: auto; left: 0; }
html[dir="ltr"] .availability { direction: ltr; }
html[dir="ltr"] .page-loader p { margin: 0 0 0 10px; }

@media (max-width: 1080px) {
    :root { --rail-width: 250px; }
    .site-nav { padding-inline: 22px; }
    .brand-mark { width: 88px; height: 88px; }
    .hero { grid-template-columns: 1fr 270px; padding: 52px; }
    .site-main .page-section,
    .site-footer .footer-inner,
    .site-footer .footer-bottom { width: min(100% - 48px, 1120px); }
    .perspective-section,
    .closing-cta { width: min(100% - 48px, 1120px) !important; }
}

@media (max-width: 860px) {
    :root { --rail-width: 0px; }
    .site-sidebar {
        position: sticky;
        inset-block-start: 0;
        width: 100%;
        max-height: none;
        overflow: visible;
        box-shadow: 0 10px 30px rgba(30, 42, 104, .16);
    }
    .site-main,
    .site-footer { margin-inline-start: 0; }
    .site-main { padding-top: 22px; }
    .site-nav { min-height: 70px; padding: 10px 18px; }
    .nav-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
    .brand { width: auto; display: flex; justify-items: initial; gap: 10px; text-align: start; }
    .brand-mark { width: 48px; height: 48px; border-width: 3px; }
    .brand-copy { justify-items: start; }
    .brand-copy strong { font-size: .98rem; }
    .brand-copy small { font-size: .76rem; text-align: start; }
    .nav-toggle { display: grid; border-color: rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .08); }
    .nav-panel {
        display: none;
        position: absolute;
        inset-block-start: 70px;
        inset-inline: 14px;
        margin: 0;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 16px;
        background: var(--sidebar);
        box-shadow: var(--shadow);
    }
    .nav-panel.is-open { display: grid; gap: 16px; }
    .nav-intro { display: none; }
    .nav-actions { margin-top: 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
    .hero { min-height: auto; grid-template-columns: 1fr; gap: 54px; }
    .hero-profile { width: min(330px, 88%); justify-self: center; }
    .expertise-grid { grid-template-columns: 1fr; }
    .expertise-item { min-height: 0; }
    .perspective-section { grid-template-columns: 1fr; }
    .approach-list { grid-template-columns: 1fr; }
    .approach-list li { min-height: 0; border-left: 1px solid var(--line); }
    .about-layout { grid-template-columns: 1fr; }
    .about-profile-card { position: static; max-width: 380px; }
    .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .site-main .page-section,
    .site-footer .footer-inner,
    .site-footer .footer-bottom { width: min(100% - 24px, 1120px); }
    .perspective-section,
    .closing-cta { width: min(100% - 24px, 1120px) !important; }
    .brand-copy small { display: block; }
    .hero { padding: 40px 24px; border-radius: 20px; }
    .hero h1 { font-size: clamp(2rem, 11vw, 2.75rem); }
    .hero-facts { grid-template-columns: 1fr; }
    .hero-facts > div,
    html[dir="ltr"] .hero-facts > div {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-right: 0;
        border-left: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .2);
    }
    .stack-strip { grid-template-columns: 1fr; padding: 20px; }
    .section-block { padding-block: 68px; }
    .perspective-section { padding: 38px 24px; }
    .closing-cta { min-height: 340px; padding: 40px 22px; }
    .page-hero { padding-top: 68px; }
    .principles-grid { grid-template-columns: 1fr; }
    .story-card,
    .education-card,
    .skill-group { padding: 24px 18px; }
    .skill-row-content > p { padding-inline-start: 0; }
    .key-badge { margin-inline-start: 48px; margin-right: 0; }
    .contact-form-panel { padding: 24px 18px; }
}

/* About portrait rotator: keep every real image mounted, cross-fade the active
   one, and constrain unlike aspect ratios to the same non-cropping frame. */
.about-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    isolation: isolate;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #edf0f7;
    contain: paint;
}

.about-photo .about-photo-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    opacity: 0;
    visibility: hidden;
    object-fit: contain;
    object-position: center;
    transform: scale(.985);
    transition:
        opacity .3s ease,
        transform .3s ease,
        visibility 0s linear .3s;
}

.about-photo .about-photo-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 0s;
}

.about-photo .about-photo-slide.is-active.is-fading-out {
    opacity: 0;
    visibility: visible;
    transform: scale(.985);
    transition-delay: 0s;
}

.about-photo-preload,
.about-photo .about-photo-preload img {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.about-photo-dots {
    position: absolute;
    z-index: 3;
    inset-inline: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.about-photo-dots i {
    width: 6px;
    height: 6px;
    border: 1px solid rgba(23, 24, 32, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 1px 4px rgba(23, 24, 32, .16);
    transition: width .25s ease, background-color .25s ease;
}

.about-photo-dots i.is-active {
    width: 20px;
    border-color: var(--blue);
    background: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
    .about-photo .about-photo-slide {
        transform: none;
        transition: none;
    }
}
