:root {
  --bg: #1e1f2b;
  --bg-panel: #282a3b;
  --grid-line: rgba(255, 255, 255, 0.04);
  --ink: #f2f2f6;
  --ink-soft: #8b90a8;
  --keyword: #ff7ab6;
  --function: #7aa2f7;
  --string: #8fd6a3;
  --number: #f2b84f;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 3px;
  --radius-lg: 16px;
  --max: 1040px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 96px,
    var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; }

.topbar {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.5rem 1rem;
}

.mark {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.1rem;
}
.mark-dot { color: var(--keyword); }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 3px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--function);
  transition: width 0.25s ease;
}

.nav a:hover {
  color: var(--ink);
}
.nav a:hover::after {
  width: 100%;
}

.nav-cta {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem !important;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  border-color: var(--function);
  color: var(--function);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  animation: reveal 0.7s ease both;
  background: radial-gradient(ellipse 780px 420px at 12% 0%, rgba(255, 122, 182, 0.12), transparent 70%);
}

@keyframes reveal {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

.hero-eyebrow {
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.hero-name {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  line-height: 0.98;
  color: var(--keyword);
}

.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  padding: 1.75rem 2rem;
  margin: 2rem 0 2.5rem;
  max-width: 48ch;
}

.hero-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0;
}

.hero-skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
}

.hero-skills li {
  font-size: 0.78rem;
  color: var(--function);
  background: rgba(122, 162, 247, 0.12);
  border: 1px solid rgba(122, 162, 247, 0.28);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(143, 214, 163, 0.12);
  color: var(--string);
  border: 1px solid rgba(143, 214, 163, 0.3);
  border-radius: 999px;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--string);
  flex-shrink: 0;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143, 214, 163, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(143, 214, 163, 0); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--function);
  color: #10131f;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(122, 162, 247, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--function);
  color: var(--function);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--function);
  outline-offset: 2px;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.spec { display: flex; flex-direction: column; gap: 0.3rem; }

.spec-k {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.spec-v {
  font-weight: 500;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

section h2::before {
  content: "// ";
  color: var(--ink-soft);
  font-weight: 400;
}

.timeline-section, .projects-section, .contact-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.timeline li {
  display: flex;
  gap: 2rem;
  padding: 0 0 2.25rem 1.75rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--function);
  box-shadow: 0 0 0 4px rgba(122, 162, 247, 0.15);
}

.timeline li.tl-pro::before {
  background: var(--number);
  box-shadow: 0 0 0 4px rgba(242, 184, 79, 0.18);
}

.timeline li:last-child { padding-bottom: 0; }

.tl-date {
  min-width: 140px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding-top: 0.15rem;
}

.tl-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.tl-body p {
  margin: 0;
  color: var(--ink-soft);
}

.section-note {
  color: var(--ink-soft);
  font-style: italic;
  margin: -1rem 0 2rem;
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg-panel);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card--example {
  border-left-color: var(--function);
}

.card--pro {
  border-left-color: var(--number);
}

.card:hover {
  border-color: var(--function);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(122, 162, 247, 0.16);
}

.card--pro:hover {
  border-color: var(--number);
  box-shadow: 0 16px 32px rgba(242, 184, 79, 0.16);
}

.card-wide {
  grid-column: span 2;
}

.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.9rem;
}

.card-tag--pro {
  color: var(--number);
  background: rgba(242, 184, 79, 0.12);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.card-stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.card-stack li {
  font-size: 0.8rem;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.spec-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.spec-list dt {
  color: var(--ink-soft);
}

.spec-list dd {
  margin: 0;
  font-weight: 500;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--ink);
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--function);
  outline-offset: 1px;
}

.contact-form .btn {
  margin-top: 1.25rem;
  align-self: flex-start;
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  html { scroll-behavior: auto; }
  .status-dot { animation: none; }
}

@media (max-width: 780px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: span 1; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .nav-toggle { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    right: 1.5rem;
    left: 1.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    z-index: 10;
  }

  .nav.open { display: flex; }

  .nav a {
    padding: 0.75rem 0.5rem;
  }

  .nav-cta {
    margin-top: 0.4rem;
    text-align: center;
  }

  .hero-panel {
    padding: 1.5rem;
    max-width: 100%;
  }
}
