/* =========================================================
   Tayyaba Qamar - Portfolio
   Light · pastel · professional-modern
   ========================================================= */

:root {
  /* Backgrounds */
  --bg:            #f8f9fe;
  --bg-soft:       #eef1fa;
  --surface:       #ffffff;
  --surface-2:     #f5f7fd;

  /* Pastel section tints */
  --lav:           #eef0fd;
  --mint:          #e7f7f4;
  --lilac:         #f2ecfb;
  --peach:         #fdeef0;

  /* Lines */
  --line:          rgba(40,52,104,.10);
  --line-strong:   rgba(40,52,104,.18);

  /* Text */
  --text:          #1f2540;
  --muted:         #5a617c;
  --faint:         #8a90a6;

  /* Accents (soft but legible) */
  --brand:         #6d7cf0;   /* periwinkle */
  --brand-2:       #2fb6a8;   /* teal       */
  --accent:        #a98bf0;   /* lilac      */
  --brand-grad:    linear-gradient(120deg, #6d7cf0 0%, #2fb6a8 100%);
  --brand-grad-soft: linear-gradient(120deg, #aeb7f8 0%, #8fd9d0 100%);

  --radius:        16px;
  --radius-sm:     10px;
  --maxw:          1140px;
  --gutter:        clamp(20px, 5vw, 48px);

  --shadow:        0 22px 55px -26px rgba(54,64,140,.40);
  --shadow-soft:   0 14px 36px -22px rgba(54,64,140,.30);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

/* Ambient pastel background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(58vw 58vw at 82% -12%, rgba(109,124,240,.16), transparent 60%),
    radial-gradient(50vw 50vw at -10% 18%, rgba(47,182,168,.14), transparent 60%),
    radial-gradient(42vw 42vw at 50% 118%, rgba(169,139,240,.14), transparent 60%);
  pointer-events: none;
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-2);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand-grad); border-radius: 2px; }

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12; font-weight: 800; letter-spacing: -.02em;
  margin: 14px 0 0;
}
.section-lead { color: var(--muted); max-width: 60ch; margin-top: 14px; font-size: 1.05rem; }
.center .section-lead { margin-inline: auto; }

.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 12px 28px -12px rgba(78,96,220,.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(78,96,220,.7); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(248,249,254,.72);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(255,255,255,.85); border-bottom-color: var(--line); box-shadow: 0 8px 28px -22px rgba(54,64,140,.5); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .95rem;
  box-shadow: 0 8px 18px -8px rgba(78,96,220,.6);
}
.brand small { display: block; font-size: .68rem; font-weight: 500; color: var(--faint); letter-spacing: .02em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; position: relative; transition: color .2s; }
.nav-links a.btn { color: #fff; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--brand-grad); border-radius: 2px; transition: width .25s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-cta { margin-left: 6px; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--text); }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(48px, 8vw, 90px); padding-bottom: clamp(40px, 6vw, 70px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: .82rem; color: var(--muted); font-weight: 500;
  box-shadow: var(--shadow-soft);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(47,182,168,.18); }
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.04; font-weight: 800; letter-spacing: -.03em;
  margin: 20px 0 0;
}
.hero p.lead { color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin-top: 20px; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--brand-2); }

/* Hero visual card */
.hero-visual { position: relative; }
.flow-card {
  background: linear-gradient(180deg, #ffffff, var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.flow-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(109,124,240,.10), transparent 60%);
}
.flow-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; position: relative; }
.flow-head .d { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.flow-head .d:nth-child(1){ background:#ff9a9a; } .flow-head .d:nth-child(2){ background:#ffd58a; } .flow-head .d:nth-child(3){ background:#8fdcae; }
.flow-head span { margin-left: auto; font-size: .72rem; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.flow-step {
  display: flex; align-items: center; gap: 13px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  position: relative;
}
.flow-step + .flow-step { margin-top: 26px; }
.flow-step + .flow-step::before {
  content: ""; position: absolute; left: 27px; top: -23px; width: 2px; height: 20px;
  background: linear-gradient(var(--brand), var(--brand-2));
}
.flow-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--lav); color: var(--brand); }
.flow-ic svg { width: 17px; height: 17px; }
.flow-step b { font-size: .92rem; font-weight: 600; }
.flow-step small { display: block; color: var(--faint); font-size: .78rem; font-weight: 400; }
.flow-step .tag { margin-left: auto; font-size: .68rem; color: var(--brand-2); border: 1px solid var(--line-strong); padding: 3px 8px; border-radius: 999px; }

/* ---------- Stats strip ---------- */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.stat { background: var(--surface); padding: 30px 22px; text-align: center; }
.stat .num { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { color: var(--muted); font-size: .88rem; margin-top: 4px; }

/* ---------- Tools marquee ---------- */
.tools { padding-block: 40px; border-bottom: 1px solid var(--line); }
.tools p { text-align: center; color: var(--faint); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 22px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: scroll 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { color: var(--muted); font-weight: 700; font-size: 1.15rem; opacity: .75; white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Airtable spotlight ---------- */
.airtable-panel {
  border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(30px, 5vw, 56px);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(109,124,240,.12), transparent 55%),
    radial-gradient(120% 120% at 100% 0%, rgba(47,182,168,.12), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}
.airtable-head { text-align: center; max-width: 64ch; margin-inline: auto; }
.airtable-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 42px;
}
.at-feature {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.at-feature:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.at-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--lav); color: var(--brand); }
.at-ic svg { width: 20px; height: 20px; }
.at-feature b { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.at-feature p { color: var(--muted); margin-top: 5px; font-size: .9rem; line-height: 1.5; }
.airtable-note {
  display: flex; align-items: flex-start; gap: 10px; justify-content: center;
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line);
  color: var(--text); font-size: .98rem; font-weight: 500; max-width: 80ch; margin-inline: auto; text-align: left;
}
.airtable-note svg { flex: none; width: 20px; height: 20px; color: var(--brand-2); margin-top: 2px; }

@media (max-width: 920px) { .airtable-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .airtable-grid { grid-template-columns: 1fr; } }

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--lav); color: var(--brand); font-weight: 800; }
.card-ic svg { width: 23px; height: 23px; }
/* pastel rotation for visual variety */
.grid-3 .card:nth-child(4n+1) .card-ic { background: var(--lav);   color: var(--brand);  }
.grid-3 .card:nth-child(4n+2) .card-ic { background: var(--mint);  color: var(--brand-2);}
.grid-3 .card:nth-child(4n+3) .card-ic { background: var(--lilac); color: var(--accent); }
.grid-3 .card:nth-child(4n)   .card-ic { background: var(--peach); color: #e07a93;       }
.card h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em; }
.card p { color: var(--muted); margin-top: 9px; font-size: .96rem; }
.card .stack { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: .76rem; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }

/* ---------- Project cards ---------- */
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.project::before { content: ""; display: block; height: 4px; background: var(--brand-grad); }
.project:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.project-top { padding: 22px 24px 0; }
.project-tag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-2); }
.project h3 { font-size: 1.22rem; font-weight: 700; margin-top: 10px; letter-spacing: -.01em; }
.project p { color: var(--muted); margin-top: 10px; font-size: .95rem; }
.project-foot { margin-top: auto; padding: 18px 24px 24px; }
.project-foot .stack { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.project-metric { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-2); font-weight: 600; font-size: .9rem; }
.project-metric svg { width: 16px; height: 16px; }

/* ---------- Certifications ---------- */
.creds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cred { text-align: center; padding: 26px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .3s, transform .3s, box-shadow .3s; }
.cred:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.cred .ic { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; }
.cred .ic svg { width: 22px; height: 22px; }
.cred b { font-size: 1rem; }
.cred small { display: block; color: var(--faint); margin-top: 4px; font-size: .84rem; }

/* ---------- CTA ---------- */
.cta-band {
  border: 1px solid var(--line); border-radius: 22px; padding: clamp(36px, 6vw, 64px);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(109,124,240,.16), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(47,182,168,.16), transparent 55%),
    var(--surface);
  text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.cta-band p { color: var(--muted); margin: 14px auto 0; max-width: 52ch; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 30px; margin-top: 20px; background: var(--surface); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer-grid .brand { margin-bottom: 12px; }
.footer-about { max-width: 34ch; color: var(--muted); font-size: .92rem; }
.footer-col h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: .94rem; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--faint); font-size: .86rem; }
.socials { display: flex; gap: 12px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: all .25s var(--ease); }
.socials a:hover { color: #fff; background: var(--brand-grad); border-color: transparent; transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .creds { grid-template-columns: repeat(2, 1fr); }
}
/* Nav collapses to a menu earlier; it carries more links now */
@media (max-width: 880px) {
  .nav-links {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(255,255,255,.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter) 24px; transform: translateY(-130%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow-soft);
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-cta { margin: 14px 0 0; justify-content: center; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand small { display: none; }   /* avoid clipping the longer tagline on small phones */
}
@media (max-width: 420px) {
  .creds { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Inner-page components
   ========================================================= */

/* Active nav state */
.nav-links a.active:not(.btn) { color: var(--text); }
.nav-links a.active:not(.btn)::after { width: 100%; }

/* Page hero */
.page-hero { padding-top: clamp(40px, 7vw, 76px); padding-bottom: clamp(26px, 4vw, 44px); text-align: center; }
.page-hero .eyebrow { display: inline-flex; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.07; margin-top: 16px; }
.page-hero p { color: var(--muted); max-width: 62ch; margin: 18px auto 0; font-size: 1.08rem; }

/* Generic section heading helper for left-aligned blocks */
.block-head { max-width: 64ch; }

/* Experience timeline */
.timeline { position: relative; margin-top: 40px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brand), var(--brand-2)); }
.tl-item { position: relative; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -30px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); box-shadow: 0 0 0 4px var(--lav); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tl-role { font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.tl-org { color: var(--brand-2); font-weight: 600; }
.tl-date { color: var(--faint); font-size: .85rem; margin-left: auto; }
.tl-item p { color: var(--muted); margin-top: 8px; font-size: .96rem; }
.tl-item .stack { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }

/* Skills grid */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.skill-cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.skill-cat:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.skill-cat h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 11px; letter-spacing: -.01em; }
.skill-cat .sic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--lav); color: var(--brand); flex: none; }
.skill-cat .sic svg { width: 18px; height: 18px; }
.skill-cat .stack { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }

