/* Layout: glazed-brick lapis night. A living glyph field (cuneiform, Arabic, code)
   sits behind an asymmetric editorial grid; one saffron glaze accent. Single dark theme. */
:root {
  color-scheme: dark;
  --lapis-900: #080d24;   /* page ground, deep glaze */
  --lapis-800: #0d1533;   /* raised surface */
  --lapis-600: #1d2a5e;   /* hairlines, frames */
  --bone:      #ece6d8;   /* glazed white ink */
  --haze:      #9ba3c2;   /* secondary ink */
  --saffron:   #e9b949;   /* the one accent: Ishtar Gate glaze */

  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --f-ar: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem);
  --step-3: clamp(2.4rem, 1.4rem + 3.6vw, 4.5rem);
  --step-4: clamp(4.2rem, 1rem + 12vw, 13.5rem);

  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--lapis-900);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--saffron); color: var(--lapis-900); }

.wrap { padding-inline: var(--gutter); max-width: 1480px; margin-inline: auto; }
.mono { font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: .02em; }
.eyebrow { color: var(--saffron); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; }
.h-section {
  font-family: var(--f-display);
  font-size: var(--step-3);
  font-variation-settings: "wdth" 80, "opsz" 96;
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.02em;
}

/* ---------- background layers ---------- */
#glyphs {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.grain {
  position: fixed; inset: -50%;
  z-index: 1; pointer-events: none;
  opacity: .07;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .foot, .nav { position: relative; z-index: 2; }
main { overflow-x: clip; }
body::before {
  /* soft glaze glow, never a flat fill */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(29, 42, 94, .75), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(233, 185, 73, .07), transparent 70%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%; translate: -50% 0;
  width: min(1100px, calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 14px;
  border: 1px solid rgba(155, 163, 194, .16);
  border-radius: 999px;
  background: rgba(8, 13, 36, .62);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .5s var(--ease);
}
.nav.is-hidden { transform: translateY(calc(-100% - 24px)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark path:first-child { fill: var(--lapis-600); }
.brand-mark .m { fill: none; stroke: var(--saffron); stroke-width: 5; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  text-decoration: none; font-size: .9rem; color: var(--haze);
  padding: 8px 14px; border-radius: 999px;
  transition: color .25s, background-color .25s;
}
.nav-links a:hover { color: var(--bone); background: rgba(155, 163, 194, .1); }
.nav-links .nav-cta { color: var(--lapis-900); background: var(--bone); font-weight: 500; }
.nav-links .nav-cta:hover { color: var(--lapis-900); background: var(--saffron); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 500; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--saffron); color: var(--lapis-900); }
.btn-primary:hover { background: var(--bone); }
.btn-ghost { border: 1px solid rgba(236, 230, 216, .3); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone); background: rgba(236, 230, 216, .06); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr);
  align-items: end;
  gap: clamp(28px, 5vw, 80px);
  padding-block: clamp(120px, 15vh, 160px) clamp(56px, 9vh, 110px);
  min-height: min(100dvh, 980px);
}
.hero-copy { display: grid; gap: 28px; min-width: 0; }
.name {
  font-family: var(--f-display);
  font-size: var(--step-4);
  font-weight: 700;
  font-variation-settings: "wdth" 75, "opsz" 96;
  line-height: .84;
  letter-spacing: -.035em;
  display: grid;
}
.name .line { display: flex; align-items: flex-end; gap: .25em; overflow: hidden; padding-bottom: .04em; }
.name .word { display: inline-block; }
.name .line:nth-child(2) .word { color: var(--saffron); }
.name .ar {
  font-family: var(--f-ar);
  font-size: .22em; font-weight: 500;
  letter-spacing: 0; line-height: 1.6;
  color: var(--haze);
  padding-bottom: .35em;
}
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--bone); max-width: 30ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.arch { position: relative; justify-self: end; width: min(100%, 440px); }
.arch-img {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 18px 18px;
  overflow: hidden;
  background: var(--lapis-800);
  box-shadow: 0 40px 80px -30px rgba(2, 4, 16, .9);
  max-width: 100%;
}
.arch-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; scale: 1.12; }
.arch-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 13, 36, .55));
}
.arch-outline {
  position: absolute; inset: -14px -14px auto -14px; aspect-ratio: 4 / 5;
  border: 1px solid var(--saffron);
  border-radius: 999px 999px 24px 24px;
  opacity: .55;
  translate: 18px 18px;
}
.arch-tag {
  position: absolute; left: 18px; bottom: 18px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(8, 13, 36, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--bone);
}
.arch-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--saffron); }

