:root {
  --bg: #0c0e12;
  --bg-elevated: #13161d;
  --surface: #1a1e28;
  --text: #e8eaef;
  --text-muted: #8b919d;
  --accent: #6ee7b7;
  --accent-dim: rgba(110, 231, 183, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --radius: 14px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--header-h);
  background: rgba(12, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.logo-dot {
  color: var(--accent);
}

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

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent) !important;
  border: 1px solid rgba(110, 231, 183, 0.35);
}

.nav-cta:hover {
  background: rgba(110, 231, 183, 0.22);
  text-decoration: none !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 4rem);
  padding: 3rem 0 4rem;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    min-height: calc(100vh - var(--header-h) - 2rem);
  }
}

.hero-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-lead {
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0 0 2rem;
  font-size: 1.1rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg) !important;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text) !important;
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.orbit {
  position: relative;
  width: min(320px, 80vw);
  height: min(320px, 80vw);
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: pulse-ring 4s ease-in-out infinite;
}

.orbit-spinner {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  animation: orbit-spin 14s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 40px var(--accent);
}

@keyframes pulse-ring {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: linear-gradient(180deg, transparent 0%, var(--bg-elevated) 40%, var(--bg-elevated) 60%, transparent 100%);
  margin: 0 -1.5rem;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  margin: 0;
}

.section-intro {
  color: var(--text-muted);
  margin: -1rem 0 2rem;
  max-width: 50ch;
}

.section-body.two-col {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .section-body.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.section-body p {
  margin: 0;
  color: var(--text-muted);
}

.section-body strong {
  color: var(--text);
  font-weight: 600;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.timeline-meta {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.timeline-content p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.skills-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.skill-card:hover {
  border-color: rgba(110, 231, 183, 0.25);
}

.skill-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.skill-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.projects-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: rgba(110, 231, 183, 0.3);
  transform: translateY(-2px);
}

.project-card-dim {
  opacity: 0.75;
}

.project-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.project-card p {
  margin: 0 0 auto;
  padding-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-block {
  max-width: 520px;
}

.contact-block > p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-chip {
  display: inline-flex;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none !important;
}

.contact-chip:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: none;
    margin-top: 0.5rem;
    text-align: center;
  }
}
