/* ztariq.com — personal site. Hand-written, no frameworks, no external requests. */

:root {
  --paper: #f6f2ea;
  --ink: #14161a;
  --muted: #4b5058;
  --line: #ded7c9;
  --line-strong: #c9c1b0;
  --card: #fffdf8;
  --accent: #0e5a52;
  --accent-soft: #d8e7e3;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px rgba(20, 22, 26, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1012;
    --ink: #eceae4;
    --muted: #b3b0a9;
    --line: #262b30;
    --line-strong: #3a4046;
    --card: #15181b;
    --accent: #63b8a8;
    --accent-soft: #16302c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .brand, .facts b {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0;
}

p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { font-size: 1.08rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 116px) 0 clamp(24px, 4vw, 48px); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 700;
  color: var(--accent); margin: 0 0 18px;
}
.hero h1 { font-size: clamp(2.6rem, 7.2vw, 4.8rem); margin-bottom: .18em; }
.hero .role { color: var(--muted); font-size: .98rem; letter-spacing: .02em; margin: 0 0 26px; }
.lead { font-size: clamp(1.06rem, 2.1vw, 1.28rem); max-width: 62ch; margin: 0 0 30px; }
.lead strong { font-weight: 650; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: .55em; padding: .72em 1.2em;
  border-radius: 999px; font-weight: 650; font-size: .95rem; text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--ghost { border-color: color-mix(in srgb, var(--ink) 30%, transparent); background: var(--card); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: clamp(36px, 6vw, 64px); border-radius: 14px; overflow: hidden;
}
.facts div { background: var(--paper); padding: 22px 22px; }
.facts b { display: block; font-size: 1.9rem; letter-spacing: -.02em; }
.facts span { color: var(--muted); font-size: .86rem; line-height: 1.4; display: block; margin-top: 2px; }

/* ---------- sections ---------- */
section { padding: clamp(46px, 7vw, 84px) 0; border-top: 1px solid var(--line); }
.section-head { display: block; margin-bottom: 34px; }
.num { display: block; color: var(--accent); font-size: .74rem; font-weight: 700; letter-spacing: .18em; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(1.55rem, 3.4vw, 2.15rem); }

.about p { max-width: 72ch; color: var(--ink); }
.about p.note { color: var(--muted); }

/* ---------- experience ---------- */
.timeline { border-left: 2px solid var(--line-strong); margin-left: 5px; padding-left: 32px; display: grid; gap: 46px; }
.job { position: relative; }
.job::before {
  content: ""; position: absolute; left: -39px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--line-strong);
}
.job--current::before { background: var(--accent); border-color: var(--accent); }
.job h3 { font-size: 1.22rem; }
.job .org { color: var(--muted); margin: .25em 0 0; }
.job .dates { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: .55em 0 0; font-weight: 600; }
.badge {
  display: inline-block; margin-left: .5em; padding: .18em .6em; border-radius: 999px;
  background: var(--accent); color: var(--paper); font-family: inherit; font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; vertical-align: .18em; font-weight: 700;
}
.bullets { margin: .9em 0 0; padding-left: 1.15em; }
.bullets li { margin: .45em 0; }
.bullets li::marker { color: var(--accent); }
details.more { margin-top: .3em; }
details.more summary {
  cursor: pointer; display: inline-flex; align-items: center; gap: .5em;
  margin-top: .6em; padding: .4em .9em; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--card); color: var(--ink);
  font-size: .84rem; font-weight: 600; list-style: none;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "⌄"; font-size: .95em; line-height: 1; }
details.more[open] summary::after { content: "⌃"; }
details.more summary:hover { border-color: var(--ink); }
details.more .bullets { margin-top: .6em; }

/* ---------- skills + certs ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(262px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h3 { font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .01em; }
.grid--skills .card h3 { min-height: 2.35em; }
.grid--skills > .card:last-child { grid-column: 1 / -1; }
.card p { margin: .5em 0 0; color: var(--muted); font-size: .93rem; }

.cert { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.cert .meta { text-align: right; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.cert .meta b { display: block; color: var(--ink); font-weight: 650; }

/* ---------- contact + footer ---------- */
.contact-box {
  background: var(--ink); color: var(--paper); border-radius: 20px;
  padding: clamp(26px, 4.5vw, 46px); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 22px;
}
.contact-box h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.contact-box p { color: color-mix(in srgb, var(--paper) 78%, transparent); margin: .5em 0 0; max-width: 46ch; }
.contact-box .btn { border-color: var(--paper); }
.contact-box .btn--primary { background: var(--paper); color: var(--ink); }
.contact-box .btn--ghost { color: var(--paper); background: transparent; }

.site-footer { padding: 36px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.site-footer a:hover { color: var(--ink); }
.site-footer .privacy { width: 100%; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .86rem; }
.to-top { text-decoration: none; }

@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; row-gap: 4px; }
  .site-nav { width: 100%; flex-wrap: wrap; gap: 8px 16px; }
  .site-nav a { font-size: .86rem; }
}

@media (max-width: 420px) {
  .actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (max-width: 700px) {
  .cert { flex-direction: column; }
  .cert .meta { text-align: left; }
  .timeline { padding-left: 22px; }
  .job::before { left: -28px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

@media print {
  .site-header, .actions, .contact-box .btn, .to-top { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  section { break-inside: avoid; padding: 18px 0; }
  details.more { display: none; }
  a { color: #000; text-decoration: none; }
}
