:root {
  --bg: #070a12;
  --bg-soft: #0d1220;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #7c5cff;
  --accent-2: #2dd4bf;
  --accent-3: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --max: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 92, 255, 0.32), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(45, 212, 191, 0.16), transparent 34%),
    radial-gradient(circle at 65% 80%, rgba(245, 158, 11, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  transform: translateY(-140%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 999px;
  z-index: 999;
}
.skip-link:focus { transform: translateY(0); }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.18), transparent 60%);
  transform: translate(-50%, -50%);
  left: 50%;
  top: 20%;
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(7, 10, 18, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  padding: 4px 10px 4px 4px;
  border-radius: 16px;
  transition: transform 220ms ease, background 220ms ease;
}
.brand:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.04);
}
.brand:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.brand-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.32);
}
.brand-avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: blur(11px);
  opacity: 0.4;
  z-index: -1;
  transition: opacity 220ms ease;
}
.brand:hover .brand-avatar-wrap::after { opacity: 0.72; }

.brand-status {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #34d399;
  border: 2px solid var(--bg);
  animation: brandPulse 2.4s ease-out infinite;
}
@keyframes brandPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.08;
}
.brand-name {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  white-space: nowrap;
}
.brand-name-last {
  background: linear-gradient(110deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.brand-role {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .brand-status { animation: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.nav-cta {
  border: 1px solid var(--line);
  color: var(--text) !important;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 4px auto;
  background: currentColor;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 82px 22px;
}

.hero {
  padding-top: 112px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 48px;
  align-items: center;
}

.eyebrow,
.section-label {
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 18px;
}

h1, h2, h3 {
  line-height: 1.05;
  letter-spacing: -0.055em;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 6.9rem);
  max-width: 990px;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.1rem);
}

h3 {
  font-size: 1.55rem;
}

.hero-text {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  margin: 28px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid var(--line);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #9d7cff);
  color: white;
  border-color: transparent;
  box-shadow: 0 18px 48px rgba(124, 92, 255, 0.35);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
}

.proof-strip {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.proof-strip div {
  padding: 18px;
  border-right: 1px solid var(--line);
}
.proof-strip div:last-child { border-right: 0; }
.proof-strip strong {
  display: block;
  font-size: 1.25rem;
}
.proof-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.hero-card {
  display: grid;
  gap: 18px;
}

.terminal,
.status-card,
.project-card,
.skill-panel,
.education-card,
.contact-grid,
.timeline-content {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.055));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.terminal {
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.terminal-top span {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--accent);
}
.terminal-top span:nth-child(2) { background: var(--accent-3); }
.terminal-top span:nth-child(3) { background: var(--accent-2); }

pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
}
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: #dbeafe;
  font-size: 0.92rem;
}

.status-card {
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.status-card p { color: var(--muted); margin: 4px 0 0; }

.pulse {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  display: inline-grid;
  place-items: center;
  color: var(--accent-2);
  filter: drop-shadow(0 0 10px rgba(45, 212, 191, 0.85));
  animation: starBlink 1.55s ease-in-out infinite;
}

.pulse::before {
  content: "✦";
  font-size: 1.05rem;
  line-height: 1;
}

@keyframes starBlink {
  0%, 100% { transform: scale(0.88) rotate(0deg); opacity: 0.45; }
  50% { transform: scale(1.22) rotate(18deg); opacity: 1; }
}

.intro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
}
.intro-content p,
.section-head p,
.project-body p,
.education-list p,
.contact-grid p,
.timeline-content p {
  color: var(--muted);
}

