/* ===== Design tokens ===== */
:root{
  --bg: #0A0E14;
  --surface: #10161F;
  --surface-2: #151C27;
  --line: #212B38;
  --text: #E8ECF1;
  --text-muted: #8B96A5;
  --accent: #3ED598;
  --accent-dim: #1FA971;
  --amber: #F2B84B;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 16px;
  --nav-h: 72px;
  --max-w: 760px;
}

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

html{ scroll-behavior: smooth; scroll-padding-top: 90px; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  padding-bottom: calc(var(--nav-h) + 12px);
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
img{ display: block; max-width: 100%; }

::selection{ background: var(--accent); color: #06110C; }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Top bar ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(10,14,20,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand{ display: flex; align-items: center; gap: 10px; }
.brand-mark{ width: 32px; height: 32px; }
.brand-text{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text em{ color: var(--accent); font-style: normal; }
.brand-text small{
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-cta{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.topbar-cta:hover{ background: var(--accent); color: #06110C; }

/* ===== Layout ===== */
.section{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 20px;
}

.section-eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title{
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
}

/* ===== Hero ===== */
.hero{ padding-top: 56px; padding-bottom: 48px; }

.hero-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(62,213,152,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(62,213,152,0.5); }
  70%{ box-shadow: 0 0 0 8px rgba(62,213,152,0); }
  100%{ box-shadow: 0 0 0 0 rgba(62,213,152,0); }
}

.hero-title{
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 58px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-sub{
  color: var(--text-muted);
  font-size: 16px;
  max-width: 52ch;
  margin-bottom: 32px;
}

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

.btn{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:active{ transform: scale(0.97); }

.btn-primary{ background: var(--accent); color: #06110C; }
.btn-primary:hover{ background: var(--accent-dim); }

.btn-ghost{ border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }

.btn-block{ width: 100%; }

/* Ticker */
.ticker{
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track{
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scroll-left 22s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-muted);
}
@keyframes scroll-left{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ===== About ===== */
.about-body{
  color: var(--text-muted);
  font-size: 16px;
  max-width: 62ch;
  margin-bottom: 36px;
}

.skills-heading{
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ledger{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ledger-row{
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  align-items: center;
}
.ledger-row:last-child{ border-bottom: none; }
.ledger-row:not(.ledger-head):hover{ background: var(--surface); }

.ledger-head{
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ledger-row span[data-label="Category"]{ font-weight: 600; }
.ledger-row span[data-label="Tools"]{ color: var(--text-muted); }

.tag{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  width: fit-content;
}
.tag-live{ background: rgba(62,213,152,0.12); color: var(--accent); }
.tag-build{ background: rgba(242,184,75,0.12); color: var(--amber); }

/* ===== Projects ===== */
.project-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.project-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.project-id{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
}
.project-name{
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}
.project-desc{
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 16px;
}
.project-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.project-tags span{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-links{ display: flex; gap: 10px; flex-wrap: wrap; }
.link-pill{
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #06110C;
  transition: background 0.2s ease;
}
.link-pill:hover{ background: var(--accent-dim); }
.link-pill-ghost{
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.link-pill-ghost:hover{ border-color: var(--accent); color: var(--accent); }

.projects-note{
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-mono);
  text-align: center;
  padding-top: 8px;
}

/* ===== Contact ===== */
.contact-form{
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 32px;
}
.field{ display: flex; flex-direction: column; gap: 8px; }
.field span{
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.field input,
.field textarea{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--accent);
}
.field input::placeholder,
.field textarea::placeholder{ color: #556072; }

.contact-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.contact-actions .btn{ flex: 1; min-width: 200px; }

.social-row{
  display: flex;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.social-link{
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.social-link:hover{ color: var(--accent); border-color: var(--accent); }

/* ===== Footer ===== */
.footer{
  text-align: center;
  padding: 32px 20px 24px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

/* ===== Bottom navigation ===== */
.bottom-nav{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  background: rgba(16,22,31,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.nav-item svg{ transition: transform 0.2s ease; }
.nav-item.active{ color: var(--accent); }
.nav-item.active svg{ transform: translateY(-2px); }

/* ===== Responsive: tablet/laptop ===== */
@media (min-width: 700px){
  .section{ padding: 96px 32px; }
  .hero{ padding-top: 80px; }
  .ledger-row{ grid-template-columns: 180px 1fr auto; }
  .contact-actions .btn{ flex: initial; }
}

@media (min-width: 960px){
  :root{ --max-w: 840px; }

  .bottom-nav{
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 24px;
    width: max-content;
    height: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    gap: 4px;
  }
  .nav-item{
    flex-direction: row;
    padding: 10px 20px;
    border-radius: 999px;
  }
  .nav-item.active{ background: var(--surface-2); }
  .nav-item.active svg{ transform: none; }
  .nav-item span{ display: inline; }

  body{ padding-bottom: 100px; }
}

@media (max-width: 420px){
  .brand-text{ font-size: 15px; }
  .topbar-cta{ font-size: 11px; padding: 7px 11px; }
}
