/* ==========================================================================
   Imran Javed — Portfolio
   Dark violet / glow theme, PT Mono, oklch color system (hue 285)
   ========================================================================== */

:root {
  --bg: oklch(16% 0.028 285);
  --bg2: oklch(12% 0.032 285);
  --surface: oklch(21% 0.032 285);
  --surface2: oklch(26% 0.036 285);
  --panel: oklch(23% 0.035 285 / 0.55);
  --text: oklch(95% 0.01 285);
  --text-dim: oklch(70% 0.02 285);
  --border: oklch(42% 0.05 285 / 0.55);
  --accent: oklch(74% 0.19 285);
  --accent2: oklch(76% 0.15 313);
  --nav-bg: oklch(19% 0.03 285 / 0.72);
  --shadow-sm: 0 2px 8px -2px oklch(10% 0.02 285 / 0.5);
  --shadow: 0 6px 20px -6px oklch(12% 0.04 285 / 0.6), 0 0 0 1px oklch(45% 0.06 285 / 0.25);
  --shadow-hover: 0 14px 34px -8px oklch(55% 0.16 285 / 0.4), 0 0 24px oklch(65% 0.18 285 / 0.28), 0 0 0 1px oklch(60% 0.12 285 / 0.45);
}

:root[data-theme="light"] {
  --bg: oklch(98% 0.006 285);
  --bg2: oklch(96% 0.012 285);
  --surface: oklch(100% 0 0);
  --surface2: oklch(95% 0.012 285);
  --panel: oklch(96% 0.014 285 / 0.7);
  --text: oklch(22% 0.02 285);
  --text-dim: oklch(48% 0.02 285);
  --border: oklch(89% 0.02 285);
  --accent: oklch(56% 0.19 285);
  --accent2: oklch(60% 0.15 313);
  --nav-bg: oklch(100% 0 0 / 0.72);
  --shadow-sm: 0 1px 4px oklch(50% 0.05 285 / 0.14);
  --shadow: 0 4px 14px -4px oklch(50% 0.08 285 / 0.16), 0 0 0 1px oklch(85% 0.02 285 / 0.6);
  --shadow-hover: 0 10px 26px -6px oklch(50% 0.14 285 / 0.26), 0 0 0 1px oklch(65% 0.1 285 / 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  font-family: 'PT Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background .25s ease, color .25s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: var(--bg); }
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: .6; }
input, textarea { outline: none; font-family: inherit; }
input:focus, textarea:focus { border-color: var(--accent); }
button { font-family: inherit; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #1c1530; }
::-webkit-scrollbar-thumb { background: #9c63c9; border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: #be7ae0; }

@keyframes blink-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pulse-skel { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wave-rotate {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

/* Background glow orbs + dot grid */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.bg-orb--1 { top: -220px; left: -160px; width: 520px; height: 520px; background: var(--accent); opacity: .22; filter: blur(90px); }
.bg-orb--2 { bottom: -260px; right: -180px; width: 620px; height: 620px; background: var(--accent2); opacity: .16; filter: blur(100px); }
.bg-dots {
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: .7;
  pointer-events: none;
  z-index: 0;
}

.page { position: relative; z-index: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px clamp(20px, 5vw, 64px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.nav-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.nav-name span { color: var(--text-dim); font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 2px;
  display: flex; align-items: center; gap: 5px;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); }
.nav-link .arrow { display: none; }
.nav-link.active .arrow { display: inline; }

.nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.theme-toggle {
  width: 38px; height: 21px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface2);
  position: relative; cursor: pointer; padding: 0; flex-shrink: 0;
}
.theme-toggle .dot {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--accent);
  transition: left .2s ease; box-shadow: 0 0 6px var(--accent);
}
:root[data-theme="light"] .theme-toggle .dot { left: 19px; }

.btn-resume {
  text-decoration: none; background: var(--accent); color: var(--bg);
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 9px 16px; border-radius: 7px; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, filter .15s ease;
  display: inline-block;
}
.btn-resume:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.08); }

/* ---- Hero ---- */
.hero { padding: 96px 0 100px; }
.hero-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px; align-items: center;
}
.hero-greet { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--text-dim); margin-bottom: 10px; }
.hero-wave { display: inline-block; transform-origin: 70% 70%; animation: wave-rotate 2.4s ease-in-out infinite; font-size: 19px; }
.hero-title { font-size: clamp(40px, 6vw, 66px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.05; }
.hero-title .accent { color: var(--accent); }
.hero-role { font-size: clamp(19px, 2.4vw, 25px); font-weight: 700; color: var(--accent2); margin-bottom: 20px; min-height: 1.3em; display: flex; align-items: center; }
.hero-caret {
  display: inline-block; width: 3px; height: 1em; background: var(--accent2);
  vertical-align: -3px; animation: blink-caret 1s step-end infinite; margin-left: 3px;
}
.hero-desc { font-size: 15px; line-height: 1.7; color: var(--text-dim); max-width: 480px; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.btn-primary {
  cursor: pointer; border: none; background: var(--accent); color: var(--bg);
  font-family: inherit; font-weight: 700; font-size: 13px; padding: 12px 22px;
  border-radius: 8px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, filter .15s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-outline {
  text-decoration: none; cursor: pointer; border: 1.5px solid var(--border);
  background: transparent; color: var(--text); font-family: inherit; font-weight: 700;
  font-size: 13px; padding: 11px 22px; border-radius: 8px; display: inline-block;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-outline:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.social-btn {
  text-decoration: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-dim);
  transition: all .2s ease;
}
.social-btn:hover {
  text-decoration: none; background: var(--accent); color: var(--bg);
  border-color: var(--accent); box-shadow: 0 0 14px var(--accent); transform: scale(1.08);
}
.social-btn.email { font-size: 15px; }

.icon-mask {
  display: inline-block;
  width: 16px; height: 16px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  flex-shrink: 0;
}
.icon-github { -webkit-mask-image: url('images/social/github.svg'); mask-image: url('images/social/github.svg'); }
.icon-linkedin { -webkit-mask-image: url('images/social/linkedin.svg'); mask-image: url('images/social/linkedin.svg'); }
.icon-sql { -webkit-mask-image: url('images/skills/sql.svg'); mask-image: url('images/skills/sql.svg'); }
.social-btn .icon-mask, .footer-social .icon-mask { width: 15px; height: 15px; }

.code-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.code-card-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.code-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.code-card-bar .fname { margin-left: 8px; font-size: 12px; color: var(--text-dim); }
.code-body { display: flex; font-size: 13px; line-height: 2; padding: 18px 0; overflow-x: auto; }
.code-lines { padding: 0 14px; text-align: right; color: var(--text-dim); opacity: .4; user-select: none; border-right: 1px solid var(--border); margin-right: 16px; }
.code-content { padding-right: 18px; white-space: nowrap; }
.code-kw { color: var(--text-dim); }
.code-key { color: var(--accent); }
.code-str { color: var(--accent2); }

.availability {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim); background: var(--surface2);
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border);
}
.availability-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 7px #4ade80; animation: pulse-skel 1.6s ease-in-out infinite; flex-shrink: 0;
}

