:root {
  --paper: #f3f6f2;
  --paper-strong: #fbfcf8;
  --ink: #112d29;
  --ink-muted: #526761;
  --line: rgba(17, 45, 41, 0.18);
  --red: #df4a34;
  --teal: #3f907e;
  --gold: #d79b31;
  --blue: #224f83;
  --shadow: 0 22px 70px rgba(17, 45, 41, 0.16);
  --max: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 45, 41, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 45, 41, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

body::selection {
  color: var(--paper-strong);
  background: var(--red);
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 34px;
  color: var(--paper-strong);
  background: rgba(17, 45, 41, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.site-header[data-elevated="true"] {
  background: rgba(17, 45, 41, 0.92);
  box-shadow: 0 12px 34px rgba(17, 45, 41, 0.24);
}

.brand,
.site-nav,
.launch-dock,
.status-row,
.contact-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 700;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  padding: 4px;
  border: 1px solid rgba(251, 252, 248, 0.28);
  border-radius: 8px;
  background: var(--paper-strong);
  image-rendering: pixelated;
  object-fit: cover;
}

.site-nav {
  gap: 6px;
}

.site-nav a {
  min-width: 64px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(251, 252, 248, 0.78);
  text-align: center;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--paper-strong);
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  display: grid;
  min-height: 86svh;
  overflow: hidden;
  color: var(--paper-strong);
  isolation: isolate;
}

.hero-canvas,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-canvas {
  z-index: -3;
  background: #071c19;
  touch-action: none;
}

.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(6, 26, 23, 0.84), rgba(6, 26, 23, 0.42) 47%, rgba(6, 26, 23, 0.06)),
    linear-gradient(0deg, rgba(6, 26, 23, 0.74), rgba(6, 26, 23, 0.08) 46%, rgba(6, 26, 23, 0.18));
  pointer-events: none;
}

.hero-content {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 120px 0 154px;
  align-self: center;
}

.hero-identity {
  display: inline-flex;
  max-width: min(100%, 440px);
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(251, 252, 248, 0.2);
  border-radius: var(--radius);
  background: rgba(6, 26, 23, 0.42);
  box-shadow: 0 16px 46px rgba(6, 26, 23, 0.22);
  backdrop-filter: blur(16px);
}

.hero-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 2px solid rgba(251, 252, 248, 0.64);
  border-radius: 8px;
  background: var(--paper-strong);
  image-rendering: pixelated;
  object-fit: cover;
}

.identity-label,
.identity-stack {
  margin: 0;
}

.identity-label {
  color: var(--paper-strong);
  font-weight: 800;
}

.identity-stack {
  color: rgba(251, 252, 248, 0.68);
  font-family: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", sans-serif;
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-family: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ff8069;
}

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

h1,
h2,
h3 {
  line-height: 1.04;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-family: "Didot", "Bodoni 72", "Songti SC", serif;
  font-size: 5.9rem;
  font-weight: 700;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 28px;
  color: rgba(251, 252, 248, 0.84);
  font-size: 1.18rem;
}

.status-row {
  flex-wrap: wrap;
  gap: 12px;
}

.status-pill,
.status-meta {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(251, 252, 248, 0.2);
  border-radius: 999px;
  background: rgba(251, 252, 248, 0.1);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(63, 144, 126, 0.7);
  animation: pulse 1800ms ease-out infinite;
}

.launch-dock {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: 28px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100% - 56px, var(--max));
  margin: 0 auto;
  border: 1px solid rgba(251, 252, 248, 0.18);
  border-radius: var(--radius);
  background: rgba(6, 26, 23, 0.66);
  backdrop-filter: blur(18px);
}

.launch-dock a {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid rgba(251, 252, 248, 0.14);
  color: rgba(251, 252, 248, 0.88);
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.launch-dock a:last-child {
  border-right: 0;
}

.launch-dock a:hover {
  color: var(--paper-strong);
  background: rgba(223, 74, 52, 0.28);
}

.launch-dock span {
  color: #ff8069;
  font-family: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", sans-serif;
  font-size: 1.05rem;
}

.profile-band,
.section,
.contact-section {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.profile-band {
  container-type: inline-size;
  padding: 76px 0 32px;
}

.section {
  padding: 88px 0 42px;
}

#projects,
#notes {
  container-type: inline-size;
}

.section-heading {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-bottom: 32px;
}

.section-heading > * {
  min-width: 0;
}

.centered-heading {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  justify-items: center;
}

.centered-heading .eyebrow {
  margin-bottom: 0;
  text-align: center;
}

.section-heading h2,
.contact-copy h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-family: "Didot", "Bodoni 72", "Songti SC", serif;
  font-size: 3rem;
  font-weight: 700;
}

