/* ============================================================
   Samuel Sabogal Pardo — personal site
   Hacker aesthetic: black terminal background, matrix green
   ============================================================ */

:root {
  --bg: #010401;
  --bg-2: #031007;
  --surface: rgba(6, 26, 12, 0.72);
  --surface-solid: #07180c;
  --border: rgba(0, 255, 65, 0.10);
  --border-strong: rgba(0, 255, 65, 0.28);
  --text: #d9f7de;
  --muted: #7ea88b;
  --primary: #00d938;
  --primary-2: #00ff41;
  --green-2: #7dffb0;
  --crit: #ff5555;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Grotesk', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 255, 65, 0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(0, 255, 65, 0.04), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: rgba(0, 255, 65, 0.35); color: #eafff0; }

#quantum-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  /* strongest at the top, softer toward the bottom of the viewport */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, 0.3) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, 0.3) 78%, transparent 100%);
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(600px 300px at 50% 120%, rgba(0, 255, 65, 0.06), transparent 70%);
  pointer-events: none;
}

a { color: var(--primary-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--green-2); }

.mono { font-family: var(--font-mono); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.grad { color: var(--green-2); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(1, 4, 1, 0.9), rgba(1, 4, 1, 0.5));
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { color: var(--text); }
.brand-text {
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  font-size: 1.02rem;
}
.prompt { color: var(--primary-2); font-weight: 700; }
.cursor {
  color: var(--primary-2);
  animation: blink 1.1s step-end infinite;
  font-weight: 400;
}
@keyframes blink { 50% { opacity: 0; } }

.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: var(--muted);
  padding: 8px 14px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.main-nav a:hover { color: var(--primary-2); background: rgba(0, 255, 65, 0.06); }
.main-nav a.active { color: var(--primary-2); background: rgba(0, 255, 65, 0.10); }
.nav-cta { color: var(--text) !important; border: 1px solid var(--border-strong); }
.nav-cta:hover { color: var(--primary-2) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--primary-2);
  font-size: 1.2rem;
  padding: 6px 12px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 110px 0 70px;
}

.hero-badge {
  display: inline-block;
  align-self: center;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--primary-2);
  background: rgba(0, 255, 65, 0.06);
  border: 1px solid rgba(0, 255, 65, 0.3);
  margin: 0 auto 26px;
  letter-spacing: 1.2px;
  font-weight: 600;
}
.hero-badge a { color: var(--primary-2); text-decoration: underline; text-underline-offset: 3px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 1.02;
  margin: 0 0 22px;
  font-weight: 700;
  letter-spacing: -2px;
  text-shadow: 0 0 40px rgba(0, 255, 65, 0.25);
}

.hero-roles {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  letter-spacing: 2px;
  margin-bottom: 26px;
  min-height: 2.2em;
}
.role-rotator {
  color: var(--primary-2);
  font-weight: 600;
  border-right: 2px solid var(--primary-2);
  padding-right: 6px;
  animation: caret 0.9s step-end infinite;
  text-shadow: 0 0 18px rgba(0, 255, 65, 0.5);
}
@keyframes caret { 50% { border-color: transparent; } }

.hero-sub {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1.12rem;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  color: #02120a;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 30px -8px rgba(0, 255, 65, 0.5);
}
.btn-primary:hover { color: #02120a; transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(0, 255, 65, 0.7); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: rgba(0, 255, 65, 0.03); }
.btn-ghost:hover { color: var(--primary-2); border-color: var(--primary-2); }

.hero-creds { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.6px; font-family: var(--font-mono); }
.hero-creds .dot { margin: 0 10px; opacity: 0.4; }

.scroll-hint {
  position: static;
  margin: 54px auto 0;
  width: 24px;
  height: 40px;
  border: 1.5px solid var(--muted);
  border-radius: 14px;
  opacity: 0.5;
  position: relative;
}
.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--primary-2);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 90px 0; position: relative; }
.section.alt {
  background: linear-gradient(180deg, rgba(3, 16, 7, 0.0), rgba(0, 255, 65, 0.03) 30%, rgba(3, 16, 7, 0.0));
}

.section-kicker {
  color: var(--primary-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 600;
  margin-bottom: 14px;
}
.section-kicker::before { content: '// '; opacity: 0.6; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 0 0 18px;
  font-weight: 700;
}

.section-sub { max-width: 720px; color: var(--muted); font-size: 1.08rem; margin-bottom: 40px; }
.section-sub em { color: var(--text); font-style: italic; }

/* ---------- Clocks ---------- */
.clocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin: 20px 0 50px;
}

