/* ============================================================
   Abdullah Al Zahid — Portfolio
   Design system: urban analytics / GIS dashboard / dark mode
   ============================================================ */

:root {
  /* Surfaces */
  --bg-0: #07090d;
  --bg-1: #0b0f15;
  --bg-2: #11161f;
  --bg-3: #181f2b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-faint: rgba(255, 255, 255, 0.04);

  /* Text */
  --ink-0: #f4f6fb;
  --ink-1: #c9d1de;
  --ink-2: #8a93a4;
  --ink-3: #5b6271;

  /* Accents */
  --transit: #4d9eff;        /* transit blue */
  --emerald: #2ce5a6;        /* emerald green */
  --urban:   #ff8a4c;        /* urban orange */
  --cyan:    #5be9e9;        /* GIS neon cyan */
  --violet:  #b78dff;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 60px -30px rgba(0,0,0,0.7);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

/* Light mode override */
body.light {
  --bg-0: #f6f7fb;
  --bg-1: #ffffff;
  --bg-2: #f1f3f8;
  --bg-3: #e6eaf1;
  --line: rgba(8, 12, 22, 0.08);
  --line-strong: rgba(8, 12, 22, 0.16);
  --line-faint: rgba(8, 12, 22, 0.04);
  --ink-0: #0a0d14;
  --ink-1: #2b3140;
  --ink-2: #5b6271;
  --ink-3: #8a93a4;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.7) inset, 0 14px 40px -20px rgba(20,30,60,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ===== Global atmospheric layers ===== */
.atmos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.atmos::before {
  /* grid */
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.atmos::after {
  /* glow blobs */
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 500px at 12% 10%, rgba(77,158,255,0.12), transparent 60%),
    radial-gradient(600px 500px at 88% 30%, rgba(44,229,166,0.08), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(91,233,233,0.07), transparent 60%);
}

/* ===== Layout ===== */
.wrap { position: relative; z-index: 1; }
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 140px 40px;
  position: relative;
}
@media (max-width: 720px) {
  .section { padding: 96px 22px; }
}

/* Section header pattern */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.section-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--transit);
  box-shadow: 0 0 10px var(--transit);
}
.section-eyebrow .coord {
  color: var(--ink-3);
  margin-left: 4px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--ink-0);
}
.section-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--transit), var(--cyan) 50%, var(--emerald));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-lede {
  max-width: 720px;
  color: var(--ink-1);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 56px;
}

/* ===== Cards ===== */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
body.light .card {
  background: var(--bg-1);
  box-shadow: var(--shadow-card);
}

/* mono small label */
.mono { font-family: var(--font-mono); }
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 7px;
  background: var(--bg-2);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink-0);
  font-size: 14px; font-weight: 500;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--bg-3); border-color: var(--ink-2); }
.btn.primary {
  background: linear-gradient(140deg, var(--transit), #2a73d4);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 24px -6px rgba(77,158,255,0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn.primary:hover { box-shadow: 0 8px 30px -6px rgba(77,158,255,0.7); }
.btn.ghost { background: transparent; }
.btn .arrow {
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ===== Selection ===== */
::selection { background: var(--transit); color: #fff; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== Animations ===== */
@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes route-dash {
  to { stroke-dashoffset: -200; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1; transform: none;
}

/* Tag/chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-1);
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); }
.chip.transit .dot { background: var(--transit); box-shadow: 0 0 8px var(--transit); }
.chip.emerald .dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.chip.urban .dot { background: var(--urban); box-shadow: 0 0 8px var(--urban); }
.chip.cyan .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.chip.violet .dot { background: var(--violet); box-shadow: 0 0 8px var(--violet); }

/* divider */
.divider {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 0;
}

/* placeholder striped image */
.ph-image {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(135deg,
      var(--bg-2) 0 12px,
      var(--bg-1) 12px 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ph-image::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(77,158,255,0.10), transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(91,233,233,0.08), transparent 50%);
  pointer-events: none;
}

/* common grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
