:root {
  --paper: #080a17;
  --surface: #0f1226;
  --surface-hover: #141833;
  --ink: #f1f3ff;
  --ink-soft: #9aa0bd;
  --signal: #7c6cff;
  --signal-deep: #6454e8;
  --signal-soft: rgba(124, 108, 255, 0.16);
  --cyan: #22d3ee;
  --amber: #f5b14c;
  --amber-soft: rgba(245, 177, 76, 0.14);
  --good: #4ade80;
  --good-soft: rgba(74, 222, 128, 0.12);
  --border: #232743;
  --radius: 12px;
  --max: 1040px;
  font-size: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 60% 45% at 15% 0%, rgba(124, 108, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(34, 211, 238, 0.10), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--signal);
  color: #fff;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  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: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
}
.mark-dot { color: var(--cyan); }

.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: linear-gradient(90deg, var(--signal), var(--cyan));
  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(--signal);
  color: var(--signal);
}

.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 {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  animation: reveal 0.7s ease both;
}

@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(--signal);
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.hero-name {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  line-height: 1.02;
  background: linear-gradient(90deg, #8b7bff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--good-soft);
  color: var(--good);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 999px;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 1.5rem;
}

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.hero-lede {
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 1.75rem 0 2.5rem;
}

.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: 10px;
  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(--signal);
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 108, 255, 0.3);
}

.btn-primary:hover {
  background: var(--signal-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(124, 108, 255, 0.45);
}

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

.btn-outline:hover {
  border-color: var(--signal);
  color: var(--ink);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  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;
}

.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(--signal);
  box-shadow: 0 0 10px rgba(124, 108, 255, 0.7);
}

.timeline li.tl-pro::before {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(245, 177, 76, 0.6);
}

.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);
  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-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(124, 108, 255, 0.2);
}

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

.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  color: #a99dff;
  background: var(--signal-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.9rem;
}

.card-tag--pro {
  color: var(--amber);
  background: var(--amber-soft);
}

.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: 8px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #5d6384;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--signal);
  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(--surface);
    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;
  }
}