/* ---------- tokens ---------- */
:root {
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --accent-h: 32; /* amber */
  --accent: oklch(78% 0.15 var(--accent-h));
  --accent-soft: oklch(78% 0.15 var(--accent-h) / 0.12);
  --accent-ink: oklch(22% 0.05 var(--accent-h));
}

html[data-theme="dark"] {
  --bg: oklch(14% 0.008 60);
  --bg-2: oklch(17% 0.01 60);
  --bg-3: oklch(21% 0.012 60);
  --line: oklch(28% 0.012 60);
  --line-soft: oklch(24% 0.01 60);
  --ink: oklch(96% 0.005 80);
  --ink-2: oklch(80% 0.008 70);
  --ink-3: oklch(60% 0.008 70);
  --ink-4: oklch(42% 0.008 70);
  --card: oklch(17% 0.01 60);
  --elev: 0 1px 0 oklch(100% 0 0 / 0.04) inset, 0 20px 40px -20px oklch(0% 0 0 / 0.6);
}

html[data-theme="light"] {
  --bg: oklch(98.5% 0.005 80);
  --bg-2: oklch(96% 0.008 80);
  --bg-3: oklch(93% 0.01 80);
  --line: oklch(88% 0.01 80);
  --line-soft: oklch(92% 0.008 80);
  --ink: oklch(18% 0.01 60);
  --ink-2: oklch(34% 0.012 60);
  --ink-3: oklch(52% 0.012 60);
  --ink-4: oklch(68% 0.008 70);
  --card: oklch(100% 0 0);
  --elev: 0 1px 0 oklch(100% 0 0 / 0.8) inset, 0 12px 32px -18px oklch(0% 0 0 / 0.18);
}

html[data-accent="amber"] { --accent-h: 48; --accent: oklch(80% 0.15 48); --accent-soft: oklch(80% 0.15 48 / 0.14); }
html[data-accent="lime"]  { --accent-h: 130; --accent: oklch(82% 0.18 130); --accent-soft: oklch(82% 0.18 130 / 0.14); }
html[data-accent="cyan"]  { --accent-h: 220; --accent: oklch(78% 0.13 220); --accent-soft: oklch(78% 0.13 220 / 0.14); }
html[data-accent="violet"]{ --accent-h: 300; --accent: oklch(76% 0.14 300); --accent-soft: oklch(76% 0.14 300 / 0.14); }
html[data-accent="rose"]  { --accent-h: 15;  --accent: oklch(76% 0.15 15);  --accent-soft: oklch(76% 0.15 15 / 0.14);  }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 100; pointer-events: none;
}
.scroll-progress > span {
  display: block; height: 100%; width: var(--p, 0%);
  background: var(--accent);
  transition: width .1s linear;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 60;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 18px;
  background: color-mix(in oklch, var(--bg-2) 75%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--elev);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px; padding-right: 10px;
  border-right: 1px solid var(--line);
  margin-right: 2px;
  font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
}
.nav-brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.nav-links { display: flex; gap: 2px; }
.nav-link {
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: var(--bg-3); }
.nav-link.active { color: var(--ink); }
.nav-link.active::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--bg-3);
  z-index: -1;
}
.nav-cta {
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  transition: transform .2s;
}
.nav-cta:hover { transform: translateY(-1px); }

.nav-mobile-btn {
  display: none; padding: 10px; border-radius: 999px;
}
@media (max-width: 780px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-btn { display: inline-flex; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 4px;
  padding: 80px 24px 24px;
  transform: translateY(-10px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 40px; line-height: 1.1;
  padding: 14px 0; color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 120px 0 40px; position: relative; }
@media (max-width: 780px) {
  .section { padding: 80px 0 20px; }
  .wrap { padding: 0 20px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--ink-4);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 12px 0 36px;
  text-wrap: balance;
}
.section-title i { font-style: italic; color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex; align-items: center;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  opacity: 0.7;
}
.hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  left: -200px; top: 10%;
  filter: blur(40px);
  pointer-events: none;
}
.hero-glow.two {
  left: auto; right: -250px; top: 40%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 40%, transparent) 0%, transparent 60%);
  opacity: 0.4;
}
.hero-inner { position: relative; z-index: 2; width: 100%; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 32px;
}
.hero-tag .pulse {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.hero-tag .pulse::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}
.hero-tag .pulse::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.2); opacity: 0; } }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero-title .name { display: block; }
.hero-title i { font-style: italic; color: var(--accent); }

