/* Hisham Ahmed — evidence-first accounting portfolio */
:root {
  color-scheme: light;
  --navy-950: #071426;
  --navy-900: #0b1b31;
  --navy-800: #102844;
  --navy-700: #16385d;
  --navy-100: #dbe7f2;
  --paper: #ffffff;
  --canvas: #f5f7fa;
  --canvas-strong: #edf1f5;
  --ink: #172234;
  --muted: #5d6878;
  --line: #dce2e9;
  --gold: #b78a36;
  --gold-strong: #8f671e;
  --gold-soft: #f5eddd;
  --green: #2f7d5b;
  --green-soft: #e5f4ed;
  --blue-soft: #e7eef8;
  --planned: #747e8b;
  --danger: #a83f47;
  --shadow-sm: 0 1px 2px rgba(7, 20, 38, .06), 0 7px 20px rgba(7, 20, 38, .05);
  --shadow-md: 0 14px 40px rgba(7, 20, 38, .10);
  --radius-sm: .65rem;
  --radius: 1rem;
  --radius-lg: 1.45rem;
  --max: 1180px;
  --header: 74px;
  --ease: cubic-bezier(.2, .75, .3, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c1a2c;
  --canvas: #071321;
  --canvas-strong: #102136;
  --ink: #edf3fa;
  --muted: #aeb9c7;
  --line: #263a52;
  --navy-100: #1f3853;
  --gold-soft: #2f281d;
  --green-soft: #123527;
  --blue-soft: #152c46;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .18), 0 7px 20px rgba(0, 0, 0, .12);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 1.5rem); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, "Noto Sans Arabic", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
[dir="rtl"] body { font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
::selection { background: var(--gold); color: #fff; }

.lang-ar { display: none !important; }
html[lang="ar"] .lang-en { display: none !important; }
html[lang="ar"] .lang-ar { display: inline !important; }
html[lang="ar"] p.lang-ar,
html[lang="ar"] div.lang-ar,
html[lang="ar"] section.lang-ar { display: block !important; }
html[lang="ar"] li.lang-ar { display: list-item !important; }

.skip-link {
  position: fixed; inset-inline-start: 1rem; top: -5rem; z-index: 2000;
  background: var(--gold); color: #fff; padding: .7rem 1rem; border-radius: .5rem;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 810px); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-sm { padding: clamp(2.7rem, 5vw, 4.5rem) 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-dark { background: var(--navy-950); color: #fff; }
.section-dark .muted { color: #b9c5d3; }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.5rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.cluster { display: flex; flex-wrap: wrap; gap: .55rem; }
.muted { color: var(--muted); }
.gold { color: var(--gold-strong); }
.text-center { text-align: center; }
.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; }

h1, h2, h3, h4 { margin: 0; color: inherit; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.55rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1rem; }
p { margin: 0; }
.lead { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--muted); max-width: 68ch; }
.kicker {
  display: inline-flex; align-items: center; gap: .55rem; color: var(--gold-strong);
  font-size: .78rem; line-height: 1; font-weight: 850; letter-spacing: .13em; text-transform: uppercase;
}
.kicker::before { content: ""; inline-size: 1.6rem; block-size: 2px; background: var(--gold); }
.section-head { display: grid; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.section-head .lead { max-width: 56ch; }
.eyebrow {
  display: inline-flex; align-items: center; width: fit-content; gap: .45rem;
  padding: .38rem .72rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--muted); font-size: .78rem; font-weight: 750;
}
.dot { width: .48rem; height: .48rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

/* Header */
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 1100; height: 3px; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0; background: var(--gold); }
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header);
  background: color-mix(in srgb, var(--canvas) 90%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(14px);
}
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; min-width: max-content; }
.brand-mark {
  display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: .72rem;
  background: var(--navy-900); color: #fff; font-weight: 900; letter-spacing: -.06em; border: 1px solid #28415e;
  box-shadow: inset 0 -2px 0 rgba(183, 138, 54, .55);
}
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-size: .91rem; }
.brand-text small { margin-top: .28rem; color: var(--muted); font-size: .68rem; font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: .1rem; }
.nav-link {
  position: relative; padding: .65rem .68rem; border-radius: .55rem;
  color: var(--muted); font-size: .78rem; font-weight: 750;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); background: var(--paper); }
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; inset-inline: .72rem; bottom: .32rem; height: 2px; background: var(--gold);
}
.nav-actions { display: flex; align-items: center; gap: .45rem; }
.icon-btn, .menu-btn {
  width: 2.55rem; height: 2.55rem; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper); border-radius: .72rem; cursor: pointer;
}
.icon-btn:hover, .menu-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.icon-btn svg, .menu-btn svg { width: 1.08rem; height: 1.08rem; }
.menu-btn { display: none; }
.lang-btn { width: auto; padding-inline: .72rem; font-weight: 850; font-size: .76rem; }
.nav-cta { padding: .7rem .95rem !important; }

