/* ─── Tokens ─── */
:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #3b9eff;
  --accent-2: #a78bfa;
  --accent-warm: #f97316;
  --gradient: linear-gradient(135deg, #3b9eff 0%, #a78bfa 50%, #f97316 100%);
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --container: min(1120px, calc(100% - 3rem));
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

.scroll-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ─── Background ─── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(59, 158, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(167, 139, 250, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(249, 115, 22, 0.05), transparent);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  pointer-events: none;
}

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

main {
  overflow-x: clip;
  max-width: 100%;
}

/* ─── Header ─── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  flex-shrink: 0;
}

.nav-links > li {
  flex-shrink: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.5rem 1.1rem !important;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
}

.nav-cta:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.06);
}

.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 4.75rem;
  min-width: 4.75rem;
  padding: 0.3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  width: 2rem;
  min-width: 2rem;
  height: 1.65rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.lang-btn:hover { color: var(--text-muted); }

.lang-btn.active {
  background: rgba(59, 158, 255, 0.15);
  color: var(--accent);
}

.lang-sep {
  font-size: 0.65rem;
  color: var(--text-dim);
  user-select: none;
  width: 0.35rem;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

/* Fixed nav widths — no layout shift on EN/RU switch */
@media (min-width: 641px) {
  .nav-links a[data-i18n="nav.about"] {
    display: inline-flex;
    justify-content: center;
    min-width: 5.25rem;
  }

  .nav-links a[data-i18n="nav.experience"] {
    display: inline-flex;
    justify-content: center;
    min-width: 6.875rem;
  }

  .nav-links a[data-i18n="nav.stack"] {
    display: inline-flex;
    justify-content: center;
    min-width: 3.5rem;
  }

  .nav-links a[data-i18n="nav.projects"] {
    display: inline-flex;
    justify-content: center;
    min-width: 5.75rem;
  }

  .nav-links a.nav-cta {
    display: inline-flex;
    justify-content: center;
    min-width: 6.5rem;
    box-sizing: border-box;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* ─── Typography helpers ─── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section {
  padding: 6rem 0;
}

.section-head {
  margin-bottom: 3rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* ─── Hero ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: 4rem;
  max-width: 100%;
  overflow-x: clip;
}

.hero-content,
.hero-visual {
  min-width: 0;
  max-width: 100%;
}

.hero-head {
  margin-bottom: 1.5rem;
}

.hero-head .eyebrow {
  margin-bottom: 0.85rem;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-photo-wrap {
  flex-shrink: 0;
  margin: 0;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b9eff 0%, #a78bfa 55%, #f97316 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 12px 40px rgba(59, 158, 255, 0.18);
}

.hero-photo {
  display: block;
  width: clamp(92px, 11vw, 112px);
  height: clamp(92px, 11vw, 112px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 14%;
  border: 3px solid var(--bg);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}

.hero-name { display: block; color: var(--text); }
.hero-surname {
  display: block;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 32rem;
  width: 100%;
  margin-bottom: 2rem;
}

.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-ai {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 32rem;
  width: 100%;
  margin-bottom: 1.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12) 0%, rgba(59, 158, 255, 0.08) 100%);
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.08);
}

.hero-ai-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: #c4b5fd;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
}

.hero-ai p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.hero-ai strong {
  color: var(--text);
  font-weight: 600;
}

.stat-value--ai {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  background: linear-gradient(135deg, #a78bfa 0%, #3b9eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 3rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-cta-group .btn {
  min-width: unset;
}

.hero-cta-group .btn-cv {
  padding-inline: 1.25rem;
}

.hero-cta-group .btn-ghost {
  padding-inline: 1.15rem;
}

.hero-product {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text-muted);
  max-width: 100%;
  transition: color 0.2s;
}

.hero-product:hover {
  color: var(--text);
}

.hero-product-name {
  font-weight: 600;
  color: var(--accent);
}

.hero-product:hover .hero-product-name {
  color: #6bb5ff;
}

.hero-product svg {
  color: var(--accent);
  flex-shrink: 0;
}

.btn-cv {
  background: rgba(59, 158, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(59, 158, 255, 0.45);
}

.btn-cv:hover {
  background: rgba(59, 158, 255, 0.18);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(59, 158, 255, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 8px 32px rgba(59, 158, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(59, 158, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 30rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1rem;
  align-items: end;
}

.hero-stats-row--labels {
  align-items: start;
}

.hero-stats-row > * {
  text-align: center;
  justify-self: center;
  min-width: 0;
  width: 100%;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}

.stat-value--platforms {
  font-size: clamp(0.62rem, 2.2vw, 0.875rem);
  letter-spacing: -0.03em;
  word-break: break-word;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.35;
}

/* ─── Hero visual ─── */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.phone-mock {
  position: relative;
  z-index: 2;
  width: 240px;
  padding: 12px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-radius: 36px;
  border: 1px solid var(--border);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.phone-screen {
  background: #0f172a;
  border-radius: 28px;
  padding: 16px 14px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screen-bar {
  height: 8px;
  width: 40%;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-bottom: 8px;
}

.screen-card {
  border-radius: 12px;
  flex: 1;
  min-height: 60px;
}

.screen-card.c1 { background: linear-gradient(135deg, rgba(59,158,255,0.4), rgba(59,158,255,0.1)); }
.screen-card.c2 { background: linear-gradient(135deg, rgba(167,139,250,0.4), rgba(167,139,250,0.1)); flex: 1.4; }
.screen-card.c3 { background: linear-gradient(135deg, rgba(249,115,22,0.3), rgba(249,115,22,0.08)); }

.screen-nav {
  height: 44px;
  background: rgba(255,255,255,0.06);
  border-radius: 22px;
  margin-top: auto;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: spin 20s linear infinite;
}

.orbit-1 {
  width: 320px;
  height: 320px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-2 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-direction: reverse;
  animation-duration: 30s;
  opacity: 0.5;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.float-tag {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  animation: float-tag 4s ease-in-out infinite;
}

.tag-swift { top: 15%; right: 8%; color: #f97316; animation-delay: 0s; }
.tag-kmp { bottom: 25%; left: 8%; color: #a78bfa; animation-delay: 1s; }
.tag-rn { top: 45%; right: 8%; color: #3b9eff; animation-delay: 2s; }
.tag-ai {
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
  animation: float-tag-ai 4s ease-in-out infinite;
  animation-delay: 1.5s;
}

@keyframes float-tag {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes float-tag-ai {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

/* ─── About ─── */
.about-grid {
  display: grid;
  gap: 3rem;
}

.about-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 42rem;
  line-height: 1.7;
}

.about-text strong { color: var(--text); }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pillar {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.pillar:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.pillar-icon {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.pillar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pillar p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--border);
  margin-bottom: 3rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 5px);
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.timeline-meta time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.badge-live {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.timeline-item h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-item ul {
  list-style: none;
  margin-bottom: 0.75rem;
}

.timeline-item li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.timeline-item li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.link-arrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.link-arrow:hover { text-decoration: underline; }

.highlight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.highlight-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59,158,255,0.08), transparent);
}

.highlight-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.highlight-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ─── Stack / Tech radar ─── */
.section-stack {
  position: relative;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.section-stack .section-head {
  margin-bottom: 1.25rem;
}

.section-stack .section-sub {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.section-stack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100%);
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(59, 158, 255, 0.06), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.stack-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.stack-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 36rem;
  line-height: 1.5;
  margin: 0;
}

.stack-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stack-pill {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.3rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 100%;
}

.stack-pill b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stack-card {
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  border-left: 2px solid var(--stack-accent, var(--accent));
  cursor: default;
  user-select: text;
}

/* Tech radar is informational only — no interactive/card hover */
.section-stack .stack-card:hover {
  border-color: var(--border);
  box-shadow: none;
}

.section-stack .tags span {
  cursor: default;
  pointer-events: none;
}

.section-stack .tags span:hover {
  color: var(--text-muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.stack-pill--ai {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.1);
  color: #ddd6fe;
}

.stack-card--ai { --stack-accent: #c084fc; }
.stack-card--ios { --stack-accent: #3b9eff; }
.stack-card--cross { --stack-accent: #a78bfa; }
.stack-card--arch { --stack-accent: #f97316; }
.stack-card--backend { --stack-accent: #34d399; }
.stack-card--quality { --stack-accent: #fbbf24; }
.stack-card--platform { --stack-accent: #f472b6; }

.stack-card-head {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.stack-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--stack-accent);
  background: color-mix(in srgb, var(--stack-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--stack-accent) 25%, transparent);
  border-radius: 8px;
}

.stack-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}

.stack-card-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tags span {
  font-size: 0.68rem;
  padding: 0.22rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tags span:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.07);
}

.tags .tag-core {
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--stack-accent) 10%, rgba(255, 255, 255, 0.05));
  border-color: color-mix(in srgb, var(--stack-accent) 30%, var(--border));
}

.tags .tag-core:hover {
  border-color: color-mix(in srgb, var(--stack-accent) 50%, var(--border-hover));
}

/* ─── Projects ─── */
.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 2.5rem 0 1rem;
}

.project-category:first-of-type { margin-top: 0; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.projects-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.project-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.project-card:hover {
  border-color: rgba(59, 158, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.project-stars {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-warm);
}

.project-arrow {
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.2s, transform 0.2s;
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.project-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.projects-note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
  border-left: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ─── Contact ─── */
.section-contact {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.75rem;
  align-items: start;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.contact-card {
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(59,158,255,0.1), rgba(167,139,250,0.06));
  border: 1px solid var(--border);
}

.contact-card h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 400;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.contact-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
}

.contact-link--primary {
  border-color: rgba(59, 158, 255, 0.35);
  background: rgba(59, 158, 255, 0.08);
}

.contact-link:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.contact-link--primary:hover {
  border-color: rgba(59, 158, 255, 0.55);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  flex-shrink: 0;
}

.contact-value {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  word-break: break-word;
}

.contact-link:hover .contact-value {
  color: var(--text);
}

.education h3 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 1rem 0 0.35rem;
}

.education h3:first-child {
  margin-top: 0;
}

.education p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ─── Footer ─── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.back-top {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-top:hover { color: var(--text); }

/* ─── Reveal animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children in grids */
.pillars .reveal:nth-child(2) { transition-delay: 0.05s; }
.pillars .reveal:nth-child(3) { transition-delay: 0.1s; }
.pillars .reveal:nth-child(4) { transition-delay: 0.15s; }

.projects-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.projects-grid .reveal:nth-child(3) { transition-delay: 0.1s; }
.projects-grid .reveal:nth-child(4) { transition-delay: 0.15s; }
.projects-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.projects-grid .reveal:nth-child(6) { transition-delay: 0.25s; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--header-h) + 2rem);
    min-height: auto;
    gap: 2rem;
  }

  .hero-head {
    text-align: center;
  }

  .hero-name-row {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .hero-head .eyebrow {
    margin-bottom: 0.75rem;
  }

  .hero-lead,
  .hero-ai {
    margin-inline: auto;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-cta-group {
    justify-content: center;
    width: 100%;
  }

  .hero-stats {
    margin-inline: auto;
    max-width: 100%;
    width: 100%;
  }

  .hero-visual {
    min-height: 300px;
    order: -1;
    max-width: min(100%, 340px);
    margin-inline: auto;
  }

  .phone-mock {
    width: min(220px, 72vw);
  }

  .phone-screen {
    min-height: 320px;
  }

  .orbit-1 {
    width: min(280px, 88vw);
    height: min(280px, 88vw);
  }

  .orbit-2 {
    width: min(340px, 96vw);
    height: min(340px, 96vw);
  }

  .section-contact {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-meta {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .stack-stats {
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root { --container: calc(100% - 1.5rem); }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li { width: 100%; }

  .lang-switch {
    justify-content: center;
    margin: 0.5rem 1rem;
    width: 4.75rem;
    min-width: 4.75rem;
  }

  .nav-links a[data-i18n] {
    min-width: unset;
  }

  .nav-links a.nav-cta {
    min-width: unset;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-toggle.open span:first-child {
    transform: translateY(4px) rotate(45deg);
  }
  .nav-toggle.open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .hero {
    padding-top: calc(var(--header-h) + 1.25rem);
    padding-bottom: 2.5rem;
  }

  .hero-title {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .hero-ai {
    padding: 0.75rem 0.85rem;
    margin-bottom: 1.25rem;
    text-align: left;
  }

  .hero-ai p {
    font-size: 0.85rem;
  }

  .hero-actions {
    margin-bottom: 2rem;
    gap: 0.75rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-visual {
    min-height: 260px;
    max-width: min(100%, 300px);
  }

  .phone-mock {
    width: min(190px, 68vw);
    padding: 10px;
    border-radius: 28px;
  }

  .phone-screen {
    min-height: 260px;
    border-radius: 22px;
    padding: 12px 10px;
  }

  .orbit-1 {
    width: min(240px, 82vw);
    height: min(240px, 82vw);
  }

  .orbit-2 {
    width: min(290px, 92vw);
    height: min(290px, 92vw);
  }

  .float-tag {
    font-size: 0.62rem;
    padding: 0.3rem 0.55rem;
  }

  .tag-swift { top: 12%; right: 6%; }
  .tag-kmp { bottom: 22%; left: 6%; }
  .tag-rn { top: 42%; right: 6%; }
  .tag-ai { bottom: 6%; }

  .hero-stats {
    max-width: 100%;
    padding-top: 1.5rem;
  }

  .hero-stats-row {
    column-gap: 0.35rem;
  }

  .stat-value {
    font-size: 0.875rem;
  }

  .stat-value--platforms {
    font-size: 0.58rem;
    letter-spacing: -0.04em;
  }

  .stat-value--ai {
    font-size: clamp(0.75rem, 3.5vw, 0.95rem);
  }

  .stat-label {
    font-size: 0.62rem;
    line-height: 1.25;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .stack-card {
    padding: 0.9rem 1rem;
  }

  .stack-pill {
    font-size: 0.68rem;
  }

  .timeline { padding-left: 1.25rem; }
  .timeline-item::before { left: calc(-1.25rem - 5px); }

  .contact-links {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 1.25rem 1.1rem;
  }

  .contact-value {
    text-align: left;
  }

  .section {
    padding-block: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
