/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  /* Grays -- the base palette */
  --gray-950: #0c0c0d;
  --gray-900: #111113;
  --gray-800: #1a1a1e;
  --gray-700: #252529;
  --gray-600: #3a3a40;
  --gray-500: #5a5a63;
  --gray-400: #8a8a96;
  --gray-300: #b8b8c2;
  --gray-200: #d8d8e0;
  --gray-100: #f0f0f4;

  /* Accent 1: Olive / Sage green */
  --olive-500: #6b7c4a;
  --olive-400: #8a9e5f;
  --olive-300: #aabb7e;
  --olive-200: #c8d5a4;
  --olive-glow: rgba(107, 124, 74, 0.15);

  /* Accent 2: Cyan / Turquoise */
  --cyan-500: #2d9ea8;
  --cyan-400: #3dbecb;
  --cyan-300: #72d4dd;
  --cyan-200: #a8e8ee;
  --cyan-glow: rgba(45, 158, 168, 0.15);

  /* Surfaces */
  --bg: var(--gray-950);
  --surface: var(--gray-800);
  --surface-hover: var(--gray-700);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);

  /* Text */
  --text-primary: var(--gray-100);
  --text-secondary: var(--gray-400);
  --text-muted: var(--gray-500);

  /* Typography */
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;

  /* Spacing */
  --container: 1200px;
  --section-gap: 120px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-med: 300ms;
  --dur-slow: 600ms;
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-700) transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

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

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

em {
  font-style: italic;
}

/* ─────────────────────────────────────────────
   NOISE TEXTURE
───────────────────────────────────────────── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─────────────────────────────────────────────
   CUSTOM CURSOR
───────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan-400);
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: width var(--dur-fast), height var(--dur-fast), opacity var(--dur-fast);
  mix-blend-mode: screen;
}

.cursor-trail {
  position: fixed;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(61, 190, 203, 0.35);
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-out), width var(--dur-med), height var(--dur-med);
}

body.cursor-hover .cursor {
  width: 16px;
  height: 16px;
}

body.cursor-hover .cursor-trail {
  width: 60px;
  height: 60px;
  border-color: rgba(61, 190, 203, 0.2);
}

/* ─────────────────────────────────────────────
   CONTAINER
───────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}

/* ─────────────────────────────────────────────
   REVEAL ANIMATIONS
───────────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out) var(--delay, 0s),
    transform 0.7s var(--ease-out) var(--delay, 0s);
}

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

/* ─────────────────────────────────────────────
   NAV
───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  transition: background var(--dur-med), backdrop-filter var(--dur-med),
    padding var(--dur-med), border-bottom var(--dur-med);
}

.nav.scrolled {
  background: rgba(12, 12, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 28px;
  width: auto;
  transition: transform var(--dur-med) var(--ease-out);
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.08);
}

.accent-dot {
  color: var(--cyan-400);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--dur-med);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan-400);
  transition: width var(--dur-med) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cyan-400);
  border: 1px solid rgba(61, 190, 203, 0.3);
  border-radius: 100px;
  padding: 7px 18px;
  transition: background var(--dur-med), border-color var(--dur-med), color var(--dur-med);
}

.nav-cta:hover {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--gray-950);
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform var(--dur-med), opacity var(--dur-med);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-link {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color var(--dur-fast);
}

.mobile-link:hover,
.mobile-link.accent {
  color: var(--cyan-400);
}

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 48px 60px;
  overflow: hidden;
}

.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, var(--olive-glow) 0%, transparent 70%);
  animation: orbFloat1 12s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: 50px;
  left: -80px;
  background: radial-gradient(circle, var(--cyan-glow) 0%, transparent 70%);
  animation: orbFloat2 15s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(40px, 30px) scale(1.1);
  }
}

@keyframes orbFloat2 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(-30px, -40px) scale(1.08);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--olive-400);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-name {
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.name-line {
  display: block;
}

.name-line-accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gray-600);
  transition: color var(--dur-slow), -webkit-text-stroke var(--dur-slow);
}

.name-line-accent:hover {
  color: var(--gray-100);
  -webkit-text-stroke: 0px transparent;
}

.cursor-blink {
  color: var(--cyan-400);
  -webkit-text-stroke: 0;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--cyan-400);
  color: var(--gray-950);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 100px;
  transition: background var(--dur-med), transform var(--dur-fast);
}

.btn-primary:hover {
  background: var(--cyan-300);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color var(--dur-med), color var(--dur-med), transform var(--dur-fast);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Ticker */
.ticker-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 14px 0;
  background: rgba(12, 12, 13, 0.4);
  backdrop-filter: blur(10px);
}

