:root {
  --bg: #0a0a0a;
  --text: #f7f7f7;
  --muted: #9a9a9a;
  --card: #0f0f0f;
  --border: #1f1f1f;
  --accent: #ffffff;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg: #f7f7f7;
  --text: #0a0a0a;
  --muted: #505050;
  --card: #ffffff;
  --border: #e2e2e2;
  --accent: #0a0a0a;
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
}

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

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 240ms ease, color 240ms ease;
  overflow-x: hidden;
  cursor: url("./cursor_white.png") 5 0, auto;
}

.patterncraft-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    radial-gradient(68% 58% at 50% 50%, #c81e3a 0%, #a51d35 16%, #7d1a2f 32%, #591828 46%, #3c1722 60%, #2a151d 72%, #1f1317 84%, #141013 94%, #0a0a0a 100%),
    radial-gradient(90% 75% at 50% 50%, rgba(228, 42, 66, 0.06) 0%, rgba(228, 42, 66, 0) 55%),
    radial-gradient(150% 120% at 8% 8%, rgba(0, 0, 0, 0) 42%, #0b0a0a 82%, #070707 100%),
    radial-gradient(150% 120% at 92% 92%, rgba(0, 0, 0, 0) 42%, #0b0a0a 82%, #070707 100%),
    radial-gradient(60% 50% at 50% 60%, rgba(240, 60, 80, 0.06), rgba(0, 0, 0, 0) 60%),
    #050505;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.patterncraft-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5) 100%);
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}

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

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  opacity: 0.22;
  z-index: 2;
}
.theme-toggle {
  display: none;
}

.floating-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 12;
  box-shadow: var(--shadow);
}

main {
  position: relative;
  z-index: 3;
}

.section {
  padding: 96px 6vw;
  opacity: 0;
  transform: translateY(120px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
  visibility: hidden;
}

.section.revealed {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 100vh;
  text-align: center;
  opacity: 1;
  transform: none;
  visibility: visible;
  position: relative;
}

.hero-clock {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}

.hero-status {
  position: static;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  font-weight: 800;
  letter-spacing: 1px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4cff72;
  box-shadow: 0 0 16px rgba(76, 255, 114, 0.8);
  animation: pulseDot 0.9s ease-in-out infinite;
}

.status-text {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

.hero-hearts {
}
.hero-inner {
  max-width: 960px;
  width: min(92vw, 1100px);
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  margin: 0 auto;
}

.hero-name {
  font-size: clamp(52px, 10vw, 96px);
  margin: 0;
  letter-spacing: -2px;
}

.hero-role {
  font-size: clamp(22px, 2.8vw, 32px);
  margin: 0;
  color: var(--muted);
  min-height: 1.4em;
}

.hero-sub {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.hero-name.glitching {
  animation: glitchFlicker 0.32s steps(2, end) infinite;
  text-shadow:
    1px 0px 4px rgba(255, 107, 107, 0.25),
    -1px 0px 4px rgba(116, 227, 138, 0.25);
  cursor: pointer;
}

@keyframes glitchFlicker {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-0.5px, 0.25px); }
  50% { transform: translate(0.5px, -0.25px); }
  75% { transform: translate(-0.25px, -0.5px); }
  100% { transform: translate(0, 0); }
}


.hero-target {
  position: absolute;
  top: var(--target-y, 50%);
  left: var(--target-x, 50%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.18;
  filter: blur(0.4px);
  mix-blend-mode: screen;
  animation: targetDrift 2s ease-in-out infinite;
}

.target-box {
  width: 130px;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  box-shadow:
    0 0 18px rgba(113, 242, 212, 0.18),
    inset 0 0 12px rgba(113, 242, 212, 0.15);
}

.target-line {
  position: absolute;
  background: linear-gradient(90deg, rgba(113, 242, 212, 0.4), rgba(255, 255, 255, 0));
}

.target-line.top {
  top: -2px;
  left: 50%;
  width: 120vw;
  height: 2px;
  transform: translateX(-50%);
}

.target-line.bottom {
  bottom: -2px;
  left: 50%;
  width: 120vw;
  height: 2px;
  transform: translateX(-50%) rotate(0deg);
}

.target-line.left {
  left: -2px;
  top: 50%;
  width: 2px;
  height: 120vh;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(113, 242, 212, 0.4), rgba(255, 255, 255, 0));
}

.target-line.right {
  right: -2px;
  top: 50%;
  width: 2px;
  height: 120vh;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(113, 242, 212, 0.4), rgba(255, 255, 255, 0));
}

