:root {
  --bg: #080808;
  --bg-2: #0f0f0f;
  --fg: #f0ede6;
  --fg-muted: rgba(240, 237, 230, 0.45);
  --accent: #4f8ef7;
  --accent2: #818cf8;
  --mono: "JetBrains Mono", monospace;
  --sans: "Inter", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body:not(.no-custom-cursor) {
  cursor: none;
}

body:not(.no-custom-cursor) a,
body:not(.no-custom-cursor) button,
body:not(.no-custom-cursor) input,
body:not(.no-custom-cursor) textarea,
body:not(.no-custom-cursor) select {
  cursor: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

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

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
}

.cursor {
  display: none;
  position: fixed;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--fg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out), border-color 0.2s;
}

.cursor.hover {
  transform: translate(-50%, -50%) scale(2.5);
  border-color: var(--accent);
}

.cursor-trail {
  display: none;
  position: fixed;
  width: 40px;
  height: 40px;
  background: rgba(79, 142, 247, 0.08);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

body.no-custom-cursor .cursor,
body.no-custom-cursor .cursor-trail {
  display: none !important;
}

.top-nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 1100px);
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
  padding: 0.7rem 1rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.55);
  backdrop-filter: blur(10px);
}

.brand {
  font-family: var(--mono);
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
}

.scroll-progress {
  grid-column: 1 / -1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

#scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.corner {
  position: fixed;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg);
  opacity: 0.2;
  z-index: 10;
}

.corner-tl {
  top: 1.5rem;
  left: 1.5rem;
}

.corner-tr {
  top: 1.5rem;
  right: 1.5rem;
}

.corner-bl {
  bottom: 1.5rem;
  left: 1.5rem;
}

.corner-br {
  bottom: 1.5rem;
  right: 1.5rem;
}

.main {
  position: relative;
  z-index: 2;
}

.hero {
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8vw;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  transition: transform 0.2s var(--ease-out);
}

