:root {
  --bg: #0b0b0b;
  --text: #ededed;
  --muted: #6e6e6e;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #efe9df;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-feature-settings: "ss01", "cv11";
}

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

em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}

.shell {
  width: min(620px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4rem 0 3rem;
  animation: fade-up 0.7s ease both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5.5rem;
}

.mark {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity 200ms ease;
}

.mark:hover {
  opacity: 0.6;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: lowercase;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #7ed957;
  box-shadow: 0 0 8px rgba(126, 217, 87, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Hero */
.hero {
  margin-bottom: 5rem;
}

.eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.display {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-style: normal;
  margin: 0 0 2.25rem;
  font-size: clamp(3.5rem, 11vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text);
}

.display em {
  color: var(--text);
  opacity: 0.55;
}

.about {
  max-width: 52ch;
}

.about p {
  margin: 0 0 1.1rem;
  color: #cfcfcf;
  font-size: 1.02rem;
  line-height: 1.7;
}

.about p:last-child {
  margin-bottom: 0;
}

/* Section blocks */
.block {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
  margin-top: 3rem;
}

.label {
  margin: 0 0 1.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* Work list */
.work-list,
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.work-list li {
  border-bottom: 1px solid var(--line);
}

.work-list li:first-child {
  border-top: 1px solid var(--line);
}

.work-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.15rem 0.25rem;
  transition: padding 280ms cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 200ms ease;
}

.work-item:hover {
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  background: rgba(255, 255, 255, 0.025);
}

.work-num {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  min-width: 1.5rem;
}

.work-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.work-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}

.work-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.work-arrow {
  color: var(--muted);
  font-size: 1rem;
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1), color 200ms ease;
  align-self: center;
}

.work-item:hover .work-arrow {
  transform: translate(3px, -3px);
  color: var(--text);
}

/* Stack */
.stack {
  margin: 0;
  color: #cfcfcf;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* Writing list */
.link-list li {
  border-top: 1px solid var(--line);
}

.link-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0.25rem;
  font-size: 0.98rem;
  color: var(--text);
  transition: padding 280ms cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 200ms ease;
}

.link-list a:hover {
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  background: rgba(255, 255, 255, 0.025);
}

.link-list a:hover .work-arrow {
  transform: translate(3px, -3px);
  color: var(--text);
}

/* Footer */
.foot {
  margin-top: 5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.foot-row a {
  font-size: 0.92rem;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
}

.foot-row a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.foot-row a:hover::after {
  transform: scaleX(1);
}

.foot-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.foot-meta a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color 200ms ease, border-color 200ms ease;
}

.foot-meta a:hover {
  color: var(--text);
  border-color: var(--text);
}

.np-rotator {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  line-height: inherit;
}

a.np-track {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(110%);
  border-bottom: 0;
  animation: np-cycle 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.np-track:nth-child(2) { animation-delay: 3s; }
.np-track:nth-child(3) { animation-delay: 6s; }
.np-track:nth-child(4) { animation-delay: 9s; }

a.np-track:nth-child(1) { color: #f5c592; }
a.np-track:nth-child(2) { color: #c8e0a0; }
a.np-track:nth-child(3) { color: #f29e9e; }
a.np-track:nth-child(4) { color: #b8a8e8; }

a.np-track:hover {
  filter: brightness(1.2);
}

@keyframes np-cycle {
  0% { transform: translateY(110%); opacity: 0; }
  3%, 22% { transform: translateY(0); opacity: 1; }
  25%, 100% { transform: translateY(-110%); opacity: 0; }
}

/* Responsive */
@media (max-width: 640px) {
  .shell {
    padding: 2.25rem 0 2rem;
  }

  .topbar {
    margin-bottom: 3.5rem;
  }

  .hero {
    margin-bottom: 3.5rem;
  }

  .display {
    margin-bottom: 1.75rem;
  }

  .block {
    margin-top: 2.5rem;
  }

  .foot {
    margin-top: 3.5rem;
  }

  .foot-row {
    gap: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .dot {
    animation: none;
  }

  * {
    transition: none !important;
  }

  .np-track {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .np-track:nth-child(n + 2) {
    display: none;
  }
}