.hero-sub {
  max-width: 580px;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 40px;
}

.hero-typed {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 40px;
  display: flex; align-items: center; gap: 10px;
}
.hero-typed .prompt { color: var(--accent); }
.hero-typed .caret {
  display: inline-block; width: 8px; height: 16px;
  background: var(--accent); vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 14px; font-weight: 500;
  border-radius: 999px;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.ghost:hover { background: var(--bg-2); border-color: var(--ink-3); }
.btn svg { width: 16px; height: 16px; }

.hero-stats {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hero-stats > div {
  padding: 0 24px;
  border-right: 1px solid var(--line);
}
.hero-stats > div:last-child { border-right: 0; }
.hero-stats > div:first-child { padding-left: 0; }
.hero-stats .num {
  font-family: var(--font-display);
  font-size: 44px; line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--ink);
}
.hero-stats .num i { color: var(--accent); font-style: italic; }
.hero-stats .lbl {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 780px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .hero-stats > div { padding: 0; border: 0; }
  .hero-stats .num { font-size: 34px; }
}

/* ---------- projects ---------- */
.projects-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 36px;
}
.projects-head .right {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-3); font-size: 14px;
  font-family: var(--font-mono);
}
.projects-head .right a { color: var(--ink); display: inline-flex; align-items: center; gap: 6px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.projects-head .right a:hover { border-color: var(--accent); color: var(--accent); }

.proj-filter {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 28px;
}
.proj-filter button {
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  transition: all .2s;
}
.proj-filter button:hover { color: var(--ink); border-color: var(--ink-4); }
.proj-filter button.active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.proj-card {
  grid-column: span 6;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease;
  cursor: pointer;
  min-height: 300px;
  display: flex; flex-direction: column;
}
.proj-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink-4);
}
.proj-card.feat { grid-column: span 12; min-height: 380px; }
.proj-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 50%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.proj-card:hover::before { opacity: 1; }

@media (max-width: 880px) {
  .proj-card { grid-column: span 12; min-height: auto; }
}

.proj-card .top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
.proj-card .lang-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: var(--bg-3);
  border-radius: 8px;
  font-size: 12px; font-family: var(--font-mono);
  color: var(--ink-2);
}
.proj-card .lang-chip .bullet {
  width: 8px; height: 8px; border-radius: 50%;
}
.proj-card .arrow {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .3s, background .3s, color .3s;
  color: var(--ink-2);
}
.proj-card:hover .arrow { background: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }

.proj-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.proj-card .desc {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 20px;
  flex: 1;
}
.proj-card .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
}
.proj-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-3);
}
.proj-card.feat h3 { font-size: clamp(34px, 4.5vw, 52px); }
.proj-card.feat .desc { max-width: 560px; font-size: 17px; }

/* visual graphic area inside feature card */
.proj-card .graphic {
  position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  width: 320px; height: 260px;
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- certifications ---------- */
.certs-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 36px;
}
.certs-nav { display: flex; gap: 8px; }
.certs-nav button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: all .2s;
}
.certs-nav button:hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.certs-nav button:disabled { opacity: 0.3; cursor: not-allowed; }