.intro {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

.name {
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  overflow: visible;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em;
  padding: 0 0.08em 0.06em 0.03em;
}

.name-part {
  display: inline-flex;
  gap: 0;
}

.char-wrap {
  display: inline-flex;
  overflow: visible;
  margin-right: 0.015em;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.last-name .char {
  color: rgba(240, 237, 230, 0.92);
}

.char {
  display: inline-block;
  transform-origin: center bottom;
  transition:
    transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    text-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.name:hover .char {
  opacity: 0.28;
  transform: translateY(1px) scale(0.98);
  filter: blur(0.25px);
}

.char-wrap:hover {
  transform: translateY(-1px);
}

.char-wrap:hover .char {
  color: #ffffff;
  opacity: 1;
  transform: translateY(-2px) scale(1.2);
  filter: blur(0);
  text-shadow: 0 0 16px rgba(79, 142, 247, 0.5);
}

.name.hover-active .char-wrap:not(.hovered) .char {
  opacity: 0.22;
}

.tagline {
  margin-top: 2rem;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--fg-muted);
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

.word-wrap {
  display: inline-block;
  overflow: hidden;
}

.word {
  display: inline-block;
  transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.word:hover {
  transform: scale(1.1);
  color: var(--fg);
}

.about-section,
.skills-section,
.projects-section,
.contact-section {
  padding: 15vh 8vw;
  max-width: 1200px;
  margin: 0 auto;
}

/* Tighten the space between projects and contact */
.projects-section {
  padding-bottom: 3vh;
}

.contact-section {
  padding-top: 3vh;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.2rem;
  position: relative;
  background: linear-gradient(92deg, rgba(240, 237, 230, 0.98) 0%, rgba(79, 142, 247, 0.95) 45%, rgba(129, 140, 248, 0.8) 50%, rgba(79, 142, 247, 0.95) 55%, rgba(240, 237, 230, 0.98) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: sectionShine 5s ease-in-out infinite;
}

@keyframes sectionShine {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.section-title::after {
  content: "";
  display: block;
  width: 84px;
  height: 2px;
  margin-top: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 142, 247, 0.95), rgba(79, 142, 247, 0.3), transparent 88%);
}

.about-text {
  font-size: 1.08rem;
  line-height: 1.9;
  color: rgba(240, 237, 230, 0.74);
  max-width: 700px;
  text-wrap: pretty;
}

.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.quick-facts {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.qf-item {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.qf-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.qf-value {
  font-size: 0.82rem;
  color: var(--fg);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-top: 2rem;
}

.skills-category-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.skills-category .skills-grid {
  margin-top: 0;
}

.skill-pill {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  letter-spacing: 0.05em;
}

.skill-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(79, 142, 247, 0.2);
  transform: none;
}

.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.selector-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.selector-toggle:hover {
  color: var(--fg);
  border-color: var(--accent);
  background: rgba(79, 142, 247, 0.08);
}

.selector-toggle svg {
  transition: transform 0.4s var(--ease-out);
}

.selector-toggle.open svg {
  transform: rotate(90deg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.projects-section {
  position: relative;
  overflow: visible;
}

.projects-section > * {
  position: relative;
  z-index: 1;
}

.project-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

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

/* ── Repo Cards ───────────────────────────────────────────── */
.repo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  min-height: 175px;
  display: grid;
}

.repo-card-front, .repo-card-overlay {
  grid-area: 1 / 1;
  padding: 1.75rem 2rem;
}

.repo-card-front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.repo-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.repo-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.repo-card:hover::before {
  transform: scaleX(1);
}

.repo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.repo-card-name {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.repo-card-link {
  color: var(--fg-muted);
  transition: color 0.2s;
  flex-shrink: 0;
  margin-top: 2px;
}

.repo-card-link:hover {
  color: var(--accent);
}

.repo-card-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* Hover overlay — fades in over the front */
.repo-card-overlay {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
  pointer-events: none;
}

.repo-card:hover .repo-card-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.repo-overlay-desc {
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(240, 237, 230, 0.78);
}

.repo-overlay-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lang-pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(79, 142, 247, 0.3);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.05em;
  background: rgba(79, 142, 247, 0.06);
}

.repo-overlay-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.repo-overlay-btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.repo-overlay-btn:hover {
  color: var(--fg);
  border-color: var(--accent);
}

/* ── Next project card ────────────────────────────────────── */
.next-card {
  display: flex;
  padding: 1.75rem 2rem;
  grid-column: 1 / -1;                /* span full row — no empty cell */
  border-style: dashed;
  border-color: rgba(129, 140, 248, 0.18);
  background: rgba(129, 140, 248, 0.015);
  cursor: default;
  flex-direction: column;
  justify-content: space-between;
  min-height: 175px;
}

.next-card:hover {
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.08), 0 16px 48px rgba(0, 0, 0, 0.32);
  transform: translateY(-4px);
}

/* Horizontal inner layout */
.next-card-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex: 1;
}

.next-card-left {
  flex-shrink: 0;
}

.next-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Hover: slow, rhythmic glitch instead of rapid strobe */
.next-card:hover .next-glitch-name::before {
  animation: glitchTop 2.5s infinite;
}

.next-card:hover .next-glitch-name::after {
  animation: glitchBot 2.5s 0.12s infinite;
}

.next-card:hover .next-glitch-name {
  color: rgba(240, 237, 230, 0.22);
}

/* Slide-up hint on hover */
.next-hover-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: none;
  font-style: italic;
  color: rgba(129, 140, 248, 0.55);
  background: linear-gradient(to top, rgba(129, 140, 248, 0.06) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}

.next-card:hover .next-hover-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Big glitching ??? title */
.next-glitch-wrap {
  position: relative;
  display: inline-block;
  line-height: 1;
  margin: 0.25rem 0 1rem;
}

.next-glitch-name {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(240, 237, 230, 0.12);
  position: relative;
  display: inline-block;
  user-select: none;
}

.next-glitch-name::before,
.next-glitch-name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: transparent;
}

.next-glitch-name::before {
  color: rgba(79, 142, 247, 0.55);
  animation: glitchTop 6s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
}

.next-glitch-name::after {
  color: rgba(129, 140, 248, 0.55);
  animation: glitchBot 6s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

@keyframes glitchTop {
  0%,  88%, 100% { transform: translate(0); opacity: 0; }
  90% { transform: translate(-4px, -2px); opacity: 0.9; }
  92% { transform: translate( 4px,  1px); opacity: 0.7; }
  94% { transform: translate(-2px,  3px); opacity: 0.9; }
  96% { transform: translate(0); opacity: 0; }
}

@keyframes glitchBot {
  0%,  88%, 100% { transform: translate(0); opacity: 0; }
  91% { transform: translate( 4px, 2px); opacity: 0.9; }
  93% { transform: translate(-4px,-1px); opacity: 0.7; }
  95% { transform: translate( 2px,-3px); opacity: 0.9; }
  97% { transform: translate(0); opacity: 0; }
}

/* Redacted bars  */
.next-redacted {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.next-redact-bar {
  display: block;
  height: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.next-redact-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(129,140,248,0.06), transparent);
  animation: redactShimmer 3.5s ease-in-out infinite;
}

@keyframes redactShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Never-completing progress bar */
.next-progress-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.next-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  animation: neverDone 9s ease-in-out infinite;
}

@keyframes neverDone {
  0%   { width:  0%; opacity: 1; }
  35%  { width: 58%; opacity: 1; }
  60%  { width: 74%; opacity: 1; }
  75%  { width: 74%; opacity: 1; }
  88%  { width: 74%; opacity: 0; }
  89%  { width:  0%; opacity: 0; }
  90%  { width:  0%; opacity: 1; }
  100% { width:  0%; opacity: 1; }
}

.next-status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.28);
}

.next-blink {
  display: inline-block;
  animation: blinkCursor 1s step-end infinite;
  color: var(--accent2);
  opacity: 0.6;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0; }
}


