/* ==========================================================================
   Ahmed Saeed Atya — personal site
   Design tokens, light/dark themes, layout and components.
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --text: #0e1626;
  --text-2: #3d4659;
  --muted: #667085;
  --line: #e2e6ef;
  --brand: #1d4ed8;
  --brand-2: #4f7cff;
  --brand-soft: rgba(29, 78, 216, 0.08);
  --gold: #a87b12;
  --gold-2: #e0b44a;
  --gold-soft: rgba(201, 152, 34, 0.12);
  --hero-ink: #0b1222;
  --shadow-sm: 0 1px 2px rgba(14, 22, 38, 0.06);
  --shadow: 0 1px 2px rgba(14, 22, 38, 0.05), 0 12px 32px -12px rgba(14, 22, 38, 0.14);
  --shadow-lg: 0 30px 60px -24px rgba(14, 22, 38, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #080d19;
  --bg-alt: #0b1222;
  --surface: #0f1729;
  --surface-2: #141e34;
  --text: #e8edf7;
  --text-2: #c2cada;
  --muted: #8d97ad;
  --line: #1f2a42;
  --brand: #6f97ff;
  --brand-2: #9db8ff;
  --brand-soft: rgba(111, 151, 255, 0.12);
  --gold: #e7bd55;
  --gold-2: #f6d98b;
  --gold-soft: rgba(231, 189, 85, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 36px -16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 200;
  background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.text-gradient {
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 45%, var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font: 600 0.95rem/1 var(--font-body);
  padding: 0.95rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 0.6rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #2f5fe6);
  box-shadow: 0 10px 24px -10px rgba(29, 78, 216, 0.7);
}
[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #3b6cf0, #5b86ff); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-gold {
  color: #1b1405;
  background: linear-gradient(135deg, #f6d98b, #d9a63a);
  box-shadow: 0 10px 24px -12px rgba(201, 152, 34, 0.8);
  white-space: nowrap;
}
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; transition: border-color 0.2s, color 0.2s, background-color 0.3s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline-block; }
[data-theme="dark"] .theme-icon-dark { display: none; }

/* ---------- Header ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 120;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold-2), var(--brand-2));
}

.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none !important; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  font: 800 0.9rem/1 var(--font-head); letter-spacing: 0.02em; color: #1b1405;
  background: linear-gradient(135deg, #f6d98b, #d9a63a);
  box-shadow: 0 6px 16px -8px rgba(201, 152, 34, 0.9);
}
.brand-name { font: 700 1rem/1 var(--font-head); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 0.25rem; }
.main-nav a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; color: var(--text-2); text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.main-nav a:hover { color: var(--text); background: var(--brand-soft); }
.main-nav a.is-active { color: var(--brand); background: var(--brand-soft); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 72px) 0 72px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.orb-1 { width: 520px; height: 520px; top: -160px; right: -120px; background: radial-gradient(circle, rgba(79, 124, 255, 0.45), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.orb-2 { width: 420px; height: 420px; bottom: -180px; left: -140px; background: radial-gradient(circle, rgba(224, 180, 74, 0.38), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
  opacity: 0.6;
}
@keyframes drift { to { transform: translate3d(40px, 30px, 0) scale(1.08); } }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 56px; align-items: center; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.85rem; font-weight: 600; color: var(--text-2);
  padding: 0.45rem 0.9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; margin: 1.4rem 0 0.6rem; }
.hero-role { font: 600 clamp(1.1rem, 2.2vw, 1.45rem)/1.3 var(--font-head); color: var(--text-2); margin-bottom: 1.2rem; }
.hero-summary { font-size: 1.08rem; color: var(--text-2); max-width: 36em; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.hero-social { display: flex; gap: 0.6rem; }
.hero-social a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: transform 0.2s, color 0.2s, border-color 0.2s;
}
.hero-social a:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }

.hero-visual { position: relative; justify-self: center; width: min(380px, 100%); }
.portrait { position: relative; aspect-ratio: 1; border-radius: 32px; padding: 10px; }
.portrait-ring {
  position: absolute; inset: 0; border-radius: 32px;
  background: conic-gradient(from 210deg, var(--gold-2), var(--brand-2), #8b5cf6, var(--gold));
  animation: spin 14s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 3px;
}
.portrait img {
  position: relative; width: 100%; height: 100%; object-fit: cover;
  border-radius: 24px; box-shadow: var(--shadow-lg);
}
@keyframes spin { to { filter: hue-rotate(360deg); } }

.golden-chip {
  position: absolute; left: -28px; bottom: 28px;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem 0.7rem 0.7rem; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  color: var(--text); text-decoration: none !important;
  animation: float 6s ease-in-out infinite;
}
.golden-chip strong { display: block; font: 700 0.95rem/1.2 var(--font-head); }
.golden-chip small { color: var(--muted); font-size: 0.78rem; }
.golden-icon {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  color: #1b1405; background: linear-gradient(135deg, #f6d98b, #d9a63a); font-size: 1.15rem;
}
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 0.45rem;
  font: 500 0.78rem/1 var(--font-mono); color: var(--text-2);
  padding: 0.55rem 0.8rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.float-chip i { color: var(--brand); }
.float-chip-a { top: 18px; right: -30px; animation: float 7s ease-in-out infinite 0.6s; }
.float-chip-b { top: 46%; right: -44px; animation: float 8s ease-in-out infinite 1.2s; }
@keyframes float { 50% { transform: translateY(-8px); } }

.stats {
  position: relative; margin-top: 64px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat { display: flex; flex-direction: column-reverse; padding: 1.5rem 1.75rem; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dd { font: 800 clamp(1.8rem, 3.4vw, 2.5rem)/1 var(--font-head); color: var(--text); letter-spacing: -0.03em; }
.stat:first-child dd { color: var(--gold); }
.stat dt { margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 500 0.78rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--brand);
}
.eyebrow-num {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px;
  color: var(--gold); background: var(--gold-soft);
}
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; margin-top: 0.9rem; }
.section-lede { margin-top: 0.9rem; color: var(--muted); font-size: 1.05rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.3s ease;
}
.card-title { font-size: 1.15rem; margin-bottom: 1.25rem; }
.group-title {
  display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap;
  font-size: 1.15rem; margin: 3rem 0 1.25rem;
}
.group-title.is-first { margin-top: 0; }
.group-note { font: 500 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font: 500 0.76rem/1 var(--font-mono); color: var(--text-2);
  padding: 0.45rem 0.65rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line);
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.about-copy p { color: var(--text-2); }
.about-copy .lead { font-size: 1.2rem; line-height: 1.6; color: var(--text); font-weight: 500; }
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.focus-card {
  padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.focus-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.focus-card i { font-size: 1.25rem; color: var(--brand); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); margin-bottom: 1rem; }
.focus-card h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.focus-card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--gold-2), var(--brand-2) 30%, var(--line) 80%);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot {
  position: absolute; left: -33px; top: 30px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--brand-2);
}
.timeline-item.is-current .timeline-dot { border-color: var(--gold); box-shadow: 0 0 0 6px var(--gold-soft); }
.job { padding: 1.6rem 1.75rem; }
.job:hover { box-shadow: var(--shadow); }
.timeline-item.is-current .job { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); box-shadow: var(--shadow); }
.job-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 0.9rem; }
.job-title { font-size: 1.2rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.badge-current {
  font: 600 0.68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold); background: var(--gold-soft); padding: 0.35rem 0.55rem; border-radius: 6px;
}
.job-org { margin: 0.35rem 0 0; color: var(--text-2); font-weight: 600; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
.client { color: var(--muted); font-weight: 500; }
.client i { color: var(--brand); margin-right: 0.2rem; }
.job-dates {
  flex-shrink: 0; font: 500 0.8rem/1 var(--font-mono); color: var(--brand);
  background: var(--brand-soft); padding: 0.5rem 0.7rem; border-radius: 8px; white-space: nowrap;
}
.job-points li { position: relative; padding-left: 1.2rem; margin-bottom: 0.45rem; color: var(--text-2); font-size: 0.97rem; }
.job-points li::before {
  content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; border-radius: 2px;
  background: var(--brand-2); transform: rotate(45deg);
}

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.project-grid > .project { grid-column: span 2; }
.project-grid > .project.is-featured,
.project-grid > .project:nth-child(6),
.project-grid > .project:nth-child(7) { grid-column: span 3; }
.project-grid-3 > .project:nth-child(n) { grid-column: span 2; }
.project { position: relative; padding: 1.6rem; display: flex; flex-direction: column; overflow: hidden; }
.project::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-2), transparent); opacity: 0; transition: opacity 0.25s;
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.project:hover::before { opacity: 1; }
.project.is-featured { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 7%, var(--surface)), var(--surface) 60%); }
.project.is-featured::before { opacity: 1; background: linear-gradient(90deg, var(--gold-2), var(--brand-2)); }
.project-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; margin-bottom: 1.1rem;
  color: var(--brand); background: var(--brand-soft); font-size: 1.15rem;
}
.project.is-featured .project-icon { color: var(--gold); background: var(--gold-soft); }
.project-role { font: 500 0.74rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 0.5rem; }
.project-title { font-size: 1.15rem; margin-bottom: 0.65rem; }
.project-desc { color: var(--text-2); font-size: 0.95rem; flex: 1; }

/* ---------- Expertise ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-bottom: 28px; }
.skill-card { grid-column: span 2; }
.skill-card:nth-child(n + 4) { grid-column: span 3; }
.skill-card { padding: 1.5rem; }
.skill-card:hover { box-shadow: var(--shadow); }
.skill-card h3 { font-size: 1.02rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.skill-card h3 i { color: var(--brand); }
.cap-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.cap-card { padding: 1.75rem; }
.cap-list { display: grid; gap: 0; }
.cap-list > div { display: grid; grid-template-columns: 190px 1fr; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.cap-list > div:first-child { border-top: 0; padding-top: 0; }
.cap-list dt { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.cap-list dd { color: var(--text-2); font-size: 0.93rem; }
.domain-col { display: grid; gap: 14px; }
.domain-col .card-title { margin-bottom: 0.25rem; }
.domain-card { display: flex; gap: 1rem; padding: 1.3rem; }
.domain-card i { flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--gold); background: var(--gold-soft); }
.domain-card h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.domain-card p { margin: 0; color: var(--text-2); font-size: 0.92rem; }

/* ---------- Credentials ---------- */
.golden-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.75rem; align-items: center;
  padding: 2rem 2.25rem; border-radius: 24px; margin-bottom: 28px; color: #f8f3e6;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(246, 217, 139, 0.28), transparent 50%),
    linear-gradient(135deg, #0b1222 0%, #18223d 60%, #2a2412 100%);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(231, 189, 85, 0.35);
}
.golden-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.08) 45%, transparent 60%);
  transform: translateX(-100%); animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.golden-badge {
  width: 84px; height: 84px; display: grid; place-items: center; border-radius: 22px; font-size: 2.2rem;
  color: #1b1405; background: linear-gradient(135deg, #f6d98b, #d9a63a);
  box-shadow: 0 0 0 8px rgba(231, 189, 85, 0.15), 0 18px 40px -12px rgba(231, 189, 85, 0.7);
}
.golden-kicker { margin: 0 0 0.3rem; font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #f6d98b; }
.golden-copy h3 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.4rem; }
.golden-copy p:last-child { margin: 0; color: rgba(248, 243, 230, 0.8); }

