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

:root {
  --bg:       #0a0c0f;
  --surface:  #111318;
  --card:     #161a22;
  --border:   #1e2330;
  --text:     #e8edf5;
  --muted:    #7a8299;
  --green:    #3dffa0;
  --amber:    #ffbb3d;
  --blue:     #3d9fff;
  --red:      #ff5f5f;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-body:    'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* ── BACKGROUND EFFECTS ── */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 255, 160, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 255, 160, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.section { padding: 5rem 0; }

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

.accent { color: var(--green); }
.t-green { color: var(--green); }
.t-amber { color: var(--amber); }
.t-blue  { color: var(--blue); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

/* ── CURSOR BLINK ── */
.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn:hover { transform: scale(1.05); }

.btn-primary {
  background: var(--green);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(61, 255, 160, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 0 32px rgba(61, 255, 160, 0.45);
}

.btn-outline {
  border: 1.5px solid var(--green);
  color: var(--green);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(61, 255, 160, 0.08);
}

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green); }

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 140px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-dropdown:hover .nav-dropdown-menu { display: flex; flex-direction: column; }

.nav-dropdown-menu a {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover { background: rgba(61,255,160,0.06); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.2s;
}
.nav-hamburger:hover span { background: var(--green); }

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem;
  gap: 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.nav-mobile a:hover { color: var(--green); }

/* ── HERO ── */
.hero {
  padding: 5rem 0 4rem;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  margin: 1.5rem 0 0.5rem;
}

.hero-sub {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Terminal window */
.terminal-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px rgba(61, 255, 160, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red   { background: var(--red); }
.dot.amber { background: var(--amber); }
.dot.green { background: var(--green); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
}

.t-prompt { color: var(--green); margin-right: 0.5rem; }
.t-cmd    { color: var(--text); }
.t-out    { color: var(--muted); padding-left: 0.5rem; }
.t-indent { padding-left: 1.5rem; }

/* Typewriter reveal for the hero terminal — each line's box grows from 0
   width with overflow hidden, which uncovers the text left-to-right without
   ever touching the text nodes (so the colored spans inside stay intact). */
.terminal-body p {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typeReveal 0.5s steps(30, end) forwards;
}
.terminal-body p:nth-child(1)  { animation-delay: 0s;    }
.terminal-body p:nth-child(2)  { animation-delay: .5s;  }
.terminal-body p:nth-child(3)  { animation-delay: 1s;   }
.terminal-body p:nth-child(4)  { animation-delay: 1.5s; }
.terminal-body p:nth-child(5)  { animation-delay: 2s;   }
.terminal-body p:nth-child(6)  { animation-delay: 2.5s; }
.terminal-body p:nth-child(7)  { animation-delay: 3s;   }
.terminal-body p:nth-child(8)  { animation-delay: 3.5s; }
.terminal-body p:nth-child(9)  { animation-delay: 4s;   }
.terminal-body p:nth-child(10) { animation-delay: 4.5s; }
@keyframes typeReveal { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .terminal-body p { animation: none; width: 100%; }
}

/* Illustrated mascot — floats beside the terminal, bleeding toward the photo
   grid. Hidden below the breakpoint where the hero stacks to one column, so
   it never competes with the photos for space on small screens. */
.hero-mascot {
  position: absolute;
  right: 6%;
  bottom: -38px;
  width: 190px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.45)) drop-shadow(0 0 30px rgba(61,255,160,.25));
  animation: mascotFloat 4.5s ease-in-out infinite;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-16px) rotate(1deg); }
}
@media (max-width: 1100px) { .hero-mascot { width: 150px; right: 2%; bottom: -26px; } }
@media (max-width: 900px)  { .hero-mascot { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-mascot { animation: none; } }

/* Photo strip */
.hero-photos {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 280px !important;
}

.photo-strip {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

.photo-strip img {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 200px !important;
  height: 260px !important;
  object-fit: cover !important;
  border-radius: 8px;
  filter: grayscale(30%);
  transition: filter 0.3s, transform 0.3s;
  display: block !important;
}

.photo-strip img:hover {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* ── STATS ── */
.stats {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(61, 255, 160, 0.08);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── ABOUT ── */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3.5rem;
  align-items: center;
}

.about-img {
  position: relative;
}

.about-img img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px;
  filter: grayscale(20%);
  display: block !important;
  border: 1px solid var(--border);
}

.about-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--green);
  border-radius: 9999px;
  padding: 0.35rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(61, 255, 160, 0.15);
}

.about-content h2 { margin-bottom: 1rem; }
.about-content p  { color: var(--muted); margin-bottom: 1rem; }

/* Pipeline */
.pipeline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}

.pipe-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.pipe-step.done   { border-color: var(--green); color: var(--green); }
.pipe-step.active { border-color: var(--amber); color: var(--amber); }

.pipe-icon { font-size: 0.7rem; }

.pulse {
  animation: glow-pulse 1.5s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.pipe-arrow { color: var(--border); font-size: 1rem; }

/* ── PODCAST ── */
.podcast {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.podcast .container { max-width: 700px; text-align: center; }

.podcast-desc {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.podcast-platforms {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.platform-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.platform-card:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 16px rgba(61, 255, 160, 0.1);
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* ── BLOG POSTS ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  border-color: var(--green);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.post-img-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
}

.post-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
  display: block;
  filter: grayscale(20%);
}

.post-card:hover .post-img-wrap img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.post-card > h3,
.post-card > p,
.post-card > .post-meta,
.post-card > .post-read {
  padding: 0 1.1rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.post-card > p {
  color: var(--muted);
  font-size: 0.88rem;
  flex: 1;
  margin-bottom: 1rem;
}

.post-read {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
  padding-bottom: 1.1rem;
  transition: letter-spacing 0.2s;
}

.post-card:hover .post-read { letter-spacing: 0.05em; }

.posts-loading {
  grid-column: 1 / -1;
  padding: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.posts-cta { text-align: center; }

/* ── CONNECT ── */
.connect .container { max-width: 800px; }
.connect p { color: var(--muted); margin-bottom: 2.5rem; }

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.social-card:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 16px rgba(61, 255, 160, 0.1);
  transform: translateY(-3px);
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

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

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner        { grid-template-columns: 1fr; }
  .hero-photos       { display: none; }
  .about-inner       { grid-template-columns: 1fr; }
  .about-img         { max-width: 320px; margin: 0 auto; }
  .stats-grid        { grid-template-columns: repeat(2, 1fr); }
  .posts-grid        { grid-template-columns: repeat(2, 1fr); }
  .projects-grid     { grid-template-columns: 1fr; }
  .social-grid       { grid-template-columns: repeat(2, 1fr); }
  .nav-links         { display: none; }
  .nav-hamburger     { display: flex; }
}

@media (max-width: 560px) {
  .posts-grid  { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .pipeline    { gap: 0.25rem; }
  .pipe-arrow  { display: none; }
}