/* ── Skeleton loading cards ───────────────────────────────── */
.repo-skeleton {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  min-height: 175px;
  background: rgba(255, 255, 255, 0.015);
  position: relative;
  overflow: hidden;
}

.repo-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 20%, rgba(255,255,255,0.04) 50%, transparent 80%);
  animation: skeletonShimmer 1.6s linear infinite;
}

@keyframes skeletonShimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── Dev Toast (localhost only) ───────────────────────────── */
#dev-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: min(380px, 92vw);
  background: rgba(10, 10, 14, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 142, 247, 0.25);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s var(--ease-out) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dev-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dev-toast-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

.dev-toast-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s;
}

.dev-toast-close:hover { color: var(--fg); }

.dev-toast-sub {
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.dev-toast-sub code {
  font-family: var(--mono);
  color: var(--accent2);
  font-size: 0.75rem;
}

.dev-toast-code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 0.75rem;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
}

.dev-toast-copy {
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: rgba(79, 142, 247, 0.1);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dev-toast-copy:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Repo Selector Panel ──────────────────────────────────── */
.selector-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(480px, 92vw);
  max-height: 80vh;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: hidden;
}

.selector-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.selector-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selector-panel-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
}

.selector-panel-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.selector-panel-close:hover {
  color: var(--fg);
}

.selector-panel-subtitle {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-top: -0.5rem;
}

.selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  max-height: 50vh;
  padding-right: 4px;
}

.selector-list::-webkit-scrollbar {
  width: 4px;
}

.selector-list::-webkit-scrollbar-track {
  background: transparent;
}

.selector-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

.selector-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.selector-item:hover {
  border-color: rgba(79, 142, 247, 0.3);
  background: rgba(79, 142, 247, 0.05);
}

