/* ═══════════════════════════════════════════
   SAMUEL GONZ · PORTFOLIO
   style.css
═══════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, button { font-family: inherit; }
ul { list-style: none; }

/* ─── CSS VARIABLES ─── */
:root {
  --bg: #0f172a;
  --bg-2: #131f35;
  --bg-3: #1e293b;
  --border: rgba(255,255,255,.07);
  --text: #e2e8f0;
  --text-muted: #7c8fa8;
  --accent: #38bdf8;
  --accent-glow: rgba(56,189,248,.25);
  --purple: #a78bfa;
  --purple-glow: rgba(167,139,250,.2);
  --radius: 16px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --shadow: 0 24px 48px rgba(0,0,0,.4);
}

/* ─── CUSTOM CURSOR ─── */
.cursor {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform .1s, background .3s;
  mix-blend-mode: screen;
}
.cursor-trail {
  width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left .12s, top .12s, width .3s, height .3s, opacity .3s;
  opacity: .5;
}
body:hover .cursor { opacity: 1; }
a:hover ~ .cursor, button:hover ~ .cursor { transform: translate(-50%,-50%) scale(2); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3 { font-family: 'Syne', sans-serif; font-weight: 800; line-height: 1.1; }
.mono { font-family: 'Space Mono', monospace; }

/* ─── CONTAINERS ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 120px 0; }

/* ─── SECTION LABELS ─── */
.section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.label-num { color: var(--accent); }
.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--border);
}
.section-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 2rem;
  color: var(--text);
}
.section-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

/* ─── REVEAL ANIMATION ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.75rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .03em;
  transition: var(--transition);
  cursor: none;
  border: none;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
  opacity: 0;
  transition: opacity .2s;
}
.btn:hover::before { opacity: 1; }
.btn svg { width: 18px; height: 18px; transition: transform .3s; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: #0f172a;
  box-shadow: 0 0 30px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 0 50px rgba(56,189,248,.5);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-ghost.linkedin-soon {
  opacity: .55;
  cursor: default;
}
.btn-ghost.linkedin-soon:hover {
  border-color: var(--border);
  color: var(--text);
  transform: none;
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .4s, backdrop-filter .4s, box-shadow .4s;
}
.nav.scrolled {
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .05em;
  color: var(--text);
}
.nav-logo .dot { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .04em;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width .3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: rgba(56,189,248,.1) !important;
  color: var(--accent) !important;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(56,189,248,.3);
}
.nav-cta:hover { background: rgba(56,189,248,.2) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#gridCanvas { width: 100%; height: 100%; opacity: .35; }
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(56,189,248,.18) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: floatGlow 8s ease-in-out infinite;
}
.glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(167,139,250,.12) 0%, transparent 70%);
  bottom: -50px; left: -50px;
  animation: floatGlow 10s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem 1rem;
  background: rgba(56,189,248,.1);
  border: 1px solid rgba(56,189,248,.25);
  border-radius: 100px;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: 2rem;
  transition-delay: .1s;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

.hero-name {
  font-size: clamp(4rem, 10vw, 8.5rem);
  line-height: 1;
  margin-bottom: .5rem;
  display: flex;
  flex-direction: column;
}
.name-line { display: block; transition-delay: .15s; }
.name-line.accent { color: var(--accent); transition-delay: .25s; }
.underscore {
  animation: blink 1.2s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-title {
  font-family: 'Space Mono', monospace;
  font-size: clamp(.8rem, 2vw, 1rem);
  color: var(--text-muted);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  transition-delay: .35s;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
  transition-delay: .45s;
}
.hero-sub strong { color: var(--text); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 5rem;
  transition-delay: .55s;
}

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition-delay: .65s;
}
.scroll-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { width: 30px; opacity: .5; }
  50% { width: 80px; opacity: 1; }
}

/* ═══════════════════════════════════════
   ABOUT
═══════════════════════════════════════ */
.about { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.about-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.about-desc strong { color: var(--text); }
.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: .25rem; }
.stat-num { font-size: 2.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); font-family: 'Space Mono', monospace; }

/* About visual — flip card */
.about-visual { position: relative; height: 480px; perspective: 1400px; }

.about-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 340px;
  height: 340px;
  z-index: 2;
  cursor: pointer;
}
.about-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
  transform-style: preserve-3d;
}
.about-card.flipped .about-card-inner { transform: rotateY(180deg); }

.about-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: .75rem;
}

