:root {
  --bg: #020c17;
  --accent-100: #fddec6;
  --accent-300: #fcc395;
  --accent-500: #faa968;
  --accent-700: #9c6d49;
  --accent-900: #4c3b2f;
  --peach: #f6dcac;
  --surface: #081e37;
  --border: #2a6b78;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--peach);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
  gap: 2rem;
}

.name {
  margin: 0;
  font-size: clamp(3rem, 14vw, 9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  /* stepped vertical bands, like the Omarchy logo */
  background: linear-gradient(
    to bottom,
    var(--accent-100) 0 30%,
    var(--accent-300) 30% 45%,
    var(--accent-500) 45% 65%,
    var(--accent-700) 65% 82%,
    var(--accent-900) 82% 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  overflow-wrap: anywhere;
}

.tagline {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: 0.9rem 1.75rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--peach);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent-500);
  border-color: var(--accent-500);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-300);
  border-color: var(--accent-300);
  color: var(--bg);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-300);
  background: #0c2744;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-100);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .hero {
    gap: 1.5rem;
  }

  .actions {
    flex-direction: column;
    width: 100%;
    max-width: 20rem;
  }

  .btn {
    width: 100%;
  }
}

/* ---------- Blog ---------- */

:root {
  --muted: #9ab69b;
  --line: #0a2540;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
}

.site-nav a {
  color: var(--peach);
  text-decoration: none;
  font-size: 1rem;
}

.site-nav a:hover {
  color: var(--accent-300);
}

.page {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.page--post {
  max-width: 48rem;
}

.page-title {
  margin: 0 0 3.5rem;
  text-align: center;
  font-size: clamp(3rem, 12vw, 6.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(
    to bottom,
    var(--accent-100) 0 30%,
    var(--accent-300) 30% 45%,
    var(--accent-500) 45% 65%,
    var(--accent-700) 65% 82%,
    var(--accent-900) 82% 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.post-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 67rem;
}

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

.post-list li:last-child {
  border-bottom: 0;
}

.post-link {
  display: block;
  padding: 2rem 0;
  color: var(--peach);
  text-decoration: none;
}

.post-date {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
}

.post-title {
  display: block;
  margin: 0.6rem 0 0.9rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--peach);
}

.post-link:hover .post-title,
.post-link:focus-visible .post-title {
  color: var(--accent-100);
}

.post-link:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: -2px;
}

.post-summary {
  display: block;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--peach);
}

/* ---------- Single post ---------- */

.post-meta {
  margin: 3rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--accent-300);
}

.post-heading {
  margin: 0 0 2rem;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.2;
  color: var(--accent-100);
}

.prose {
  font-size: 1rem;
  line-height: 1.8;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.4rem;
  color: var(--accent-100);
}

.prose a {
  color: var(--accent-300);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--accent-100);
}

.prose strong {
  color: var(--accent-100);
}

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose code {
  padding: 0.1em 0.4em;
  font: inherit;
  font-size: 0.9em;
  color: var(--accent-100);
  background: var(--surface);
  border: 1px solid var(--accent-900);
}

.prose pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--accent-900);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.back-link {
  display: inline-block;
  margin-top: 3rem;
  color: var(--accent-300);
  text-decoration: none;
}

.back-link:hover {
  color: var(--peach);
}

/* ---------- Home waves ---------- */

#waves {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 42vh;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%);
  mask-image: linear-gradient(to bottom, transparent, #000 45%);
}

.hero {
  position: relative;
  z-index: 1;
}

@media (max-width: 599px) {
  #waves {
    height: 32vh;
  }
}

/* ---------- Experiments ---------- */

.page-title--long {
  font-size: clamp(2rem, 9.5vw, 5.5rem);
}

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--accent-700);
  box-shadow: 6px 6px 0 var(--accent-900);
  transition: transform 0.12s steps(2), box-shadow 0.12s steps(2), border-color 0.12s steps(2);
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--accent-900);
  border-color: var(--accent-500);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.card-title {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--accent-100);
}

.card-desc {
  margin: 0 0 1.5rem;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--peach);
}

.card-link {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  color: var(--bg);
  background: var(--accent-500);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 3px 3px 0 var(--accent-900);
}

.card-link:hover,
.card-link:focus-visible {
  background: var(--accent-300);
  outline: none;
}

.card-link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--accent-900);
}

@media (max-width: 820px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-right: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}
