:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: rgba(20, 21, 25, 0.76);
  --panel-strong: rgba(18, 19, 22, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f1e8;
  --muted: #b7b2a5;
  --cyan: #4fd6c7;
  --lime: #9dd85d;
  --amber: #f5c85b;
  --coral: #ff7b6e;
  --violet: #a78bfa;
  --shadow: rgba(0, 0, 0, 0.36);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(160deg, #101114 0%, #181511 52%, #111412 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

#space {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#space:active {
  cursor: grabbing;
}

.texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.38;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 0.75rem;
}

.brand {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 13, 15, 0.76);
  box-shadow: 0 12px 36px var(--shadow);
  backdrop-filter: blur(18px);
}

.brand span {
  color: var(--cyan);
  font-weight: 800;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 70svh;
  padding: 4rem 0 3rem;
}

.hero-copy {
  max-width: 46rem;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 0.8rem;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: 5.2rem;
  line-height: 0.93;
}

.hero-lead {
  max-width: 39rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  box-shadow: 0 14px 34px var(--shadow);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.button-primary {
  color: #111411;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  border-color: transparent;
}

.button-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
}

.button:hover,
.button:focus-visible {
  outline: 0;
  transform: translateY(-1px);
}

.icon-link {
  display: inline-grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 14px 34px var(--shadow);
  backdrop-filter: blur(14px);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.icon-link:hover,
.icon-link:focus-visible {
  border-color: rgba(79, 214, 199, 0.5);
  background: rgba(79, 214, 199, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.icon-link svg {
  width: 1.18rem;
  height: 1.18rem;
  fill: var(--text);
}

.explore-section {
  padding: 2rem 0 3rem;
}

.explore-heading {
  display: grid;
  grid-template-columns: minmax(10rem, 0.34fr) minmax(0, 0.66fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1rem;
}

.explore-heading h2 {
  max-width: 42rem;
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
}

.space-stage {
  position: relative;
  min-height: 76svh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 20%, rgba(79, 214, 199, 0.14), transparent 20rem),
    radial-gradient(circle at 72% 72%, rgba(245, 200, 91, 0.12), transparent 18rem),
    rgba(10, 11, 13, 0.54);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.space-stage::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background: linear-gradient(to bottom, rgba(16, 17, 20, 0.05), rgba(16, 17, 20, 0.42));
}

.space-stage.is-focused .node-label {
  opacity: 0 !important;
  pointer-events: none;
}

.focus-panel {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(18rem, 1fr);
  gap: clamp(2rem, 12vw, 10rem);
  align-items: center;
  padding: clamp(1rem, 3vw, 2.2rem);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.focus-panel.is-visible,
.focus-panel.is-armed {
  opacity: 1;
  transform: translateY(0);
}

.focus-panel.is-changing {
  opacity: 0;
  transform: translateY(0.8rem) scale(0.985);
}

.panel-summary {
  align-self: center;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 13, 15, 0.64);
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(20px);
  pointer-events: auto;
}

.focus-panel h3 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.18;
}

.focus-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.panel-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.panel-metrics span {
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
  font-weight: 700;
}

.panel-detail-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  align-self: center;
  max-height: calc(100% - 5rem);
  overflow: auto;
  pointer-events: auto;
}

.detail-item {
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.95rem;
}

.detail-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.experience-detail {
  display: grid;
  grid-template-columns: minmax(6rem, 0.34fr) minmax(0, 0.66fr);
  gap: 0.2rem 0.85rem;
  padding: 0.9rem 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.experience-detail + .experience-detail {
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.experience-detail strong,
.experience-detail .detail-place,
.experience-detail p:not(.detail-place) {
  grid-column: 2;
}

.detail-date {
  grid-row: span 3;
  color: var(--amber);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.experience-detail .detail-place {
  color: var(--cyan);
  font-weight: 700;
}

.unzoom-button {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: auto;
  margin: 0;
  cursor: pointer;
  pointer-events: auto;
}

.projects-section {
  padding: 3.5rem 0 0;
}

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

.project-card {
  display: grid;
  min-height: 24rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 19, 22, 0.74);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(79, 214, 199, 0.55);
  background: rgba(24, 26, 29, 0.92);
  outline: 0;
  transform: translateY(-3px);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-card-body {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 1rem;
}

.project-card-body span,
.project-detail-grid span {
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.project-card-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.2;
}

.project-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-page main {
  padding-bottom: 4rem;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  min-height: 72svh;
  padding: 3.5rem 0 2rem;
}

.project-hero-copy {
  display: grid;
  gap: 1.1rem;
  align-content: center;
}

.project-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.6rem);
}

.project-hero p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.project-hero .button {
  justify-self: start;
  margin-top: 0.4rem;
}

.project-hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 2rem;
}

.project-detail-grid article {
  min-height: 13rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 19, 22, 0.74);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.project-detail-grid p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.skill-card {
  min-height: 10rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 19, 22, 0.74);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.skill-card p,
.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-shell {
  padding: 5.5rem 0 0;
}

.section-shell.compact {
  padding-top: 4.2rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(10rem, 0.38fr) minmax(0, 0.62fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.12;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(10rem, 0.32fr) minmax(0, 0.68fr);
  gap: 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--amber);
  font-size: 0.9rem;
  font-weight: 800;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.25rem;
}

.timeline-item .company {
  margin: 0.25rem 0 0.7rem;
  color: var(--cyan);
  font-weight: 700;
}

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

.skill-card h3 {
  margin: 0 0 0.8rem;
  color: var(--text);
  font-size: 1.08rem;
}

.mindset-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.mindset-grid p {
  display: grid;
  min-height: 4.2rem;
  margin: 0;
  padding: 0.8rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: center;
  font-weight: 750;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  margin: 5.5rem 0 2rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.contact-band h2 {
  max-width: 42rem;
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.2;
}

.node-labels {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.node-label {
  position: absolute;
  min-width: 6.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--text);
  background: rgba(12, 13, 15, 0.62);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.node-label:hover,
.node-label.is-hovered,
.node-label.is-active {
  color: #101114;
  border-color: transparent;
  background: var(--cyan);
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  h1 {
    font-size: 4rem;
  }

  .explore-heading {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .space-stage {
    min-height: 68svh;
  }

  .project-grid,
  .project-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mindset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    width: min(100% - 1rem, 1180px);
  }

  main {
    width: min(100% - 1rem, 1180px);
  }

  .hero {
    gap: 1.2rem;
    padding-top: 2.2rem;
  }

  h1 {
    font-size: 3.15rem;
    line-height: 1;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .focus-panel h3,
  .section-heading h2 {
    font-size: 1.55rem;
  }

  .skill-grid,
  .mindset-grid,
  .project-grid,
  .project-detail-grid,
  .section-heading,
  .timeline-item,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .section-shell,
  .section-shell.compact {
    padding-top: 3rem;
  }

  .explore-section {
    padding-top: 1rem;
  }

  .space-stage {
    min-height: 74svh;
  }

  .projects-section {
    padding-top: 2.6rem;
  }

  .project-card {
    min-height: 0;
  }

  .project-hero {
    padding-top: 2rem;
  }

  .project-hero h1 {
    max-width: 14ch;
    font-size: 3rem;
  }

  .focus-panel {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: end;
    padding: 0.75rem;
    overflow: auto;
  }

  .focus-panel.is-visible .panel-summary {
    align-self: end;
  }

  .focus-panel.is-visible .panel-detail-list {
    max-height: 17rem;
  }

  .experience-detail {
    grid-template-columns: 1fr;
  }

  .experience-detail strong,
  .experience-detail .detail-place,
  .experience-detail p:not(.detail-place) {
    grid-column: 1;
  }

  .detail-date {
    grid-row: auto;
  }

  .unzoom-button {
    top: 0.75rem;
    right: 0.75rem;
  }

  .contact-band .button {
    width: 100%;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
  }

  .node-label {
    min-width: 5.8rem;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