/* ---------- about ---------- */
.about { padding-block: clamp(80px, 14vh, 180px); display: grid; gap: clamp(56px, 9vw, 120px); }
.statement {
  font-family: var(--f-display);
  font-variation-settings: "wdth" 92, "opsz" 48;
  font-weight: 450;
  font-size: var(--step-2);
  line-height: 1.28;
  letter-spacing: -.01em;
  max-width: 34ch;
  color: var(--bone);
}
.statement .w { transition: none; }
.js .statement .w { color: rgba(236, 230, 216, .32); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.facts { display: grid; gap: 0; border-top: 1px solid var(--lapis-600); }
.facts > div {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 16px;
  padding-block: 20px; border-bottom: 1px solid var(--lapis-600);
}
.facts dt { color: var(--haze); padding-top: 3px; }
.facts dd small { color: var(--haze); font-size: .8em; }
.about-photo { border-radius: var(--radius); overflow: hidden; max-width: 100%; }
.about-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 35% 40%; }

/* ---------- work (horizontal) ---------- */
.work { padding-block: clamp(40px, 8vh, 100px); }
.work-pin { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vh, 48px); }
.work-head { display: grid; gap: 16px; width: 100%; }
.work-intro { color: var(--haze); max-width: 52ch; }
.work-count { color: var(--saffron); margin-left: 6px; white-space: nowrap; }
.work-track {
  display: flex; gap: clamp(20px, 2.5vw, 36px);
  padding-inline: var(--gutter);
  width: max-content;
  justify-self: start;
  will-change: transform;
}
.proj {
  width: clamp(300px, min(46vw, (100svh - 450px) * 2.09), 720px);
  display: grid; gap: 22px; align-content: start;
}
.proj-shot {
  border-radius: var(--radius); overflow: hidden;
  background: var(--lapis-800);
  border: 1px solid var(--lapis-600);
  max-width: 100%;
}
.proj-shot img { width: 100%; aspect-ratio: 1242 / 595; object-fit: cover; object-position: top; transition: scale .9s var(--ease); }
.proj-link:hover .proj-shot img { scale: 1.035; }
.proj-link { display: grid; gap: 22px; text-decoration: none; color: inherit; border-radius: var(--radius); }
.proj-link:focus-visible { outline-offset: 8px; }
.proj-shot { position: relative; }
.proj-shot::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(8, 13, 36, .55);
  opacity: 0; transition: opacity .4s var(--ease);
}
.proj-visit {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  translate: -50% -50%;
  padding: 12px 20px; border-radius: 999px;
  background: var(--saffron); color: var(--lapis-900); font-weight: 500;
  opacity: 0; scale: .9;
  transition: opacity .35s var(--ease), scale .35s var(--ease);
}
.proj-link:hover .proj-shot::after, .proj-link:focus-visible .proj-shot::after { opacity: 1; }
.proj-link:hover .proj-visit, .proj-link:focus-visible .proj-visit { opacity: 1; scale: 1; }
.proj-arrow { display: inline-block; color: var(--saffron); font-size: .7em; vertical-align: .25em; transition: transform .35s var(--ease); }
.proj-link:hover .proj-arrow { transform: translate(4px, -4px); }
.proj .proj-url { color: var(--saffron); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(233, 185, 73, .4); }
.proj-link:hover .proj-url { text-decoration-color: var(--saffron); }
.proj-meta { display: grid; gap: 10px; max-width: 58ch; }
.proj-type { color: var(--saffron); display: flex; gap: 10px; }
.proj-type span { color: var(--haze); }
.proj h3 {
  font-family: var(--f-display); font-variation-settings: "wdth" 85, "opsz" 72;
  font-size: var(--step-2); font-weight: 600; letter-spacing: -.015em; line-height: 1.05;
}
.proj p:not(.proj-type) { color: var(--haze); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.stack li { padding: 4px 10px; border: 1px solid var(--lapis-600); border-radius: 999px; color: var(--bone); }
.work-progress { width: 100%; }
.work-progress::before { content: ""; display: block; height: 1px; background: var(--lapis-600); }
.work-progress span { display: block; height: 2px; margin-top: -1.5px; width: 100%; background: var(--saffron); transform-origin: left; transform: scaleX(0); }

/* ---------- capstone ---------- */
.capstone {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: center;
  padding-block: clamp(80px, 14vh, 180px);
}
.cap-photo { border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; max-width: 100%; }
.cap-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; scale: 1.15; }
.cap-copy { display: grid; gap: 22px; min-width: 0; }
.cap-copy > p:not(.eyebrow):not(.cap-also) { color: var(--haze); max-width: 58ch; }
.cap-list { display: grid; border-top: 1px solid var(--lapis-600); }
.cap-list > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--lapis-600); }
.cap-list dt { color: var(--haze); padding-top: 3px; }
.cap-also { color: var(--haze); font-size: .95rem; }
.cap-also .mono { color: var(--saffron); margin-right: 8px; }

