/* ============ Zubiya Moin — Portfolio ============ */
:root {
  --bg: #faf8f5;
  --bg-alt: #f1ede7;
  --card: #ffffff;
  --ink: #1c2430;
  --ink-soft: #4b5563;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-2: #c2632a;
  --line: #e5e0d8;
  --shadow: 0 1px 2px rgba(28,36,48,.06), 0 8px 24px rgba(28,36,48,.07);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}
[data-theme="dark"] {
  --bg: #11161d;
  --bg-alt: #161d26;
  --card: #1b232e;
  --ink: #edf0f4;
  --ink-soft: #b7c0cc;
  --muted: #8b95a3;
  --accent: #2dd4bf;
  --accent-soft: #103b37;
  --accent-2: #f0975a;
  --line: #2a3441;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  transition: background .3s, color .3s;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 12px; }
.section-kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: .75rem;
  font-weight: 700; color: var(--accent); margin-bottom: 10px; display: block;
}
.section-intro { color: var(--ink-soft); max-width: 640px; margin-bottom: 40px; }
a { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--line); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem;
  display: grid; place-items: center; color: var(--ink);
}
.nav-burger { display: none; background: none; border: none; font-size: 1.5rem; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 90px; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent);
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600; margin-bottom: 22px;
}
.hero-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 560px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  text-decoration: none; transition: transform .15s, box-shadow .15s; cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
[data-theme="dark"] .btn-primary { color: #06251f; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.hero-card h3 { font-size: 1rem; margin-bottom: 16px; color: var(--muted); font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.hero-fact { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; align-items: baseline; }
.hero-fact:last-child { border-bottom: none; }
.hero-fact .k { color: var(--accent); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero-fact .v { color: var(--ink-soft); }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 64px; }
.stat { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 12px; }
.stat .num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--accent); display: block; }
.stat .lbl { font-size: .82rem; color: var(--muted); }

/* ---------- Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .2s, box-shadow .2s;
}
.cap:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cap .icon { font-size: 1.6rem; margin-bottom: 14px; display: block; }
.cap h3 { font-size: 1.08rem; margin-bottom: 10px; }
.cap p { font-size: .9rem; color: var(--ink-soft); }
.cap .cap-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.cap .cap-tags span {
  font-size: .72rem; background: var(--bg-alt); color: var(--ink-soft);
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
}

/* ---------- Projects ---------- */
#projects { background: var(--bg-alt); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filters .flabel { width: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.chip {
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink-soft);
  border-radius: 999px; padding: 7px 16px; font-size: .84rem; font-weight: 500;
  cursor: pointer; transition: all .15s; font-family: var(--font-body);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .chip.active { color: #06251f; }
.proj-count { font-size: .85rem; color: var(--muted); margin: 18px 0 22px; }
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proj {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; cursor: pointer; transition: transform .2s, box-shadow .2s; position: relative;
}
.proj:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.proj .client { font-size: .76rem; font-weight: 700; color: var(--accent-2); text-transform: uppercase; letter-spacing: .08em; }
.proj h3 { font-size: 1.05rem; margin: 8px 0 10px; }
.proj .desc { font-size: .89rem; color: var(--ink-soft); max-height: 4.6em; overflow: hidden; transition: max-height .35s ease; }
.proj.open .desc { max-height: 30em; }
.proj .more { font-size: .8rem; color: var(--accent); font-weight: 600; margin-top: 10px; display: inline-block; }
.proj .ptags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.proj .ptags span { font-size: .7rem; background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); padding: 3px 9px; border-radius: 999px; }
.proj .plink { font-size: .82rem; font-weight: 600; margin-top: 12px; display: none; }
.proj.open .plink { display: inline-block; }

/* ---------- Publications ---------- */
.pub-list { display: grid; gap: 14px; }
.pub {
  display: flex; gap: 18px; align-items: baseline;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
}
.pub .year { font-family: var(--font-display); font-weight: 700; color: var(--accent); min-width: 52px; }
.pub .pt { font-weight: 600; font-size: .95rem; }
.pub .pm { font-size: .84rem; color: var(--muted); }
.pub a { text-decoration: none; font-weight: 600; font-size: .84rem; white-space: nowrap; margin-left: auto; }
.pub a:hover { text-decoration: underline; }

/* ---------- Experience timeline ---------- */
#experience { background: var(--bg-alt); }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.titem { position: relative; padding-bottom: 36px; }
.titem:last-child { padding-bottom: 0; }
.titem::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-alt);
}
.titem .twhen { font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.titem h3 { font-size: 1.15rem; margin: 4px 0 2px; }
.titem .twhere { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.titem ul { padding-left: 18px; color: var(--ink-soft); font-size: .92rem; display: grid; gap: 6px; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.edu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.edu .ewhen { font-size: .78rem; font-weight: 700; color: var(--accent); }
.edu h3 { font-size: 1.1rem; margin: 6px 0 4px; }
.edu .ewhere { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.edu p { font-size: .89rem; color: var(--ink-soft); }
.award-strip { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.award-strip span {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: .82rem; color: var(--ink-soft);
}
.award-strip span b { color: var(--ink); }

/* ---------- Toolkit ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 18px; font-size: .88rem; font-weight: 500;
}
.tool em { font-style: normal; color: var(--muted); font-size: .76rem; margin-left: 6px; }

/* ---------- Contact ---------- */
#contact { background: var(--ink); color: var(--bg); text-align: center; }
[data-theme="dark"] #contact { background: var(--bg-alt); color: var(--ink); }
#contact h2 { color: inherit; }
#contact .section-intro { margin-left: auto; margin-right: auto; color: inherit; opacity: .75; }
.contact-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.contact-meta { margin-top: 34px; font-size: .9rem; opacity: .7; }
.contact-meta a { color: inherit; }

footer { padding: 26px 0; text-align: center; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 18px 24px; gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
}
@media (max-width: 560px) {
  section { padding: 60px 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .pub { flex-wrap: wrap; }
  .pub a { margin-left: 0; }
}
