/* Shazia Kausar — Senior Full Stack Software Engineer
   Deep slate + amber · Geist / Geist Mono */

:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1d212a;
  --border: #252932;
  --text: #e8eaed;
  --muted: #9aa1ac;
  --accent: #f5a524;
  --accent-ink: #1a1403;

  --wrap: 1200px;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --sec: clamp(4.5rem, 9vw, 7.5rem);
  --r: 14px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.125rem, 0.95rem + 0.7vw, 1.375rem);
  --t-h3: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  --t-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --t-h1: clamp(2.5rem, 1.5rem + 4.4vw, 4.75rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  font-size: var(--t-md);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.12;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gut);
  top: 0.75rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 500;
}

/* mono is for data: dates, counts, tags, labels */
.kicker,
.tags li,
.role-when,
.project-tag,
.hero-stats dt,
.cred-label,
.contact-label,
.post-meta,
.foot-inner,
.nav-menu a {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover { background: #ffb948; }
.btn:active { transform: translateY(1px) scale(0.985); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Nav ─────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

@supports (backdrop-filter: blur(8px)) {
  .nav { backdrop-filter: blur(10px); }
}

.nav.is-stuck { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand-mark {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
  transform: rotate(45deg);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.5rem);
}

.nav-menu a[data-spy] {
  position: relative;
  font-size: var(--t-xs);
  color: var(--muted);
  padding: 0.4rem 0;
  transition: color 0.25s var(--ease);
}

.nav-menu a[data-spy]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-menu a[data-spy]:hover { color: var(--text); }

.nav-menu a[data-spy].is-active { color: var(--accent); }
.nav-menu a[data-spy].is-active::after { transform: scaleX(1); }

.nav-cv { margin-left: 0.5rem; padding: 0.55rem 0.9rem; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-size: var(--t-xs);
  font-family: "Geist Mono", monospace;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.nav-toggle-bars { display: grid; gap: 3px; }
.nav-toggle-bars i { display: block; width: 14px; height: 1.5px; background: currentColor; }

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) var(--sec);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.hero-main { max-width: 46rem; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--t-xs);
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.hero-name {
  font-size: var(--t-h1);
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-role {
  font-size: var(--t-lg);
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.875rem;
}

.hero-lede {
  color: var(--muted);
  max-width: 54ch;
  margin-top: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero-portrait {
  margin: 0;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--panel);
  justify-self: start;
  width: min(100%, 15rem);
  aspect-ratio: 4 / 5;
}

@media (min-width: 64rem) {
  .hero-portrait {
    justify-self: end;
    width: 20rem;
    aspect-ratio: 4 / 5;
  }
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  /* settle the studio grey into the page's own temperature */
  filter: saturate(0.88) contrast(1.04) brightness(0.94);
}

/* the picture sinks into the page rather than ending on a hard edge */
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to bottom, rgba(15, 17, 21, 0), rgba(15, 17, 21, 0.92));
  pointer-events: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  max-width: 34rem;
  margin-top: 2.5rem;
}

.hero-stats > div {
  background: var(--panel);
  padding: 1.25rem 1.25rem 1.1rem;
}

.hero-stats dt {
  font-size: var(--t-xs);
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hero-stats dd {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-stats dd span { color: var(--accent); }

/* ── Sections ────────────────────────────────────────────── */

.section { padding-block: var(--sec); }

.section-head {
  max-width: 48rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.section-head h2 { font-size: var(--t-h2); }

.section-head p {
  color: var(--muted);
  margin-top: 0.875rem;
  max-width: 56ch;
}

.section-head a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── Tags ────────────────────────────────────────────────── */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.tags li {
  font-size: var(--t-xs);
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tags li:hover { color: var(--accent); border-color: var(--accent); }

/* ── Tech stack ──────────────────────────────────────────── */

/* Products get their mark; practices get words. */
.techs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.techs li {
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  transition: background 0.25s var(--ease);
}

.techs li:hover { background: var(--panel-2); }

.techs img {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  object-fit: contain;
  transition: transform 0.3s var(--ease);
}

.techs img.is-wide { width: 2.5rem; }

/* Four marks are dark artwork and vanish on this ground. Kafka (#231f20)
   and the AWS wordmark are monochrome, so they take their official
   dark-background form: white. MySQL and Terraform only need a lift. */
.techs img.on-dark { filter: brightness(0) invert(1) opacity(0.92); }
.techs img.lift { filter: brightness(1.45) saturate(1.15); }

.techs li:hover img { transform: scale(1.1); }

.techs span {
  font-size: var(--t-sm);
  color: var(--muted);
  transition: color 0.25s var(--ease);
  overflow-wrap: anywhere;
}

.techs li:hover span { color: var(--text); }

.subhead {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.25rem;
}

/* Rows, not cards: boxes left ragged heights and dead space, and the page
   already speaks in label-column rows (see .role). */
.practices {
  display: grid;
  border-top: 1px solid var(--border);
}

.practice {
  display: grid;
  gap: 0.75rem;
  padding-block: clamp(1.25rem, 2.4vw, 1.75rem);
  border-bottom: 1px solid var(--border);
}

.practice dt {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: var(--t-xs);
  color: var(--muted);
  padding-top: 0.3rem;
}

/* ── Projects ────────────────────────────────────────────── */

.projects { display: grid; gap: 1px; background: var(--border); border-block: 1px solid var(--border); }

.project {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  transition: background 0.3s var(--ease);
}

.project:hover { background: var(--panel); }

.project > * { padding-inline: clamp(0rem, 1.5vw, 1.25rem); }

.project-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.875rem;
  margin-bottom: 0.75rem;
}

.project-title h3 { font-size: var(--t-h3); }

.project-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.25s var(--ease);
}

.project-title a:hover { color: var(--accent); }

.project-tag {
  font-size: var(--t-xs);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.project-tag.is-live { color: var(--accent); border-color: var(--accent); }

.project p { color: var(--muted); max-width: 68ch; margin-bottom: 1.125rem; }

/* ── Experience ──────────────────────────────────────────── */

.roles { display: grid; gap: clamp(2rem, 4vw, 3rem); }

.role { display: grid; gap: 0.5rem; }

.role-when {
  font-size: var(--t-xs);
  color: var(--muted);
  padding-top: 0.3rem;
  white-space: nowrap;
}

.role-body h3 { font-size: var(--t-h3); }
.role-body h3 span { color: var(--accent); font-weight: 500; }
.role-body > p { color: var(--muted); margin: 0.75rem 0 1.125rem; max-width: 68ch; }

.credentials {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
}

.cred-label { font-size: var(--t-xs); color: var(--accent); margin-bottom: 0.5rem; }
.cred-main { font-weight: 600; }
.cred-sub { color: var(--muted); font-size: var(--t-sm); margin-top: 0.2rem; }

/* ── Blog feed ───────────────────────────────────────────── */

.feed {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.post {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: clamp(1.125rem, 2.2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

a.post:hover { border-color: var(--accent); transform: translateY(-3px); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: var(--t-xs);
  color: var(--muted);
}

.post-title {
  font-size: var(--t-md);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-foot { margin-top: auto; }

.feed-note {
  grid-column: 1 / -1;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.feed-note button {
  font: inherit;
  font-size: var(--t-sm);
  margin-top: 1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: var(--r-sm);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}

/* skeletons */
.sk {
  background: var(--panel-2);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer { 100% { transform: translateX(100%); } }

.sk-meta { height: 0.75rem; width: 55%; }
.sk-title { height: 1.1rem; width: 100%; }
.sk-title.short { width: 72%; }
.sk-tags { height: 1.4rem; width: 60%; margin-top: auto; border-radius: 999px; }

/* ── Contact ─────────────────────────────────────────────── */

.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }

.contact-main h2 { font-size: var(--t-h2); }

.contact-main p {
  color: var(--muted);
  margin: 1rem 0 2rem;
  max-width: 48ch;
}

.contact-list {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  align-self: start;
}

.contact-list li {
  background: var(--panel);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.contact-label { font-size: var(--t-xs); color: var(--muted); }

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--t-sm);
  font-weight: 500;
  transition: color 0.25s var(--ease);
}

.contact-list a:hover { color: var(--accent); }
.contact-plain { font-size: var(--t-sm); color: var(--text); }

/* ── Footer ──────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--border);
  padding-block: 2rem 2.5rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: var(--t-xs);
  color: var(--muted);
}

.foot-top { display: inline-flex; align-items: center; gap: 0.4rem; transition: color 0.25s var(--ease); }
.foot-top:hover { color: var(--accent); }

/* ── The bot ─────────────────────────────────────────────── */

.bot {
  position: fixed;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 160px;
  height: 180px;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.bot.is-ready { opacity: 1; transform: none; }
.bot canvas { display: block; width: 100% !important; height: 100% !important; }

/* ── Reveals ─────────────────────────────────────────────── */

/* Only ever hide content while scripting is confirmed live (html.js, set by
   the inline failsafe in the head). Without it the page renders in full. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
  }

  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ── Wider ───────────────────────────────────────────────── */

@media (min-width: 40rem) {
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credentials { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .practice { grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; }
  .techs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .role { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.5rem; }
}

@media (min-width: 64rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  /* width: fit-content, or the container's border colour shows past the
     last column as a phantom fourth cell */
  .hero-stats {
    grid-template-columns: repeat(3, 9.5rem);
    width: fit-content;
  }

  .techs { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .practice { grid-template-columns: 11rem minmax(0, 1fr); gap: 2.5rem; }

  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .contact-grid { grid-template-columns: 1.15fr 1fr; align-items: start; }

  .role { grid-template-columns: 10rem minmax(0, 1fr); gap: 2.5rem; }
}

/* ── Phone ───────────────────────────────────────────────── */

@media (max-width: 63.99rem) {
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gut) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.is-open { display: flex; }
  .nav-menu a[data-spy] { padding: 0.75rem 0; font-size: var(--t-sm); }
  .nav-menu a[data-spy]::after { display: none; }
  .nav-cv { margin: 0.75rem 0 0; justify-content: center; }
}

@media (max-width: 39.99rem) {
  .hero-stats { grid-template-columns: 1fr; max-width: none; }
  .project > * { padding-inline: 0; }
}

/* The bot is a desktop companion only: below this it would sit on top of
   the content. Kept in step with the guard in js/main.js. */
@media (max-width: 64rem) {
  .bot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bot { display: none; }
}