.ticker {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: tickerScroll 28s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  flex-shrink: 0;
}

.ticker .sep {
  color: var(--olive-400);
}

@keyframes tickerScroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ─────────────────────────────────────────────
   SECTION SHARED STYLES
───────────────────────────────────────────── */
.section-header {
  margin-bottom: 72px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-title em {
  color: transparent;
  -webkit-text-stroke: 1px var(--gray-500);
  font-style: normal;
}

/* ─────────────────────────────────────────────
   ABOUT
───────────────────────────────────────────── */
.about {
  padding: var(--section-gap) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 72px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--dur-med), background var(--dur-med);
}

.fact-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.fact-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--cyan-400);
  letter-spacing: -0.04em;
  line-height: 1;
}

.fact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Skills */
.skills-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.skill-group {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.skill-group-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  min-width: 160px;
  padding-top: 6px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  font-size: 0.8rem;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.tag:hover {
  border-color: var(--gray-500);
  color: var(--text-primary);
}

.accent-tag {
  border-color: rgba(107, 124, 74, 0.4);
  color: var(--olive-300);
}

.accent-tag:hover {
  border-color: var(--olive-400);
  color: var(--olive-200);
}

/* Skill Tooltip */
.skill-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.95);
  background: rgba(26, 26, 30, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  max-width: 240px;
  line-height: 1.4;
  text-align: center;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.skill-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}


/* ─────────────────────────────────────────────
   PROJECTS
───────────────────────────────────────────── */
.projects {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}

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

.project-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--dur-med), transform var(--dur-med) var(--ease-out);
}

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

.project-card:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 4px;
  transform: translateY(-4px);
}

.project-card:hover .project-card-glow {
  opacity: 1;
}

.project-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(61, 190, 203, 0.05), transparent 40%);
  opacity: 0;
  transition: opacity var(--dur-med);
  pointer-events: none;
}

.project-card-inner {
  position: relative;
  z-index: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 280px;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ptag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-body {
  flex: 1;
}

.project-name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  transition: color var(--dur-fast);
}

.project-card:hover .project-name {
  color: var(--cyan-300);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.status-live {
  background: rgba(107, 124, 74, 0.15);
  color: var(--olive-300);
  border: 1px solid rgba(107, 124, 74, 0.3);
}

.status-wip {
  background: rgba(61, 190, 203, 0.1);
  color: var(--cyan-300);
  border: 1px solid rgba(61, 190, 203, 0.2);
}

.project-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.project-link:hover {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--gray-950);
  transform: rotate(15deg);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-link-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan-400);
  letter-spacing: 0.05em;
  transition: opacity var(--dur-fast);
}

.project-link-text:hover {
  opacity: 0.7;
}

.projects-more {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 48px;
  letter-spacing: 0.05em;
}

.coming-soon-title em {
  color: transparent;
  -webkit-text-stroke: 1px var(--gray-500);
  font-style: normal;
}

/* ─────────────────────────────────────────────
   CONNECT
───────────────────────────────────────────── */
.connect {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}

.connect-inner {
  max-width: 700px;
}

.connect-heading {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 24px 0 48px;
}

.connect-heading em {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gray-600);
  font-style: normal;
}

.connect-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 48px;
  transition: color var(--dur-med), border-color var(--dur-med), gap var(--dur-med);
}

.connect-cta:hover {
  color: var(--cyan-400);
  border-color: var(--cyan-400);
  gap: 20px;
}

.connect-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: -32px;
  margin-bottom: 40px;
}

.connect-links {
  display: flex;
  gap: 32px;
}

.social-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  position: relative;
  transition: color var(--dur-fast);
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--olive-400);
  transition: width var(--dur-med);
}

.social-link:hover {
  color: var(--olive-300);
}

