/* ==========================================================================
   Shahd Saqr — Kinetic Orange: digital-first brutalist
   ========================================================================== */

:root {
  --orange: #FF4D00;
  --black: #000000;
  --white: #FFFFFF;
  --photo-dark: #1A1613; /* sampled from the portrait photo's own backdrop */
  --white-20: rgba(255, 255, 255, .2);
  --white-80: rgba(255, 255, 255, .8);
  --white-5: rgba(255, 255, 255, .05);

  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --border: 2px;
  --nav-h: 84px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--orange);
  color: var(--black);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:root { color-scheme: light; }
::selection { background: var(--black); color: var(--orange); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--black); color: var(--orange);
  padding: 12px 16px; z-index: 300; font-family: var(--mono); font-size: 13px; text-decoration: none;
}
.skip-link:focus { left: 0; }

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--black); outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  letter-spacing: -.04em; line-height: .9; margin: 0;
}

.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: -.02em;
  text-transform: uppercase; color: var(--black); margin: 0 0 20px;
}
.kicker-on-black { color: var(--orange); }

.section-title { font-size: clamp(32px, 5vw, 64px); line-height: .88; margin-bottom: 22px; }
.body-text {
  font-family: var(--sans); font-size: 16px; line-height: 1.75; color: var(--black);
  max-width: 54ch; margin: 0 0 16px;
}

/* buttons */
.btn {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: -.02em; text-transform: uppercase; text-decoration: none;
  padding: 16px 32px; border: var(--border) solid var(--black);
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn-outline-white { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--black); transform: translateX(6px); }
.btn-pill {
  border-radius: 999px; background: var(--black); color: var(--white); border-color: var(--black);
  padding: 20px 44px; font-size: 14px;
}
.btn-pill:hover { transform: scale(1.1); }
.btn-pill-outline {
  border-radius: 999px; background: transparent; color: var(--black); border-color: var(--black);
  padding: 20px 44px; font-size: 14px;
}
.btn-pill-outline:hover { background: var(--black); color: var(--orange); transform: scale(1.1); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Pointer-tracked edge glow (every interactive element) ----------
   --gdeg / --gd are set by script.js from real pointer position: --gdeg is
   the angle from the element's center to the pointer, --gd is 0..1 for how
   close the pointer is to the nearest edge. The glow is masked by a
   conic-gradient from --gdeg so it concentrates on the edge nearest the
   pointer, like a magnet, instead of just fading the whole border in. */
.glow-target { position: relative; }
.glow-target::after {
  content: "";
  position: absolute; inset: -3px; border-radius: inherit; z-index: 6;
  pointer-events: none; opacity: 0;
  box-shadow:
    0 0 2px 0 rgba(255, 77, 0, .95),
    0 0 6px 0 rgba(255, 77, 0, .75),
    0 0 14px 2px rgba(255, 77, 0, .5),
    0 0 28px 4px rgba(255, 77, 0, .3);
  mask-image: conic-gradient(from var(--gdeg, 45deg) at center, black 20%, transparent 40%, transparent 60%, black 80%);
  -webkit-mask-image: conic-gradient(from var(--gdeg, 45deg) at center, black 20%, transparent 40%, transparent 60%, black 80%);
  transition: opacity .25s ease-out;
}
.glow-target.glowing::after { opacity: var(--gd, 0); }
@media (prefers-reduced-motion: reduce), (hover: none) {
  .glow-target::after { display: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 20px; left: var(--gutter); right: var(--gutter); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  opacity: 0; transform: translateY(-14px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.nav.visible { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .nav { transition: opacity .01s; }
}
.nav-pill {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; background: var(--black); border-radius: 999px;
  padding: 8px 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.nav-pill a {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: -.02em;
  text-transform: uppercase; text-decoration: none; color: var(--white);
  padding: 8px 16px; border-radius: 999px; transition: background-color .18s ease, color .18s ease;
}
.nav-pill a:hover { background: var(--white); color: var(--black); }

.nav-social { display: flex; gap: 16px; align-items: center; margin-left: auto; }
.nav-social a { color: var(--orange); display: flex; transition: transform .18s ease; }
.nav-social a:hover { transform: scale(1.15); }

.nav-toggle {
  display: none; width: 40px; height: 40px; border: var(--border) solid var(--black);
  background: var(--orange); padding: 0; cursor: pointer; position: relative; border-radius: 999px;
}
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--black); transition: transform .2s ease; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { bottom: 15px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 20px) var(--gutter) 80px;
  /* solid match for the portrait photo's own backdrop, sampled directly
     from the photo — the whole top section reads as one continuous dark
     surface the photo sits inside, rather than a separate background. */
  background: var(--photo-dark);
}
.hero-headline-row {
  width: 100%; max-width: 1400px; display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 4vw, 56px); margin-bottom: 40px;
}
.hero-photo {
  flex: none; width: clamp(220px, 28vw, 420px); aspect-ratio: 4/5;
  border: var(--border) solid var(--orange); overflow: hidden; background: var(--black);
}
html.js .hero-photo.reveal { transform: translateX(-18px); transition-delay: .08s; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-headline {
  font-family: 'Manrope', var(--sans); font-weight: 700;
  text-transform: none; letter-spacing: -.01em; font-size: clamp(28px, 4.5vw, 64px);
  text-align: left; color: var(--orange); margin: 0; flex: 1 1 auto; min-width: 0;
}
.hero-credentials {
  flex: none; width: clamp(200px, 18vw, 260px); align-self: stretch;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  border-left: var(--border) solid var(--orange); padding-left: clamp(20px, 3vw, 32px);
}
html.js .hero-credentials.reveal { transform: translateX(18px); transition-delay: .22s; }
@media (prefers-reduced-motion: reduce) {
  html.js .hero-photo.reveal,
  html.js .hero-credentials.reveal { transform: none; transition-delay: 0s; }
}
.hero-credential h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: -.02em; color: var(--orange); margin: 0 0 6px;
}
.hero-credential p {
  font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--white-80); margin: 0;
}
/* ---------- Marquee (skewed, two rows opposite directions) ----------
   Clipping (overflow:hidden) and skewing live on different elements on
   purpose: overflow:hidden on the same element as a transform is unreliable
   on mobile WebKit and can silently freeze the animated children inside
   it. .marquee-section only skews; .marquee-clip (unskewed) only clips;
   .marquee-inner counter-skews the content back level. */
.marquee-section {
  background: var(--black); padding: 60px 0;
  transform: skewY(-2deg); margin: -1px 0;
}
.marquee-clip { overflow: hidden; }
.marquee-inner { transform: skewY(2deg); }
.marquee-row { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee-row span {
  font-family: var(--display); text-transform: uppercase; letter-spacing: -.04em;
  flex: none;
}
.marquee-row-a { font-size: 10vw; color: var(--orange); animation: marquee-left 24s linear infinite; margin-bottom: 8px; }
.marquee-row-b {
  font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--white-80);
  animation: marquee-right 28s linear infinite;
}
@keyframes marquee-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-row-a, .marquee-row-b { animation: none; }
  .marquee-clip { overflow-x: auto; }
}