/* Buttons */
.btn {
  min-height: 2.9rem; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: .72rem; padding: .72rem 1rem;
  background: var(--navy-900); color: #fff; font-size: .87rem; font-weight: 800; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--navy-800); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05rem; height: 1.05rem; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-strong); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--canvas-strong); border-color: var(--navy-100); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-small { min-height: 2.45rem; padding: .54rem .78rem; font-size: .78rem; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .56; cursor: not-allowed; transform: none; box-shadow: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .45rem; color: var(--navy-700); font-weight: 850; font-size: .88rem; }
[data-theme="dark"] .link-arrow { color: #cbdbee; }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
[dir="rtl"] .link-arrow::after { content: "←"; }
.link-arrow:hover::after { transform: translateX(.22rem); }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-.22rem); }

/* Hero */
.hero { min-height: calc(100svh - var(--header)); display: grid; align-items: center; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -12rem; top: 12%; width: 32rem; height: 32rem; border: 1px solid var(--line);
  border-radius: 50%; opacity: .45; pointer-events: none;
}
[dir="rtl"] .hero::after { right: auto; left: -12rem; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: 3rem; }
.hero-copy { display: grid; gap: 1.35rem; }
.hero h1 span { display: block; }
.hero h1 .given { color: var(--navy-700); }
[data-theme="dark"] .hero h1 .given { color: #d9e7f5; }
.hero-title { color: var(--navy-700); font-size: clamp(1rem, 2.4vw, 1.32rem); font-weight: 750; }
[data-theme="dark"] .hero-title { color: #c3d2e1; }
.hero-manifesto {
  max-width: 710px; padding-inline-start: 1rem; border-inline-start: 3px solid var(--gold);
  color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 650;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .68rem; }
.skill-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.tag {
  display: inline-flex; align-items: center; gap: .38rem; padding: .36rem .68rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted);
  font-size: .75rem; font-weight: 750;
}
.tag::before { content: ""; width: .3rem; height: .3rem; border-radius: 50%; background: var(--gold); }
.portrait-wrap { position: relative; width: min(100%, 390px); justify-self: end; }
.portrait-card {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; padding: 1.1rem;
  border: 1px solid var(--line); border-radius: 1.8rem; background: var(--paper); box-shadow: var(--shadow-md);
}
.portrait-card::before { content: ""; position: absolute; inset: .55rem; border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); border-radius: 1.4rem; pointer-events: none; }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; border-radius: 1.1rem; background: var(--navy-900); }
.portrait-note {
  position: absolute; inset-inline-start: -1.2rem; bottom: 2.2rem; width: min(250px, 78%);
  padding: .8rem .9rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--paper); box-shadow: var(--shadow-sm);
}
.portrait-note strong { display: block; font-size: .82rem; }
.portrait-note span { display: block; margin-top: .16rem; color: var(--muted); font-size: .72rem; }