#profile-title,
#projects-title,
#notes-title {
  width: 100%;
  max-width: none;
  overflow-wrap: normal;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  font-size: clamp(0.82rem, 4.4cqi, 2.38rem);
}

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

.profile-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 252, 248, 0.72);
  box-shadow: 0 14px 44px rgba(17, 45, 41, 0.08);
}

.profile-card {
  min-height: 178px;
  padding: 24px;
}

.profile-card p,
.project-kicker {
  margin-bottom: 16px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-card h3 {
  margin-bottom: 22px;
  font-size: 1.45rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tags span {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(17, 45, 41, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(63, 144, 126, 0.1);
  font-family: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", sans-serif;
  font-weight: 800;
}

.project-card {
  min-height: 320px;
  padding: 28px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.project-card:hover {
  border-color: rgba(223, 74, 52, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.project-kicker {
  color: var(--red);
  font-family: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", sans-serif;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 18px;
  font-size: 2rem;
}

.project-card p {
  min-height: 94px;
  color: var(--ink-muted);
}

.project-card a,
.contact-actions a,
.copy-button,
.site-footer a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.project-card a {
  padding: 9px 16px;
  color: var(--paper-strong);
  background: var(--ink);
}

.notes-section {
  padding-top: 74px;
}

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

.note-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  min-height: 86px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition:
    color 160ms ease,
    background 160ms ease,
    padding 160ms ease;
}

.note-row:hover {
  padding-left: 18px;
  color: var(--red);
  background: rgba(251, 252, 248, 0.52);
}

.note-row time {
  color: var(--ink-muted);
  font-family: "DIN Condensed", "Avenir Next Condensed", "Bahnschrift", sans-serif;
  font-weight: 800;
}

.note-row span {
  font-size: 1.18rem;
  font-weight: 700;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: end;
  margin-top: 72px;
  margin-bottom: 44px;
  padding: 42px;
  color: var(--paper-strong);
  background:
    linear-gradient(135deg, rgba(223, 74, 52, 0.88), rgba(17, 45, 41, 0.94) 52%),
    var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-copy .eyebrow {
  color: #f6b748;
}

.contact-copy h2 {
  margin-bottom: 18px;
}

.contact-copy p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(251, 252, 248, 0.78);
}

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

.contact-actions a,
.copy-button {
  padding: 10px 16px;
  border: 1px solid rgba(251, 252, 248, 0.25);
  color: var(--paper-strong);
  background: rgba(251, 252, 248, 0.1);
}

.copy-button {
  cursor: pointer;
}

.contact-actions a:hover,
.copy-button:hover,
.copy-button.is-copied {
  background: rgba(251, 252, 248, 0.2);
}

.site-footer {
  justify-content: space-between;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--ink-muted);
}

.site-footer a {
  min-width: 90px;
  color: var(--ink);
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  animation: reveal-up 560ms ease both;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(63, 144, 126, 0.68);
  }

  100% {
    box-shadow: 0 0 0 13px rgba(63, 144, 126, 0);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .site-header {
    padding: 14px 20px;
  }

  .site-nav {
    gap: 2px;
  }

  h1 {
    font-size: 4.2rem;
  }

  .hero-content {
    padding: 104px 0 250px;
  }

  .hero-copy {
    font-size: 1.06rem;
  }

  .launch-dock,
  .profile-grid,
  .project-grid,
  .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .launch-dock {
    overflow: hidden;
  }

  .launch-dock a {
    min-height: 62px;
    border-right: 0;
    border-bottom: 1px solid rgba(251, 252, 248, 0.14);
  }

  .launch-dock a:last-child {
    border-bottom: 0;
  }

  .section-heading {
    gap: 8px;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2.35rem;
  }

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

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

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    min-width: 0;
    flex: 1;
  }

  .hero {
    min-height: 84svh;
  }

  .hero-content {
    width: min(100% - 32px, var(--max));
    padding: 120px 0 284px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .status-pill,
  .status-meta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .launch-dock {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: calc(100% - 32px);
  }

  .profile-band,
  .section,
  .contact-section,
  .site-footer {
    width: calc(100% - 32px);
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2rem;
  }

  .note-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 0;
  }

  .note-row:hover {
    padding-left: 0;
  }

  .contact-section {
    padding: 28px 22px;
  }

  .contact-actions a,
  .copy-button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
