/* One Unit — studio business card + blog
   Direction: daylight stone, charcoal ink, verdigris accent */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-0: #e8ebe6;
  --bg-1: #f3f4f0;
  --ink: #1a1c19;
  --ink-muted: #4a5248;
  --line: rgba(26, 28, 25, 0.14);
  --accent: #0f6e5c;
  --accent-deep: #0a4f42;
  --surface: rgba(255, 255, 255, 0.42);
  --max: 68rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --font-display: "Open Sans", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

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

/* —— Atmosphere —— */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 12% -10%, #dfe8e2 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 8%, #d5ddd4 0%, transparent 45%),
    radial-gradient(70% 50% at 70% 100%, #cfd9d1 0%, transparent 50%),
    linear-gradient(165deg, var(--bg-1) 0%, var(--bg-0) 55%, #dde3da 100%);
  animation: atmosphere 18s ease-in-out infinite alternate;
}

@keyframes atmosphere {
  from {
    filter: hue-rotate(0deg) saturate(1);
  }
  to {
    filter: hue-rotate(8deg) saturate(1.08);
  }
}

/* —— Shell —— */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.1rem var(--pad);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.wordmark span {
  color: var(--accent);
  transition: color 0.25s var(--ease);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}

.brand-lockup:hover .wordmark {
  color: var(--accent);
}

.brand-lockup:hover .wordmark span {
  color: var(--ink);
}

.brand-lockup .person {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  transform: scaleX(1);
}

main {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad) 4rem;
}

.site-footer {
  max-width: var(--max);
  width: 100%;
  margin: auto auto 0;
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

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

/* —— Landing card —— */
.card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 28rem;
  padding-bottom: 12vh;
  animation: rise 0.85s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 10vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  margin: 0 0 0.3rem;
  color: var(--ink);
  cursor: default;
  transition: color 1s var(--ease);
}

.brand .unit {
  color: var(--accent);
  transition: color 1s var(--ease);
}

.brand:hover {
  color: var(--accent);
}

.brand:hover .unit {
  color: var(--ink);
}

.person {
  margin: -0.35rem 0 2.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.card .lede {
  margin: 0 0 2.5rem;
  max-width: 28rem;
  color: var(--ink-muted);
  font-size: 1.08rem;
  line-height: 1.85;
  letter-spacing: -0.01em;
}

.card .lede em {
  font-style: normal;
  font-weight: 650;
  color: var(--ink);
}

.card .lede .lede-punch {
  display: inline-block;
  color: var(--ink);
  font-weight: 600;
}

.card .lede .lede-close {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12em;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.card .links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.card .links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.05em;
}

.card .links a:hover {
  color: var(--accent);
}

.card .links span {
  color: var(--ink-muted);
  font-weight: 400;
}

/* —— Blog —— */
.page-intro {
  padding: 2.5rem 0 1rem;
  animation: rise 0.7s var(--ease) both;
}

.page-intro h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 0.75rem;
}

.page-intro p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 60ch;
}

.post-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

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

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

.post-list a {
  display: block;
  padding: 1.5rem 0;
  color: inherit;
  text-decoration: none;
  transition: padding-left 0.35s var(--ease);
}

.post-list a:hover {
  padding-left: 0.4rem;
}

.post-list time {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.post-list h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.post-list p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 50ch;
}

/* —— Projects —— */
.project-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.project-list li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

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

.project-list h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.project-list h2 a {
  color: inherit;
  text-decoration: none;
}

.project-list h2 a:hover {
  color: var(--accent);
}

.project-list > li > p:not(.project-links) {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
  max-width: 80ch;
}

.project-links {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.project-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.05em;
}

.project-links a:hover {
  color: var(--accent);
}

.project-links span {
  color: var(--ink-muted);
}

.article {
  max-width: 42rem;
  padding: 2rem 0 3rem;
  animation: rise 0.7s var(--ease) both;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.article h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--ink-muted);
}

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

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

.prose code {
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
}

.prose pre {
  background: #1a1c19;
  color: #e8ebe6;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  text-decoration: none;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