/* ---------- About ---------- */
.about { background: var(--white); padding: 104px var(--gutter); border-bottom: var(--border) solid var(--black); }
.about-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 160px 1fr; gap: 40px; }
.about-body { max-width: 840px; }
.about-body .body-text { text-align: justify; text-justify: inter-word; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 32px;
  border-top: var(--border) solid var(--black); padding-left: clamp(32px, 4vw, 56px);
}
.fact { padding: 16px 16px 16px 0; border-right: 1px solid var(--black); }
.fact:last-child { border-right: none; }
/* Every item except the first in a row sits right after a divider — give
   it matching left padding so the gap reads the same on both sides of
   the line. Which items are "first in a row" changes with the grid's
   column count, so this is set per breakpoint rather than once. */
.fact:not(:first-child) { padding-left: 16px; }
.fact dt { font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--black); opacity: .55; margin-bottom: 6px; }
.fact dd { margin: 0; font-family: var(--display); font-size: 16px; text-transform: uppercase; letter-spacing: -.02em; }

/* ---------- Work ---------- */
.work { background: var(--black); color: var(--white); padding: 90px var(--gutter); border-bottom: var(--border) solid var(--black); }
.work .kicker { color: var(--orange); }
.work-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work-card { text-decoration: none; color: inherit; display: block; }
.work-media {
  position: relative; aspect-ratio: 4/3; background: #141414; border: var(--border) solid var(--white-20);
  overflow: hidden; transition: border-color .2s ease;
}
.work-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.work-card:hover .work-media, .work-card:focus-visible .work-media { border-color: var(--orange); }
.work-card:hover .work-media img { transform: scale(1.04); }
.work-caption { margin: 14px 2px 0; font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--white-80); }
.work > .btn { max-width: 1200px; margin: 40px auto 0; display: block; width: max-content; }

@media (prefers-reduced-motion: reduce) {
  .work-media img { transition: none; }
  .work-card:hover .work-media img { transform: none; }
}

/* ---------- Services (vertical brutalist list) ---------- */
.services { background: var(--black); color: var(--white); padding: 90px var(--gutter) 60px; }
.service-list { max-width: 1200px; margin: 40px auto 0; list-style: none; padding: 0; border-top: 1px solid var(--white-20); }
.service-item {
  display: grid; grid-template-columns: 80px 1fr 48px; align-items: center; gap: 24px;
  padding: 32px 12px; border-bottom: 1px solid var(--white-20);
  transition: background-color .25s ease;
}
.service-item:hover { background: var(--white-5); }
.service-index { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--orange); }
.service-body h3 {
  font-size: clamp(24px, 7vw, 56px); color: var(--white); margin-bottom: 14px;
  opacity: 0; transform: translateY(28px);
  transition: transform .25s ease, opacity .6s ease;
}
/* Entrance: each heading slides/fades in just after its row reveals,
   staggered by row so they don't all land at once. Hover's translateX
   below fires only once this has already settled to transform:none. */