.social-link:hover::after {
  width: 100%;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-back {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color var(--dur-fast);
}

.footer-back:hover {
  color: var(--cyan-400);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .container {
    padding: 0 24px;
  }

  .hero {
    padding: 120px 24px 60px;
  }

  .nav {
    padding: 18px 24px;
  }

  .nav.scrolled {
    padding: 12px 24px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    cursor: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

  .skill-group {
    flex-direction: column;
    gap: 12px;
  }

  .skill-group-title {
    min-width: auto;
  }

  .connect-links {
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* ── Disable custom cursor on mobile ── */
  body {
    cursor: auto;
  }

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

@media (max-width: 600px) {
  .hero-name {
    font-size: 3.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    text-align: center;
    justify-content: center;
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  .connect-heading {
    font-size: 2.8rem;
  }
}

/* ─────────────────────────────────────────────
   TOAST
───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--gray-700);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────
   PROJECT DETAILS MODAL
───────────────────────────────────────────── */
body.modal-open {
  overflow: hidden;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 13, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-content {
  position: relative;
  z-index: 2;
  width: 90vw;
  max-width: 1050px;
  height: 75vh;
  max-height: 700px;
  background: var(--gray-900);
  border: 1px solid var(--border-hover);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(0.95) translateY(30px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal.open .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(12, 12, 13, 0.6);
  backdrop-filter: blur(4px);
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.modal-close:hover {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--gray-950);
  transform: rotate(90deg);
}

.modal-layout {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Left side: Media Viewer */
.modal-media-container {
  width: 58%;
  background: #080809;
  display: flex;
  flex-direction: column;
  position: relative;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.modal-slider {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.modal-slides-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #080809;
}

.modal-slide img,
.modal-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Custom placeholder when no images are present */
.modal-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  height: 100%;
  width: 100%;
  color: var(--text-secondary);
}

.modal-placeholder svg {
  width: 60px;
  height: 60px;
  stroke: var(--cyan-400);
  margin-bottom: 20px;
  opacity: 0.8;
}

.modal-placeholder p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  max-width: 340px;
  line-height: 1.6;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(18, 18, 20, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
  z-index: 10;
}

.slider-btn:hover {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--gray-950);
  transform: translateY(-50%) scale(1.05);
}

.slider-btn.prev {
  left: 16px;
}

.slider-btn.next {
  right: 16px;
}

.slider-btn.hidden {
  display: none;
}

.slider-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur-fast), transform var(--dur-fast);
}

.indicator-dot.active {
  background: var(--cyan-400);
  transform: scale(1.2);
}

.indicator-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* Right side: Project Details */
.modal-details {
  width: 42%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--gray-900);
  text-align: left;
}

.modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.modal-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.modal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-description-wrap {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 24px;
}

.modal-description-wrap::-webkit-scrollbar {
  width: 4px;
}

.modal-description-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.modal-description-wrap::-webkit-scrollbar-thumb {
  background: var(--gray-700);
  border-radius: 4px;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-more-info {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.modal-more-info h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.modal-more-info ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-more-info li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.modal-more-info li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan-400);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.modal-footer .project-status {
  margin: 0;
}

.modal-footer .project-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-footer .project-link-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan-400);
  letter-spacing: 0.05em;
  transition: opacity var(--dur-fast);
}

.modal-footer .project-link-text:hover {
  opacity: 0.75;
}

/* ─────────────────────────────────────────────
   RESPONSIVE DESIGN FOR MODAL
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .modal-content {
    width: 95vw;
    height: auto;
    max-height: 90vh;
    border-radius: 20px;
  }

  .modal-layout {
    flex-direction: column;
    overflow-y: auto;
  }

  .modal-media-container {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 16/10;
    height: auto;
    min-height: 280px;
  }

  .modal-details {
    width: 100%;
    padding: 32px 24px;
    height: auto;
    overflow-y: visible;
  }

  .modal-description-wrap {
    overflow-y: visible;
    margin-bottom: 20px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    background: rgba(12, 12, 13, 0.85);
  }
}

@media (max-width: 600px) {
  .modal-title {
    font-size: 1.6rem;
  }

  .modal-media-container {
    aspect-ratio: 16/9;
    min-height: 200px;
  }

  .modal-details {
    padding: 24px 16px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-700);
  border-radius: 10px;
}

/* ─── POKEDEX WIDGET GUI (Facebook chat popup style) ─── */
.dex-chat-widget {
  position: fixed;
  bottom: 0;
  right: 40px;
  width: 330px;
  height: 40px;
  /* Minimized height */
  background: #dc0a2d;
  /* Classic Pokédex Red */
  border: 2px solid #222;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  z-index: 99;
  font-family: 'DM Mono', monospace;
  color: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.55);
  transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

.dex-chat-widget.expanded {
  height: 480px;
  /* Expanded height */
}

/* Header style with round sensor lights */
.dex-chat-header {
  height: 40px;
  min-height: 40px;
  background: #b00820;
  border-bottom: 2px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
}

.dex-header-lights {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dex-sensor-blue {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #85e0ff 0%, #00a2e8 70%, #005f87 100%);
  border: 1.5px solid #fff;
  box-shadow: 0 0 6px #00a2e8;
  animation: sensor-pulse 2s infinite;
}

@keyframes sensor-pulse {

  0%,
  100% {
    box-shadow: 0 0 4px #00a2e8;
  }

  50% {
    box-shadow: 0 0 10px #85e0ff;
  }
}

.dex-mini-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 0.5px solid #222;
}

.dex-mini-led.red {
  background: #ea4335;
}

.dex-mini-led.yellow {
  background: #fbbc05;
}

.dex-mini-led.green {
  background: #34a853;
}

.dex-chat-title {
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-left: 6px;
  flex: 1;
}

.dex-chat-toggle-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 4px;
}

.dex-chat-toggle-btn:hover {
  opacity: 1;
}

/* Body / Screen Area */
.dex-chat-body {
  flex: 1;
  background: #3e3e3e;
  /* Bevel color */
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* Screen Casing mimicking retro LCD green-greyish or dark screen */
.dex-screen {
  flex: 1;
  background: #15181a;
  border: 4px solid #282828;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow-y: auto;
  color: #a3ffac;
  /* Glowing terminal/retro green font */
  font-size: 0.78rem;
  line-height: 1.5;
}

.dex-screen::-webkit-scrollbar {
  width: 4px;
}

.dex-screen::-webkit-scrollbar-track {
  background: transparent;
}

.dex-screen::-webkit-scrollbar-thumb {
  background: #a3ffac;
  border-radius: 2px;
}

/* Live Search Bar */
.dex-search-container {
  display: flex !important;
  align-items: center !important;
  background: #25282a !important;
  border: 2px solid #555 !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
}

.dex-chat-widget input.dex-search-input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 0.8rem !important;
  width: 100% !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.dex-search-input::placeholder {
  color: #777;
}

/* Visual layout components for Pokémon data */
.dex-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  margin-right: 4px;
}

/* Type Colors */
.type-fire {
  background: #ff9d55;
}

.type-water {
  background: #5090d6;
}

.type-grass {
  background: #63bc5a;
}

.type-poison {
  background: #a040a0;
}

.type-normal {
  background: #9099a1;
}

.type-electric {
  background: #f4d23c;
  color: #111;
}

.type-ice {
  background: #73cec0;
}

.type-fighting {
  background: #ce4069;
}

.type-ground {
  background: #d97746;
}

.type-flying {
  background: #8fa8dd;
}

.type-psychic {
  background: #fa7179;
}

.type-bug {
  background: #91c12f;
}

.type-rock {
  background: #c5b78c;
}

.type-ghost {
  background: #5269ac;
}

.type-dragon {
  background: #0b6dc3;
}

.type-dark {
  background: #5a5366;
}

.type-steel {
  background: #5a8ea1;
}

.type-fairy {
  background: #ec8fe6;
}

/* Stat bars style for screen */
.dex-screen-stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.dex-screen-stat-label {
  width: 60px;
  color: #8cd993;
}

.dex-screen-stat-bar {
  flex: 1;
  height: 6px;
  background: rgba(163, 255, 172, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.dex-screen-stat-fill {
  height: 100%;
  background: #a3ffac;
  border-radius: 3px;
}

.dex-screen-stat-val {
  width: 28px;
  text-align: right;
  font-weight: bold;
}

/* Clickable list item for partial matches */
.dex-list-item {
  padding: 6px;
  cursor: pointer;
  border-bottom: 1px solid rgba(163, 255, 172, 0.1);
  transition: background 0.2s, color 0.2s;
}

.dex-list-item:hover {
  background: rgba(163, 255, 172, 0.15);
  color: #fff;
}

/* Pokéball Period Easter Egg */
.pokeball-dot {
  display: inline-block;
  width: 0.28em;
  height: 0.28em;
  border-radius: 50%;
  border: 0.04em solid var(--text-primary);
  position: relative;
  vertical-align: baseline;
  margin-left: 0.05em;
  cursor: none !important;
  overflow: hidden;
  background: #fff;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 0 10px rgba(61, 190, 203, 0);
}

.pokeball-dot:hover {
  transform: rotate(360deg) scale(1.15);
  box-shadow: 0 0 12px rgba(220, 10, 45, 0.6);
  border-color: #dc0a2d;
}

/* Top half is red */
.pokeball-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: #dc0a2d; /* Pokeball Red */
  border-bottom: 0.03em solid var(--text-primary);
  transition: border-color 0.4s ease;
}

.pokeball-dot:hover::before {
  border-bottom-color: #dc0a2d;
}

/* Center button */
.pokeball-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.09em;
  height: 0.09em;
  background: #fff;
  border: 0.03em solid var(--text-primary);
  border-radius: 50%;
  z-index: 2;
  transition: border-color 0.4s ease;
}

.pokeball-dot:hover::after {
  border-color: #dc0a2d;
}