.target-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 12px rgba(255, 59, 59, 0.7);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes targetDrift {
  0%   { transform: translate(-50%, -50%) translate(0px, 0px); }
  20%  { transform: translate(-50%, -50%) translate(15px, -10px); }
  33%  { transform: translate(-50%, -50%) translate(20px, -14px); }
  45%  { transform: translate(-50%, -50%) translate(-5px, 12px); }
  55%  { transform: translate(-50%, -50%) translate(-18px, 16px); }
  70%  { transform: translate(-50%, -50%) translate(10px, -4px); }
  85%  { transform: translate(-50%, -50%) translate(-12px, 8px); }
  100% { transform: translate(-50%, -50%) translate(12px, 6px); }
}


.hero-code {
  margin: 10px auto 0;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 90%, transparent), color-mix(in srgb, var(--bg) 85%, transparent));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: "Space Grotesk", "SFMono-Regular", ui-monospace, monospace;
  text-align: left;
  width: clamp(320px, 60vw, 560px);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 80%, transparent);
  font-weight: 700;
}

.code-title {
  color: var(--muted);
  font-size: 0.9rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.dot.red { background: #ff6b6b; }
.dot.yellow { background: #ffd166; }
.dot.green { background: #74e38a; }

.code-body {
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  font-size: 0.98rem;
  min-height: 108px;
}

.code-line {
  color: var(--text);
  opacity: 0.85;
  white-space: pre-wrap;
  animation: codeGlow 2.4s ease-in-out infinite;
}

@keyframes codeGlow {
  0%, 100% { opacity: 0.75; filter: blur(0px); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px rgba(113, 242, 212, 0.25)); }
}

.progress-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 80%, transparent);
}

.progress-track {
  flex: 1;
  height: 8px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #71f2d4, #4ab3ff);
  border-radius: 999px;
  transition: width 0.2s linear;
}

.progress-label {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 10px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  letter-spacing: -0.5px;
  font-size: clamp(26px, 3vw, 38px);
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  background: #ffffff;
  color: #0a0a0a;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 0;
  position: relative;
  line-height: 1.1;
}

.eyebrow-badge::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  background: #ff0000ff;
}