.about-card-front {
  transform: rotateY(0deg);
  padding: 1.25rem;
}
.about-photo {
  width: 100%; height: 250px;
  border-radius: 14px;
  background: rgba(56,189,248,.1);
  border: 2px solid rgba(56,189,248,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { font-size: 2.6rem; line-height: 1; }
.flip-hint {
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  color: var(--text-muted);
  letter-spacing: .05em;
}

.about-card-back {
  transform: rotateY(180deg);
  flex-direction: column;
  text-align: center;
  gap: 1.25rem;
}
.about-avatar {
  width: 96px; height: 96px;
  background: rgba(56,189,248,.1);
  border: 2px solid rgba(56,189,248,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-avatar svg { width: 52px; height: 52px; }
.card-name { font-weight: 800; font-size: 1.4rem; }
.card-role { font-size: 1rem; color: var(--accent); font-family: 'Space Mono', monospace; }
.card-location { font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: .3rem; margin-top: .3rem; }

.floating-tag {
  position: absolute;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem .9rem;
  font-size: .8rem;
  font-family: 'Space Mono', monospace;
  color: var(--text-muted);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  z-index: 1;
  opacity: 0;
  transform: scale(.7);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.about-card.flipped ~ .floating-tag {
  opacity: 1;
  transform: scale(1);
  animation: floatTag 4s ease-in-out infinite;
}
.tag-1 { top: -4%; left: -8%; animation-delay: 0s; border-color: rgba(56,189,248,.3); color: var(--accent); transition-delay: .15s; }
.tag-2 { top: -8%; right: -6%; animation-delay: 1.5s; border-color: rgba(167,139,250,.3); color: var(--purple); transition-delay: .25s; }
.tag-3 { bottom: -2%; left: -4%; animation-delay: .8s; border-color: rgba(52,211,153,.3); color: #34d399; transition-delay: .35s; }
@keyframes floatTag {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ═══════════════════════════════════════
   STACK
═══════════════════════════════════════ */
.stack { background: var(--bg-2); }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}
.stack-category {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  transition: border-color .3s, transform .3s;
}
.stack-category:hover { border-color: rgba(56,189,248,.3); transform: translateY(-4px); }
.cat-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.tech-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tech-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem .9rem;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s, transform .2s;
  animation: techReveal .5s ease both;
  animation-delay: calc(var(--i) * .1s);
  cursor: default;
}
.tech-item:hover { background: rgba(56,189,248,.08); transform: translateX(4px); }
@keyframes techReveal {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
.tech-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  padding: 6px;
  overflow: hidden;
}
.tech-icon svg { width: 18px; height: 18px; }
.tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tech-icon.html  { background: rgba(228,77,38,.15); color: #e44d26; }
.tech-icon.css   { background: rgba(21,114,182,.15); color: #1572b6; }
.tech-icon.js    { background: rgba(247,223,30,.15); color: #f7df1e; }
.tech-icon.react { background: rgba(97,218,251,.15); color: #61dafb; }
.tech-icon.node  { background: rgba(104,160,99,.15); color: #68a063; }
.tech-icon.express { background: rgba(255,255,255,.08); color: var(--text-muted); }
.tech-icon.python { background: rgba(55,118,171,.15); color: #3776ab; }
.tech-icon.prisma { background: rgba(56,189,248,.12); color: var(--accent); }
.tech-icon.mongo { background: rgba(77,179,61,.15); color: #4db33d; }
.tech-icon.mysql { background: rgba(0,117,143,.15); color: #00758f; }
.tech-icon.leaflet { background: rgba(52,211,153,.15); color: #34d399; }
.tech-icon.git   { background: rgba(240,80,51,.15); color: #f05033; }
.tech-icon.docker { background: rgba(13,183,237,.15); color: #0db7ed; }
.tech-icon.socket { background: rgba(56,189,248,.12); color: var(--accent); }
.tech-icon.linux { background: rgba(167,139,250,.15); color: var(--purple); }
.tech-icon.vscode { background: rgba(0,122,204,.15); color: #007acc; }

/* ═══════════════════════════════════════
   PROJECTS
═══════════════════════════════════════ */
.projects { background: var(--bg); overflow: hidden; }
.projects-carousel {
  margin-top: 1rem;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.projects-track {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  overflow-x: auto;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: .5rem 4vw 1.5rem;
}
.projects-track::-webkit-scrollbar { display: none; }
.projects-track.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.project-card {
  flex: 0 0 340px;
  max-width: 340px;
}
.project-card.featured { flex: 0 0 380px; max-width: 380px; }
.project-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.project-card:hover { border-color: var(--c); transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.project-card:hover::before { opacity: 1; }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; }
.card-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  flex-shrink: 0;
}
.card-icon svg { width: 20px; height: 20px; }
.card-links { display: flex; gap: .5rem; }
.card-links a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color .2s, border-color .2s, background .2s;
}
.card-links a:hover { color: var(--c); border-color: var(--c); background: rgba(255,255,255,.08); }

/* "Ver ahora" hover link */
.card-view-btn {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: .35rem;
  height: 34px;
  padding: 0 .3rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .25s, transform .25s, color .2s;
}
.card-view-btn span { white-space: nowrap; }
.project-card:hover .card-view-btn,
.project-card:focus-within .card-view-btn {
  opacity: 1;
  transform: translateX(0);
}
.card-view-btn:hover { color: var(--c); }
.card-view-btn.is-private {
  opacity: 1;
  transform: none;
  color: var(--text-muted);
  cursor: default;
}
.card-view-btn.is-private:hover { color: var(--text-muted); }

/* touch devices: no hover, keep the button visible */
@media (hover: none) {
  .card-view-btn { opacity: 1; transform: none; }
}

/* Card mockup previews */
.card-mockup { border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.mockup-window { padding: .5rem; }
.mockup-dots { display: flex; gap: 4px; padding: .4rem .6rem; }
.mockup-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.mockup-dots span:nth-child(1) { background: #ff5f57; }
.mockup-dots span:nth-child(2) { background: #febc2e; }
.mockup-dots span:nth-child(3) { background: #28c840; }
.mockup-content { padding: .75rem; height: 90px; display: flex; flex-direction: column; gap: .4rem; overflow: hidden; }

/* Auth mockup */
.auth .mockup-input { height: 14px; background: rgba(255,255,255,.07); border-radius: 4px; width: 100%; }
.auth .mockup-btn-mock { height: 18px; background: rgba(56,189,248,.25); border-radius: 5px; width: 70%; margin-top: .2rem; }
.auth .mockup-token { font-family: 'Space Mono', monospace; font-size: .55rem; color: var(--accent); opacity: .6; margin-top: auto; }

/* Ecommerce mockup */
.ecommerce { flex-direction: row; align-items: center; gap: .5rem; }
.mockup-products { display: flex; gap: .3rem; }
.mock-product { width: 28px; height: 40px; background: rgba(167,139,250,.2); border-radius: 4px; }
.mock-cart { font-family: 'Space Mono', monospace; font-size: .6rem; color: var(--purple); white-space: nowrap; }

/* Chat mockup */
.chat { gap: .3rem; }
.chat-msg { height: 12px; border-radius: 6px; background: rgba(56,189,248,.15); width: 70%; }
.chat-msg.right { align-self: flex-end; background: rgba(167,139,250,.2); }
.chat-msg.short { width: 35%; }
.chat-typing { font-size: .65rem; color: var(--accent); opacity: .6; letter-spacing: .2em; margin-top: .2rem; }

/* Admin mockup */
.admin { flex-direction: row; gap: .4rem; padding: .4rem; }
.admin-sidebar { width: 24px; display: flex; flex-direction: column; gap: .3rem; }
.sidebar-item { height: 8px; background: rgba(255,255,255,.1); border-radius: 3px; }
.sidebar-item.active { background: rgba(56,189,248,.4); }
.admin-main { flex: 1; }
.admin-chart { height: 100%; background: linear-gradient(180deg, rgba(56,189,248,.1) 0%, transparent 100%); border-radius: 6px; }

.card-title { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.card-desc {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
  max-height: 4.6em;
  overflow: hidden;
  transition: max-height .45s ease;
}
.card-desc::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.6em;
  background: linear-gradient(to bottom, transparent, var(--bg-3));
  opacity: 1;
  transition: opacity .3s;
}
.project-card:hover .card-desc { max-height: 30em; }
.project-card:hover .card-desc::after { opacity: 0; }
.card-tech { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.card-tech span {
  padding: .25rem .65rem;
  background: rgba(56,189,248,.08);
  border: 1px solid rgba(56,189,248,.2);
  border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  color: var(--accent);
  letter-spacing: .05em;
}

/* ═══════════════════════════════════════
   EXPERIENCE / TIMELINE
═══════════════════════════════════════ */
.experience { background: var(--bg-2); }
.timeline { position: relative; padding-left: 2rem; margin-top: 1rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 1px;
  height: calc(100% - 12px);
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .3;
}
.timeline-item {
  position: relative;
  padding: 0 0 3.5rem 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -6px; top: 8px;
  width: 13px; height: 13px;
  background: var(--accent);
  border: 3px solid var(--bg-2);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(56,189,248,.2);
  transition: box-shadow .3s;
}
.timeline-item:hover .timeline-dot { box-shadow: 0 0 0 8px rgba(56,189,248,.15); }
.timeline-content {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .3s, transform .3s;
}
.timeline-content:hover { border-color: rgba(56,189,248,.3); transform: translateX(6px); }
.timeline-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.timeline-date {
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .08em;
}
.timeline-badge {
  padding: .2rem .65rem;
  background: rgba(56,189,248,.1);
  border: 1px solid rgba(56,189,248,.3);
  border-radius: 100px;
  font-size: .65rem;
  font-family: 'Space Mono', monospace;
  color: var(--accent);
}
.timeline-content h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.timeline-company { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; font-family: 'Space Mono', monospace; }
.timeline-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.timeline-tags span {
  padding: .2rem .6rem;
  background: rgba(167,139,250,.08);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 5px;
  font-size: .65rem;
  font-family: 'Space Mono', monospace;
  color: var(--purple);
}

/* ═══════════════════════════════════════
   GITHUB SECTION
═══════════════════════════════════════ */
.github-section { background: var(--bg); }
.github-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.github-features { display: flex; flex-direction: column; gap: .85rem; margin: 1.5rem 0 2rem; }
.github-features li { display: flex; align-items: center; gap: .75rem; font-size: .95rem; color: var(--text-muted); }
.github-features li svg { flex-shrink: 0; }

.contribution-grid {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 3px;
  padding: 1.5rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.contrib-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--bg-2);
  transition: background .2s;
}
.contrib-cell.level-1 { background: rgba(56,189,248,.2); }
.contrib-cell.level-2 { background: rgba(56,189,248,.4); }
.contrib-cell.level-3 { background: rgba(56,189,248,.65); }
.contrib-cell.level-4 { background: rgba(56,189,248,.9); }
.contrib-cell.blink {
  background: var(--accent) !important;
  box-shadow: 0 0 6px rgba(56,189,248,.8);
  transition: background .15s ease, box-shadow .15s ease;
}

.github-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.gh-stat {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color .3s;
}
.gh-stat:hover { border-color: rgba(56,189,248,.3); }
.gh-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.gh-label { font-size: .75rem; color: var(--text-muted); font-family: 'Space Mono', monospace; }

/* ═══════════════════════════════════════
   CONTACT
═══════════════════════════════════════ */
.contact { background: var(--bg-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}
.contact-links { display: flex; flex-direction: column; gap: .85rem; margin-top: 2rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.25rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .9rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  transition: border-color .3s, color .3s, transform .3s;
}
.contact-link:hover { border-color: rgba(56,189,248,.4); color: var(--accent); transform: translateX(6px); }
.contact-link-soon { opacity: .55; cursor: default; }
.contact-link-soon:hover { border-color: var(--border); color: var(--text-muted); transform: none; }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .9rem 1rem;
  color: var(--text);
  font-size: .95rem;
  transition: border-color .3s, box-shadow .3s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56,189,248,.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: .6; }

.contact-form .btn { align-self: flex-start; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}
.footer-text { font-size: .9rem; color: var(--text-muted); }
.footer-text strong { color: var(--text); }
.footer-sub { font-size: .75rem; color: var(--text-muted); font-family: 'Space Mono', monospace; margin-top: .4rem; opacity: .5; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .about-grid, .github-grid, .contact-grid { gap: 4rem; }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transition: right .4s cubic-bezier(.4,0,.2,1);
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: flex; z-index: 1000; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero { padding: 100px 0 60px; }
  .hero-name { font-size: clamp(3rem, 12vw, 5rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .section { padding: 80px 0; }
  .about-grid, .github-grid, .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { height: 380px; }
  .about-card { width: 280px; height: 280px; }
  .about-photo { height: 190px; }
  .tag-1 { top: 2%; left: 2%; }
  .tag-2 { top: 2%; right: 2%; }
  .tag-3 { bottom: 4%; left: 4%; }
  .project-card, .project-card.featured { flex: 0 0 82vw; max-width: 82vw; }
  .stack-grid { grid-template-columns: 1fr; }
  .contribution-grid { grid-template-columns: repeat(26, 1fr); }
  .about-stats { gap: 1.5rem; }
  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .stack-grid { grid-template-columns: 1fr; }
  .tech-list { grid-template-columns: 1fr; }
  .about-stats { flex-wrap: wrap; gap: 1rem; }
  .github-stats-row { gap: .75rem; }
  .contact-grid { gap: 2rem; }
  .card-view-btn span { display: none; }
  .card-view-btn { padding: 0 .2rem; }
}


::selection { background: var(--accent-glow); color: var(--text); }