.section-head {
  max-width: 820px;
  margin-bottom: 38px;
}
.section-head.narrow {
  max-width: 680px;
}
.section-head p:last-child {
  font-size: 1.08rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, 0.44);
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project-media {
  min-height: 260px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.project-card.featured .project-media {
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: 28px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}

.tag {
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.meta-list strong { color: var(--text); }

.timeline {
  position: relative;
  margin-left: 10px;
  display: grid;
  gap: 20px;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 13px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 22px;
  position: relative;
}
.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 8px rgba(124, 92, 255, 0.12);
  z-index: 1;
  margin-top: 26px;
}
.timeline-content {
  padding: 26px;
}
.date {
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.skill-panel {
  padding: 28px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.chips span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  border: 1px solid var(--line);
}


.skills-view-switch {
  width: fit-content;
  margin: 0 auto 22px;
  padding: 7px;
  display: flex;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.skills-mode-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  color: var(--muted);
  background: transparent;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.skills-mode-btn:hover,
.skills-mode-btn:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}
.skills-mode-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(45, 212, 191, 0.18);
}
.skills-physics-view {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.18), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(124, 92, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow-soft);
}
.physics-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.physics-toolbar p {
  margin: 0;
  color: var(--muted);
}
.btn.compact {
  padding: 10px 14px;
  font-size: 0.86rem;
  white-space: nowrap;
}
.skill-ball-stage {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.10), rgba(5, 8, 18, 0.56));
  background-size: 42px 42px, 42px 42px, cover;
  perspective: 900px;
  cursor: grab;
  touch-action: none;
}
.skill-ball-stage:active {
  cursor: grabbing;
}
 .skill-ball {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 72px);
  height: var(--size, 72px);
  border: 0;
  border-radius: 50%;
  display: block;
  padding: 0;
  user-select: none;
  touch-action: none;
  will-change: transform;
  transform-style: preserve-3d;
  background: transparent;
  cursor: grab;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.22));
}
.skill-ball:active { cursor: grabbing; }
.skill-ball-aura,
.skill-ball-sphere,
.skill-ball-ring,
.skill-ball-face,
.skill-ball-label {
  display: none;
}
.skill-ball-aura {
  inset: -2%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ball-a) 26%, white 3%) 0%, transparent 68%);
  filter: blur(10px);
  opacity: 0.20;
  transform: translateZ(-18px) scale(0.94);
}
.skill-ball-sphere {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,0.52), rgba(255,255,255,0.14) 10%, transparent 18%),
    radial-gradient(circle at 50% 16%, rgba(255,255,255,0.08), transparent 36%),
    radial-gradient(circle at 68% 78%, rgba(0,0,0,0.28), transparent 42%),
    linear-gradient(160deg, color-mix(in srgb, var(--ball-a) 74%, white 12%), color-mix(in srgb, var(--ball-b) 80%, black 6%));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset -12px -15px 22px rgba(0, 0, 0, 0.24),
    inset 10px 10px 16px rgba(255, 255, 255, 0.06),
    0 12px 20px rgba(0, 0, 0, 0.22),
    0 0 14px color-mix(in srgb, var(--ball-glow) 45%, transparent);
  transform: translateZ(0);
}
.skill-ball-sphere::before {
  content: "";
  position: absolute;
  inset: 9% 10% auto auto;
  width: 26%;
  height: 18%;
  border-radius: 50%;
  background: rgba(255,255,255,0.34);
  filter: blur(2px);
}
.skill-ball-sphere::after {
  content: "";
  position: absolute;
  inset: auto 14% -12%;
  width: 72%;
  height: 24%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.30), transparent 70%);
  filter: blur(8px);
  transform: translateZ(-28px) rotateX(78deg);
}
.skill-ball-ring {
  inset: 8%;
  border: 2px solid rgba(255,255,255,0.20);
  border-left-color: rgba(255,255,255,0.06);
  border-right-color: rgba(255,255,255,0.06);
  transform: translateZ(12px) rotateX(74deg) rotateY(18deg);
  opacity: 0.58;
}
.skill-ball-ring.secondary {
  inset: 16%;
  border-width: 2px;
  opacity: 0.24;
  transform: translateZ(18px) rotateY(74deg) rotateX(18deg);
}
.skill-ball-face {
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  transform: translateZ(18px);
}
.skill-ball-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.16));
}
.skill-ball-label {
  display: none;
}
.skill-ball.dragging {
  z-index: 20;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.30));
}
.skill-ball.dragging .skill-ball-sphere {
  box-shadow:
    inset -12px -15px 22px rgba(0, 0, 0, 0.24),
    inset 10px 10px 16px rgba(255, 255, 255, 0.08),
    0 16px 24px rgba(0, 0, 0, 0.28),
    0 0 18px color-mix(in srgb, var(--ball-glow) 45%, transparent);
}
.skill-ball.dragging .skill-ball-aura {
  opacity: 0.24;
}