.selector-item.checked {
  border-color: rgba(79, 142, 247, 0.45);
  background: rgba(79, 142, 247, 0.07);
}

.selector-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.selector-item.checked .selector-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.selector-checkbox-tick {
  display: none;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.selector-item.checked .selector-checkbox-tick {
  display: block;
}

.selector-item-info {
  flex: 1;
  min-width: 0;
}

.selector-item-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selector-item-desc {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selector-panel-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1rem;
}

.selector-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.selector-btn-cancel {
  background: transparent;
  color: var(--fg-muted);
}

.selector-btn-cancel:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.2);
}

.selector-btn-apply {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.selector-btn-apply:hover {
  background: #6aa0f8;
  border-color: #6aa0f8;
}

.selector-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.selector-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.magnetic {
  transition: transform 0.18s ease-out;
  will-change: transform;
}

.loading-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.68);
}

.loading-minimal {
  margin: 1.35rem auto 0.7rem;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
}

.loading-minimal .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  opacity: 0.3;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-minimal .dot:nth-child(2) {
  animation-delay: 0.18s;
}

.loading-minimal .dot:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes dotPulse {
  0%, 100% {
    transform: translateY(0) scale(0.9);
    opacity: 0.28;
  }
  50% {
    transform: translateY(-2px) scale(1.08);
    opacity: 0.95;
  }
}

.project-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  filter: saturate(1.05) contrast(1.05);
  transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(240, 237, 230, 0.72);
  max-width: 62ch;
}

.card-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-top: 1.5rem;
}

.contact-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}



.contact-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.contact-link:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4vh 8vw 6vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-text {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 237, 230, 0.5);
}

.footer-top {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(240, 237, 230, 0.62);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.footer-top:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float linear infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(-40px) scale(1.05);
  }
}

.about-text,
.quick-facts,
.skills-grid .skill-pill,
.project-card,
.contact-links .contact-link,
.section-label,
.section-title {
  opacity: 0;
  transform: translateY(60px);
}

.about-section,
.skills-section,
.projects-section,
.contact-section {
  will-change: transform;
}

/* ── Featured Project Card ─────────────────────────────────────────────────── */
.featured-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(79, 142, 247, 0.18);
  border-radius: 16px;
  padding: 2.5rem;
  background: rgba(79, 142, 247, 0.03);
  backdrop-filter: blur(12px);
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s;
  grid-column: 1 / -1;
  cursor: default;
}

/* Animated shimmer top bar */
.featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent2),
    #a78bfa,
    var(--accent2),
    var(--accent)
  );
  background-size: 200% auto;
  animation: featuredBarShine 4s linear infinite;
}

@keyframes featuredBarShine {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

/* Ambient glow orb — top-right corner */
.featured-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.07) 0%, transparent 68%);
  pointer-events: none;
  border-radius: 50%;
}

.featured-card:hover {
  border-color: rgba(79, 142, 247, 0.38);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 80px rgba(79, 142, 247, 0.06);
  transform: translateY(-4px);
}

.featured-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Left column */
.featured-card-left {}

.featured-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.25);
  border-radius: 999px;
  padding: 0.28rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.featured-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: featuredPulse 2.5s ease-in-out infinite;
}

@keyframes featuredPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.65); }
}

.featured-title {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.featured-subtitle {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent2);
  opacity: 0.85;
  margin-bottom: 0.3rem;
}

.featured-role {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.35rem;
}

.featured-desc {
  font-size: 0.9rem;
  line-height: 1.85;
  color: rgba(240, 237, 230, 0.68);
  margin-bottom: 1.75rem;
}

.featured-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.featured-tech-pill {
  font-family: var(--mono);
  font-size: 0.63rem;
  padding: 0.28rem 0.78rem;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 999px;
  color: var(--accent2);
  letter-spacing: 0.05em;
  background: rgba(129, 140, 248, 0.06);
}

.featured-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.featured-link-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.22s;
  cursor: pointer;
  border: none;
}

