:root {
  color-scheme: dark;
  --bg: #0d1011;
  --surface: #15191b;
  --surface-strong: #1d2325;
  --line: rgba(232, 239, 235, 0.14);
  --text: #f0f5f2;
  --muted: #a8b4af;
  --soft: #d9e2de;
  --cyan: #3ddbd9;
  --amber: #ffbf69;
  --green: #83e377;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(61, 219, 217, 0.1), transparent 28rem),
    linear-gradient(180deg, #0d1011 0%, #111516 48%, #0d1011 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  background: rgba(13, 16, 17, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.signal-list,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(61, 219, 217, 0.18), rgba(255, 191, 105, 0.12));
  color: var(--cyan);
  font-size: 0.85rem;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a:hover,
.text-link:hover {
  color: var(--cyan);
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 170px);
  padding: 42px 0 32px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.65rem, 5.3vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-text {
  max-width: 670px;
  color: var(--soft);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 22px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button {
  gap: 9px;
  padding: 0 18px;
}

.primary {
  background: var(--cyan);
  color: #041112;
}

.secondary,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.icon-button {
  padding: 0 16px;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 219, 217, 0.5);
}

.signal-list {
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.signal-list li,
.tech-list span,
.skill-card span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
}

.signal-list li {
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.system-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, rgba(29, 35, 37, 0.96), rgba(13, 16, 17, 0.94));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-header strong {
  margin-left: auto;
  color: var(--green);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(131, 227, 119, 0.8);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.telemetry-grid div {
  padding: 18px;
  background: rgba(21, 25, 27, 0.92);
}

.telemetry-grid span,
.project-topline,
.timeline span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.telemetry-grid strong {
  display: block;
  margin-top: 9px;
  font-size: 1rem;
}

.route-map {
  position: relative;
  height: 190px;
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(61, 219, 217, 0.12), transparent 40%),
    rgba(255, 255, 255, 0.035);
}

.node,
.robot-pulse,
.path-line {
  position: absolute;
  display: block;
}

.node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 22px rgba(255, 191, 105, 0.5);
}

.node-a {
  left: 14%;
  top: 70%;
}

.node-b {
  left: 52%;
  top: 36%;
}

.node-c {
  right: 16%;
  top: 56%;
}

.path-line {
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan), rgba(61, 219, 217, 0.12));
}

.path-line.one {
  left: 17%;
  top: 69%;
  width: 45%;
  transform: rotate(-31deg);
}

.path-line.two {
  left: 54%;
  top: 39%;
  width: 32%;
  transform: rotate(22deg);
}

.robot-pulse {
  left: 50%;
  top: 49%;
  width: 42px;
  height: 42px;
  border: 2px solid var(--cyan);
  border-radius: 8px;
  background: rgba(61, 219, 217, 0.1);
  box-shadow: 0 0 34px rgba(61, 219, 217, 0.42);
  animation: pulse 2.2s ease-in-out infinite;
}

.code-strip {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
}

.code-strip span {
  overflow-wrap: anywhere;
}

.about-section,
#projects,
#skills,
#experience {
  padding: 72px 0;
}

.split-layout {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 46px;
  align-items: start;
}

.split-layout p,
.contact-content p {
  color: var(--soft);
  font-size: 1.03rem;
  line-height: 1.8;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.text-link {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card,
.skill-card,
.timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 22px;
}

.project-card.featured {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(61, 219, 217, 0.12), rgba(255, 191, 105, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.project-card h3,
.skill-card h3,
.timeline h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.project-card p,
.project-card li,
.timeline p {
  color: var(--soft);
  line-height: 1.65;
}

.project-card ul {
  display: grid;
  gap: 9px;
  padding-left: 18px;
  margin: 8px 0 20px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tech-list span,
.skill-card span {
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  padding: 22px;
}

.skill-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.timeline article {
  padding: 24px;
}

.contact-band {
  margin-top: 58px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(61, 219, 217, 0.12), rgba(255, 191, 105, 0.08));
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 58px 0;
}

.contact-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .split-layout,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 28px;
    padding-top: 34px;
  }

  .project-grid,
  .skills-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .section-shell,
  .site-header {
    width: min(100% - 24px, 1180px);
  }

  h1 {
    font-size: 2.28rem;
    line-height: 1.04;
  }

  .hero-text {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .hero-actions {
    margin: 22px 0 18px;
  }

  .signal-list {
    margin-bottom: 4px;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .icon-button {
    width: 100%;
  }

  .system-panel {
    min-width: 0;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }

  .route-map {
    height: 120px;
    margin: 12px;
  }

  .panel-header {
    padding: 12px;
  }

  .telemetry-grid div {
    padding: 12px;
  }

  .telemetry-grid span {
    font-size: 0.7rem;
  }

  .telemetry-grid strong {
    margin-top: 5px;
    font-size: 0.9rem;
  }

  .code-strip {
    display: none;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
