/* ==========================================================================
   Abu Bakar Siddik — portfolio
   Dark-first, one family (Geist) + Geist Mono for code, one gradient used
   sparingly: title keywords, the primary button, the avatar ring.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0b1020;
  --bg-alt: #0e1528;
  --surface: #131b31;
  --surface-2: #1a2440;
  --border: rgba(148, 163, 255, 0.14);
  --border-strong: rgba(148, 163, 255, 0.3);
  --text: #e9edfb;
  --muted: #9aa5c9;
  --primary: #7c86ff;
  --primary-2: #b48cff;
  --accent: #43e5d0;
  --on-gradient: #0b1020;
  --gradient: linear-gradient(135deg, #7c86ff 0%, #b48cff 55%, #43e5d0 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124, 134, 255, 0.18), rgba(180, 140, 255, 0.14));
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
  --glow: 0 12px 40px -12px rgba(124, 134, 255, 0.55);

  --code-bg: #0d1324;
  --code-bar: #111a33;
  --code-text: #d6dcf5;

  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --container: 1140px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f7fc;
  --bg-alt: #eef0fa;
  --surface: #ffffff;
  --surface-2: #f1f3fc;
  --border: rgba(60, 70, 150, 0.14);
  --border-strong: rgba(60, 70, 150, 0.3);
  --text: #151a33;
  --muted: #5b6488;
  --primary: #5b63f0;
  --primary-2: #8b5cf6;
  --accent: #0fb9a8;
  --on-gradient: #ffffff;
  --gradient: linear-gradient(135deg, #5b63f0 0%, #8b5cf6 55%, #0fb9a8 100%);
  --gradient-soft: linear-gradient(135deg, rgba(91, 99, 240, 0.12), rgba(139, 92, 246, 0.1));
  --shadow: 0 24px 60px -30px rgba(80, 90, 180, 0.35);
  --glow: 0 12px 40px -12px rgba(91, 99, 240, 0.45);
  color-scheme: light;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3, p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--text); }
svg[hidden] { display: none; }

::selection { background: var(--primary); color: var(--on-gradient); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

.muted { color: var(--muted); font-weight: 400; }
.center { text-align: center; }

.skip {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--on-gradient);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons, pills, chips, tags, cards ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-primary {
  background: var(--gradient);
  color: var(--on-gradient);
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -12px rgba(124, 134, 255, 0.6); }
.btn-outline {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); background: var(--surface-2); transform: translateY(-2px); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; border-radius: 14px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--text); }
.icon-btn .icon { width: 18px; height: 18px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: middle;
}
.pill .icon { width: 0.9rem; height: 0.9rem; }
.pill-current { background: rgba(67, 229, 208, 0.14); color: var(--accent); }
.pill-pro { background: rgba(67, 229, 208, 0.14); color: var(--accent); }
.pill-private { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
[data-theme="light"] .pill-current,
[data-theme="light"] .pill-pro { background: rgba(15, 185, 168, 0.12); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tags li {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  color: var(--primary);
  background: rgba(124, 134, 255, 0.1);
  border: 1px solid rgba(124, 134, 255, 0.22);
}
[data-theme="light"] .tags li { background: rgba(91, 99, 240, 0.08); border-color: rgba(91, 99, 240, 0.22); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.chip:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.chip.is-core {
  background: var(--gradient-soft);
  border-color: rgba(124, 134, 255, 0.4);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Progress bar & navbar ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
}

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  color: var(--on-gradient);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}
.logo-text { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.logo-text .accent { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--primary); background: rgba(124, 134, 255, 0.12); }
[data-theme="light"] .nav-link.is-active { background: rgba(91, 99, 240, 0.1); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-burger { display: none; }
[data-theme="dark"] .icon-moon, [data-theme="light"] .icon-sun { display: none; }
.nav-burger .icon-close { display: none; }
.navbar.is-open .nav-burger .icon-menu { display: none; }
.navbar.is-open .nav-burger .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-block: calc(var(--nav-h) + 2.5rem) 4rem;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}
.orb-1 { width: 520px; height: 520px; top: -160px; left: -120px; background: var(--primary); animation: drift 22s ease-in-out infinite alternate; }
.orb-2 { width: 460px; height: 460px; right: -140px; top: 10%; background: var(--primary-2); animation: drift 26s ease-in-out infinite alternate-reverse; }
.orb-3 { width: 380px; height: 380px; right: 22%; bottom: -160px; background: var(--accent); opacity: 0.3; animation: drift 30s ease-in-out infinite alternate; }
[data-theme="light"] .orb { opacity: 0.22; }
[data-theme="light"] .grid-overlay { opacity: 0.55; }
[data-theme="light"] .orb-3 { opacity: 0.16; }
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 55% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 55% 40%, #000 30%, transparent 75%);
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 30px, 0) scale(1.08); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(67, 229, 208, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67, 229, 208, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(67, 229, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 229, 208, 0); }
}
.hero-name {
  margin-top: 1.25rem;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero-role {
  margin-top: 1rem;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 500;
  color: var(--muted);
}
.typed { color: var(--text); font-weight: 600; }
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--primary);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
.hero-desc {
  margin-top: 1.4rem;
  max-width: 56ch;
  font-size: 1.05rem;
  color: var(--muted);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.hero-socials {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.75rem;
}
.social {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.social:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.social .icon { width: 18px; height: 18px; }

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(380px, 78vw);
  aspect-ratio: 1;
}
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.avatar-ring {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(from var(--angle), var(--primary), var(--primary-2), var(--accent), var(--primary));
  box-shadow: 0 30px 80px -30px rgba(124, 134, 255, 0.55);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { --angle: 360deg; } }
.avatar-ring::after {
  /* Soft vignette so a light photo background blends into the ring on dark. */
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, transparent 58%, rgba(11, 16, 32, 0.5) 100%);
  pointer-events: none;
}
[data-theme="light"] .avatar-ring::after { display: none; }
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 7px solid var(--bg);
  object-fit: cover;
  transition: border-color 0.3s ease;
}
.badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.badge .dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-java { background: #f89820; }
.dot-spring { background: #6db33f; }
.dot-kafka { background: var(--accent); }
.badge-java { top: 6%; left: -8%; }
.badge-spring { top: 58%; right: -12%; animation-delay: -2s; }
.badge-kafka { bottom: 2%; left: 4%; animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  color: var(--muted);
  animation: bob 2s ease-in-out infinite;
}
.scroll-down .icon { width: 22px; height: 22px; }
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------- Stats ---------- */
.stats { padding-block: 0 1rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.stat {
  padding: 1.4rem 1rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-number .count,
.stat-plus { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.stat-label { margin-top: 0.5rem; font-size: 0.88rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-alt { background: var(--bg-alt); transition: background-color 0.3s ease; }
.section-head { text-align: center; margin-bottom: clamp(2.25rem, 5vw, 3.25rem); }
.section-tag {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.section-sub {
  max-width: 56ch;
  margin: 1rem auto 0;
  color: var(--muted);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.code-window {
  background: var(--code-bg);
  border: 1px solid rgba(148, 163, 255, 0.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--code-text);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--code-bar);
  border-bottom: 1px solid rgba(148, 163, 255, 0.12);
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.code-tabs { display: flex; gap: 0.2rem; margin-left: 0.25rem; overflow-x: auto; }
.code-tab {
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8e99c2;
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.code-tab:hover { color: #e9edfb; }
.code-tab.is-active { background: rgba(124, 134, 255, 0.16); color: #e9edfb; }
.code-body {
  min-height: 21rem;
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  tab-size: 2;
}
.code-body code { font-family: inherit; }
.kw { color: #c792ea; }
.ty { color: #82aaff; }
.str { color: #c3e88d; }
.fn { color: #ffcb6b; }

.about-heading { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.about-text p { color: var(--muted); }
.about-text p + p { margin-top: 1rem; }
.about-facts {
  display: grid;
  gap: 0.6rem;
  margin: 1.5rem 0 1.75rem;
}
.about-facts li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.95rem; }
.about-facts .icon { width: 18px; height: 18px; color: var(--primary); }
.about-facts a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.about-facts a:hover { text-decoration-color: var(--primary); }

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
  padding-left: 2.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 11px;
  width: 2px;
  background: linear-gradient(var(--primary), var(--primary-2), var(--accent));
  opacity: 0.5;
}
.timeline-item { position: relative; }
.timeline-item + .timeline-item { margin-top: 1.75rem; }
.timeline-dot {
  position: absolute;
  left: calc(-2.5rem + 4px);
  top: 1.65rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 0 6px rgba(124, 134, 255, 0.35);
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.timeline-role { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.timeline-role .pill { margin-left: 0.4rem; }
.timeline-company { margin-top: 0.15rem; font-weight: 500; font-size: 0.95rem; }
.timeline-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.25rem;
}
.timeline-date .icon { width: 15px; height: 15px; }
.timeline-desc { margin: 1rem 0 1.1rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.skill-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}
.skill-icon,
.project-icon,
.edu-icon,
.contact-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--gradient-soft);
  color: var(--primary);
}
.skill-icon { width: 36px; height: 36px; }
.skill-icon .icon { width: 18px; height: 18px; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.service-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient);
  color: var(--on-gradient);
  margin-bottom: 1.1rem;
}
.service-icon .icon { width: 22px; height: 22px; }
.service h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.service p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Projects ---------- */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.is-active { background: var(--gradient); color: var(--on-gradient); border-color: transparent; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.project { display: flex; flex-direction: column; }
.project.is-hidden { display: none; }
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.project-icon { width: 42px; height: 42px; }
.project-icon .icon { width: 20px; height: 20px; }
.project-links { display: inline-flex; gap: 0.25rem; }
.project-links a {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.project-links a:hover { color: var(--primary); background: var(--surface-2); }
.project-links .icon { width: 18px; height: 18px; }
.project h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.project p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.project .tags { margin-top: 1.1rem; }
.projects-grid + .center { margin-top: 2.25rem; }

/* ---------- Education & certifications ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.edu, .cert { display: flex; gap: 1rem; align-items: flex-start; }
.edu { grid-column: 1 / -1; }
.edu-icon { width: 44px; height: 44px; border-radius: 12px; }
.edu-icon .icon { width: 20px; height: 20px; }
.edu h3, .cert h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.edu .muted, .cert .muted { font-size: 0.9rem; margin-top: 0.2rem; }
.edu p:not(.muted) { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- GitHub ---------- */
.gh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.gh-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.gh-title .icon { width: 18px; height: 18px; color: var(--primary); }
.gh-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}
.gh-facts div { display: flex; flex-direction: column-reverse; gap: 0.15rem; }
.gh-facts dt { font-size: 0.85rem; color: var(--muted); }
.gh-facts dd {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.lang-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  gap: 2px;
}
.lang-bar span { display: block; height: 100%; min-width: 4px; }
.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
}
.lang-list li { display: inline-flex; align-items: center; gap: 0.45rem; }
.lang-list i { width: 10px; height: 10px; border-radius: 50%; }
.lang-list b { font-weight: 500; color: var(--muted); }
.gh-contrib { margin-top: 1.25rem; padding: 1.25rem; }
.gh-contrib:hover { transform: none; box-shadow: none; }
.gh-contrib img {
  width: 100%;
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: lighten;
}
[data-theme="light"] .gh-contrib img { filter: none; mix-blend-mode: normal; }
.gh-contrib figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.gh-contrib + .center { margin-top: 2rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
}
.contact-icon { width: 44px; height: 44px; border-radius: 12px; }
.contact-icon .icon { width: 20px; height: 20px; }
.contact-body { min-width: 0; }
.contact-label { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.contact-body p:not(.contact-label),
.contact-body a { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.contact-body a:hover { color: var(--primary); }
.copy-btn { margin-left: auto; width: 36px; height: 36px; }
.copy-btn .icon-check { display: none; }
.copy-btn.is-copied { color: var(--accent); border-color: var(--accent); }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }
.contact-grid + .center { margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-note { color: var(--muted); font-size: 0.88rem; }
.footer-socials { display: flex; gap: 0.5rem; }
.footer-socials .social { width: 38px; height: 38px; }
.footer-socials .social .icon { width: 16px; height: 16px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { gap: 2rem; }
  .about-grid { gap: 2rem; }
}

@media (max-width: 900px) {
  .nav-burger { display: inline-grid; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .navbar.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }
  .nav-link { padding: 0.75rem 0.9rem; font-size: 1rem; border-radius: 10px; }

  .hero { padding-block: calc(var(--nav-h) + 1.5rem) 4.5rem; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { order: -1; width: min(280px, 64vw); }
  .hero-desc { margin-inline: auto; }
  .hero-cta, .hero-socials { justify-content: center; }
  .badge-java { left: -14%; }
  .badge-spring { right: -16%; }

  .about-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gh-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-number { font-size: 2rem; }
  .edu-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 2rem; }
  .timeline-dot { left: calc(-2rem + 4px); }
  .projects-grid { grid-template-columns: 1fr; }
  .badge { font-size: 0.78rem; padding: 0.4rem 0.75rem; }
  .badge-java { left: -6%; }
  .badge-spring { right: -8%; }
  .code-body { font-size: 0.76rem; padding: 1rem; min-height: 0; }
  .code-bar { padding: 0.55rem 0.7rem; gap: 0.5rem; }
  .code-tab { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
  .hero-pill { font-size: 0.74rem; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .pill-extra { display: none; }
}

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