.education-card {
  padding: 32px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: start;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  padding: 34px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}
.contact-links a {
  color: var(--accent-2);
  font-weight: 800;
  word-break: break-word;
}


.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 22px 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.footer a { color: var(--text); }

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* Interactive project tree */
.project-tree-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.project-tree,
.project-details-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.055));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.project-tree {
  position: relative;
  min-height: 600px;
  padding: 30px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 24px;
  overflow: hidden;
}

.project-tree::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 14%, rgba(124, 92, 255, 0.18), transparent 26%),
    radial-gradient(circle at 18% 72%, rgba(45, 212, 191, 0.12), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(245, 158, 11, 0.10), transparent 28%);
  pointer-events: none;
}

.tree-root {
  position: relative;
  z-index: 2;
  justify-self: center;
  min-width: 150px;
  padding: 16px 22px;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 46px rgba(124, 92, 255, 0.34);
}

.tree-root::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 72px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--accent-2), rgba(45, 212, 191, 0.15));
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.35);
}

.tree-instruction {
  position: relative;
  z-index: 2;
  justify-self: center;
  max-width: 380px;
  margin: 4px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.tree-instruction::before {
  content: "✦";
  color: var(--accent-2);
  margin-right: 8px;
}

.tree-branches {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-content: center;
  padding: 40px 0 10px 64px;
}

.tree-branches::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 32px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.78), rgba(124, 92, 255, 0.58), rgba(245, 158, 11, 0.44));
  box-shadow: 0 0 26px rgba(45, 212, 191, 0.25);
}

.tree-node {
  position: relative;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  padding: 18px 20px 18px 26px;
  text-align: left;
  cursor: pointer;
  overflow: visible;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.tree-node .branch-line {
  position: absolute;
  left: -32px;
  top: 50%;
  width: 32px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.75), rgba(124, 92, 255, 0.5));
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.25);
}

.tree-node .node-dot {
  position: absolute;
  left: -42px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.55);
  background: var(--node-glow, rgba(124, 92, 255, 0.22));
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.035), 0 0 22px var(--node-glow, rgba(124, 92, 255, 0.22));
}

.tree-node::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  right: -36px;
  top: -36px;
  border-radius: 999px;
  background: var(--node-glow, rgba(124, 92, 255, 0.22));
  filter: blur(8px);
  opacity: 0.55;
  pointer-events: none;
}

.tree-node:focus-visible,
.tree-node.active {
  border-color: rgba(45, 212, 191, 0.62);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(45, 212, 191, 0.18) inset;
  outline: none;
}

.tree-node.active .node-dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 8px rgba(45, 212, 191, 0.08), 0 0 28px rgba(45, 212, 191, 0.5);
}

.tree-node strong {
  position: relative;
  display: block;
  font-size: 1.03rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.node-content {
  position: relative;
  display: block;
}

.node-content > span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 8px;
}

.tree-node small {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--accent-2);
  background: rgba(45, 212, 191, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.project-details-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.055));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.project-tree {
  position: relative;
  min-height: 520px;
  padding: 30px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 32px;
  overflow: hidden;
}

.project-tree::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 92, 255, 0.18), transparent 26%),
    radial-gradient(circle at 20% 70%, rgba(45, 212, 191, 0.12), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.10), transparent 28%);
  pointer-events: none;
}

.tree-root {
  position: relative;
  z-index: 1;
  justify-self: center;
  min-width: 150px;
  padding: 16px 22px;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 46px rgba(124, 92, 255, 0.34);
}

.tree-root::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 45px;
  background: linear-gradient(var(--accent-2), transparent);
}

.tree-instruction {
  position: relative;
  z-index: 1;
  justify-self: center;
  max-width: 330px;
  margin: -10px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.tree-instruction::before {
  content: "✦";
  color: var(--accent-2);
  margin-right: 8px;
}

.tree-branches {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-content: center;
}

.tree-node {
  position: relative;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.tree-node::before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -28px;
  top: -28px;
  border-radius: 999px;
  background: var(--node-glow, rgba(124, 92, 255, 0.22));
  filter: blur(2px);
  opacity: 0.58;
}

.tree-node:focus-visible,
.tree-node.active {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  outline: none;
}

.tree-node strong {
  position: relative;
  display: block;
  font-size: 1.03rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tree-node span {
  position: relative;
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 10px;
}

.project-details-panel {
  padding: 30px;
}

.panel-kicker {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}

#project-category-description {
  color: var(--muted);
  margin: 16px 0 0;
}

.dynamic-project-list {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.dynamic-project-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dynamic-project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.42);
  background: rgba(255, 255, 255, 0.085);
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.project-card-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 800;
}

