/* =============================================
   TOKENS & RESET - TEMA OSCURO (ESTILO IDE)
   ============================================= */
:root {
  --bg:          #0d1117;           /* Fondo principal estilo GitHub Dark */
  --bg-2:        #161b22;           /* Fondo alternativo / secciones */
  --bg-card:     #1e242c;           /* Tarjetas, ligeramente más claras */
  --border:      rgba(48, 54, 61, 0.8);   /* #30363d */
  --border-glow: rgba(88, 166, 255, 0.4);

  --txt:         #e6edf3;           /* Texto principal: gris muy claro */
  --txt-muted:   #8b949e;           /* Texto secundario tipo GitHub */
  --txt-dim:     #6e7681;           /* Texto más tenue */

  --accent:      #58a6ff;           /* Azul tipo JetBrains/DeepSeek */
  --accent-2:    #9f7aea;           /* Violeta suave */
  --accent-3:    #f6ad55;           /* Ámbar (para el libro) */
  --green:       #3fb950;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius:       12px;
  --radius-lg:    20px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: none; border: none; background: none; font: inherit; color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =============================================
   CUSTOM CURSOR
============================================= */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s, height 0.2s, opacity 0.2s;
}
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(88, 166, 255, 0.5);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out), width 0.3s, height 0.3s, opacity 0.3s, border-color 0.3s;
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--accent);
}

/* =============================================
   NAV (fondo semitransparente oscuro)
============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 64px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--txt-muted); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.nav-links a {
  color: var(--txt-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--txt); }
.nav-cta {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
  transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--accent);
}

/* =============================================
   HERO (nebulosas adaptadas a fondo oscuro)
============================================= */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px clamp(1.5rem, 8vw, 8rem) 80px;
  overflow: hidden;
}

.nebula {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.nebula-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
  animation: nebula-drift 18s ease-in-out infinite alternate;
}
.nb-1 {
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, var(--accent), transparent 70%);
  top: -10%; left: -5%;
  animation-delay: 0s;
}
.nb-2 {
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, var(--accent-2), transparent 70%);
  top: 30%; right: -8%;
  animation-delay: -6s;
}
.nb-3 {
  width: 400px; height: 350px;
  background: radial-gradient(ellipse, #1f3a5f, transparent 70%);
  bottom: 0; left: 30%;
  animation-delay: -12s;
  opacity: 0.15;
}
@keyframes nebula-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.07); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.4);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.8rem;
  background: rgba(88, 166, 255, 0.08);
  opacity: 0;
  animation: fade-up 0.7s var(--ease-out) 0.2s forwards;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.hero-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #f0ede8;
  margin-bottom: 0.2rem;
  opacity: 0;
  animation: fade-up 0.7s var(--ease-out) 0.25s forwards;
}
.hero-name .line-2 {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 400;
  color: rgba(160,190,230,0.5);
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.hero-roles {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.5s forwards;
}
.role-pill {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
}
.role-pill.blue   { background: rgba(88, 166, 255, 0.15); color: var(--accent); border: 1px solid rgba(88, 166, 255, 0.3); }
.role-pill.violet { background: rgba(159, 122, 234, 0.15); color: var(--accent-2); border: 1px solid rgba(159, 122, 234, 0.3); }
.role-pill.amber  { background: rgba(246, 173, 85, 0.12); color: var(--accent-3); border: 1px solid rgba(246, 173, 85, 0.3); }
.role-sep { color: var(--txt-dim); font-size: 0.9rem; }

.hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--txt-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.4rem;
  font-weight: 300;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.65s forwards;
}
.hero-desc strong { color: var(--txt); font-weight: 500; }

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.8s forwards;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  background: var(--accent);
  color: #0d1117;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88, 166, 255, 0.3);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--txt-muted);
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--txt);
  transform: translateY(-2px);
  background: rgba(88, 166, 255, 0.05);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--txt-dim);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fade-up 1s var(--ease-out) 1.4s forwards;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--txt-dim), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* =============================================
   SECTION COMMON