.certs-scroll {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 16px;
  scrollbar-width: none;
  margin: 0 -28px;
  padding-left: 28px; padding-right: 28px;
}
.certs-scroll::-webkit-scrollbar { display: none; }
.cert {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  transition: transform .3s, border-color .3s;
}
.cert:hover { transform: translateY(-4px); border-color: var(--ink-4); }
.cert .img {
  aspect-ratio: 1 / 1;
  background: var(--bg-3);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.cert .img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.cert h4 {
  font-size: 16px; font-weight: 600; margin: 0 0 4px;
}
.cert .issuer {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cert .cat {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- docs ---------- */
.cert-pdf .img {
  background: var(--bg-3);
  display: block;
  position: relative;
  padding: 0;
}
.cert-pdf .img object {
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
  background: white;
}
.cert-pdf .pdf-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  color: var(--ink-3);
  background: var(--bg-3);
}
.cert-pdf .pdf-fallback svg { width: 40px; height: 40px; }
.cert-pdf .pdf-fallback span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cert-pdf .pdf-pill {
  position: absolute;
  bottom: 10px; right: 10px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.doc-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: all .25s;
}
.doc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: color-mix(in oklch, var(--accent-soft) 50%, var(--card));
}
.doc-icon {
  position: relative;
  width: 48px; height: 56px;
  background: var(--bg-3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
}
.doc-icon svg { width: 24px; height: 24px; }
.doc-badge {
  position: absolute;
  bottom: -6px; right: -6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.doc-meta { flex: 1; min-width: 0; }
.doc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.doc-issuer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.doc-arrow {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: all .25s;
  flex-shrink: 0;
}
.doc-card:hover .doc-arrow {
  background: var(--accent);
  color: var(--accent-ink);
  transform: rotate(-45deg);
}

/* ---------- experience ---------- */
.xp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
@media (max-width: 880px) { .xp-grid { grid-template-columns: 1fr; gap: 40px; } }

.xp-col h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.xp-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 36px;
  border-left: 1px solid var(--line);
  margin-left: 8px;
}
.xp-item:last-child { padding-bottom: 0; }
.xp-item::before {
  content: ''; position: absolute; left: -7px; top: 6px;
  width: 13px; height: 13px;
  background: var(--card);
  border: 2px solid var(--ink-4);
  border-radius: 50%;
  transition: all .3s;
}
.xp-item.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.xp-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 8px;
}
.xp-item.current .xp-date { color: var(--accent); }
.xp-item h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px; line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.xp-org {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 10px;
}
.xp-desc {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* ---------- about / skills ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-3);
}
.about-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
}
.about-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in oklch, var(--bg) 40%, transparent));
}
.about-photo .sig {
  position: absolute; bottom: 20px; left: 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  color: white;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
  z-index: 2;
}

.about-text p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.about-text p:first-child {
  font-size: 20px;
  color: var(--ink);
  line-height: 1.5;
}
.about-text p strong { color: var(--ink); font-weight: 600; }

.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.skill-group h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  font-weight: 500;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  font-size: 13px;
  padding: 5px 11px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  transition: all .2s;
}
.skill-tag:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- contact ---------- */
.contact {
  padding: 100px 0 60px;
  position: relative;
}
.contact-inner {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 72px 56px;
  position: relative;
  overflow: hidden;
}
.contact-inner::before {
  content: ''; position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  filter: blur(40px);
}
.contact-inner > * { position: relative; z-index: 1; }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 16px 0 40px;
  max-width: 14ch;
  text-wrap: balance;
}
.contact h2 i { font-style: italic; color: var(--accent); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
@media (max-width: 780px) {
  .contact-inner { padding: 40px 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
}

.contact-item .lbl {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.contact-item a, .contact-item .val {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
  display: inline-block;
  transition: color .2s;
}
.contact-item a:hover { color: var(--accent); }

.socials {
  display: flex; gap: 10px;
  margin-top: 32px;
}
.socials a {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: all .2s;
}
.socials a:hover {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.socials a svg { width: 18px; height: 18px; }

/* ---------- footer ---------- */
.foot {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.foot-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.foot-inner .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(70% 0.18 145); margin-right: 6px;
  vertical-align: middle;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink { 50% { opacity: 0.4; } }

/* ---------- tweaks ---------- */
.tweaks {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.5);
  font-size: 13px;
}
.tweaks h4 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.tweak-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.tweak-row:last-child { margin-bottom: 0; }
.tweak-row label { color: var(--ink-2); }
.swatches { display: flex; gap: 6px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer; transition: transform .15s;
}
.swatch.active { border-color: var(--ink); transform: scale(1.1); }
.swatch[data-c="amber"] { background: oklch(80% 0.15 48); }
.swatch[data-c="lime"] { background: oklch(82% 0.18 130); }
.swatch[data-c="cyan"] { background: oklch(78% 0.13 220); }
.swatch[data-c="violet"] { background: oklch(76% 0.14 300); }
.swatch[data-c="rose"] { background: oklch(76% 0.15 15); }

.toggle {
  width: 40px; height: 22px;
  background: var(--bg-3);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.toggle::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--ink); border-radius: 50%;
  transition: transform .2s;
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); background: var(--accent-ink); }

/* animation util */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