/* ---------- experience ---------- */
.experience { padding-block: clamp(60px, 10vh, 140px); display: grid; gap: clamp(32px, 5vw, 56px); }
.jobs { border-top: 1px solid var(--lapis-600); }
.job {
  position: relative;
  display: grid;
  grid-template-columns: 11rem minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 48px);
  padding-block: 32px;
  border-bottom: 1px solid var(--lapis-600);
  isolation: isolate;
}
.job::before {
  content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); z-index: -1;
  background: linear-gradient(90deg, rgba(233, 185, 73, .09), rgba(29, 42, 94, .35));
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .5s var(--ease);
}
.job:hover::before { transform: scaleY(1); }
.job-when { color: var(--saffron); padding-top: 6px; font-variant-numeric: tabular-nums; }
.job h3 {
  font-family: var(--f-display); font-variation-settings: "wdth" 85, "opsz" 48;
  font-size: var(--step-1); font-weight: 600; line-height: 1.2;
  transition: transform .45s var(--ease);
}
.job:hover h3 { transform: translateX(8px); }
.job-where { color: var(--haze); margin-top: 6px; }
.job-where .mono { display: block; margin-top: 2px; opacity: .8; }
.job-detail { display: grid; gap: 8px; color: var(--haze); font-size: .97rem; }
.job-detail li { position: relative; padding-left: 18px; }
.job-detail li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--saffron); }

/* ---------- skills ---------- */
.skills { padding-block: clamp(60px, 10vh, 120px); display: grid; gap: clamp(48px, 8vh, 96px); }
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--lapis-600);
  padding-block: 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-row {
  display: flex; align-items: center; gap: 36px; width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--f-display); font-variation-settings: "wdth" 78, "opsz" 96;
  font-size: clamp(2rem, 1rem + 4vw, 4.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
  white-space: nowrap;
}
.marquee-row i { width: 14px; height: 14px; background: var(--saffron); border-radius: 50% 50% 2px 2px; flex: none; }
.marquee:hover .marquee-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.skills .wrap { display: grid; gap: 40px; width: 100%; }
.skill-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.sg { display: grid; gap: 14px; align-content: start; border-top: 1px solid var(--saffron); padding-top: 18px; }
.sg h3 { font-size: var(--step-0); font-weight: 600; }
.sg ul { display: grid; gap: 6px; color: var(--haze); }

/* ---------- life ---------- */
.life {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(80px, 14vh, 180px);
}
.life-copy { display: grid; gap: 22px; align-self: start; position: sticky; top: 120px; }
.life-copy p { color: var(--haze); max-width: 44ch; }
.collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.c { border-radius: var(--radius); overflow: hidden; max-width: 100%; will-change: transform; }
.c img { width: 100%; height: 100%; object-fit: cover; }
.c1 { aspect-ratio: 3 / 4; }
.c2 { aspect-ratio: 9 / 14; margin-top: 22%; }
.c1 img { object-position: 50% 30%; }
.c2 img { object-position: 50% 45%; }

/* ---------- contact ---------- */
.contact { padding-block: clamp(80px, 16vh, 200px) clamp(60px, 10vh, 120px); display: grid; gap: 28px; }
.contact-h {
  font-family: var(--f-display); font-variation-settings: "wdth" 75, "opsz" 96;
  font-size: clamp(3.2rem, 1rem + 9vw, 10rem); font-weight: 700;
  line-height: .9; letter-spacing: -.035em;
}
.contact-sub { color: var(--haze); max-width: 46ch; font-size: var(--step-1); line-height: 1.5; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 12px; }
.email {
  font-family: var(--f-display); font-variation-settings: "wdth" 90, "opsz" 48;
  font-size: clamp(1.35rem, .8rem + 2.6vw, 3rem); font-weight: 500;
  text-decoration: none; color: var(--saffron);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .5s var(--ease);
  overflow-wrap: anywhere;
}
.email:hover { background-size: 100% 2px; }
.copy {
  appearance: none; cursor: pointer;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(236, 230, 216, .3); background: transparent; color: var(--bone);
  transition: border-color .25s, background-color .25s;
}
.copy:hover { border-color: var(--bone); }
.copy.is-done { background: var(--saffron); border-color: var(--saffron); color: var(--lapis-900); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.socials a {
  display: inline-flex; gap: 8px; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--lapis-600);
  background: rgba(13, 21, 51, .6);
  transition: border-color .25s, background-color .25s;
}
.socials a:hover { border-color: var(--saffron); background: rgba(233, 185, 73, .08); }
.socials .wa { background: var(--saffron); border-color: var(--saffron); color: var(--lapis-900); font-weight: 500; align-items: center; }
.socials .wa .mono { opacity: .75; }
.socials .wa:hover { background: var(--bone); border-color: var(--bone); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--lapis-600);
  color: var(--haze); font-size: .9rem;
}
.foot .ar { font-family: var(--f-ar); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--saffron); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .skill-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .job-detail { margin-top: 6px; }
}
@media (max-width: 899px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; padding-top: 112px; }
  .arch { justify-self: start; width: min(100%, 380px); }
  .about-grid, .capstone, .life { grid-template-columns: minmax(0, 1fr); }
  .life-copy { position: static; }
  .work-track { width: auto; flex-direction: column; gap: 56px; }
  .proj { width: 100%; }
  .work-progress { display: none; }
}
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .brand span { font-size: .9rem; }
  .facts > div, .cap-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .skill-groups { grid-template-columns: minmax(0, 1fr); }
  .name .line:nth-child(2) { flex-wrap: wrap; }
  .collage { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-row { animation: none; }
  .js .statement .w { color: inherit; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