/* ---- Shared section chrome ---- */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section--panel { background: var(--panel); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 700; margin: 0 0 40px; letter-spacing: -0.01em; }
.section-title .accent { color: var(--accent); }
.section-sub { font-size: 13.5px; color: var(--text-dim); margin: 0 0 32px; }

/* ---- Projects ---- */
.projects-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; }
.projects-head .section-title { margin: 0; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tab {
  cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface2); color: var(--text-dim); transition: all .2s ease;
}
.filter-tab:hover { border-color: var(--accent); color: var(--text); transform: scale(1.04); }
.filter-tab.active { border-color: var(--accent); background: var(--accent); color: var(--bg); box-shadow: var(--shadow-sm); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.project-card {
  cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; animation: fade-in-up .35s ease both;
  box-shadow: var(--shadow); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 20px 20px 0; }
.project-icon-box {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklch, var(--accent) 16%, var(--surface2));
  color: var(--accent);
}
.project-icon-box svg { width: 22px; height: 22px; }
.project-tag-pill {
  font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 5px 12px; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
}
.project-body { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.project-summary { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); flex: 1; }
.tag-chip { font-size: 10.5px; font-weight: 600; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); }

.project-github-link {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 12.5px; font-weight: 600; color: var(--accent); margin-top: 4px;
}
.project-github-link:hover { text-decoration: underline; }
.project-github-link .icon-mask { width: 13px; height: 13px; }

.project-card.more-repos-card { text-decoration: none; color: inherit; }
.project-card.more-repos-card:hover { text-decoration: none; }

.no-results { padding: 40px 0; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ---- Experience ---- */
.timeline { display: flex; flex-direction: column; }
.timeline-row { display: grid; grid-template-columns: 130px 20px 1fr; gap: 0 16px; }
.timeline-period { font-size: 12.5px; color: var(--text-dim); padding-top: 3px; white-space: nowrap; }
.timeline-rail { display: flex; flex-direction: column; align-items: center; }
.timeline-node { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; box-shadow: 0 0 10px var(--accent); }
.timeline-line { width: 2px; flex: 1; background: var(--border); margin-top: 4px; border-radius: 2px; }
.timeline-row:last-child .timeline-line { display: none; }
.timeline-content { padding-bottom: 36px; }
.timeline-role-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.timeline-role { font-size: 16px; font-weight: 700; }
.badge-current {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent2);
  background: var(--surface2); padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border);
}
.badge-current .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); animation: pulse-skel 1.6s ease-in-out infinite; }
.timeline-org { font-size: 13px; color: var(--accent); margin-bottom: 10px; }
.timeline-desc { font-size: 13.5px; line-height: 1.65; color: var(--text-dim); max-width: 560px; }

