:root {
  color-scheme: dark;
  --ink: #0d1117;
  --panel: #141a22;
  --panel-strong: #1b2430;
  --paper: #f2eadc;
  --muted: #aeb8bc;
  --quiet: #728087;
  --line: rgba(242, 234, 220, 0.13);
  --red: #e34d3f;
  --green: #7ee06c;
  --cyan: #43c7d9;
  --blue: #235a73;
  --yellow: #efc96f;
  --shadow: rgba(0, 0, 0, 0.48);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(13, 17, 23, 0.2), var(--ink) 34rem),
    radial-gradient(circle at 8% 0%, rgba(67, 199, 217, 0.18), transparent 28rem),
    var(--ink);
  color: var(--paper);
  font-family: var(--mono);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(242, 234, 220, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 234, 220, 0.022) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

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

#signal-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100vw;
  height: 100vh;
  opacity: 0.1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
  font-weight: 800;
  font-size: 0.92rem;
}

.brand-lockup img {
  width: 1.8rem;
  height: 1.8rem;
  border: 2px solid rgba(242, 234, 220, 0.9);
  border-radius: 50%;
  object-fit: cover;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

nav a {
  padding: 0.38rem 0.54rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--paper);
  background: rgba(242, 234, 220, 0.08);
  outline: none;
}

.inline-link {
  color: var(--cyan);
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  outline: none;
}

main {
  position: relative;
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(12rem, 0.48fr);
  grid-template-areas:
    "banner copy";
  align-items: stretch;
  gap: 0.55rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(0.7rem, 1.6vw, 1rem) clamp(1rem, 4vw, 2rem) 0;
}

.banner-frame {
  grid-area: banner;
  position: relative;
  min-height: clamp(5.2rem, 10vw, 8rem);
  overflow: hidden;
  border: 1px solid rgba(242, 234, 220, 0.18);
  border-radius: 4px;
  background: #082631;
  box-shadow: none;
}

.banner-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(13, 17, 23, 0.78), rgba(13, 17, 23, 0.18) 44%, rgba(13, 17, 23, 0.08)),
    linear-gradient(0deg, rgba(13, 17, 23, 0.7), transparent 44%);
}

.banner-frame img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  grid-area: copy;
  display: grid;
  align-content: center;
  min-height: auto;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(20, 26, 34, 0.82);
}

.kicker {
  margin: 0 0 0.42rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: lowercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: lowercase;
  text-shadow: 0.035em 0.035em 0 var(--red);
}

.lede {
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: #d7dedb;
  font-size: 0.86rem;
  line-height: 1.42;
}

.feed-shell {
  max-width: 82rem;
  display: grid;
  grid-template-columns: minmax(13rem, 0.42fr) minmax(18rem, 0.9fr) minmax(13rem, 0.42fr);
  gap: 0.75rem;
  margin: 0 auto;
  padding: clamp(0.8rem, 2vw, 1.25rem) clamp(1rem, 4vw, 2rem);
}

.feed-panel {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(13, 17, 23, 0.2);
}

.section-heading {
  max-width: none;
  margin-bottom: 0.55rem;
}

.section-heading.compact {
  max-width: 44rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.status-line span,
.thought-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

time {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.thought-layout {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.thought-stream {
  display: grid;
  gap: 0.45rem;
}

.thought-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.58rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(67, 199, 217, 0.08), transparent 55%),
    rgba(20, 26, 34, 0.82);
}

.thought-meta,
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.thought-meta {
  gap: 0.36rem;
}

.thought-card strong {
  color: var(--paper);
  font-size: 0.9rem;
}

.blog-section {
  min-width: 0;
}

.projects-section {
  min-width: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.post-card {
  min-height: auto;
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(126, 224, 108, 0.07), transparent 54%),
    rgba(20, 26, 34, 0.82);
}

.post-card h3 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(0.98rem, 1.4vw, 1.18rem);
  line-height: 1.14;
}

.post-tag {
  width: fit-content;
  padding: 0.18rem 0.34rem;
  border: 1px solid rgba(126, 224, 108, 0.32);
  border-radius: 4px;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: lowercase;
}

.project-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.empty-state {
  margin: 0;
  padding: 0.65rem;
  border: 1px dashed rgba(242, 234, 220, 0.2);
  border-radius: 4px;
  color: var(--quiet);
  font-size: 0.78rem;
}

.project-link {
  display: grid;
  gap: 0.38rem;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(20, 26, 34, 0.82);
}

.project-link img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(242, 234, 220, 0.12);
  border-radius: 3px;
}

.project-link strong {
  color: var(--paper);
  font-size: 0.9rem;
}

.project-link span {
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.project-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.project-link .project-url {
  color: var(--quiet);
  font-size: 0.68rem;
}

.status-line {
  max-width: 82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem 1rem;
  margin: 0 auto clamp(1.6rem, 3vw, 2.4rem);
  padding: 0 clamp(1rem, 4vw, 2rem);
  color: var(--muted);
  font-size: 0.72rem;
}

.status-line strong {
  color: var(--quiet);
  font-size: 0.72rem;
  text-transform: uppercase;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem clamp(1rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

@media (max-width: 420px) {
  .hero,
  .feed-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "banner"
      "copy"
      "profile";
  }

  .hero-copy,
  .hero-copy {
    min-height: auto;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .banner-frame {
    min-height: 8.5rem;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 4.2rem);
  }

  .thought-card,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .thought-meta {
    flex-direction: row;
    grid-row: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
