:root {
  color-scheme: light;
  --bg: #fbfaf6;
  --bg-soft: #f2f4ec;
  --text: #11110f;
  --muted: #686963;
  --muted-strong: #484943;
  --line: rgba(20, 20, 16, 0.15);
  --line-strong: rgba(20, 20, 16, 0.28);
  --surface: rgba(255, 255, 252, 0.72);
  --mint: #dfe8de;
  --mint-strong: #94b29b;
  --amber: #f3e6d4;
  --accent: #c65f1d;
  --shadow: 0 24px 70px rgba(29, 28, 23, 0.08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(125deg, rgba(243, 230, 212, 0.42), transparent 34%),
    linear-gradient(235deg, rgba(223, 232, 222, 0.5), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(20, 20, 16, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 16, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 68%);
}

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

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  padding: 0 clamp(24px, 6vw, 90px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(26px, 5vw, 70px);
  font-size: 14px;
  font-weight: 520;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.section-shell {
  width: min(100% - 48px, 1210px);
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  min-height: min(780px, calc(100vh - 96px));
  padding: clamp(62px, 8vw, 126px) 0 clamp(62px, 7vw, 104px);
  border-bottom: 1px solid var(--line);
  gap: clamp(50px, 8vw, 120px);
}

.hero-copy {
  max-width: 570px;
}

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

h1,
h2,
h3 {
  color: var(--text);
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  max-width: 7.5em;
  font-size: clamp(4.7rem, 8.3vw, 7.9rem);
  line-height: 0.96;
}

.hero-copy p {
  max-width: 455px;
  margin-top: 32px;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  margin-top: 62px;
}

.text-link,
.row-link,
.contact-link,
.row-details summary {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  color: var(--text);
  font-size: 18px;
  font-weight: 520;
  cursor: pointer;
}

.text-link {
  position: relative;
  padding-bottom: 12px;
}

.text-link::after,
.contact-link::after,
.row-link::after,
.row-details summary::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0.5;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.text-link svg,
.row-link svg,
.row-details summary svg {
  width: 22px;
  height: 22px;
  transition: transform 180ms var(--ease);
}

.text-link:hover svg,
.text-link:focus-visible svg,
.row-link:hover svg,
.row-link:focus-visible svg,
.row-details summary:hover svg,
.row-details summary:focus-visible svg,
.contact-link:hover svg,
.contact-link:focus-visible svg {
  transform: translateX(4px);
}

.text-link:hover::after,
.text-link:focus-visible::after,
.contact-link:hover::after,
.contact-link:focus-visible::after,
.row-link:hover::after,
.row-link:focus-visible::after,
.row-details summary:hover::after,
.row-details summary:focus-visible::after {
  opacity: 1;
}

.text-link-accent {
  color: var(--accent);
}

.text-link-small,
.row-link,
.row-details summary {
  gap: 18px;
  font-size: 14px;
}

.system-map {
  position: relative;
  width: min(100%, 690px);
  min-height: 500px;
  justify-self: end;
}

.map-lines {
  position: absolute;
  inset: 28px 18px 12px 10px;
  z-index: 0;
  width: calc(100% - 28px);
  height: calc(100% - 40px);
  color: rgba(63, 65, 58, 0.42);
  overflow: visible;
}

.map-lines path {
  stroke-dasharray: 5 5;
  stroke-width: 1.4;
}

.map-panel {
  position: absolute;
  z-index: 1;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 252, 0.76);
  box-shadow: 0 12px 46px rgba(19, 18, 15, 0.055);
  backdrop-filter: blur(12px);
}

.code-panel {
  top: 22px;
  left: 24px;
  width: 380px;
  height: 310px;
  overflow: hidden;
}

.panel-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-family: var(--serif);
  font-size: 17px;
}

.dots {
  color: #787a74;
  font-family: var(--sans);
  letter-spacing: 4px;
}

.code-lines {
  display: grid;
  gap: 15px;
  padding: 28px 26px 0;
}

.code-lines span {
  display: block;
  width: var(--w);
  height: 4px;
  margin-left: var(--x);
  border-radius: 999px;
  background: linear-gradient(90deg, #1f211d 0 30%, var(--mint-strong) 30% 100%);
  opacity: 0.78;
}

.terminal-panel {
  top: 8px;
  right: 0;
  display: grid;
  gap: 14px;
  width: 196px;
  height: 120px;
  padding: 25px 26px;
  background: linear-gradient(135deg, rgba(237, 241, 232, 0.92), rgba(255, 255, 252, 0.74));
}

.terminal-caret {
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
}

.terminal-panel span:not(.terminal-caret) {
  height: 4px;
  border-radius: 999px;
  background: var(--mint-strong);
  opacity: 0.72;
}

.terminal-panel span:nth-child(2) {
  width: 76px;
  background: var(--text);
}

.terminal-panel span:nth-child(3) {
  width: 126px;
}

.flow-panel {
  top: 178px;
  right: 0;
  width: 196px;
  height: 164px;
}

.flow-node,
.flow-diamond,
.flow-branch {
  position: absolute;
  border: 1.5px solid currentColor;
}

.flow-node {
  top: 32px;
  left: 82px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 252, 0.9);
}

.flow-diamond {
  top: 75px;
  left: 82px;
  width: 30px;
  height: 30px;
  transform: rotate(45deg);
  background: rgba(255, 255, 252, 0.9);
}

.flow-branch {
  bottom: 28px;
  width: 46px;
  height: 28px;
  background: linear-gradient(to right, rgba(148, 178, 155, 0.14), rgba(255, 255, 252, 0.7));
}

.branch-left {
  left: 34px;
}

.branch-right {
  right: 34px;
}

.chart-panel {
  bottom: 26px;
  left: 18px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  width: 168px;
  height: 134px;
  padding: 24px 24px 22px;
}

.chart-panel span {
  width: 12px;
  border-radius: 2px 2px 0 0;
  background: var(--mint-strong);
  opacity: 0.5;
}

.chart-panel span:nth-child(1) {
  height: 20px;
}

.chart-panel span:nth-child(2) {
  height: 35px;
}

.chart-panel span:nth-child(3) {
  height: 56px;
}

.chart-panel span:nth-child(4) {
  height: 78px;
}

.data-panel {
  right: 268px;
  bottom: 26px;
  display: grid;
  place-items: center;
  width: 142px;
  height: 134px;
}

.data-panel span {
  width: 58px;
  height: 58px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 0 18px 0 rgba(223, 232, 222, 0.74);
}

.notes-panel {
  right: 0;
  bottom: 26px;
  display: grid;
  align-content: center;
  gap: 12px;
  width: 196px;
  height: 134px;
  padding: 0 28px;
}

.notes-panel strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.notes-panel span {
  height: 4px;
  border-radius: 999px;
  background: #aeb1a9;
}

.notes-panel span:nth-child(2) {
  width: 80%;
}

.notes-panel span:nth-child(3) {
  width: 58%;
}

.notes-panel span:nth-child(4) {
  width: 70%;
}

.scroll-cue {
  position: absolute;
  right: 49%;
  bottom: -14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
}

.scroll-cue svg {
  width: 24px;
  height: 24px;
}

.work-section,
.skills-section,
.credentials-section,
.notes-section {
  padding: clamp(66px, 8vw, 112px) 0 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}

h2 {
  font-size: clamp(2.35rem, 4vw, 3.5rem);
  line-height: 1.06;
}

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

.project-row,
.note-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) minmax(130px, auto);
  align-items: center;
  gap: clamp(28px, 6vw, 92px);
  min-height: 162px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.work-icon {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(223, 232, 222, 0.86), rgba(255, 255, 252, 0.7));
}