============================================= */
section {
  padding: clamp(5rem, 10vw, 9rem) clamp(1.5rem, 8vw, 8rem);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--txt);
}
.section-sub {
  font-size: 1.05rem;
  color: var(--txt-muted);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 3.5rem;
  line-height: 1.7;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* =============================================
   ABOUT
============================================= */
#about {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-text p {
  color: var(--txt-muted);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.about-text p strong { color: var(--txt); font-weight: 500; }
.about-text p a {
  color: var(--accent);
  border-bottom: 1px solid rgba(88, 166, 255, 0.3);
  transition: border-color 0.2s;
}
.about-text p a:hover { border-color: var(--accent); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.stat-card {
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.2s;
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(88, 166, 255, 0.15);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-num.blue   { color: var(--accent); }
.stat-num.violet { color: var(--accent-2); }
.stat-num.amber  { color: var(--accent-3); }
.stat-num.green  { color: var(--green); }
.stat-label {
  font-size: 0.8rem;
  color: var(--txt-muted);
  font-weight: 400;
  line-height: 1.4;
}

/* =============================================
   PROJECTS
============================================= */
#projects { background: var(--bg); }

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(88, 166, 255, 0.06), transparent);
  pointer-events: none;
  transition: opacity 0.3s;
  opacity: 0;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.15);
}
.project-card:hover::before { opacity: 1; }

.project-card.violet-glow::before {
  background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(159, 122, 234, 0.08), transparent);
}
.project-card.violet-glow:hover { border-color: var(--accent-2); box-shadow: 0 4px 20px rgba(159, 122, 234, 0.15); }

.project-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.project-icon.blue   { background: rgba(88, 166, 255, 0.15);  border: 1px solid rgba(88, 166, 255, 0.3); }
.project-icon.violet { background: rgba(159, 122, 234, 0.15); border: 1px solid rgba(159, 122, 234, 0.3); }

.project-body { min-width: 0; }
.project-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.project-sub {
  font-size: 0.85rem;
  color: var(--txt-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.7rem;
}
.project-desc {
  font-size: 0.92rem;
  color: var(--txt-muted);
  font-weight: 300;
  line-height: 1.6;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}
.tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--txt-muted);
}
.project-arrow {
  font-size: 1.2rem;
  color: var(--txt-dim);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.project-card:hover .project-arrow {
  color: var(--accent);
  transform: translateX(4px);
}
.project-card-static {
  cursor: default;
}
.project-card-static:hover {
  border-color: var(--border);
  transform: none;
}
.project-card-static:hover::before {
  opacity: 0;
}
.project-status {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--txt-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.25rem 0.55rem;
  flex-shrink: 0;
}

/* =============================================
   BOOK
============================================= */
#book {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.book-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: center;
}
.book-mockup {
  position: relative;
  display: flex;
  justify-content: center;
}
.book-cover-image {
  width: 240px;
  aspect-ratio: 6/9;
  border-radius: 6px 12px 12px 6px;
  border: 1px solid var(--border);
  box-shadow:
    -8px 0 0 rgba(0,0,0,0.3),
    0 30px 80px rgba(0,0,0,0.4),
    0 0 60px rgba(88, 166, 255, 0.15);
  position: relative;
  overflow: hidden;
  transform: perspective(600px) rotateY(-8deg);
  transition: transform 0.5s var(--ease-out);
}
.book-mockup:hover .book-cover-image {
  transform: perspective(600px) rotateY(0deg) scale(1.03);
}
.book-glow {
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 173, 85, 0.15), transparent 70%);
  bottom: -40px; left: 0;
  pointer-events: none;
}
.book-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.book-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: rgba(246, 173, 85, 0.12);
  color: var(--accent-3);
  border: 1px solid rgba(246, 173, 85, 0.25);
}
.book-desc {
  font-size: 1rem;
  color: var(--txt-muted);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.book-desc strong { color: var(--txt); font-weight: 500; }
.book-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.book-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--txt-muted);
}
.book-features li::before {
  content: '▸';
  color: var(--accent-3);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.btn-book {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(246, 173, 85, 0.15), rgba(246, 173, 85, 0.08));
  border: 1px solid rgba(246, 173, 85, 0.3);
  color: var(--accent-3);
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.btn-book:hover {
  background: linear-gradient(135deg, rgba(246, 173, 85, 0.25), rgba(246, 173, 85, 0.12));
  border-color: var(--accent-3);
  transform: translateY(-2px);
}
.btn-book svg { transition: transform 0.2s; }
.btn-book:hover svg { transform: translateY(2px); }

/* =============================================
   WHITEPAPER
============================================= */
#whitepaper {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.whitepaper-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}
.whitepaper-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.whitepaper-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.3);
}
.whitepaper-desc {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
.whitepaper-abstract {
  font-size: 0.95rem;
  color: var(--txt-muted);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.whitepaper-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.whitepaper-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--txt-muted);
}
.whitepaper-features li::before {
  content: '▸';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.btn-whitepaper {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(88, 166, 255, 0.08));
  border: 1px solid rgba(88, 166, 255, 0.3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.btn-whitepaper:hover {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.25), rgba(88, 166, 255, 0.12));
  border-color: var(--accent);
  transform: translateY(-2px);
}
.whitepaper-note {
  font-size: 0.75rem;
  color: var(--txt-dim);
  margin-top: 1rem;
  font-style: italic;
}
.whitepaper-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.icon-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.15), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 2px solid rgba(88, 166, 255, 0.3);
}
.citation-preview {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.citation-title {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.citation-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--txt);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.citation-authors {
  font-size: 0.7rem;
  color: var(--txt-muted);
}

/* =============================================
   CREDENTIALS
============================================= */
#credentials {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.creds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.cred-card {
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.2s;
}
.cred-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(88, 166, 255, 0.15);
}
.cred-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.3);
}
.cred-body { min-width: 0; }
.cred-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.cred-sub {
  font-size: 0.8rem;
  color: var(--txt-muted);
  font-weight: 300;
  line-height: 1.5;
}
.cred-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}
.cred-badge.done    { background: rgba(63, 185, 80, 0.15);  color: #7ee787;     border: 1px solid rgba(63, 185, 80, 0.35); }
.cred-badge.ongoing { background: rgba(246, 173, 85, 0.12);  color: #f6ad55;     border: 1px solid rgba(246, 173, 85, 0.35); }
.cred-badge.planned { background: rgba(88, 166, 255, 0.12); color: var(--accent);    border: 1px solid rgba(88, 166, 255, 0.35); }

/* =============================================
   CONTACT
============================================= */
#contact {
  background: var(--bg);
  text-align: left;
}
.contact-inner {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(88, 166, 255, 0.08), transparent 45%),
    linear-gradient(180deg, var(--bg-card), var(--bg));
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.contact-inner .section-label { justify-content: flex-start; }
.contact-inner .section-label::before { display: none; }
.contact-desc {
  color: var(--txt-muted);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.3rem;
  max-width: 56ch;
}
.contact-actions {
  margin-bottom: 1.6rem;
}
.btn-contact-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.12), rgba(88, 166, 255, 0.06));
  color: var(--txt);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn-contact-primary:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.2), rgba(88, 166, 255, 0.1));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 166, 255, 0.2);
}
.btn-contact-primary-text {
  font-weight: 600;
  font-size: 0.92rem;
}
.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.87rem;
  color: var(--txt-muted);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--txt);
  transform: translateY(-3px);
  background: var(--bg-2);
  box-shadow: 0 4px 15px rgba(88, 166, 255, 0.15);
}
.contact-link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-link-icon svg {
  width: 100%;
  height: 100%;
}
.contact-link-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.contact-link-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}
.contact-link-text small {
  font-size: 0.72rem;
  color: var(--txt-dim);
  line-height: 1.2;
}
.contact-link-arrow {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--txt-dim);
}

