:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #667085;
  --line: #d7dce5;
  --teal: #0f8b8d;
  --coral: #ee6c4d;
  --violet: #6d5dfc;
  --green: #2f9e44;
  --amber: #d89c11;
  --shadow: 0 20px 50px rgba(32, 33, 36, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(215, 220, 229, 0.86);
  background: rgba(247, 248, 251, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.kicker,
.section-heading p,
.signal-panel small,
.site-footer,
.project-card p,
.idea-grid p,
.resume-main p,
.timeline p {
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 3vw, 28px);
  font-size: 0.95rem;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--coral);
}

.intro-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 32px;
  min-height: min(760px, calc(100vh - 72px));
  padding: clamp(44px, 7vw, 90px) clamp(18px, 4vw, 54px);
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.intro-content,
.signal-panel {
  position: relative;
  z-index: 1;
}

.intro-content {
  align-self: center;
  max-width: 980px;
}

.kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 7vw, 6.7rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 1;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.intro-copy {
  max-width: 720px;
  font-size: clamp(1rem, 2vw, 1.22rem);
  color: #3d4552;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  font-weight: 800;
}

.primary-action {
  background: var(--ink);
  color: white;
}

.secondary-action,
.download-link {
  background: white;
}

.signal-panel {
  align-self: end;
  display: grid;
  gap: 12px;
}

.signal-panel div,
.project-card,
.viz-card,
.resume-main,
.resume-sidebar,
.idea-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.signal-panel div {
  padding: 18px;
}

.metric {
  display: block;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
}

.section-shell {
  padding: clamp(56px, 8vw, 100px) clamp(18px, 4vw, 54px);
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

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

.project-card,
.idea-grid article {
  min-height: 260px;
  padding: 18px;
}

.project-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
}

.project-tag {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid currentColor;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-card svg {
  width: 100%;
  height: 74px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.viz-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 16px;
}

.viz-card {
  min-height: 360px;
  padding: 20px;
}

#radarChart {
  width: 100%;
  height: auto;
  min-height: 280px;
}

.bar-chart {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  font-size: 0.92rem;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #edf1f7;
}

.bar-fill {
  height: 100%;
  background: var(--teal);
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
}

.resume-main,
.resume-sidebar {
  padding: 24px;
}

.timeline {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.timeline span {
  color: var(--coral);
  font-weight: 900;
}

.skill-list {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
}

.skill-list li {
  display: grid;
  gap: 8px;
}

meter {
  width: 100%;
  height: 12px;
}

.idea-grid article {
  min-height: 190px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 54px);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .intro-section,
  .split-layout,
  .resume-layout {
    grid-template-columns: 1fr;
  }

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

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

  .brand {
    min-width: 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.88rem;
  }

  .intro-section {
    min-height: auto;
  }

  .project-grid,
  .idea-grid,
  .viz-board {
    grid-template-columns: 1fr;
  }

  .timeline li,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
