/* ============================================================
   Zubair Ahmed — alternate layout
   Structured after gabiruiz.com: hero + photo, about, services,
   filterable portfolio grid, featured project, contact.
   Light theme, same typographic voice as the main site.
   ============================================================ */

:root {
  --paper:   #F7F9F8;
  --paper-2: #FFFFFF;
  --ink:     #0B2129;
  --body-c:  #40595F;
  --muted:   #7E959B;
  --line:    #DFE6E4;
  --accent:  #D62B60;
  --teal:    #0F6E7B;

  --display: "Archivo", "Helvetica Neue", sans-serif;
  --body:    "Karla", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --gut:  clamp(20px, 5vw, 56px);
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body-c);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the intrinsic ratio when max-width shrinks the image —
   without it, the width/height attributes stretch the picture */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "wdth" 110;
  color: var(--ink);
  line-height: 1.1;
  margin: 0;
}

.center { text-align: center; }
.center .lede { margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.h-sec { font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.lede { font-size: 18px; color: var(--body-c); max-width: 62ch; margin: 0; }

.sec { padding: clamp(60px, 8vw, 100px) 0; }
.sec-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(34px, 5vw, 54px); }

/* ---------- header ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 248, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  font-family: var(--display); font-variation-settings: "wdth" 122;
  font-weight: 800; font-size: 15px; letter-spacing: .05em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--muted);
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(30px, 4vw, 50px) 0 clamp(28px, 3.6vw, 46px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(95deg,
      rgba(247,249,248,.82) 0%,
      rgba(247,249,248,.72) 30%,
      rgba(247,249,248,.24) 62%,
      rgba(247,249,248,.40) 100%),
    linear-gradient(180deg,
      rgba(247,249,248,.34) 0%,
      rgba(247,249,248,.04) 40%,
      rgba(247,249,248,.84) 100%),
    url("../img/fcc-delta-light.jpg") center 42% / cover no-repeat;
}
/* faint graticule, so the scene reads as a map sheet rather than wallpaper */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(11,33,41,.05) 0 1px, transparent 1px 124px),
    repeating-linear-gradient(0deg,  rgba(11,33,41,.05) 0 1px, transparent 1px 124px);
  -webkit-mask-image: radial-gradient(120% 100% at 68% 45%, #000 0%, transparent 74%);
  mask-image: radial-gradient(120% 100% at 68% 45%, #000 0%, transparent 74%);
}
.hero-in { position: relative; }
.hero h1 {
  font-size: clamp(40px, 7vw, 74px);
  font-variation-settings: "wdth" 116;
  font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px;
}
.hero .role {
  font-family: var(--mono); font-size: 13px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--teal); margin: 0 0 22px;
}
.hero p.intro { font-size: 18px; max-width: 48ch; margin: 0 0 28px; }

.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  padding: 13px 22px; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); background: var(--paper-2);
  transition: border-color .18s, color .18s, background .18s;
}
.btn:hover, .btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-solid:hover, .btn-solid:focus-visible { background: #b8214f; border-color: #b8214f; color: #fff; }

/* ---------- about ---------- */

.about-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); }
.about p { margin: 0 0 16px; }
.tools-k {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 26px 0 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: 11.5px;
  border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 2px; padding: 5px 10px; color: var(--body-c);
}
.facts { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 108px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.fact dd { margin: 0; font-size: 15.5px; color: var(--ink); }

/* ---------- services ---------- */

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service {
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  padding: 26px 22px; border-top: 3px solid var(--accent);
}
.sec-alt .service { background: var(--paper); }
.service h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.service p { margin: 0; font-size: 15px; }

/* ---------- portfolio grid ---------- */

/* vintage survey sheets behind the grid — the cards read as plates laid on a map table */
#portfolio { position: relative; isolation: isolate; }
#portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.90) 0%,
      rgba(255,255,255,.62) 26%,
      rgba(255,255,255,.62) 74%,
      rgba(255,255,255,.90) 100%),
    url("../img/maps-texture.jpg") center / cover no-repeat;
}
#portfolio .tile { box-shadow: 0 2px 14px rgba(11, 33, 41, .07); }
/* keep inactive chips legible on the map; the active one must stay dark-on-light-page */
#portfolio .filter { background: rgba(255,255,255,.90); }
#portfolio .filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.filter {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 16px; border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 2px; color: var(--muted); cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.filter:hover { color: var(--ink); border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tile {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.tile:hover, .tile:focus-visible {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(11, 33, 41, .08);
}
.tile-fig { aspect-ratio: 16/10; overflow: hidden; background: #EDF2F0; display: flex; align-items: center; justify-content: center; }
.tile-fig img { width: 100%; height: 100%; object-fit: cover; }
.tile-glyph {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: #fff; text-align: center; padding: 16px;
}
.tile-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.tile-cat { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 9px; }
.tile h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.25; }
.tile p { margin: 0; font-size: 14.5px; }
.tile .more { margin-top: auto; padding-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.tile .more::after { content: " →"; color: var(--accent); }
.tile[hidden] { display: none; }

/* tiles with no case study behind them must not offer a click affordance */
.tile-static { cursor: default; }
.tile-static:hover { border-color: var(--line); transform: none; box-shadow: 0 2px 14px rgba(11, 33, 41, .07); }
.tile-static .more::after { content: ""; }

.filter-status {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- featured ---------- */

/* the feature stacks rather than running figure beside copy: a landscape figure in a
   side column either crops or letterboxes, neither of which reads well */
.feature {
  display: grid; grid-template-columns: 1fr;
  border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--paper-2);
}
/* full bleed — the figure runs to the card edges. Padding here would frame a
   photographic cover in white; height:auto still shows any aspect ratio whole */
.feature-fig {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.feature-fig img {
  width: 100%;
  height: auto;
}
.feature-body { padding: clamp(26px, 4vw, 44px); }
.feature h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin-bottom: 14px; }
.feature p { margin: 0 0 18px; }
.feature ul { margin: 0 0 24px; padding-left: 18px; }
.feature li { margin-bottom: 6px; font-size: 15.5px; }
.feature li::marker { color: var(--accent); }

/* ---------- contact ---------- */

.contact-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; max-width: 660px; margin: 32px auto 0; }
.clink {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 2px; text-decoration: none; color: var(--ink);
  font-family: var(--mono); font-size: 13px;
  transition: border-color .18s, color .18s;
}
.clink span:last-child { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.clink:hover, .clink:focus-visible { border-color: var(--accent); color: var(--accent); }

.foot {
  border-top: 1px solid var(--line); background: var(--paper-2);
  padding: 26px 0 34px;
}
.foot-in {
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}

/* ---------- a11y + motion ---------- */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 100; font-family: var(--mono); font-size: 12px; text-decoration: none; }
.skip:focus { left: 8px; top: 8px; }

.rv { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .about-in { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  .grid, .services { grid-template-columns: 1fr; }
  /* the header stacks instead of dropping links — a portfolio with no way to
     reach the work from a phone is worse than a slightly taller bar */
  .nav-in { height: auto; flex-direction: column; gap: 9px; padding-block: 11px; }
  .nav-links { gap: 14px; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 10.5px; letter-spacing: .06em; }
  html { scroll-padding-top: 112px; }
}