.featured-link-btn.primary {
  background: rgba(79, 142, 247, 0.13);
  border: 1px solid rgba(79, 142, 247, 0.38);
  color: var(--accent);
}

.featured-link-btn.primary:hover {
  background: rgba(79, 142, 247, 0.24);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 22px rgba(79, 142, 247, 0.22);
}

.featured-link-btn.store {
  background: rgba(129, 140, 248, 0.13);
  border: 1px solid rgba(129, 140, 248, 0.38);
  color: var(--accent2);
}

.featured-link-btn.store:hover {
  background: rgba(129, 140, 248, 0.24);
  border-color: var(--accent2);
  color: #fff;
  box-shadow: 0 0 22px rgba(129, 140, 248, 0.22);
}

.featured-link-btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fg-muted);
}

.featured-link-btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--fg);
}

/* Disabled / coming-soon state */
.featured-link-wip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(240, 237, 230, 0.3);
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.featured-wip-badge {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  color: rgba(240, 237, 230, 0.38);
  margin-left: 0.15rem;
}

/* Right column */
.featured-card-right {}

.featured-features-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.35rem;
}

.featured-features {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.featured-feature {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
}

.featured-feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.featured-feature-body {}

.featured-feature-name {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.01em;
  margin-bottom: 0.28rem;
  line-height: 1.3;
}

.featured-feature-desc {
  font-size: 0.8rem;
  line-height: 1.68;
  color: rgba(240, 237, 230, 0.5);
}

@keyframes mobileBgPulse {
  from { opacity: 0.65; }
  to   { opacity: 1; }
}

@media (max-width: 900px) {
  .top-nav {
    width: 94vw;
    gap: 0.8rem;
    padding: 0.65rem 0.8rem 0.45rem;
  }

  .nav-links {
    gap: 0.65rem;
  }

  .featured-card-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 0 6vw;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Ambient background replaces the particle canvas on touch devices */
  #bg-canvas {
    background:
      radial-gradient(ellipse 75% 50% at 12% 20%, rgba(79, 142, 247, 0.07) 0%, transparent 60%),
      radial-gradient(ellipse 60% 70% at 88% 82%, rgba(129, 140, 248, 0.06) 0%, transparent 60%);
    animation: mobileBgPulse 10s ease-in-out infinite alternate;
  }

  .about-section,
  .skills-section,
  .projects-section,
  .contact-section {
    padding: 12vh 6vw;
  }

  .contact-links {
    gap: 1.2rem;
    flex-direction: column;
  }

  .site-footer {
    padding: 3vh 6vw 6vh;
  }

  .corner {
    opacity: 0.12;
  }
}

@media (max-width: 480px) {
  .top-nav {
    top: 0.65rem;
    width: 95vw;
    gap: 0.55rem;
    padding: 0.58rem 0.7rem 0.42rem;
  }

  .brand {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .nav-links {
    gap: 0.5rem 0.7rem;
    justify-content: flex-start;
  }

  .nav-links a {
    font-size: 0.66rem;
  }

  .hero {
    min-height: 100svh;
    padding: 0 5vw;
  }

  .intro {
    font-size: 0.64rem;
    letter-spacing: 0.16em;
  }

  .name {
    font-size: clamp(2.8rem, 18vw, 4rem);
    gap: 0.22em;
  }

  .tagline {
    margin-top: 1.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
  }

  .about-section,
  .skills-section,
  .projects-section,
  .contact-section {
    padding: 10vh 5vw;
  }

  .section-title {
    margin-bottom: 1.75rem;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-card {
    padding: 1.5rem;
  }

  .featured-card-inner {
    gap: 2rem;
  }

  .featured-title {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  .coming-stage {
    padding: 1.5rem 1.1rem;
  }

  .site-footer {
    padding: 2.5vh 5vw 5.5vh;
    flex-direction: column;
    align-items: flex-start;
  }
}