/* Service detail rows */
.svc { display: grid; grid-template-columns: .9fr 1.3fr; gap: 34px; align-items: start; padding: 38px 0; border-top: 1px solid var(--line); }
.svc:first-of-type { border-top: 0; padding-top: 8px; }
.svc-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.svc-head .stack { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.svc-body > p { color: var(--muted); font-size: 1.02rem; }
.svc-list { margin-top: 18px; display: grid; gap: 11px; }
.svc-list li { position: relative; padding-left: 30px; color: var(--text); font-size: .98rem; }
.svc-list li svg { position: absolute; left: 0; top: 3px; width: 19px; height: 19px; color: var(--brand-2); }

/* Project filter */
.filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 36px; }
.filter button { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-weight: 600; font-size: .88rem; transition: color .2s, background .2s, border-color .2s, transform .2s; }
.filter button:hover { color: var(--brand); border-color: var(--brand); }
.filter button.active { background: var(--brand-grad); color: #fff; border-color: transparent; }
.project.hide { display: none; }

/* Detailed project body */
.project p.p-sub { color: var(--muted); margin-top: 10px; font-size: .95rem; }
.project .p-section { margin-top: 14px; }
.project .p-section b { display: block; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.project .p-section span { color: var(--muted); font-size: .92rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; margin-top: 8px; }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-soft); }
.contact-form h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.contact-form > p { color: var(--muted); font-size: .95rem; margin-top: 6px; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--text);
  font: inherit; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px rgba(109,124,240,.18); }
.field textarea { min-height: 132px; resize: vertical; }
.form-note { color: var(--faint); font-size: .82rem; margin-top: 12px; text-align: center; }
.contact-side .card { margin-bottom: 18px; }
.contact-side .card:last-child { margin-bottom: 0; }
.contact-side .card a.inline { color: var(--brand); font-weight: 600; }
.contact-list { margin-top: 8px; display: grid; gap: 12px; }
.contact-list li { position: relative; padding-left: 30px; color: var(--muted); font-size: .96rem; }
.contact-list li svg { position: absolute; left: 0; top: 2px; width: 19px; height: 19px; color: var(--brand-2); }

@media (max-width: 860px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .svc { grid-template-columns: 1fr; gap: 16px; padding: 30px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .tl-date { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .skills-grid { grid-template-columns: 1fr; }
}
