/* Maryam Farid — portfolio
   Palette: paper, ink, ultramarine, mint, slate */
:root {
  --paper: #f2f4f8;
  --card: #ffffff;
  --ink: #141a3c;
  --slate: #566082;
  --line: #d9deea;
  --blue: #2d3cf5;
  --blue-dark: #1f2bc4;
  --mint: #c6f3dc;
  --mint-ink: #0d5a3a;
  --radius: 14px;
  --maxw: 1120px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, canvas, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }
.section { padding: 84px 0; }
.section.tight { padding: 56px 0; }
.lede { font-size: 1.2rem; color: var(--slate); max-width: 60ch; }
.muted { color: var(--slate); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 244, 248, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--blue); }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.nav-links a:hover { background: #e4e8f3; }
.nav-links a[aria-current="page"] { background: var(--ink); color: #fff; }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-family: var(--body);
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .status {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--mint); color: var(--mint-ink); font-weight: 600; font-size: .92rem;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero .status i { width: 9px; height: 9px; border-radius: 50%; background: #1a9d62; display: inline-block; }
.space {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden; aspect-ratio: 1 / 1;
  box-shadow: 0 20px 50px -28px rgba(20, 26, 60, .35);
}
.space canvas { width: 100%; height: 100%; }
.space .cap {
  position: absolute; left: 16px; bottom: 12px; font-size: .82rem; color: var(--slate);
  background: rgba(255,255,255,.85); padding: 3px 10px; border-radius: 8px;
}

/* ---------- Facts strip ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 48px; }
.fact { padding: 22px 20px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact b { display: block; font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; }
.fact span { color: var(--slate); font-size: .95rem; }

/* ---------- Page heading ---------- */
.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }

/* ---------- Cards & grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column;
}
.card.featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.card.featured p, .card.featured .muted { color: #c7cdea; }
.card.featured a { color: #fff; }
.card h3 { margin-bottom: .35em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.tags li { background: #e8ebf5; color: var(--ink); font-size: .84rem; padding: 4px 11px; border-radius: 999px; font-weight: 500; }
.featured .tags li { background: rgba(255,255,255,.14); color: #fff; }
.card .links { margin-top: auto; padding-top: 18px; display: flex; gap: 18px; font-weight: 600; font-size: .95rem; }
.card ul.points { padding-left: 18px; margin: 8px 0 0; }
.card ul.points li { margin-bottom: 6px; max-width: 62ch; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 28px; }
.chip {
  font: inherit; font-weight: 500; font-size: .95rem; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.project[hidden] { display: none; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding: 0 0 38px 44px; }
.timeline > li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--blue);
}
.timeline .when { font-weight: 600; color: var(--blue); font-size: .95rem; }
.timeline h3 { margin: 2px 0 2px; }
.timeline .org { color: var(--slate); margin-bottom: 10px; }
.timeline ul { margin: 0; padding-left: 18px; }
.timeline li li { margin-bottom: 6px; max-width: 66ch; }

/* ---------- Skills ---------- */
.skill-block { margin-bottom: 40px; }
.skill-block h3 { margin-bottom: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pills li {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 14px; font-weight: 500; font-size: .96rem;
}

/* ---------- Certs ---------- */
.cert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cert-list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cert-list b { font-weight: 600; }
.cert-list span { color: var(--slate); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.aside-card { position: sticky; top: 96px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; font-weight: 500; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; }
form label { display: block; font-weight: 600; margin: 0 0 6px; }
form .field { margin-bottom: 18px; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(45, 60, 245, .18); }
textarea { min-height: 160px; resize: vertical; }
.contact-links { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.contact-links a { font-weight: 600; font-size: 1.1rem; }

/* ---------- CTA band ---------- */
.cta { background: var(--ink); color: #fff; border-radius: 24px; padding: 56px; margin-bottom: 84px; }
.cta p { color: #c7cdea; }
.cta .btn-primary { background: #fff; color: var(--ink); }
.cta .btn-primary:hover { background: var(--mint); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--slate); font-size: .95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--slate); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact { border-bottom: 1px solid var(--line); }
  .cta { padding: 36px 26px; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .section { padding: 60px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .menu-btn { display: inline-block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 20px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}