/* =============================================
   FOOTER
============================================= */
footer {
  padding: 1.5rem clamp(1.5rem, 8vw, 8rem);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--txt-dim);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background: var(--bg);
}
footer a { color: var(--txt-muted); transition: color 0.2s; }
footer a:hover { color: var(--accent); }

/* =============================================
   ANIMATIONS & UTILS
============================================= */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #cursor-dot,
  #cursor-ring {
    display: none !important;
  }
  body,
  button {
    cursor: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
  body,
  button {
    cursor: auto;
  }
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .about-grid   { grid-template-columns: 1fr; gap: 3rem; }
  .book-inner   { grid-template-columns: 1fr; gap: 3rem; }
  .whitepaper-inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .whitepaper-icon { order: -1; }
  .citation-preview { margin: 0 auto; }
  .book-cover-image   { transform: none; width: 200px; margin: 0 auto; }
  .book-mockup  { justify-content: center; }
  .creds-grid   { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: auto 1fr; }
  .project-status { display: none; }
  .project-arrow { display: none; }
  nav {
    gap: 0.8rem;
    padding: 0 1rem;
  }
  nav .nav-links {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    max-width: 58vw;
  }
  nav .nav-links::-webkit-scrollbar { display: none; }
  nav .nav-cta { display: none; }
  .nav-links a { font-size: 0.78rem; }
  .contact-links { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  section { padding: 4rem 1.5rem; }
  .about-stats { grid-template-columns: 1fr; }
  .hero-name { font-size: 2.6rem; }
  .hero-roles { gap: 0.4rem; }
  .role-pill { font-size: 0.65rem; }
  nav {
    height: 56px;
    padding: 0 0.75rem;
  }
  .nav-logo { font-size: 0.82rem; }
  nav .nav-links {
    gap: 0.75rem;
    max-width: 68vw;
    font-size: 0.75rem;
  }
  .contact-inner { padding: 1.2rem; }
  .btn-contact-primary {
    width: 100%;
    justify-content: center;
  }
}
