/* =========================================================
   Belugga — terminal-inspired dark theme
   ========================================================= */

:root {
  --bg:            #0a0e14;
  --bg-elev:       #0f141c;
  --surface:       #121a24;
  --surface-2:     #182231;
  --border:        #1f2a3a;
  --border-strong: #2a3a52;

  --text:          #d6dee8;
  --text-dim:      #8b96a7;
  --text-muted:    #5b6677;

  --accent:        #7ee787;   /* phosphor green */
  --accent-dim:    #4ec25e;
  --cyan:          #79c0ff;
  --amber:         #ffb86c;
  --magenta:       #d2a8ff;
  --red:           #ff6b6b;

  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --maxw: 1200px;

  --shadow-glow: 0 0 0 1px rgba(126, 231, 135, 0.08), 0 10px 40px -20px rgba(126, 231, 135, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(126, 231, 135, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(121, 192, 255, 0.05), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Subtle scanline overlay for terminal feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0px,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
  mix-blend-mode: overlay;
}

main, header, footer { position: relative; z-index: 2; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color .15s ease, color .15s ease;
}
a:hover { border-bottom-color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-dim); }
strong { color: var(--text); font-weight: 600; }

ul { margin: 0 0 1em; padding-left: 1.2em; color: var(--text-dim); }
li { margin-bottom: .35em; }

/* =========================================================
   Header / Nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  line-height: 1;
  white-space: nowrap;
}
.brand:hover { border: none; }
.brand .prompt { color: var(--accent); }
.brand .dot { color: var(--text-muted); }
.brand .cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1.05s steps(2, jump-none) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.nav-links a {
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  width: 40px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
  border-color: var(--accent);
}
.menu-toggle .bars,
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform .2s ease, top .2s ease, background .2s ease, opacity .15s ease;
}
.menu-toggle .bars { top: 50%; margin-top: -1px; }
.menu-toggle .bars::before { top: -6px; }
.menu-toggle .bars::after  { top: 6px; }

.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
  background: var(--accent);
}
.menu-toggle[aria-expanded="true"] .bars::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
  background: var(--accent);
}

/* =========================================================
   Layout / Section
   ========================================================= */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
  border-bottom: 1px dashed var(--border);
}
.section:last-of-type { border-bottom: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin: 0 0 .8em;
}
.eyebrow::before { content: "// "; color: var(--text-muted); }

.section-header { max-width: 760px; margin-bottom: 48px; }
.section-header p.lede { color: var(--text-dim); font-size: 1.05rem; }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding: 96px 0 80px;
  border-bottom: 1px dashed var(--border);
}

.terminal-window {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  margin-bottom: 40px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.terminal-bar .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--border-strong);
}
.terminal-bar .dot.r { background: #ff5f56; }
.terminal-bar .dot.y { background: #ffbd2e; }
.terminal-bar .dot.g { background: #27c93f; }
.terminal-bar .title { margin-left: 12px; }

.terminal-body {
  padding: 28px clamp(20px, 4vw, 40px);
  font-family: var(--mono);
}
.terminal-body .line { margin-bottom: 6px; color: var(--text-dim); }
.terminal-body .line .prompt {
  color: var(--accent);
  margin-right: 8px;
  user-select: none;
}
.terminal-body .line .comment { color: var(--text-muted); }
.terminal-body .line .out { color: var(--text); }
.terminal-body .line .ok { color: var(--accent); }
.terminal-body .line .warn { color: var(--amber); }
.terminal-body .line .cy { color: var(--cyan); }
.terminal-body .line .mg { color: var(--magenta); }

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin: 28px 0 18px;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { border-bottom-color: transparent; }
.btn.primary {
  background: var(--accent);
  color: #0a1a0e;
  border-color: var(--accent);
}
.btn.primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =========================================================
   Cards / Grids
   ========================================================= */

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background: linear-gradient(135deg, rgba(126, 231, 135, 0.04), transparent 40%);
  opacity: 0;
  transition: opacity .2s ease;
}
.card:hover::before { opacity: 1; }

.card .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(126, 231, 135, 0.08);
  border: 1px solid rgba(126, 231, 135, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.card .tag.cy {
  color: var(--cyan);
  background: rgba(121, 192, 255, 0.08);
  border-color: rgba(121, 192, 255, 0.2);
}
.card .tag.am {
  color: var(--amber);
  background: rgba(255, 184, 108, 0.08);
  border-color: rgba(255, 184, 108, 0.2);
}
.card .tag.mg {
  color: var(--magenta);
  background: rgba(210, 168, 255, 0.08);
  border-color: rgba(210, 168, 255, 0.2);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text);
}
.card p {
  font-size: 0.94rem;
  margin: 0;
}

/* =========================================================
   Stats row
   ========================================================= */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 18px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.stat .num {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.stat .label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* =========================================================
   Timeline (history page)
   ========================================================= */

.timeline {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.5;
}
.timeline li {
  position: relative;
  padding: 0 0 26px 44px;
  margin: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(126, 231, 135, 0.08);
}
.timeline .year {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 4px;
}
.timeline h3 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--text);
}
.timeline p {
  font-size: 0.95rem;
  margin: 0;
}

/* =========================================================
   Contact block
   ========================================================= */

.contact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 32px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-card .label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.contact-card .label::before { content: "$ "; color: var(--accent); }
.contact-card .value {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--text);
  word-break: break-word;
}
.contact-card .value a {
  color: var(--text);
  border-bottom: 1px dotted var(--border-strong);
}
.contact-card .value a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.socials {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.socials a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================================
   Inline code chip + travel skills list
   ========================================================= */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}
.chip {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius);
}
.chip::before { content: "["; color: var(--accent); }
.chip::after  { content: "]"; color: var(--accent); }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.footer-inner a { color: var(--text-dim); }
.footer-inner a:hover { color: var(--accent); }

/* =========================================================
   Reveal on scroll
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .brand .cursor { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 760px) {
  .nav { padding: 12px 18px; }
  .brand { font-size: 0.98rem; }

  .nav-links {
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elev);
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--border);
    padding: 8px 22px 18px;
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    font-size: 1rem;
  }
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s;
  }
  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .nav-links a::before {
    content: "$ ";
    color: var(--accent);
    margin-right: 4px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.active { color: var(--accent); }
  .menu-toggle { display: inline-block; }

  .section { padding: 56px 0; }
  .hero { padding: 56px 0; }
  .terminal-body { padding: 20px 16px; font-size: 0.85rem; }
}