/* ---- Skills ---- */
.skills-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.skills-card-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.skills-card-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.skills-card-bar .fname { margin-left: 6px; font-size: 11px; color: var(--text-dim); }
.skills-body { padding: 26px 26px 8px; }
.skill-group { margin-bottom: 22px; }
.skill-group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 11px; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-pill {
  font-size: 12.5px; font-weight: 600; padding: 8px 15px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface2); color: var(--text-dim);
}
.skill-pill.clickable {
  cursor: pointer; border-color: var(--accent2); color: var(--text); transition: all .2s ease;
  font-family: inherit;
}
.skill-pill.clickable:hover { transform: scale(1.06); box-shadow: 0 0 12px var(--accent2); }
.skill-pill { display: inline-flex; align-items: center; gap: 7px; }
.skill-pill .skill-logo {
  width: 15px; height: 15px; flex-shrink: 0; border-radius: 3px;
  background: oklch(96% 0.005 285); padding: 1.5px; object-fit: contain;
}
.skill-pill .icon-mask.skill-logo { background: none; padding: 0; color: var(--accent2); }

/* ---- Education ---- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 28px; }
.edu-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
  box-shadow: var(--shadow); transition: border-color .2s ease, transform .2s ease;
}
.edu-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.edu-period { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.edu-degree { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.edu-school { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.edu-note { font-size: 12px; color: var(--accent2); font-weight: 600; }
.cert-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cert-chip { font-size: 11.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); }

/* ---- GitHub ---- */
.gh-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.gh-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.gh-stat-num { font-size: 28px; font-weight: 700; color: var(--accent); }
.gh-stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.gh-skel { height: 88px; border-radius: 12px; background: var(--surface2); animation: pulse-skel 1.4s ease-in-out infinite; }
.gh-error { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; font-size: 13px; color: var(--text-dim); }
.gh-error .cmd { color: var(--accent2); margin-bottom: 8px; }
.gh-error .msg { margin-bottom: 16px; }
.gh-error a { color: var(--accent); font-weight: 600; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-lead { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin: 0 0 8px; max-width: 420px; }
.contact-row {
  text-decoration: none; color: var(--text); font-size: 14px; display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--border); padding-bottom: 12px; transition: color .15s ease;
}
.contact-row:hover { text-decoration: none; color: var(--accent); }
.contact-row .label { color: var(--text-dim); }
.contact-row.static { padding-bottom: 12px; }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.contact-form-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.contact-form-head .prompt { color: var(--accent2); }
.field-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.field-input {
  display: block; width: 100%; margin-top: 6px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 13px; color: var(--text);
}
.field-input:focus { border-color: var(--accent); }
textarea.field-input { resize: vertical; }
.btn-send {
  cursor: pointer; margin-top: 4px; border: none; background: var(--accent); color: var(--bg);
  font-family: inherit; font-weight: 700; font-size: 13px; padding: 12px 20px; border-radius: 8px;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, filter .15s ease;
}
.btn-send:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface2); padding: 26px clamp(20px, 5vw, 64px);
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.footer-socials { display: flex; gap: 12px; }
.footer-social {
  text-decoration: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-dim); transition: all .2s ease;
}
.footer-social:hover { text-decoration: none; background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
.footer-social.email { font-size: 13px; }
.footer-copy { font-size: 11.5px; color: var(--text-dim); }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 4, 16, .65); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; max-width: 640px;
  width: 100%; max-height: 85vh; overflow-y: auto; animation: fade-in-up .25s ease both; box-shadow: var(--shadow-hover);
}
.modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface);
}
.modal-bar-left { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.modal-bar-left .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.modal-close { cursor: pointer; background: none; border: none; font-size: 20px; color: var(--text-dim); font-family: inherit; line-height: 1; padding: 4px 8px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px 28px 30px; }
.modal-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.modal-title { font-size: 24px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.01em; }
.modal-summary { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin: 0 0 20px; }
.modal-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.modal-role { font-size: 14px; margin-bottom: 20px; }
.modal-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.modal-stack .tag-chip { padding: 6px 13px; font-size: 11.5px; }
.modal-highlights { display: flex; flex-direction: column; gap: 9px; }
.modal-highlight { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.modal-highlight .bullet { color: var(--accent2); flex-shrink: 0; }

@media (max-width: 640px) {
  .nav-links { order: 3; width: 100%; justify-content: space-between; gap: 10px; }
  .timeline-row { grid-template-columns: 20px 1fr; }
  .timeline-period { grid-column: 1 / -1; order: -1; padding-top: 0; margin-bottom: 4px; }
}
