/* 1. TOKENS — desert night; legacy aliases preserve the existing components. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* Thedus by Colin Philippe-Jan: local files keep display typography independent of a CDN. */
@font-face{font-family:'Thedus Wide';src:url('../assets/fonts/thedus-wide.otf') format('opentype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'Thedus Condensed';src:url('../assets/fonts/thedus-condensed.otf') format('opentype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'Floane';src:url('../assets/fonts/Floane-Regular.otf') format('opentype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'Chewy';src:url('../assets/fonts/Chewy-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
:root{
  --bg:#0E0D0B;--surface:#16140F;--text:#EDE6D8;--muted:#9A9183;
  --accent:#C9A227;--gold:#C9A227;--line:rgba(201,162,39,.05);
  --ink:var(--text);--raise:#201D16;--faint:rgba(201,162,39,.20);
  --accent-text:#C9A227;--accent-ink:#0E0D0B;--gold-ink:#C9A227;
  --name-base:#EDE6D8;--name-highlight:#F0CF6D;--name-deep:#C9A227;
  --control-line:#827B6F;--sun:rgba(214,140,60,.12);--logo-filter:invert(1);
  --font-editorial:'Floane','Georgia',serif;
  --font-handdrawn:'Chewy','Inter','Segoe UI',sans-serif;
  --font-geometric:'Thedus Condensed','Inter','Segoe UI',sans-serif;
  --font-geometric-wide:'Thedus Wide','Inter','Segoe UI',sans-serif;
  /* Select the free hand-drawn face; Floane and Thedus remain available here. */
  --display:var(--font-handdrawn);--display-wide:var(--font-handdrawn);
  --body:'Inter','Segoe UI',sans-serif;
  --grid-step:48px;
  --edge:rgba(237,230,216,.12);--sheen:rgba(255,255,255,.035);
  --elevation:0 2px 4px rgba(0,0,0,.12),0 16px 36px -24px rgba(0,0,0,.6);
  --elevation-hover:0 4px 8px rgba(0,0,0,.14),0 22px 44px -24px rgba(0,0,0,.7);
  --portrait-shadow:0 6px 14px -8px rgba(0,0,0,.4),0 32px 64px -28px rgba(0,0,0,.65);
  color-scheme:dark;
}
/* 2. DARK/LIGHT — both explicit toggle and no-JS system preference. */
@media(prefers-color-scheme:light){:root:not([data-theme='dark']){
  --bg:#FFFFFF;--surface:#FFFFFF;--text:#1C1A16;--muted:#6B6355;
  --accent:#A8841C;--gold:#A8841C;--line:rgba(120,90,30,.07);
  --raise:#EEE6D7;--faint:rgba(120,90,30,.20);--accent-text:#725914;
  --accent-ink:#0E0D0B;--gold-ink:#725914;--control-line:#827B6F;
  --name-base:#1C1A16;--name-highlight:#A8841C;--name-deep:#725914;
  --sun:rgba(214,140,60,.025);--logo-filter:none;color-scheme:light;
  --edge:rgba(28,26,22,.12);--sheen:rgba(28,26,22,.018);
  --elevation:0 1px 2px rgba(28,26,22,.035),0 12px 32px -20px rgba(28,26,22,.14);
  --elevation-hover:0 3px 6px rgba(28,26,22,.04),0 20px 40px -22px rgba(28,26,22,.22);
  --portrait-shadow:0 4px 12px -6px rgba(28,26,22,.12),0 32px 64px -30px rgba(28,26,22,.24);
}}
:root[data-theme='light']{
  --bg:#FFFFFF;--surface:#FFFFFF;--text:#1C1A16;--muted:#6B6355;
  --accent:#A8841C;--gold:#A8841C;--line:rgba(120,90,30,.07);
  --raise:#EEE6D7;--faint:rgba(120,90,30,.20);--accent-text:#725914;
  --accent-ink:#0E0D0B;--gold-ink:#725914;--control-line:#827B6F;
  --name-base:#1C1A16;--name-highlight:#A8841C;--name-deep:#725914;
  --sun:rgba(214,140,60,.025);--logo-filter:none;color-scheme:light;
  --edge:rgba(28,26,22,.12);--sheen:rgba(28,26,22,.018);
  --elevation:0 1px 2px rgba(28,26,22,.035),0 12px 32px -20px rgba(28,26,22,.14);
  --elevation-hover:0 3px 6px rgba(28,26,22,.04),0 20px 40px -22px rgba(28,26,22,.22);
  --portrait-shadow:0 4px 12px -6px rgba(28,26,22,.12),0 32px 64px -30px rgba(28,26,22,.24);
}
/* 3. BASE — 16px gutters on phones; content never relies on clipping. */
body{background:var(--bg);background-image:none;color:var(--text);font:400 1rem/1.75 var(--body);isolation:isolate}
.shell{width:100%;max-width:1180px;padding-inline:16px}
img,svg{max-width:100%}
a{color:var(--accent-text)}
h1,h2,h3,h4{font-family:var(--body);font-stretch:normal;font-synthesis:none;letter-spacing:-.015em}
h1{font-family:var(--display-wide);font-size:clamp(3.4rem,8.2vw,6.2rem);line-height:1.08;font-weight:400;text-transform:none;margin:0}
.hero h1{text-transform:uppercase;letter-spacing:.01em}
h1 .thin{color:var(--text);font-weight:400}
/* Colour bands live inside the real text; layout and accessible name stay intact. */
@supports (background-clip:text) or (-webkit-background-clip:text){
  .hero h1,.hero h1 .thin{
    background-image:repeating-linear-gradient(112deg,var(--name-base) 0 .35em,var(--name-base) .5em,var(--name-highlight) .85em,var(--name-deep) 1.15em,var(--name-base) 1.55em,var(--name-base) 1.85em);
    background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;
  }
  .hero h1::selection,.hero h1 .thin::selection{background:var(--gold);color:#0E0D0B;-webkit-text-fill-color:#0E0D0B}
}
@media(forced-colors:active){.hero h1,.hero h1 .thin{background-image:none;color:CanvasText;-webkit-text-fill-color:CanvasText}}
h2,.rail h2{font-size:clamp(1.6rem,2.5vw,2rem);font-weight:600;line-height:1.25;text-transform:none}
.job h3,.edu h3,.certificate-card h3{font-family:var(--body);font-size:1.15rem;line-height:1.45;font-weight:600;letter-spacing:-.02em}
.card h3{font-family:var(--body);font-size:1.35rem;line-height:1.4;font-weight:600}
.why-item h4{font-family:var(--body);font-size:1.2rem;font-weight:600}
.sub{font-family:var(--body);font-weight:600;letter-spacing:.02em;text-transform:none}
.nick{font-family:var(--display-wide);font-size:clamp(1.6rem,2.6vw,2rem);font-weight:400;letter-spacing:0}
.label,.idx,.why-k{line-height:1.5;letter-spacing:.1em}
.lede{font-size:1rem;line-height:1.8;max-width:48ch}
.about-quote{font-family:var(--body);font-size:clamp(1.5rem,3vw,2.2rem);font-weight:500;line-height:1.4;letter-spacing:-.025em}
::selection{background:var(--gold);color:#0E0D0B}
:focus-visible{outline:2px solid var(--accent-text);outline-offset:4px}
/* 4. BACKGROUND — running-bond brick lines; courses stay on --grid-step so dividers still snap. */
.desert-grid{position:absolute;inset:0;z-index:-2;pointer-events:none;background-color:var(--grid);
  --brick:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath fill='%23000' d='M0 0h96v1H0zM0 48h96v1H0zM0 0h1v48H0zM48 48h1v48h-1z'/%3E%3C/svg%3E");
  -webkit-mask:var(--brick) 0 0/calc(var(--grid-step)*2) calc(var(--grid-step)*2) repeat;
  mask:var(--brick) 0 0/calc(var(--grid-step)*2) calc(var(--grid-step)*2) repeat}
body{position:relative}
.sand-grain{position:fixed;inset:0;pointer-events:none;z-index:15;opacity:.022;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23808080' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
.hero{grid-template-columns:minmax(0,1fr);padding-block:48px 64px;gap:36px}
.hero::before{content:'';position:absolute;z-index:0;right:0;top:0;width:min(100%,650px);height:650px;max-height:100%;pointer-events:none;background:radial-gradient(ellipse at 65% 40%,var(--sun),transparent 68%)}
.hero-portrait{max-width:430px;justify-self:center;order:-1}
.portrait-frame{border-radius:18px;border-color:var(--edge);box-shadow:var(--portrait-shadow)}
.portrait-frame img{aspect-ratio:4/5;object-position:50% 24%}
.portrait-caption{font-family:var(--body);letter-spacing:.02em}
/* 5. COMPONENTS — cartouche, stepped stats, cards and controls. */
.nav{background:color-mix(in srgb,var(--bg) 90%,transparent);border-bottom-color:var(--edge);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.nav .shell{flex-wrap:wrap;gap:12px;padding-block:14px}
.nav .brand{position:relative;justify-content:center;width:44px;height:44px;padding:6px;color:var(--text)}
.nav .brand svg{width:30px;height:30px}
.brand span{font-family:var(--body);font-size:.8rem;font-weight:600;letter-spacing:.03em;text-transform:none}
.links{order:3;flex-basis:100%;justify-content:space-between;gap:8px}
.links li{flex:1;min-width:0}
.links li:not(:last-child){display:list-item}
.links a{color:var(--accent-text);font-size:.84rem;font-weight:600;letter-spacing:.06em;min-height:44px;padding:6px;display:flex;align-items:center;justify-content:center;border-radius:8px;transition:color .2s ease,background-color .2s ease}
.links a:hover,.links a:focus-visible{color:var(--accent-text);background:color-mix(in srgb,var(--accent) 6%,transparent)}
.links a::after{background:var(--accent);left:6px;right:6px;bottom:4px}
#theme-toggle{padding:12px 16px;min-height:44px;font-size:.8rem;letter-spacing:0;margin-left:auto}
.theme-icon{display:block;width:18px;height:18px;flex:0 0 18px}
.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0}
.metric,.metric:first-child,.metric:nth-child(3){border:1px solid var(--edge);border-radius:16px;background:var(--surface);padding:24px 20px;justify-content:flex-start}
.metric:nth-child(n+3){border-top:1px solid var(--edge)}
.metric b{font-family:var(--display-wide);font-weight:400;font-synthesis:none;font-size:3.4rem;color:var(--gold);line-height:1.2}
.metric b sup{color:var(--gold-ink);font-size:.55em}
.metric > span{font-size:.8rem;color:var(--muted)}
.sec{position:relative;grid-template-columns:minmax(0,1fr);gap:24px;padding-block:56px;border-bottom:0}
.sec::before{content:'';position:absolute;left:5%;right:5%;bottom:var(--divider-offset,0px);height:1px;pointer-events:none;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--gold) 30%,transparent) 25%,color-mix(in srgb,var(--gold) 30%,transparent) calc(50% - 28px),transparent calc(50% - 28px),transparent calc(50% + 28px),color-mix(in srgb,var(--gold) 30%,transparent) calc(50% + 28px),color-mix(in srgb,var(--gold) 30%,transparent) 75%,transparent)}
.sec::after{content:'';position:absolute;bottom:calc(var(--divider-offset,0px) - 14px);left:calc(50% - 24px);width:48px;height:30px;background:var(--gold);opacity:.7;pointer-events:none;mask:url('../assets/decor/lotus-divider.svg') center/contain no-repeat;-webkit-mask:url('../assets/decor/lotus-divider.svg') center/contain no-repeat}
.rail{position:static;gap:10px}
.rail .idx{display:none}
.rail h2{margin:0;font-family:var(--body);font-size:1.75rem;font-weight:600;line-height:1.5;letter-spacing:-.02em;color:var(--muted);text-wrap:balance}
.jobs{gap:22px}
.job,.job:first-child{padding:24px 20px;border:1px solid var(--edge);background:var(--surface);border-radius:16px;gap:10px 16px}
.job .title,.skill .label,.card .label,.sub,.about-quote em,.nick,.certs li.top span:last-child{color:var(--accent-text)}
.job .when{font-size:.7rem}
.job li{font-size:.94rem}
.skillgrid,.why,.beyond{grid-template-columns:minmax(0,1fr);gap:20px}
.skill,.why-item,.card,.edu,.certificate-card,.vault-panel{border:1px solid var(--edge);background:var(--surface);border-radius:16px}
/* A quiet satin finish: no card images, filters or continuously running effects. */
:is(.metric,.job,.skill,.why-item,.card,.edu,.certificate-card,.vault-panel){background-image:linear-gradient(135deg,var(--sheen),transparent 55%);box-shadow:inset 0 1px 0 var(--sheen),var(--elevation)}
.skill,.why-item,.card{padding:24px;gap:14px}
.card:hover{transform:none;border-color:var(--edge)}
:is(.job,.skill,.why-item,.card,.edu,.certificate-card){transition:border-color .2s,box-shadow .2s,transform .2s}
:is(.skill,.why-item,.card,.edu,.row,.certificate-card,.portrait-frame)::after{background:radial-gradient(360px circle at var(--glow-x,50%) var(--glow-y,50%),color-mix(in srgb,var(--gold) 5%,transparent),transparent 75%)}
.chips,.tags{gap:8px}
.chip,.tag{border-radius:999px;color:var(--accent-text);border:1px solid color-mix(in srgb,var(--accent) 18%,transparent);background:color-mix(in srgb,var(--accent) 3%,var(--surface));font-family:var(--body);line-height:1.4;max-width:100%;overflow-wrap:anywhere}
.skill:hover .chip{background:color-mix(in srgb,var(--accent) 3%,var(--surface))}
.btn{color:var(--accent-text);background:transparent;border:1px solid var(--accent);padding:13px 18px;min-height:44px;font-family:var(--body);font-weight:600;font-size:.8rem;letter-spacing:0;line-height:1.3;justify-content:center}
.btn{transition:box-shadow .2s ease,border-color .2s ease,transform .2s ease}
.btn.primary{background:var(--accent);background-image:linear-gradient(180deg,rgba(255,255,255,.06),transparent);border-color:var(--accent);color:var(--accent-ink);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 4px 12px -6px color-mix(in srgb,var(--accent) 35%,transparent)}
.btn:hover{border-color:var(--accent);transform:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 8%,transparent),var(--elevation)}
.btn-arrow{display:inline-block;transition:translate .2s ease}
.btn:hover .btn-arrow{translate:3px 0}
.cta{gap:10px}
.edu{grid-template-columns:minmax(0,1fr);gap:10px;padding:24px}
.edu .when{grid-column:1;grid-row:auto}
.certs{grid-template-columns:minmax(0,1fr)}
.certs li{align-items:flex-start;flex-wrap:wrap;gap:6px}
.certs li span:first-child{flex:1 1 190px;min-width:0}
.certs li span:last-child{white-space:normal;line-height:1.5}
.certificate-card img{background:var(--raise)}
.certificate-preview{overflow:hidden;border:1px solid var(--edge);border-radius:10px}
.certificate-preview img,.certificate-preview .certificate-pdf{border-radius:0}
.certificate-card{display:flex;flex-direction:column;align-items:stretch}
.certificate-card .vault-actions{margin-top:auto;padding-top:8px}
.certificate-design-preview{background:#fff}
.certificate-design-preview img{display:block;width:100%;height:auto;object-fit:contain;background:#fff}
.certificate-card .vault-actions .btn{padding:11px 14px}
.certificate-preview .certificate-pdf{color:var(--accent-text)}
/* Logo card: the three pyramids of Giza with the logo as the fourth; tones follow the theme. */
.logo-story{isolation:isolate}
.logo-story > :not(.giza-bg){position:relative;z-index:1}
.giza-bg{position:absolute;right:0;bottom:0;z-index:0;width:72%;height:100%;pointer-events:none;
  mask-image:linear-gradient(90deg,transparent,#000 35%);-webkit-mask-image:linear-gradient(90deg,transparent,#000 35%)}
.giza-lit{fill:color-mix(in srgb,var(--text) 11%,var(--surface))}
.giza-shade{fill:color-mix(in srgb,var(--text) 6%,var(--surface))}
.giza-fourth{fill:none;stroke:color-mix(in srgb,var(--text) 11%,var(--surface));stroke-width:30;stroke-linecap:round;stroke-linejoin:round}
/* The fourth pyramid draws itself once the card scrolls in, then warms to a faint gold. */
@media(prefers-reduced-motion:no-preference){
  .motion-ready .logo-story.reveal .giza-fourth{stroke-dasharray:1;stroke-dashoffset:1}
  .motion-ready .logo-story.reveal.is-visible .giza-fourth{animation:fourth-draw 2.4s cubic-bezier(.45,0,.2,1) .5s forwards,fourth-glow 1.2s ease 2.9s forwards}
  @keyframes fourth-draw{to{stroke-dashoffset:0}}
  @keyframes fourth-glow{to{stroke:color-mix(in srgb,var(--gold) 45%,var(--surface))}}
}
/* Phones: the scene sits below the text instead of behind it. */
@media(max-width:620px){.logo-story{padding-bottom:170px}.giza-bg{width:100%;height:170px;mask-image:none;-webkit-mask-image:none}}
.logo-story-frame{background:var(--raise);background-image:linear-gradient(135deg,var(--sheen),transparent);border-color:var(--edge);border-radius:14px;box-shadow:inset 0 1px 0 var(--sheen)}
.rows{grid-template-columns:minmax(0,1fr);border-radius:16px;border-color:var(--edge);background:var(--edge);box-shadow:var(--elevation)}
.row{padding:24px;background-image:linear-gradient(135deg,var(--sheen),transparent 55%);gap:14px}
.row a{text-decoration-thickness:1px;text-underline-offset:4px}
.row .line{flex-wrap:wrap;gap:10px}
.row .v{min-width:0;font-family:var(--body);font-size:.95rem}
#contact-linkedin .v{color:var(--accent-text)}
@media(min-width:621px){.contact .rows{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:821px){.contact .rows{grid-template-columns:repeat(2,minmax(0,1fr))}}
.copy{border-color:var(--control-line);color:var(--muted);min-height:36px}
.contact{position:relative;isolation:isolate;padding-block:72px;gap:24px}
.contact h2{font-size:clamp(2.3rem,6vw,4.8rem);font-weight:400;line-height:1.2}
.contact h2 span{font-weight:400}
.mashrabiya{position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.03;stroke:var(--text);fill:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23808080' stroke-width='1'%3E%3Cpath d='M48 0 96 48 48 96 0 48Z M14 14h68v68H14Z M48 14 58 38 82 48 58 58 48 82 38 58 14 48 38 38Z'/%3E%3C/g%3E%3C/svg%3E");mask-image:linear-gradient(transparent,#000 20%,#000 80%,transparent)}
footer{position:relative;gap:18px;padding-top:56px;border-top:0}
footer .brand{color:var(--text);gap:8px;max-width:100%}
footer .brand span{font-size:.75rem;overflow-wrap:anywhere}
.scroll-pyramid{position:fixed;right:18px;bottom:20px;z-index:12;width:28px;height:28px;pointer-events:none;color:var(--accent)}
.scroll-pyramid .pyramid-outline{fill:var(--bg);stroke:var(--gold);stroke-width:1.2}
.scroll-pyramid .pyramid-fill{fill:var(--accent)}
.progress{display:none}
.fields input{border-color:var(--control-line)}
#message,#filename{color:var(--accent-text)}
/* 6. UTILITIES / RESPONSIVE / MOTION. */
/* Bento emphasis follows reading order and collapses to one column on phones. */
.metric b{font-variant-numeric:tabular-nums}
@media(min-width:621px){
  #skills .skillgrid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
  #skills .skill:nth-child(1),#skills .skill:nth-child(2),#skills .skill:nth-child(4),#skills .skill:nth-child(8){grid-column:span 2}
  #skills .skill:first-child{border-color:color-mix(in srgb,var(--accent) 40%,var(--edge));background-color:color-mix(in srgb,var(--accent) 5%,var(--surface))}
}
@media(prefers-reduced-motion:no-preference){
  .motion-ready .hero-portrait.reveal .portrait-frame,
  .motion-ready .certificate-card.reveal .certificate-preview{clip-path:inset(0 0 12% 0 round 10px);opacity:.35;transition:clip-path .65s cubic-bezier(.2,.7,.2,1),opacity .65s ease}
  .motion-ready .hero-portrait.reveal.is-visible .portrait-frame,
  .motion-ready .certificate-card.reveal.is-visible .certificate-preview,
  .motion-ready .reveal:focus-within .certificate-preview{clip-path:inset(0 round 10px);opacity:1}
}
@media(min-width:621px){.shell{padding-inline:32px}.skillgrid,.beyond{grid-template-columns:repeat(2,minmax(0,1fr))}.certs{grid-template-columns:repeat(2,minmax(0,1fr))}.edu{grid-template-columns:minmax(0,1fr) auto}.edu .when{grid-column:2;grid-row:1}}
@media(min-width:821px){.shell{padding-inline:48px}.nav .shell{flex-wrap:nowrap}.links{order:0;flex-basis:auto;justify-content:flex-start;gap:24px}.hero{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);padding-block:88px 96px;gap:56px}.hero-portrait{order:0;justify-self:end}.sec{grid-template-columns:minmax(0,240px) minmax(0,1fr);gap:48px;padding-block:80px}.rail{position:sticky;top:100px}.metrics{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}.metric{min-height:164px}.metric:nth-child(2){translate:0 -8px;min-height:172px}.metric:nth-child(3){translate:0 -16px;min-height:180px}.metric:nth-child(4){translate:0 -24px;min-height:188px}.why{grid-template-columns:repeat(3,minmax(0,1fr))}.rows{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:621px){.job,.job:first-child,.skill,.card,.edu{padding:28px}.portrait-caption{bottom:28px;left:28px;right:28px}}
@media(min-width:821px){.links{gap:16px}.links li{flex:0 0 auto}.links a{padding-inline:10px}}
@media(hover:hover) and (pointer:fine){:is(.job,.skill,.why-item,.card,.edu,.certificate-card):hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 55%,var(--edge));box-shadow:inset 0 1px 0 var(--sheen),var(--elevation-hover)}.portrait-frame:hover{border-color:var(--accent);box-shadow:var(--portrait-shadow)}}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.btn:hover{transform:translateY(-1px)}}
@media(max-width:400px){.scroll-pyramid{display:none}}
@media(prefers-reduced-motion:no-preference){.hero::before{animation:sun-breathe 8s ease-in-out infinite alternate}.motion-ready .reveal{translate:0 12px;transition:opacity .4s ease,translate .4s ease,border-color .2s,box-shadow .2s,transform .2s}.motion-ready .reveal.is-visible,.motion-ready .reveal:focus-within{translate:0 0}@keyframes sun-breathe{from{opacity:.8}to{opacity:1}}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.reveal{opacity:1!important;translate:none!important}.metric{translate:none!important}.btn-arrow{translate:none!important}}
/* One quiet statistics panel, with aligned values and consistent spacing. */
.metrics{gap:0;border:1px solid var(--edge);border-radius:20px;overflow:hidden;background:var(--surface);box-shadow:var(--elevation);align-items:stretch}
.metrics .metric{translate:none;min-height:0;padding:28px 24px;border:0;border-radius:0;box-shadow:none;background:none;gap:14px}
.metrics .metric + .metric{border-left:1px solid var(--edge)}
.metrics .metric b{display:block;white-space:nowrap;font-family:var(--body);font-size:clamp(2.4rem,4vw,3.5rem);font-weight:600;letter-spacing:-.055em;line-height:1.15}
.metrics .metric b sup{font-family:inherit;font-size:.5em;letter-spacing:-.02em;vertical-align:baseline;margin-left:3px}
.metrics .metric > span{max-width:25ch;font-size:.85rem;line-height:1.6}
@media(max-width:820px){
  .metrics .metric:nth-child(3){border-left:0}
  .metrics .metric:nth-child(n+3){border-top:1px solid var(--edge)}
}
@media(max-width:400px){.metrics .metric{padding:22px 16px}.metrics .metric > span{font-size:.78rem}}
/* Education: two focal credentials, followed by a compact learning collection. */
#education{grid-template-columns:minmax(0,1fr);gap:28px}
#education .rail{position:static}
#education .rail h2{font-family:var(--body);font-size:clamp(1.8rem,3.5vw,2.7rem);font-weight:600;letter-spacing:-.045em;color:var(--text);text-align:left}
.education-highlights{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
#education .degree-card,.diploma-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:18px;padding:30px;border:1px solid var(--edge);border-radius:20px;overflow:hidden;min-width:0}
#education .degree-card{background:var(--surface);justify-content:flex-end;min-height:270px}
.education-eyebrow{font-family:var(--mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;line-height:1.6;color:var(--muted)}
.degree-card .education-eyebrow{margin-bottom:auto}
.education-icon{position:absolute;right:28px;top:28px;width:64px;height:64px;color:var(--accent-text);opacity:.65}
#education .degree-card h3{font-size:clamp(1.6rem,3vw,2.25rem);letter-spacing:-.045em;line-height:1.2;margin:24px 0 0}
#education .degree-card p{font-size:1rem;line-height:1.6}
#education .degree-card .when{order:4;padding:7px 12px;border:1px solid var(--edge);border-radius:999px;font-size:.7rem;line-height:1.4}
.diploma-card{background:color-mix(in srgb,var(--gold) 9%,var(--surface));border-color:color-mix(in srgb,var(--gold) 35%,var(--edge));justify-content:space-between}
.diploma-card h3{font-family:var(--body);font-size:1.35rem;line-height:1.4;font-weight:600;margin:0;letter-spacing:-.025em}
.diploma-result{display:flex;align-items:center;gap:20px;width:100%;flex-wrap:wrap}
.diploma-result strong{font-family:var(--body);font-size:clamp(3.8rem,7vw,5.5rem);font-weight:600;letter-spacing:-.07em;line-height:1.1;color:var(--accent-text)}
.diploma-result strong span{font-size:.45em;letter-spacing:-.02em}
.diploma-result > span{font-family:var(--mono);font-size:.7rem;color:var(--muted)}
.grade-track{height:4px;width:100%;background:color-mix(in srgb,var(--gold) 18%,transparent);border-radius:8px;overflow:hidden}
.grade-track span{display:block;width:95%;height:100%;background:var(--gold);border-radius:inherit}
.learning-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:36px 0 16px}
.learning-heading h3{font-family:var(--body);font-size:1rem;font-weight:600;margin:0;letter-spacing:-.02em}
#education .certs{margin:0;gap:12px;counter-reset:learning;grid-template-columns:minmax(0,1fr)}
#education .certs li{counter-increment:learning;display:grid;grid-template-columns:24px minmax(0,1fr);gap:7px 14px;align-content:start;padding:22px;border:1px solid var(--edge);border-radius:14px;background:var(--surface);min-width:0}
#education .certs li::before{content:counter(learning,decimal-leading-zero);grid-row:1 / 3;font-family:var(--mono);font-size:.65rem;color:var(--accent-text);padding-top:4px}
#education .certs li span:first-child{font-size:.9rem;line-height:1.55;font-weight:500;overflow-wrap:anywhere}
#education .certs li span:last-child{grid-column:2;font-size:.65rem;line-height:1.6;white-space:normal;color:var(--muted)}
@media(min-width:621px){.education-highlights{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}#education .certs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1050px){#education .certs{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Shared type scale: equal heading levels keep equal size across sections. */
:root{
  --heading-section:clamp(1.5rem,1.15rem + 1vw,1.875rem);
  --heading-card:clamp(1.0625rem,1rem + .25vw,1.1875rem);
  --heading-small:1rem;
}
h2,.rail h2,#education .rail h2,.contact h2{
  font-family:var(--body);font-size:var(--heading-section);font-weight:600;
  line-height:1.3;letter-spacing:-.025em;color:var(--text);
}
h3,.job h3,.edu h3,.card h3,.certificate-card h3,
#education .degree-card h3,.diploma-card h3,.learning-heading h3,
#education .certs li span:first-child{
  font-family:var(--body);font-size:var(--heading-card);font-weight:600;
  line-height:1.45;letter-spacing:-.02em;
}
h4,.why-item h4,.sub{
  font-family:var(--body);font-size:var(--heading-small);font-weight:600;
  line-height:1.45;letter-spacing:-.01em;
}
.contact h2 span{font-weight:inherit}
/* Wide screens: the page grows into the side margins instead of staying a narrow column. */
@media(min-width:1400px){.shell{max-width:1400px;padding-inline:56px}.hero{gap:80px}.hero-portrait{max-width:500px}.sec{grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:72px}}
@media(min-width:1700px){.shell{max-width:1600px;padding-inline:64px}.hero-portrait{max-width:560px}.lede{max-width:56ch}}
/* LED lighting: a backlight behind the portrait and a strip under the nav, both in the gold accent. */
.hero-portrait::before{content:'';position:absolute;inset:4% 6%;z-index:-1;border-radius:28px;pointer-events:none;
  background:linear-gradient(160deg,var(--gold),color-mix(in srgb,var(--gold) 55%,#E07A2E));filter:blur(46px);opacity:var(--led-glow,.45)}
.nav::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;pointer-events:none;
  background:linear-gradient(90deg,transparent,var(--gold) 15%,var(--gold) 85%,transparent);opacity:.7;
  box-shadow:0 0 6px color-mix(in srgb,var(--gold) 80%,transparent),0 2px 18px color-mix(in srgb,var(--gold) 45%,transparent)}
.nav::before{content:'';position:absolute;left:0;bottom:-3px;width:180px;height:6px;pointer-events:none;opacity:0;border-radius:999px;
  background:radial-gradient(closest-side,#FFF3C4,color-mix(in srgb,var(--gold) 70%,transparent),transparent);filter:blur(1px)}
@media(prefers-color-scheme:light){:root:not([data-theme='dark']){--led-glow:.3}}
:root[data-theme='light']{--led-glow:.3}
@media(prefers-reduced-motion:no-preference){
  .hero-portrait::before{animation:led-breathe 5s ease-in-out infinite alternate}
  .nav::before{animation:led-run 7s linear infinite}
  @keyframes led-breathe{from{opacity:calc(var(--led-glow,.45)*.75)}to{opacity:var(--led-glow,.45)}}
  @keyframes led-run{0%{opacity:0;left:0}10%,90%{opacity:1}100%{opacity:0;left:calc(100% - 180px)}}
}
/* LED runner: a spot of light that travels around the portrait border. */
@property --led-angle{syntax:'<angle>';inherits:false;initial-value:0deg}
.hero-portrait::after{content:'';position:absolute;inset:0;z-index:2;padding:2px;border-radius:18px;pointer-events:none;
  background:conic-gradient(from var(--led-angle),transparent 0 72%,color-mix(in srgb,var(--gold) 40%,transparent) 82%,var(--gold) 92%,#FFF3C4 97%,transparent 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
  filter:drop-shadow(0 0 6px var(--gold))}
@media(prefers-reduced-motion:no-preference){
  .hero-portrait::after{animation:led-orbit 6s linear infinite}
  @keyframes led-orbit{to{--led-angle:360deg}}
}
/* AR9 THEME (key 'mido') — Egyptian flag colours: a red brick wall, black panels, white text and flag-red accents. */
html:root[data-theme='mido']{
  --bg:#7E2418;--surface:#121010;--raise:#1E1A18;--text:#FFFFFF;--muted:#CFC4B8;
  --accent:#E8283A;--gold:#E8283A;--line:rgba(232,40,58,.06);
  --ink:var(--text);--faint:rgba(232,40,58,.32);--grid:transparent;
  --accent-text:#FF5A6A;--accent-ink:#FFFFFF;--gold-ink:#FF5A6A;
  --name-base:#FFFFFF;--name-highlight:#FF4D5E;--name-deep:#CE1126;
  --control-line:#8A8178;--sun:rgba(255,236,190,.08);--logo-filter:invert(1);
  --edge:rgba(255,255,255,.14);--sheen:rgba(255,255,255,.04);
  --elevation:0 2px 6px rgba(0,0,0,.25),0 18px 40px -22px rgba(0,0,0,.75);
  --elevation-hover:0 4px 10px rgba(0,0,0,.3),0 24px 48px -22px rgba(0,0,0,.85);
  --portrait-shadow:0 8px 18px -8px rgba(0,0,0,.5),0 34px 70px -28px rgba(0,0,0,.8);
  --led-glow:.5;color-scheme:dark}
/* Bricks in mixed reds on dark mortar; 48px courses keep the section dividers on the brick lines. */
html[data-theme='mido'] body{background-color:var(--bg);background-size:192px 96px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='96'%3E%3Crect width='192' height='96' fill='%23400F09'/%3E%3Crect x='2' y='2' width='92' height='44' rx='2' fill='%238E2B1F'/%3E%3Crect x='98' y='2' width='92' height='44' rx='2' fill='%239B3425'/%3E%3Crect x='-46' y='50' width='92' height='44' rx='2' fill='%2385281C'/%3E%3Crect x='50' y='50' width='92' height='44' rx='2' fill='%23963022'/%3E%3Crect x='146' y='50' width='92' height='44' rx='2' fill='%2385281C'/%3E%3C/svg%3E")}
/* The wall is also painted on .desert-grid so it stays measurable: interactions.js snaps the dividers to its 48px courses. */
html[data-theme='mido'] .desert-grid{background:inherit;background-position:0 0;-webkit-mask:none;mask:none}
/* A black nav keeps the menu readable over the bricks. */
html[data-theme='mido'] .nav{background:color-mix(in srgb,#121010 92%,transparent)}
html[data-theme='mido'] body{text-shadow:0 1px 3px rgba(0,0,0,.7)}
html[data-theme='mido'] :is(.hero h1,.hero h1 .thin){text-shadow:none}
/* Red accents need black behind them to read on red bricks: flag-style buttons with a hard black shadow. */
html[data-theme='mido'] .btn.primary{background:#CE1126;border-color:#121010;color:#FFFFFF;box-shadow:0 3px 0 #121010,0 8px 18px -8px rgba(0,0,0,.6)}
html[data-theme='mido'] .btn:not(.primary){background:#121010;border-color:var(--accent)}
/* AR9: a black flag-style shadow keeps the white/red name off the red bricks; the lotus dividers turn white on a black badge. */
html[data-theme='mido'] .hero h1{filter:drop-shadow(0 4px 0 #121010) drop-shadow(0 8px 18px rgba(0,0,0,.45))}
html[data-theme='mido'] .sec::before{height:48px;bottom:calc(var(--divider-offset,0px) - 23.5px);
  background:radial-gradient(44px 24px at 50% 50%,#121010 96%,transparent) no-repeat,linear-gradient(90deg,transparent,#FFFFFF 12%,#FFFFFF 88%,transparent) center/100% 3px no-repeat,linear-gradient(90deg,transparent,#121010 12%,#121010 88%,transparent) center/100% 7px no-repeat}
html[data-theme='mido'] .sec::after{background:#FFFFFF;opacity:1;width:64px;height:40px;left:calc(50% - 32px);bottom:calc(var(--divider-offset,0px) - 20px)}