.dynamic-project-card h4 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.dynamic-project-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.dynamic-project-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.dynamic-project-card li + li {
  margin-top: 6px;
}

@media (max-width: 920px) {
  .brand-text { display: none; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 76px;
    right: 22px;
    left: 22px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(7, 10, 18, 0.94);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .hero-grid,
  .project-card.featured,
  .intro,
  .education-card,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .project-card.featured .project-media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .proof-strip,
  .skills-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }
  .proof-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .proof-strip div:last-child { border-bottom: 0; }
  .project-tree-shell {
    grid-template-columns: 1fr;
  }
  .project-tree {
    min-height: auto;
    padding: 24px;
  }
  .tree-branches {
    grid-template-columns: 1fr;
    padding-left: 52px;
  }
  .tree-branches::before { left: 26px; }
  .tree-node .branch-line { left: -26px; width: 26px; }
  .tree-node .node-dot { left: -36px; }
}

@media (max-width: 560px) {
  .section { padding: 64px 16px; }
  .hero { padding-top: 82px; }
  h1 { font-size: 2.65rem; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .project-body,
  .skill-panel,
  .education-card,
  .contact-grid,
  .timeline-content {
    padding: 22px;
  }
  .footer {
    flex-direction: column;
  }
}

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

/* Header profile image and language switch */
.brand-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(7, 10, 18, 0.9);
  display: block;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--text);
  outline: none;
}

.lang-btn.active {
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.28);
}

.seeking-card {
  display: block;
}

.seeking-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.seeking-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  margin: 0;
  color: var(--muted);
}

.pulse.blue {
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.9));
  animation-delay: 0.28s;
}

@media (max-width: 920px) {
  .language-switch {
    align-self: flex-start;
    margin-top: 6px;
  }
}


/* v10 project navigation fixes */
.tree-root::after {
  display: none !important;
}

.project-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.project-link:hover {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.13);
}

.github-status {
  margin: 6px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(45, 212, 191, 0.22);
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  font-size: 0.88rem;
}

.tree-node.active {
  transform: none !important;
}

/* Direct contact card replacing the old form */
.contact-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow-soft);
}
.contact-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.contact-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 8px rgba(45, 212, 191, 0.10), 0 0 22px rgba(45, 212, 191, 0.40);
}
.contact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.direct-contact-list {
  display: grid;
  gap: 12px;
}
.direct-contact-list a {
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.direct-contact-list a:hover,
.direct-contact-list a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.08);
  outline: none;
}
.direct-contact-list span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.direct-contact-list strong {
  overflow-wrap: anywhere;
}