.achievements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
.achievements li {
  display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 1.15rem;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 0.95rem;
}
.achievements i { color: var(--gold); margin-top: 0.25rem; }
.achievements strong { color: var(--text); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cert {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.15rem;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.cert:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.cert-code { font: 800 1.25rem/1 var(--font-head); color: var(--brand); letter-spacing: -0.01em; }
.cert.pro { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); background: linear-gradient(160deg, var(--gold-soft), var(--surface) 70%); }
.cert.pro .cert-code { color: var(--gold); }
.cert-name { font-size: 0.85rem; color: var(--text-2); line-height: 1.4; }

.vendor-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 10px; }
.vendor-list li {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem; color: var(--text-2);
}
.vendor-tag {
  flex-shrink: 0; min-width: 48px; text-align: center; font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.06em;
  color: var(--brand); background: var(--brand-soft); padding: 0.4rem 0.5rem; border-radius: 6px;
}

.training { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.training summary {
  cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; display: flex; align-items: center; gap: 0.6rem; list-style: none;
}
.training summary::-webkit-details-marker { display: none; }
.training summary::before { content: "\f054"; font: 900 0.75rem/1 "Font Awesome 6 Free"; color: var(--muted); transition: transform 0.2s; }
.training[open] summary::before { transform: rotate(90deg); }
.training .count { font: 500 0.72rem/1 var(--font-mono); color: var(--muted); background: var(--surface-2); padding: 0.3rem 0.5rem; border-radius: 6px; }
.training ul { columns: 2; column-gap: 2rem; padding: 0 1.2rem 1.2rem 2.6rem; }
.training li { break-inside: avoid; color: var(--text-2); font-size: 0.9rem; margin-bottom: 0.4rem; list-style: disc; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.edu { padding: 1.75rem; }
.edu:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.edu-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: var(--brand); background: var(--brand-soft); font-size: 1.15rem; margin-bottom: 1.1rem; }
.edu-dates { font: 500 0.76rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 0.6rem; }
.edu h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.edu p:last-child { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-card {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; padding: 3rem;
  border-radius: 28px; color: #e8edf7; position: relative; overflow: hidden;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(79, 124, 255, 0.35), transparent 60%),
    radial-gradient(70% 100% at 0% 100%, rgba(224, 180, 74, 0.22), transparent 60%),
    #0b1222;
  box-shadow: var(--shadow-lg);
}
.contact-card .section-title { color: #fff; }
.contact-intro > p { color: rgba(232, 237, 247, 0.78); margin: 1rem 0 2rem; font-size: 1.05rem; }
.eyebrow-light { color: #9db8ff; }
.contact-list { display: grid; gap: 0.9rem; }
.contact-list li { display: flex; align-items: center; gap: 0.85rem; }
.contact-list i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, 0.08); color: #f6d98b; flex-shrink: 0; }
.contact-list a, .contact-list span { color: #e8edf7; overflow-wrap: anywhere; }

.contact-form {
  padding: 1.75rem; border-radius: 20px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; color: rgba(232, 237, 247, 0.85); }
.field input, .field textarea {
  width: 100%; font: 400 0.98rem/1.5 var(--font-body); color: #fff;
  padding: 0.8rem 0.95rem; border-radius: 12px;
  background: rgba(8, 13, 25, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: #6f97ff; box-shadow: 0 0 0 4px rgba(111, 151, 255, 0.2); }
.field.has-error input, .field.has-error textarea { border-color: #f87171; }
.form-status { margin: 0.9rem 0 0; min-height: 1.4em; font-size: 0.9rem; }
.form-status.is-success { color: #86efac; }
.form-status.is-error { color: #fca5a5; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.back-top { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); text-decoration: none !important; }
.back-top:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav a { padding: 0.5rem 0.6rem; font-size: 0.85rem; }
  .project-grid, .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid > .project:nth-child(n), .skill-card:nth-child(n) { grid-column: span 1; }
  .project-grid > .project:last-child:nth-child(odd), .skill-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cap-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .menu-btn { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 0.75rem 16px 1.25rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0.15rem; }
  .main-nav a { padding: 0.8rem 0.9rem; font-size: 1rem; border-radius: 10px; }
  .site-header.menu-open { background: var(--bg); border-bottom-color: var(--line); }

  .hero { padding: calc(var(--header-h) + 40px) 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; width: min(300px, 78%); }
  .golden-chip { left: -12px; bottom: 16px; }
  .float-chip-a { right: -16px; }
  .float-chip-b { right: -22px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .about-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .golden-card { grid-template-columns: auto 1fr; }
  .golden-card .btn-gold { grid-column: 1 / -1; justify-self: start; }
  .contact-card { grid-template-columns: 1fr; padding: 2rem; gap: 32px; }
  .training ul { columns: 1; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .brand-name { display: none; }
  .header-cv { padding: 0.55rem 0.8rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-kicker { font-size: 0.8rem; border-radius: 14px; align-items: flex-start; line-height: 1.45; }
  .hero-kicker .pulse-dot { margin-top: 0.4em; flex-shrink: 0; }
  .project-grid, .project-grid-3 { grid-template-columns: 1fr; }
  .focus-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .achievements, .vendor-list { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { padding-left: 26px; }
  .timeline::before { left: 5px; }
  .timeline-dot { left: -27px; }
  .job { padding: 1.25rem; }
  .job-head { flex-direction: column; gap: 0.75rem; }
  .cap-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .golden-card { grid-template-columns: 1fr; padding: 1.6rem; text-align: left; }
  .golden-badge { width: 64px; height: 64px; font-size: 1.7rem; border-radius: 18px; }
  .contact-card { padding: 1.5rem; border-radius: 22px; }
  .contact-form { padding: 1.25rem; }
  .stat { padding: 1.1rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .scroll-progress, .hero-bg, .hero-cta, .float-chip, .contact-form, .back-top { display: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding: 24px 0; }
}