html.js .service-item.reveal.in .service-body h3 { opacity: 1; transform: none; }
.service-item:nth-child(1).reveal.in .service-body h3 { transition-delay: .05s; }
.service-item:nth-child(2).reveal.in .service-body h3 { transition-delay: .15s; }
.service-item:nth-child(3).reveal.in .service-body h3 { transition-delay: .25s; }
.service-item:hover .service-body h3 { transform: translateX(16px); }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tags span {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: -.02em;
  color: var(--orange); border: 1px solid var(--white-20); border-radius: 999px; padding: 6px 12px;
}
.service-arrow {
  color: var(--orange); opacity: 0; transform: rotate(0deg); justify-self: end;
  transition: opacity .25s ease, transform .25s ease;
}
.service-item:hover .service-arrow, .service-item:focus-within .service-arrow { opacity: 1; transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  .service-body h3, .service-arrow, .work-media { transition: none; }
  .service-body h3 { opacity: 1; transform: none; }
}

/* ---------- Experience ---------- */
.experience { background: var(--white); padding: 90px var(--gutter); border-top: var(--border) solid var(--black); }
.experience > .kicker, .experience > .section-title, .timeline, .credentials { max-width: 1200px; margin-left: auto; margin-right: auto; }

.timeline { list-style: none; padding: 0; margin-top: 40px; border-top: var(--border) solid var(--black); }
.timeline-item { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--black); }
.timeline-date { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--orange); padding-top: 4px; }
.timeline-body h3 { font-size: 20px; text-transform: uppercase; margin-bottom: 6px; }
.timeline-body p { margin: 0; font-family: var(--sans); color: var(--black); font-size: 15px; }
.timeline-tag {
  display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0; color: var(--orange); border: 1px solid var(--orange);
  border-radius: 999px; padding: 4px 10px; margin-left: 8px; vertical-align: middle;
}
.timeline-detail { margin: 12px 0 0; padding: 0 0 0 18px; max-width: 62ch; }
.timeline-detail li {
  font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--black); opacity: .8;
  margin-bottom: 6px;
}

.credentials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 0; border-bottom: var(--border) solid var(--black); }
.credential { padding: 24px 20px 24px 0; border-right: 1px solid var(--black); }
.credential:last-child { border-right: none; }
.credential h3 { font-size: 14px; color: var(--black); margin-bottom: 10px; letter-spacing: -.02em; }
.credential p { margin: 0; font-family: var(--sans); font-size: 14.5px; color: var(--black); line-height: 1.6; }

/* ---------- Notable Projects ---------- */
.projects { max-width: 1200px; margin: 56px auto 0; }
.projects > .kicker { margin-bottom: 20px; }
.project-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--black); }
.project-list li {
  display: grid; grid-template-columns: 260px 220px 1fr; gap: 20px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--black);
}
.project-client { font-family: var(--display); font-size: 15px; text-transform: uppercase; letter-spacing: -.02em; color: var(--black); }
.project-role { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--orange); }
.project-scope { font-family: var(--sans); font-size: 13.5px; color: var(--black); opacity: .75; line-height: 1.5; }

/* ---------- CTA ---------- */
.cta { background: var(--orange); padding: 120px var(--gutter); text-align: center; }
.cta-title { font-size: clamp(56px, 14vw, 220px); margin-bottom: 24px; }
.cta-sub { font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: -.02em; max-width: 46ch; margin: 0 auto 40px; }
.cta-actions { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--border) solid var(--black); background: var(--white);
  padding: 24px var(--gutter); display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: -.02em;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--orange); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: none; }
  .fact { border-bottom: 1px solid var(--black); }
  /* At 4 columns only the first item starts a row. At 2 columns the 3rd
     item also starts a row (no divider to its left), so its left padding
     — inherited from the general :not(:first-child) rule — must reset. */
  .fact:nth-child(3) { padding-left: 0; }
  .credentials { grid-template-columns: 1fr; }
  .credential { border-right: none; border-bottom: 1px solid var(--black); }
}

@media (max-width: 860px) {
  .nav-pill { display: none; }
  .nav-toggle { display: block; }
  .nav-pill.open {
    display: flex; position: fixed; inset: var(--nav-h) 16px auto; transform: none;
    flex-direction: column; border-radius: 12px; padding: 8px; gap: 0; z-index: 101;
  }
  .nav-pill.open a { padding: 12px 16px; border-radius: 8px; }

  .hero-headline-row { flex-direction: column; }
  .hero-photo { width: clamp(220px, 60vw, 320px); }
  .hero-headline { text-align: center; font-size: clamp(30px, 8vw, 48px); }
  .hero-credentials {
    width: 100%; max-width: 300px; margin: 0 auto; border-left: none; padding-left: 0;
    border-top: var(--border) solid var(--orange); padding-top: 24px; text-align: center;
  }

  .work-grid { grid-template-columns: 1fr; }
  .service-item { grid-template-columns: 50px 1fr; }
  .service-arrow { display: none; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .project-list li { grid-template-columns: 1fr; gap: 4px; }
}