.muted {
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  border: 1px solid transparent;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 94%, transparent), color-mix(in srgb, var(--bg) 90%, transparent));
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: 180px 1fr;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, #ff6b6b, #ffd166, #74e38a);
  pointer-events: none;
  padding: 1px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent),
    0 0 0 3px color-mix(in srgb, #ff6b6b 10%, transparent),
    0 0 0 5px color-mix(in srgb, #ffd166 10%, transparent),
    0 0 0 7px color-mix(in srgb, #74e38a 10%, transparent);
}

.project-cover {
  position: relative;
  background: linear-gradient(145deg, color-mix(in srgb, var(--bg) 88%, transparent), color-mix(in srgb, var(--text) 10%, var(--bg) 90%));
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.8px;
}

.project-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.project-body h3 {
  margin: 0;
  font-size: 1.1rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}

.tag-accent {
  border-color: transparent;
  background: linear-gradient(120deg, #ff6b6b, #ffd166, #74e38a);
  color: #0a0a0a;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px color-mix(in srgb, #000 20%, transparent);
}

.repo-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.tech-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  overflow: hidden;
}

.tech-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.timeline {
  position: relative;
  display: grid;
  gap: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 18px;
  width: 2px;
  height: calc(100% - 24px);
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 48px;
}

.timeline-node {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-item[data-active="true"] .timeline-node {
  background: var(--text);
  border-color: var(--text);
}

.timeline-item[data-active="true"] .timeline-node {
  background: #ff6b6b;
  border-color: #ff6b6b;
  box-shadow:
    0 0 0 4px var(--bg),
    0 0 14px rgba(255, 107, 107, 0.65);
  animation: pulseActive 1.8s ease-in-out infinite;
}

@keyframes pulseActive {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.timeline-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.timeline-card h3 {
  margin: 0;
  font-size: 1rem;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.education-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.education-card h3 {
  margin: 0;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.legal {
  display: grid;
  gap: 14px;
}

.legal-page {
  min-height: 100vh;
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: none;
}

.legal-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin-top: 0;
}

.legal-card h1 {
  margin-top: 0;
  margin-bottom: 10px;
}

.legal-links-inline {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.contact-links {
  display: grid;
  gap: 8px;
  align-content: center;
}

.contact-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.footer {
  padding: 32px 6vw 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  display: grid;
  gap: 12px;
  justify-items: center;
  position: relative;
  z-index: 3;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-runner {
  position: relative;
  width: 100%;
  height: 110px;
  margin-top: 12px;
  overflow: hidden;
}

.footer-mascot {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 72px;
  height: 72px;
  z-index: 4;
  animation: mascot-slide 9s ease-in-out infinite alternate;
}

.footer-mascot-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' shape-rendering='crispEdges'%3E%3Crect width='20' height='20' fill='none'/%3E%3Crect x='6' y='3' width='8' height='1' fill='%230d0d0d'/%3E%3Crect x='5' y='4' width='1' height='8' fill='%230d0d0d'/%3E%3Crect x='14' y='4' width='1' height='8' fill='%230d0d0d'/%3E%3Crect x='6' y='12' width='8' height='1' fill='%230d0d0d'/%3E%3Crect x='6' y='4' width='8' height='8' fill='%23f4d35e'/%3E%3Crect x='7' y='13' width='2' height='2' fill='%23f4d35e'/%3E%3Crect x='11' y='13' width='2' height='2' fill='%23f4d35e'/%3E%3Crect x='7' y='15' width='2' height='1' fill='%23f45b69'/%3E%3Crect x='11' y='15' width='2' height='1' fill='%23f45b69'/%3E%3Crect x='8' y='6' width='1' height='1' fill='%230d0d0d'/%3E%3Crect x='11' y='6' width='1' height='1' fill='%230d0d0d'/%3E%3Crect x='9' y='8' width='2' height='1' fill='%23f45b69'/%3E%3Crect x='7' y='5' width='1' height='1' fill='%23ffe9a3'/%3E%3C/svg%3E") center/contain no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.65));
  animation: mascot-hop 0.95s ease-in-out infinite;
}

@keyframes mascot-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(100% - 72px)); }
}

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

.mono-slider {
  position: relative;
}

.mono-container {
  position: relative;
  min-height: 70vh;
  height: 70vh;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(140deg, color-mix(in srgb, var(--card) 92%, transparent), color-mix(in srgb, var(--bg) 80%, transparent));
  box-shadow: var(--shadow);
}

.mono-preloader {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 900;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mono-preloader-counter {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f4d35e;
}

.mono-preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.mono-grid-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.mono-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  height: 100%;
}

.mono-grid-item {
  position: relative;
  overflow: hidden;
}

.mono-grid-item-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(0.92) brightness(0.9);
  transform: scale(1.02);
}

.mono-grid-item.target {
  grid-column: 2;
  grid-row: 2;
}

.mono-slider-image,
.mono-slider-image-bg,
.mono-slider-image-next,
.mono-transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.mono-slider-image { z-index: 2; }
.mono-slider-image-bg { z-index: 3; }
.mono-slider-image-next { z-index: 4; }
.mono-transition-overlay { z-index: 5; background: #000; }

.mono-slider-image,
.mono-slider-image-bg,
.mono-slider-image-next {
  filter: grayscale(1) contrast(0.92) brightness(0.9);
}

.mono-content {
  position: absolute;
  inset: 0;
  padding: 8% 7%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  color: #ffffff;
}

.mono-content-title {
  margin: 0;
  font-size: clamp(40px, 5.5vw, 72px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  overflow: hidden;
  color: #ffffff;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

.mono-content-title span {
  display: block;
  transform: translateY(100%);
}

.mono-content-paragraph {
  max-width: 620px;
  line-height: 1.5;
  color: #ffffff;
  opacity: 0;
  font-size: 1.08rem;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

.mono-thumbnails {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  z-index: 7;
}

.mono-thumbnail {
  width: 66px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: color-mix(in srgb, var(--card) 85%, transparent);
}

.mono-thumbnail-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(0.92) brightness(0.9);
}

.mono-thumbnail:hover {
  border-color: color-mix(in srgb, var(--text) 22%, transparent);
}

.mono-thumbnail.active {
  border: 2px solid #ffffff;
}

.mono-switch {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 12px;
  z-index: 8;
  box-shadow: var(--shadow);
  transition: padding 0.3s ease-in-out;
}

.mono-switch-button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  position: relative;
  padding: 6px 10px;
  transition: color 0.25s ease;
}

.mono-switch-button-current {
  color: var(--text);
}

.indicator-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
  opacity: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.25s ease;
}

.mono-switch-button-grid .indicator-dot { left: -8px; }
.mono-switch-button-slider .indicator-dot { right: -8px; }

.mono-switch-button:hover .indicator-dot {
  opacity: 1;
}

.mono-switch-button:hover {
  color: var(--text);
}

.mono-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.mono-grid,
.mono-slider-image,
.mono-slider-image-bg,
.mono-slider-image-next,
.mono-transition-overlay,
.mono-content {
  border-radius: 12px;
}

.mono-grid {
  overflow: hidden;
}

.mono-transition-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
}

.mono-container .mono-thumbnail,
.mono-container .mono-switch {
  backdrop-filter: blur(4px);
}

.mono-slider-image-bg {
  filter: grayscale(1) contrast(0.92) brightness(0.9) blur(4px) saturate(1.05);
}

.mono-slider-image-next {
  filter: grayscale(1) contrast(0.92) brightness(0.9) saturate(1.05);
}

.mono-slider-image {
  filter: grayscale(1) contrast(0.92) brightness(0.9);
}

.mono-content,
.mono-thumbnails,
.mono-switch {
  will-change: opacity, transform;
}

code {
  background: color-mix(in srgb, var(--card) 70%, transparent);
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.github-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.github-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.github-grid {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
}

.github-grid img {
  width: 100%;
  max-width: 840px;
  height: auto;
  filter: saturate(1.05);
  border-radius: 10px;
}

.tiny {
  font-size: 0.85rem;
}

/* GitHub calendar: ocultar stats y footer, solo el grid */
.calendar .contrib-legend,
.calendar .contrib-footer,
.calendar .contrib-column,
.calendar h2,
.calendar h3 {
  display: none !important;
}



.calendar {
  width: 100%;
}

.calendar .calendar-graph {
  margin: 0 auto !important;
}

/* Override status pill for footer placement */
.hero-status {
  position: static;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  font-weight: 800;
  letter-spacing: 1px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4cff72;
  box-shadow: 0 0 16px rgba(76, 255, 114, 0.8);
  animation: pulseDot 1.2s ease-in-out infinite;
}

.status-text {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

@media (max-width: 900px) {
  .section {
    padding: 88px 6vw;
  }

  .project-card {
    grid-template-rows: 160px 1fr;
  }
}

@media (max-width: 640px) {
  .mono-container {
    height: 65vh;
    min-height: 520px;
  }

  .mono-content {
    padding: 10% 8%;
  }

  .mono-content-title {
    font-size: clamp(28px, 8vw, 44px);
  }

  .mono-thumbnails {
    right: 10px;
  }

  .mono-switch {
    gap: 10px;
    padding: 8px 12px;
  }

  /* Ocultar totalmente el slider en móviles */
  .mono-slider {
    display: none;
  }

  .section {
    padding: 72px 5vw;
  }

  .github {
    display: none;
  }

  .contact-card {
    max-width: 100%;
  }

  .hero-clock {
    position: static;
    justify-self: end;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 42px;
  }

  .timeline-node {
    left: 2px;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.8px;
  animation: pulse 1.4s ease-in-out infinite;
}

.scroll-text {
  text-transform: uppercase;
  font-size: 0.9rem;
}

.scroll-arrow {
  font-size: 1.2rem;
  display: inline-block;
  animation: bounce 1s ease-in-out infinite;
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 720px) {
  .hero-target {
    display: none;
  }
}

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  box-shadow: var(--shadow);
  max-width: 90vw;
  z-index: 20;
}

.cookie-text {
  display: grid;
  gap: 4px;
  color: var(--text);
}

.btn-cookie {
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Hero name: fijar ancho y glitch suave */
.hero-name {
  display: block;
  width: 100%;
  white-space: nowrap;
  margin: 0 auto;
}

.hero-name.glitching {
  animation: glitchFlickerSoft 0.8s steps(2, end) infinite;
  text-shadow:
    0 0 4px rgba(255, 107, 107, 0.18),
    0 0 4px rgba(116, 227, 138, 0.18);
  cursor: pointer;
}

@keyframes glitchFlickerSoft {
  0% { color: #f7f7f7; }
  33% { color: #ff6b6b; }
  66% { color: #9a9a9a; }
  100% { color: #f7f7f7; }
}

@media (max-width: 640px) {
  .hero {
    padding: 72px 5vw;
  }

  .hero-inner {
    width: 100%;
    gap: 10px;
  }

  .hero-name {
    white-space: normal;
    font-size: clamp(38px, 9vw, 64px);
  }

  .hero-clock {
    right: 16px;
    top: 16px;
  }

  .hero-code {
    width: 100%;
  }
}