.work-icon-warm {
  background: linear-gradient(135deg, rgba(243, 230, 212, 0.95), rgba(255, 255, 252, 0.74));
}

.work-icon svg {
  width: 42px;
  height: 42px;
}

.row-copy {
  max-width: 610px;
}

.row-copy h3 {
  font-size: clamp(1.55rem, 2.2vw, 2.08rem);
  line-height: 1.16;
}

.row-copy p {
  max-width: 520px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.row-link,
.row-details summary {
  position: relative;
  justify-self: end;
  padding-bottom: 8px;
  list-style: none;
}

.row-details {
  justify-self: end;
}

.row-details summary::-webkit-details-marker {
  display: none;
}

.row-details[open] {
  align-self: stretch;
  display: grid;
  align-content: center;
  width: min(310px, 100%);
}

.row-details[open] summary svg {
  transform: rotate(90deg);
}

.row-details p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.skills-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(70px, 8vw, 108px);
}

.skills-section h2 {
  margin-bottom: 38px;
}

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

.skill-row {
  display: grid;
  grid-template-columns: 44px minmax(220px, 0.8fr) repeat(4, minmax(90px, 1fr));
  align-items: center;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.skill-row svg {
  width: 24px;
  height: 24px;
}

.skill-row h3 {
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 620;
}

.skill-row p {
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.notes-section {
  padding-bottom: 0;
}

.credentials-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(70px, 8vw, 108px);
}

.section-note {
  max-width: 360px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.credential-item {
  min-height: 150px;
  padding: 30px 34px 30px 0;
  border-bottom: 1px solid var(--line);
}

.credential-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.credential-item:nth-child(even) {
  padding-left: 34px;
}

.credential-item span {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  text-transform: uppercase;
}

.credential-item h3 {
  max-width: 420px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.18;
}

.credential-item p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.contact-section {
  margin-top: 0;
  background:
    linear-gradient(100deg, rgba(223, 232, 222, 0.94), rgba(251, 250, 246, 0.88)),
    var(--bg-soft);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 245px;
  gap: 48px;
}

.contact-inner p {
  max-width: 445px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
}

.contact-link {
  position: relative;
  gap: 26px;
  padding-bottom: 12px;
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  font-weight: 440;
  cursor: pointer;
  text-transform: none;
}

.contact-link svg {
  width: 32px;
  height: 32px;
}

@media (max-width: 980px) {
  .site-header {
    height: 78px;
    padding-inline: 22px;
  }

  .site-nav {
    gap: clamp(16px, 4vw, 34px);
    font-size: 13px;
  }

  .section-shell {
    width: min(100% - 36px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
    gap: 44px;
  }

  h1 {
    font-size: clamp(4.3rem, 15vw, 6.8rem);
  }

  .hero-actions {
    margin-top: 42px;
  }

  .system-map {
    justify-self: center;
    transform: scale(0.94);
    transform-origin: top center;
    margin-bottom: -30px;
  }

  .scroll-cue {
    right: calc(50% - 17px);
  }

  .project-row,
  .note-row {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 22px;
  }

  .work-icon {
    width: 76px;
    height: 76px;
  }

  .work-icon svg {
    width: 32px;
    height: 32px;
  }

  .row-link,
  .row-details {
    grid-column: 2;
    justify-self: start;
  }

  .row-details[open] {
    width: 100%;
  }

  .skill-row {
    grid-template-columns: 32px minmax(160px, 1fr) repeat(2, minmax(92px, 1fr));
    padding: 16px 0;
    gap: 14px;
  }

  .skill-row h3 {
    border-right: 0;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  body::before {
    background-size: 48px 48px;
  }

  .site-header {
    align-items: flex-start;
    height: auto;
    min-height: 86px;
    padding-block: 18px;
    gap: 18px;
  }

  .brand {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
    max-width: 280px;
    line-height: 1.1;
  }

  .section-shell {
    width: min(100% - 28px, 560px);
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: clamp(3.6rem, 18vw, 5.4rem);
  }

  .hero-copy p {
    margin-top: 24px;
    font-size: 1.05rem;
  }

  .hero-actions {
    display: grid;
    gap: 22px;
    margin-top: 34px;
  }

  .text-link {
    width: max-content;
    max-width: 100%;
  }

  .system-map {
    width: 100%;
    min-height: 390px;
    transform: none;
  }

  .code-panel {
    left: 0;
    width: 72%;
    height: 230px;
  }

  .panel-chrome {
    height: 44px;
    padding: 0 16px;
  }

  .code-lines {
    gap: 11px;
    padding: 22px 16px 0;
  }

  .terminal-panel,
  .flow-panel,
  .notes-panel {
    right: 0;
    width: 37%;
    min-width: 126px;
  }

  .terminal-panel {
    height: 92px;
    padding: 17px;
  }

  .terminal-panel span:nth-child(3) {
    width: 88px;
  }

  .flow-panel {
    top: 144px;
    height: 120px;
  }

  .flow-node {
    top: 18px;
    left: calc(50% - 13px);
    width: 26px;
    height: 26px;
  }

  .flow-diamond {
    top: 54px;
    left: calc(50% - 13px);
    width: 26px;
    height: 26px;
  }

  .flow-branch {
    bottom: 18px;
    width: 34px;
    height: 22px;
  }

  .branch-left {
    left: 14%;
  }

  .branch-right {
    right: 14%;
  }

  .chart-panel,
  .data-panel,
  .notes-panel {
    bottom: 0;
    height: 100px;
  }

  .chart-panel {
    left: 0;
    width: 32%;
    padding: 16px 14px;
    gap: 8px;
  }

  .data-panel {
    right: 40%;
    width: 22%;
  }

  .data-panel span {
    width: 42px;
    height: 42px;
  }

  .notes-panel {
    padding: 0 16px;
  }

  .map-lines {
    display: none;
  }

  .section-heading {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
  }

  h2 {
    font-size: clamp(2.2rem, 12vw, 3rem);
  }

  .project-row,
  .note-row {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 20px;
    padding: 28px 0;
  }

  .row-link,
  .row-details {
    grid-column: 1;
  }

  .skills-table {
    display: grid;
    gap: 18px;
    border-top: 0;
  }

  .skill-row {
    grid-template-columns: 30px 1fr;
    align-items: start;
    min-height: 0;
    padding: 18px 0;
    border-top: 1px solid var(--line);
  }

  .skill-row h3 {
    display: block;
    height: auto;
  }

  .skill-row p {
    grid-column: 2;
    white-space: normal;
  }

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

  .credential-item,
  .credential-item:nth-child(even) {
    padding: 26px 0;
  }

  .credential-item:nth-child(odd) {
    border-right: 0;
  }

  .contact-inner {
    min-height: 290px;
    gap: 34px;
  }

  .contact-link {
    gap: 18px;
    font-size: clamp(1.12rem, 7vw, 1.55rem);
  }

  .contact-link svg {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