/* Cards & layouts */
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); box-shadow: var(--shadow-md); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.icon-box {
  width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: .8rem;
  background: var(--gold-soft); color: var(--gold-strong); border: 1px solid color-mix(in srgb, var(--gold) 20%, transparent);
}
.icon-box svg { width: 1.25rem; height: 1.25rem; }
.proof-card { display: grid; gap: .9rem; min-height: 180px; }
.proof-card p { color: var(--muted); font-size: .9rem; }
.proof-card .evidence { margin-top: auto; font-weight: 850; color: var(--navy-700); font-size: .78rem; }
[data-theme="dark"] .proof-card .evidence { color: #c8daed; }

.roadmap-card { overflow: hidden; padding: 0; }
.roadmap-visual {
  min-height: 190px; display: grid; place-items: center; padding: 1.2rem; background: var(--navy-900); color: #fff;
  border-bottom: 3px solid var(--gold);
}
.roadmap-visual .mock-sheet { width: 82%; display: grid; gap: .55rem; }
.mock-line { height: .55rem; border-radius: 99px; background: rgba(255,255,255,.15); }
.mock-line.gold-line { width: 58%; background: var(--gold); }
.mock-bars { height: 76px; display: flex; align-items: end; gap: .5rem; }
.mock-bars i { flex: 1; background: rgba(255,255,255,.2); border-radius: .25rem .25rem 0 0; }
.mock-bars i:nth-child(1) { height: 42%; }.mock-bars i:nth-child(2) { height: 76%; }.mock-bars i:nth-child(3) { height: 57%; }.mock-bars i:nth-child(4) { height: 90%; }.mock-bars i:nth-child(5) { height: 66%; background: var(--gold); }
.roadmap-body { display: grid; gap: .65rem; padding: 1.2rem; }
.status-label { display: inline-flex; width: fit-content; padding: .3rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.status-label.draft { background: var(--gold-soft); color: var(--gold-strong); }
.status-label.completed { background: var(--green-soft); color: var(--green); }
.status-label.current { background: var(--blue-soft); color: var(--navy-700); }
.status-label.planned { background: var(--canvas-strong); color: var(--planned); }

.recruiter-panel {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.2rem, 4vw, 3rem);
  padding: clamp(1.35rem, 4vw, 2.7rem); border: 1px solid #28415e; border-radius: var(--radius-lg);
  background: var(--navy-900); color: #fff; box-shadow: var(--shadow-md);
}
.recruiter-panel h2 { max-width: 13ch; }
.recruiter-panel .lead { color: #bdc9d7; }
.snapshot-list { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.snapshot-item { padding: .85rem; border: 1px solid #2b425d; border-radius: .78rem; background: rgba(255,255,255,.035); }
.snapshot-item small { display: block; color: #91a1b4; font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.snapshot-item strong { display: block; margin-top: .25rem; font-size: .86rem; }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.process-step { position: relative; padding: 1.2rem; border-top: 1px solid var(--line); }
.process-step::before { counter-increment: step; content: "0" counter(step); display: block; margin-bottom: 1rem; color: var(--gold-strong); font-weight: 900; font-size: .78rem; }
.process-step::after { content: ""; position: absolute; top: -4px; inset-inline-start: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.process-step p { margin-top: .55rem; color: var(--muted); font-size: .85rem; }

/* Page hero */
.page-hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(2.7rem, 5vw, 4.5rem); border-bottom: 1px solid var(--line); background: var(--paper); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; }
.page-hero h1 { max-width: 13ch; font-size: clamp(2.6rem, 7vw, 5rem); }
.page-hero .lead { margin-top: 1rem; }
.page-index { color: var(--gold-strong); font-weight: 900; font-size: clamp(3rem, 8vw, 6rem); opacity: .22; line-height: 1; }
.breadcrumb { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; color: var(--muted); font-size: .78rem; font-weight: 750; }
.breadcrumb span[aria-current] { color: var(--ink); }

/* About */
.story-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.story-aside { position: sticky; top: calc(var(--header) + 2rem); }
.story-quote { padding: 1.4rem; border-inline-start: 3px solid var(--gold); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.15rem; font-weight: 750; }
[dir="rtl"] .story-quote { border-radius: var(--radius) 0 0 var(--radius); }
.story-copy { display: grid; gap: 1.2rem; font-size: 1.07rem; }
.story-copy p { color: var(--muted); }
.value-card { min-height: 190px; display: grid; align-content: space-between; gap: 1rem; }
.value-card .number { color: var(--gold-strong); font-weight: 900; font-size: .75rem; }

/* Projects */
.project-tools { display: flex; flex-wrap: wrap; gap: .45rem; }
.toolbar {
  position: sticky; top: calc(var(--header) + .75rem); z-index: 20; display: grid; gap: .85rem;
  padding: 1rem; margin-bottom: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px);
}
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 1.05rem; color: var(--muted); }
[dir="rtl"] .search-wrap svg { left: auto; right: .9rem; }
.search-input { width: 100%; min-height: 3rem; padding: .7rem .9rem .7rem 2.65rem; border: 1px solid var(--line); border-radius: .72rem; background: var(--canvas); color: var(--ink); }
[dir="rtl"] .search-input { padding: .7rem 2.65rem .7rem .9rem; }
.search-input:focus { border-color: var(--gold); outline: 3px solid color-mix(in srgb, var(--gold) 18%, transparent); }
.filters { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.filter-btn { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); padding: .47rem .73rem; color: var(--muted); font-size: .73rem; font-weight: 800; cursor: pointer; }
.filter-btn:hover, .filter-btn.active { border-color: var(--navy-700); background: var(--navy-900); color: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-card { overflow: hidden; padding: 0; }
.project-thumb { aspect-ratio: 16 / 10; background: var(--navy-900); object-fit: cover; }
.project-card-body { display: grid; gap: .7rem; padding: 1.2rem; }
.project-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .72rem; font-weight: 750; }
.empty-state { grid-column: 1 / -1; padding: clamp(2rem, 6vw, 4.5rem); border: 1px dashed var(--line); border-radius: var(--radius-lg); text-align: center; background: var(--paper); }
.empty-state .icon-box { margin: 0 auto 1rem; }
.empty-state p { max-width: 55ch; margin: .75rem auto 1.3rem; color: var(--muted); }
.results-count { color: var(--muted); font-size: .8rem; font-weight: 750; }

/* Skills */
.skill-feature { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.skill-feature p { margin-top: .45rem; color: var(--muted); font-size: .9rem; }
.evidence-matrix { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { background: var(--canvas-strong); color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
.evidence-state { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 700; }
.evidence-state::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--planned); }
.domain-card { display: grid; gap: .85rem; min-height: 175px; }
.domain-card footer { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.workflow { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.workflow-step { position: relative; padding: 1rem; border: 1px solid #2b425d; border-radius: .8rem; background: rgba(255,255,255,.035); }
.workflow-step:not(:last-child)::after { content: "→"; position: absolute; right: -.65rem; top: 50%; color: var(--gold); font-weight: 900; transform: translateY(-50%); }
[dir="rtl"] .workflow-step:not(:last-child)::after { content: "←"; right: auto; left: -.65rem; }
.workflow-step small { display: block; margin-bottom: .35rem; color: #91a1b4; font-size: .65rem; text-transform: uppercase; letter-spacing: .07em; }
.workflow-step strong { font-size: .82rem; }
.current-learning { border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); background: var(--gold-soft); }

/* Timeline */
.timeline { position: relative; display: grid; gap: .2rem; max-width: 850px; }
.timeline::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: 1rem; width: 2px; background: var(--line); }
[dir="rtl"] .timeline::before { left: auto; right: 1rem; }
.timeline-item { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: 1rem; padding: .7rem 0; }
.timeline-dot { position: relative; z-index: 2; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: var(--canvas); }
.timeline-dot::after { content: ""; width: .52rem; height: .52rem; border-radius: 50%; background: var(--planned); }
.timeline-item.completed .timeline-dot { border-color: var(--green); }.timeline-item.completed .timeline-dot::after { background: var(--green); }
.timeline-item.current .timeline-dot { border-color: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }.timeline-item.current .timeline-dot::after { background: var(--gold); }
.timeline-content { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--paper); }
.timeline-content header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.timeline-content p { margin-top: .45rem; color: var(--muted); font-size: .84rem; }

/* Experience and certifications */
.experience-list { display: grid; gap: 1rem; }
.experience-card { display: grid; grid-template-columns: minmax(180px, .35fr) 1fr; gap: 1.5rem; }
.experience-meta { padding-inline-end: 1.5rem; border-inline-end: 1px solid var(--line); }
.experience-meta p { margin-top: .45rem; color: var(--muted); font-size: .78rem; }
.experience-body { display: grid; gap: .85rem; }
.transfer-title { color: var(--gold-strong); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.experience-highlights { display: grid; gap: .5rem; margin-top: .65rem; padding-inline-start: 1.15rem; color: var(--muted); font-size: .88rem; }
.experience-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: .25rem; }
.experience-evidence, .cert-image-button, .project-gallery-button { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: .75rem; background: var(--canvas-strong); cursor: zoom-in; }
.experience-evidence { min-height: 190px; }
.experience-evidence img { width: 100%; height: 100%; max-height: 320px; object-fit: contain; }
.project-gallery-button { padding: .5rem; }
.project-gallery-button img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #0b1b31; border-radius: .5rem; }
.cert-card { display: grid; grid-template-rows: 185px 1fr; overflow: hidden; padding: 0; }
.cert-visual { display: grid; place-items: center; background: var(--canvas-strong); border-bottom: 1px solid var(--line); }
.cert-image-button { width: 100%; height: 100%; border: 0; border-radius: 0; }
.cert-image-button img { width: 100%; height: 100%; object-fit: contain; }
.cert-paper { width: 72%; height: 68%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); color: var(--gold-strong); box-shadow: 0 8px 22px rgba(7,20,38,.08); font-size: 2rem; font-weight: 900; }
.cert-body { display: grid; gap: .6rem; padding: 1.1rem; }
.cert-body .org { color: var(--muted); font-size: .8rem; font-weight: 750; }
.cert-actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .4rem; }

/* Resume */
.resume-sheet { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.resume-head { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: clamp(1.5rem, 5vw, 3rem); background: var(--navy-900); color: #fff; border-bottom: 4px solid var(--gold); }
.resume-head h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.resume-head p { margin-top: .65rem; color: #bdc9d7; }
.resume-section { padding: 1.5rem clamp(1.3rem, 5vw, 3rem); border-bottom: 1px solid var(--line); }
.resume-section:last-child { border-bottom: 0; }
.resume-section h2 { margin-bottom: 1rem; color: var(--gold-strong); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.resume-entry { display: grid; gap: .4rem; }
.resume-entry + .resume-entry { padding-top: 1rem; border-top: 1px solid var(--line); }
.resume-entry p, .resume-entry li { font-size: .84rem; }
.resume-entry ul { display: grid; gap: .35rem; padding-inline-start: 1.1rem; color: var(--muted); }
.resume-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.placeholder { color: var(--danger); font-weight: 800; }

/* Forms */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 5vw, 4rem); }
.contact-methods { display: grid; gap: .75rem; }
.contact-card { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; }
.contact-card small { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.contact-card strong { display: block; margin-top: .15rem; font-size: .87rem; word-break: break-word; }
.form-card { padding: clamp(1.2rem, 4vw, 2rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .38rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .76rem; font-weight: 850; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: .68rem; background: var(--canvas); color: var(--ink); padding: .78rem .85rem;
}
.field textarea { min-height: 155px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); outline: 3px solid color-mix(in srgb, var(--gold) 18%, transparent); }
.field-hint { color: var(--muted); font-size: .7rem; }
.form-status { min-height: 1.5rem; color: var(--muted); font-size: .8rem; font-weight: 750; }
.form-status.success { color: var(--green); }.form-status.error { color: var(--danger); }

/* Knowledge / now */
.now-card { min-height: 220px; display: grid; align-content: space-between; }
.now-card .type { color: var(--gold-strong); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.article-card { display: grid; gap: .8rem; min-height: 180px; }
.article-card footer { margin-top: auto; color: var(--muted); font-size: .76rem; }

/* Utilities */
.notice { padding: 1rem; border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: .7rem; background: var(--paper); color: var(--muted); font-size: .86rem; }
.divider { height: 1px; background: var(--line); }
.back-to-top {
  position: fixed; z-index: 900; right: 1rem; bottom: 1rem; width: 2.8rem; height: 2.8rem; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); box-shadow: var(--shadow-sm); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(.8rem); transition: .25s var(--ease);
}
[dir="rtl"] .back-to-top { right: auto; left: 1rem; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.toast { position: fixed; z-index: 2000; left: 50%; bottom: 1.2rem; transform: translate(-50%, 1rem); padding: .75rem 1rem; border-radius: .7rem; background: var(--navy-950); color: #fff; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: .25s var(--ease); font-size: .8rem; font-weight: 750; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.lightbox { position: fixed; inset: 0; z-index: 3000; display: none; place-items: center; padding: 1rem; background: rgba(2,8,16,.88); }
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; border-radius: .7rem; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: #fff; color: #071426; }

/* Footer */
.site-footer { padding: 3rem 0 1.2rem; background: var(--navy-950); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding-bottom: 2rem; }
.footer-brand p { margin-top: .55rem; color: #aab7c6; font-size: .86rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: start; justify-content: end; }
.footer-link { padding: .5rem .7rem; border: 1px solid #29415d; border-radius: .55rem; color: #c6d0db; font-size: .76rem; font-weight: 750; }
.footer-link:hover { border-color: var(--gold); color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid #213650; color: #8191a4; font-size: .72rem; }

@media (max-width: 1080px) {
  .site-nav { position: fixed; inset: var(--header) 0 0; display: none; align-content: start; padding: 1rem; background: var(--canvas); overflow-y: auto; }
  .site-nav.open { display: grid; }
  .nav-link { padding: .9rem; font-size: .95rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-link[aria-current="page"]::after { display: none; }
  .menu-btn { display: grid; }
  .nav-cta { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .project-grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow { grid-template-columns: repeat(3, 1fr); }
  .workflow-step::after { display: none; }
}

@media (max-width: 760px) {
  :root { --header: 66px; }
  .container, .narrow { width: min(calc(100% - 1.25rem), var(--max)); }
  .brand-text small { display: none; }
  .nav-actions { gap: .28rem; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 2.4rem 4rem; }
  .hero h1 { font-size: clamp(2.75rem, 16vw, 4.6rem); }
  .portrait-wrap { justify-self: center; width: min(86%, 340px); order: -1; }
  .portrait-card { aspect-ratio: 1 / 1.08; }
  .portrait-note { inset-inline-start: -.5rem; bottom: 1rem; }
  .hero-actions .btn { flex: 1 1 calc(50% - .5rem); }
  .section-head.split, .page-hero-grid, .story-grid, .recruiter-panel, .contact-grid, .resume-head { grid-template-columns: 1fr; }
  .page-index { display: none; }
  .story-aside { position: static; }
  .grid-2, .grid-3, .grid-4, .project-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .snapshot-list { grid-template-columns: 1fr; }
  .recruiter-panel h2 { max-width: none; }
  .workflow { grid-template-columns: 1fr 1fr; }
  .experience-card { grid-template-columns: 1fr; }
  .experience-meta { padding-inline-end: 0; padding-bottom: 1rem; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .experience-gallery { grid-template-columns: 1fr; }
  .resume-columns, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .toolbar { top: calc(var(--header) + .35rem); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: start; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 430px) {
  .lang-btn { padding-inline: .55rem; }
  .icon-btn, .menu-btn { width: 2.35rem; height: 2.35rem; }
  .process, .workflow { grid-template-columns: 1fr; }
  .hero-actions .btn { flex-basis: 100%; }
  .contact-card { grid-template-columns: auto 1fr; }
  .contact-card .btn { grid-column: 1 / -1; }
}

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

@media print {
  .site-header, .site-footer, .back-to-top, .scroll-progress, .resume-actions, .skip-link { display: none !important; }
  body { background: #fff; color: #111; }
  .section { padding: 0; }
  .resume-sheet { border: 0; box-shadow: none; }
  .resume-head { background: #0b1b31 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