.clock-card {
  --accent: var(--primary-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 26px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  text-align: center;
  container-type: inline-size;
}
.clock-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.clock-card.cyan { --accent: var(--green-2); }

.clock-label { font-weight: 500; color: var(--muted); margin-bottom: 18px; font-size: 0.95rem; }
.clock-label strong { color: var(--text); }

.countdown { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.cd-num {
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 8.5cqw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(0, 255, 65, 0.4);
}
.cd-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
.cd-sep { font-size: clamp(1rem, 5cqw, 1.6rem); color: var(--muted); opacity: 0.4; align-self: flex-start; margin-top: 2px; }
.clock-note { margin-top: 16px; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

/* ---------- Q-Day cards ---------- */
.qday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 26px;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s;
}
.glass-card:hover { border-color: rgba(0, 255, 65, 0.45); transform: translateY(-4px); }
.glass-card h3 { font-family: var(--font-display); margin: 12px 0 10px; font-size: 1.15rem; }
.glass-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card-icon { font-size: 1.7rem; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 30px auto 0;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--green-2));
  opacity: 0.5;
}

.tl-item { position: relative; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary-2);
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.8);
}
.tl-item.future::before { border-color: var(--crit); box-shadow: 0 0 14px rgba(255, 85, 85, 0.8); }

.tl-year {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-2);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.tl-item.future .tl-year { color: var(--crit); }
.tl-body h3 { font-family: var(--font-display); margin: 0 0 6px; font-size: 1.25rem; }
.tl-body p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---------- Frontier ---------- */
.frontier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 50px;
}

.frontier-card {
  background: linear-gradient(160deg, rgba(0, 255, 65, 0.07), rgba(0, 255, 65, 0.02));
  border: 1px solid var(--border);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.frontier-card:hover { border-color: rgba(0, 255, 65, 0.4); transform: translateY(-4px); }
.frontier-num {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--primary-2), var(--green-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
.frontier-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin: 10px 0 12px; }
.frontier-card p { color: var(--muted); font-size: 0.96rem; margin: 0; }

.frontier-quote {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 38px;
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--primary-2), var(--green-2)) 1;
  background: var(--surface);
  font-size: 1.15rem;
  line-height: 1.7;
}
.frontier-quote p { margin: 0 0 14px; }
.frontier-quote cite { color: var(--muted); font-style: normal; font-size: 0.92rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: start;
}

.about-photo { position: relative; }
.about-photo img {
  width: 100%;
  display: block;
  border: 1px solid var(--border-strong);
  filter: saturate(0.9) contrast(1.05);
  position: relative;
  z-index: 1;
}
.photo-glow {
  position: absolute;
  inset: -18px;
  background:
    radial-gradient(60% 50% at 30% 20%, rgba(0, 255, 65, 0.22), transparent 70%),
    radial-gradient(50% 40% at 80% 90%, rgba(125, 255, 176, 0.15), transparent 70%);
  filter: blur(24px);
  z-index: 0;
}

.terminal-card {
  margin-top: 22px;
  background: rgba(2, 10, 4, 0.9);
  border: 1px solid var(--border-strong);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
}
.term-bar {
  display: flex;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.term-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 255, 65, 0.18);
  border: 1px solid var(--border-strong);
}
.term-body { padding: 16px 18px 18px; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.5; }
.term-body p { margin: 0 0 4px; color: var(--text); }
.t-prompt { color: var(--primary-2); font-weight: 700; }
.t-out { color: var(--muted); padding-left: 2px; }

.about-text p { color: var(--muted); font-size: 1.02rem; }
.about-text p strong { color: var(--text); }

.expertise-row { display: grid; gap: 12px; margin-top: 28px; }
.exp-pill {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.exp-pill:nth-child(2) { border-left-color: var(--primary-2); }
.exp-pill:nth-child(3) { border-left-color: var(--green-2); }
.exp-title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.exp-desc { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

/* ---------- Writing ---------- */
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.writing-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  background: var(--surface-solid);
}
.writing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: saturate(0.85) brightness(0.8);
}
.writing-card:hover img { transform: scale(1.06); filter: saturate(1) brightness(0.95); }

.writing-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, transparent 30%, rgba(1, 4, 1, 0.92));
}
.writing-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.35;
}
.lang-chip {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: var(--font-mono);
  color: var(--primary-2);
  border: 1px solid rgba(0, 255, 65, 0.4);
  padding: 2px 8px;
}

.writing-card.video { aspect-ratio: auto; }
.writing-card.video video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 30px;
  max-width: 760px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 26px;
}
.contact-card h3 { font-family: var(--font-mono); margin: 0 0 14px; letter-spacing: 1px; color: var(--primary-2); }
.contact-card p { color: var(--muted); margin: 6px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 46px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}
.footer-note { opacity: 0.7; font-size: 0.82rem; margin-top: 6px; color: var(--primary-2); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .hero { padding: 80px 0 56px; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { max-width: 320px; }

  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(1, 4, 1, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 18px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }

  .hero-creds { padding: 0 20px; }
  .hero-creds .dot { margin: 0 6px; }

  .timeline { padding-left: 32px; }
  .tl-item::before { left: -29px; }
}