/* v12 — compact first screen: show headline, code profile and current search without scrolling */
@media (min-width: 921px) {
  .nav {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 12px;
  }

  .section.hero {
    padding-top: 34px;
    padding-bottom: 54px;
  }

  .hero-grid {
    align-items: start;
    gap: 34px;
  }

  h1 {
    font-size: clamp(2.8rem, 5.15vw, 5.1rem);
    max-width: 850px;
  }

  .hero-text {
    margin-top: 18px;
    font-size: clamp(0.98rem, 1.28vw, 1.12rem);
    line-height: 1.55;
    max-width: 660px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .proof-strip {
    margin-top: 24px;
  }

  .proof-strip div {
    padding: 14px 16px;
  }

  .hero-card {
    gap: 14px;
    transform: translateY(-2px);
  }

  .terminal-top {
    padding: 12px 16px;
  }

  .terminal-top span {
    width: 10px;
    height: 10px;
  }

  pre {
    padding: 16px 18px;
  }

  code {
    font-size: 0.86rem;
    line-height: 1.48;
  }

  .status-card {
    padding: 16px 18px;
  }

  .seeking-list {
    gap: 9px;
    margin-top: 10px;
  }

  .seeking-item {
    grid-template-columns: 18px 1fr;
    gap: 10px;
    line-height: 1.35;
  }

  .pulse {
    width: 16px;
    height: 16px;
  }
}

@media (min-width: 921px) and (max-height: 780px) {
  .section.hero {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(2.55rem, 4.65vw, 4.55rem);
  }

  .hero-text {
    margin-top: 14px;
  }

  .hero-actions,
  .proof-strip {
    margin-top: 18px;
  }
}

@media (max-width: 920px) {
  .hero {
    padding-top: 42px;
  }
}


@media (max-width: 720px) {
  .skills-view-switch {
    width: 100%;
    justify-content: center;
    border-radius: 24px;
  }
  .skills-mode-btn {
    flex: 1;
    padding: 10px 10px;
  }
  .physics-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .skill-ball-stage {
    min-height: 540px;
  }
  .skill-ball {
    font-size: 0.74rem;
  }
}

.skills-grid-organized {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.skills-grid-organized .skill-panel {
  min-height: 150px;
}
@media (max-width: 980px) {
  .skills-grid-organized {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .skills-grid-organized {
    grid-template-columns: 1fr;
  }
}

.skill-ball-fallback {display:grid;place-items:center;width:100%;height:100%;font-size:0.68rem;font-weight:800;color:rgba(255,255,255,0.92);background:rgba(15,23,42,0.35);border-radius:50%;}


/* v22 skill color system */
.skills-grid-organized .skill-panel:nth-child(1) .chips span { background: rgba(96, 165, 250, 0.13); border-color: rgba(96, 165, 250, 0.26); color: #dbeafe; }
.skills-grid-organized .skill-panel:nth-child(2) .chips span { background: rgba(45, 212, 191, 0.13); border-color: rgba(45, 212, 191, 0.27); color: #ccfbf1; }
.skills-grid-organized .skill-panel:nth-child(3) .chips span { background: rgba(14, 165, 233, 0.14); border-color: rgba(14, 165, 233, 0.27); color: #e0f2fe; }
.skills-grid-organized .skill-panel:nth-child(4) .chips span { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.25); color: #ffedd5; }
.skills-grid-organized .skill-panel:nth-child(5) .chips span { background: rgba(236, 72, 153, 0.12); border-color: rgba(236, 72, 153, 0.25); color: #fce7f3; }
.skills-grid-organized .skill-panel:nth-child(6) .chips span { background: rgba(148, 163, 184, 0.13); border-color: rgba(148, 163, 184, 0.26); color: #e2e8f0; }
.skills-grid-organized .skill-panel:nth-child(7) .chips span { background: rgba(168, 85, 247, 0.13); border-color: rgba(168, 85, 247, 0.26); color: #f3e8ff; }
.skills-grid-organized .skill-panel:nth-child(8) .chips span { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.25); color: #fef3c7; }
.skills-grid-organized .chips span {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 22px rgba(0,0,0,0.12);
}
.education-card-full {
  grid-template-columns: 0.88fr 1.12fr;
}
.education-intro {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.education-path {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}
.education-path article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.055));
  box-shadow: var(--shadow);
}
.education-path article span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.education-path article strong {
  display: block;
  color: var(--text);
}
.education-path article p {
  margin: 6px 0 0;
  color: var(--muted);
}

.skills-physics-view-static { margin-top: 24px; }
.skills-physics-view-static .skills-physics-help { margin: 0 0 14px; color: var(--muted); }

/* v25 requested spacing and project hint */
.project-domain-hint {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 10px 0 0;
  padding: 10px 16px;
  border-radius: 999px;
  color: #bfdbfe;
  font-weight: 900;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.26), rgba(14, 165, 233, 0.13));
  border: 1px solid rgba(96, 165, 250, 0.38);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14), inset 0 1px 0 rgba(255,255,255,0.10);
}
.projects .section-head {
  margin-bottom: 18px;
}
.projects {
  padding-bottom: 18px;
}
.skills-section {
  padding-top: 82px;
}
.skills-section .skills-physics-view-static {
  margin-top: 0;
}


/* v26 unify section titles */
#experience .eyebrow,
#projects .eyebrow,
#skills .eyebrow,
.education .eyebrow,
#contact .eyebrow {
  color: var(--text);
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 850;
  text-transform: none;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 18px;
  display: block;
}

#experience .section-head,
#projects .section-head,
#skills .section-head,
.education-card > div:first-child,
.contact-grid > div:first-child {
  max-width: 820px;
}

#experience .section-head,
#projects .section-head,
#skills .section-head,
.education-card > div:first-child,
.contact-grid > div:first-child {
  text-align: left;
}

.project-domain-hint {
  margin-top: 2px;
}


/* v27 layout fixes */
.education-card-list-only {
  display: block;
}
.education-card-list-only .education-path {
  width: 100%;
}
.contact-grid-simple .contact-links {
  margin-top: 0;
}
.section-title-outside {
  margin-bottom: 18px;
}
.skills-classic-view {
  margin-top: 28px;
}
/* Keep external titles aligned instead of being inside cards */
.education > .section-head,
.contact-section > .section-head {
  max-width: 820px;
}

.skills-title-head { margin-bottom: 18px; }


/* v29 spacing + education logos */
.education > .section-head .eyebrow {
  font-size: clamp(2rem, 3vw, 2.55rem);
  color: var(--text);
  font-weight: 850;
  letter-spacing: -0.04em;
  text-transform: none;
  line-height: 1.08;
}

.education-path article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.education-path .edu-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.edu-logo-wrap {
  flex: 0 0 auto;
  width: 132px;
  display: flex;
  justify-content: flex-end;
}
.edu-logo-wrap img {
  width: 120px;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
@media (max-width: 760px) {
  .education-path article {
    flex-direction: column;
    align-items: flex-start;
  }
  .edu-logo-wrap {
    width: 100%;
    justify-content: flex-start;
  }
}

/* v30 real education logos */
.edu-logo-wrap img {
  background: rgba(255,255,255,0.96);
  object-fit: contain;
  padding: 8px;
}
.edu-bac-logo {
  width: 120px;
  min-height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(124, 45, 18, 0.92));
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

/* v32 contact opportunity */
.contact-opportunity {
  color: var(--text) !important;
  font-weight: 850;
  font-size: 1.02rem;
  line-height: 1.45;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(45, 212, 191, 0.10));
  border: 1px solid rgba(96, 165, 250, 0.24);
}


/* v33 contact merged widget */
.contact-grid-single {
  grid-template-columns: 1fr;
  padding-top: 0;
}
.contact-card-main {
  max-width: 100%;
}

/* v34 contact: one main widget only */
.contact-card-flat {
  gap: 16px;
}
.direct-contact-flat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.direct-contact-flat a {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 8px 0 !important;
  box-shadow: none !important;
}
.direct-contact-flat a:hover {
  transform: none !important;
  background: transparent !important;
}
.direct-contact-flat span {
  color: var(--accent-2);
  font-weight: 900;
}
.direct-contact-flat strong {
  color: var(--text);
}
@media (max-width: 760px) {
  .direct-contact-flat {
    grid-template-columns: 1fr;
  }
}


/* v35 remove outer contact container card */
.contact-grid-single {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* v36 — real contact form (Resend) */
.contact-form {
  display: grid;
  gap: 16px;
  margin: 6px 0 4px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-field {
  display: grid;
  gap: 7px;
}
.form-field > span {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.contact-form textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.6;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(167, 176, 192, 0.7);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}
.contact-form input:user-invalid,
.contact-form textarea:user-invalid {
  border-color: rgba(248, 113, 113, 0.55);
}
/* Honeypot — hidden from humans, visible to bots */
.form-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.form-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}
.form-status.is-success { color: var(--accent-2); }
.form-status.is-error { color: #f87171; }
.contact-form button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.contact-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 4px 0;
}
.contact-divider::before,
.contact-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
}

/* v38 — footer legal links + standalone legal pages */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--text);
}

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 22px 80px;
  color: var(--text);
}
.legal-back {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.legal-back:hover { text-decoration: underline; }
.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.legal-updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 28px;
}
.legal section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.legal h2 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text);
}
.legal p,
.legal li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}
.legal p { margin: 0 0 12px; }
.legal a { color: var(--accent-2); }
.legal ul {
  margin: 10px 0 0;
  padding-left: 20px;
}
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); }
.legal-note {
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--muted);
  font-size: 0.9rem;
}
