:root {
  --paper: #fbfbfd;
  --paper-deep: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --ember: #bf4800;
  --ember-deep: #3a2a22;
  --accent: #1d1d1f;
  --accent-hover: #000000;
  --accent-soft: #424245;
  --pine: #1d1d1f;
  --white: #ffffff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.04);
  --radius-lg: 1.25rem;
  --radius-xl: 1.65rem;
  --ease-apple: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --serif: "Fraunces", "Iowan Old Style", "New York", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", "Outfit", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(0, 0, 0, 0.045), transparent 58%),
    radial-gradient(720px 360px at -10% 8%, rgba(0, 0, 0, 0.03), transparent 55%),
    var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.58824;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
img { max-width: 100%; }
::selection { background: #ead7c6; }

.wrap {
  width: min(980px, calc(100% - max(1.5rem, env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px) + 1.5rem)));
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.site-header {
  position: sticky;
  top: 0.7rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(980px, calc(100% - max(1.5rem, env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px) + 1.5rem)));
  margin: max(0.55rem, env(safe-area-inset-top, 0px)) auto 0;
  padding: 0.4rem 0.5rem 0.4rem 0.45rem;
  background: rgba(251, 251, 253, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background 0.5s var(--ease-apple), box-shadow 0.5s var(--ease-apple), transform 0.5s var(--ease-apple);
}
.site-header.is-scrolled {
  background: rgba(251, 251, 253, 0.88);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.mark-photo {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  box-shadow: 0 0 0 2px #fffdf9, 0 0 0 3px rgba(22, 19, 17, 0.16);
}
.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.94rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}
.nav a:not(.btn):hover,
.nav a:not(.btn).active { color: var(--ink); background: rgba(22, 19, 17, 0.05); }
.nav a.btn {
  margin-left: 0.35rem;
  color: #fff;
  background-color: #1d1d1f;
  border-color: #1d1d1f;
}
.nav a.btn:hover {
  color: #fff;
  background-color: #000000;
  border-color: #000000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.nav a.btn.active {
  color: #fff;
  background-color: #1d1d1f;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px #1d1d1f;
}
.nav-toggle { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.96rem;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background-color: #1d1d1f;
  border-color: #1d1d1f;
  color: #fff;
}
.btn-primary:hover {
  background-color: #000000;
  border-color: #000000;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}
.btn-primary:focus-visible {
  outline: 2px solid #1d1d1f;
  outline-offset: 2px;
}
.btn-ghost { background: rgba(255, 255, 255, 0.85); border-color: var(--line); color: var(--ink); }
.btn-ember { background: var(--ember); color: white; }
.btn-ember:hover { background: var(--ember-deep); }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding: 3.4rem 0 2rem;
}
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--ember-deep);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3.4rem, 7.4vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.048em;
}
h1 em { font-style: italic; font-weight: 500; color: #3a2a22; }
.lede { max-width: 38rem; margin: 1.15rem 0 0; font-size: 1.12rem; color: var(--muted); }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.portrait {
  position: relative;
  margin: 0;
  border-radius: 1.8rem;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 30px 70px rgba(22, 19, 17, 0.18);
}
.portrait img {
  display: block;
  width: 100%;
  height: 34rem;
  object-fit: cover;
  object-position: center 12%;
}
.portrait figcaption {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 1.15rem;
  color: #f6f1e8;
  background: rgba(22, 19, 17, 0.72);
  border: 1px solid rgba(255, 253, 249, 0.14);
  backdrop-filter: blur(16px);
}
.portrait .eyebrow { color: #e7c2a4; margin-bottom: 0.35rem; }
.portrait strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.portrait p { margin: 0.4rem 0 0; color: rgba(246, 241, 232, 0.78); font-size: 0.95rem; }

.meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.meta-row div {
  padding: 1.05rem 1.1rem 1.1rem;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
}
.meta-row span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.meta-row strong {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

section, .block { padding: 3.4rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.35rem;
}
h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 1;
}
.section-head p, .prose p { color: var(--muted); }
.section-head a { color: var(--ember-deep); font-weight: 650; }
.prose p { max-width: 44rem; }

.work-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0.9rem; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-top: 0.9rem; }
.stack { display: grid; gap: 0.9rem; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.3rem 1.2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}
a.card:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow); }
.card.feature {
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.04), transparent 28%),
    var(--ink);
  color: var(--paper);
  align-self: start;
  border-color: transparent;
  position: relative;
}
.card.feature.feature-tytil {
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(251, 80, 26, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.05), transparent 32%),
    linear-gradient(145deg, #1a1613 0%, #241a16 48%, #161311 100%);
  box-shadow: 0 28px 70px rgba(22, 19, 17, 0.18);
}
.feature-badge {
  align-self: flex-start;
  margin-bottom: 0.35rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff7f2;
  background: linear-gradient(135deg, #fb501a, #c93d12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.card.feature.feature-tytil .kicker { color: #ffb899; }
.feature-shot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.kicker {
  color: var(--ember);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.card.feature .kicker { color: #e7c2a4; }
.card h3, .entry h3 {
  margin: 0.45rem 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.card p, .entry p { margin: 0; color: var(--muted); }
.card.feature p { color: rgba(243, 238, 230, 0.74); }
.card .go { margin-top: auto; padding-top: 0.95rem; font-weight: 650; font-size: 0.95rem; }
.card.feature .go { color: #f3eee6; }

.page-hero { padding: 3rem 0 0.2rem; }
.page-hero h1 { font-size: clamp(2.7rem, 6vw, 4.4rem); }
.about-hero, .resume-hero {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 2rem;
  align-items: center;
}
.about-photo, .resume-photo {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  object-position: center 16%;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}
.resume-photo { height: 16rem; }

.about-social-lede { margin-top: 0.35rem; max-width: 36rem; }
.about-social {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.about-social a {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.about-social a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.about-social-label {
  font-weight: 650;
  color: var(--ember-deep);
  letter-spacing: -0.01em;
}
.about-social-hint {
  font-size: 0.9rem;
  color: var(--muted);
}

.entry { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.entry header { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.when { color: var(--ember-deep); font-weight: 650; white-space: nowrap; }
.entry ul { margin: 0.75rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.entry li + li { margin-top: 0.35rem; }

.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.15rem 1.2rem 1.25rem;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }
.pills span, .pills .pill, .services li {
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.pill-link {
  display: inline-flex;
  text-decoration: none;
  color: var(--ember-deep);
  font-weight: 650;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pill-link:hover {
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 19, 17, 0.06);
  text-decoration: none;
}
.services { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contact-aside {
  padding: 1.35rem 1.25rem;
  background: linear-gradient(180deg, rgba(243, 238, 230, 0.5), rgba(255, 253, 249, 0.2));
  border-right: 1px solid var(--line);
}
.contact-form-wrap {
  padding: 1.35rem 1.4rem 1.5rem;
}
.contact-form-head {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.contact-chip {
  display: inline-flex;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--ember-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(22, 19, 17, 0.06);
  text-decoration: none;
}
.contact-form .btn { justify-self: start; margin-top: 0.25rem; }
.contact-photo {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 1.15rem;
  margin-bottom: 1rem;
}
.contact-aside a { color: var(--ember-deep); font-weight: 650; text-decoration: none; }
.contact-aside a:hover { text-decoration: underline; }
.contact-aside p { margin: 0.35rem 0; }
.contact-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 560; margin: 0 0 0.15rem; }
.contact-role { color: var(--muted); margin: 0 0 0.35rem; }
.contact-meta { font-size: 0.92rem; color: var(--muted); margin-bottom: 1rem; }
.contact-block { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.contact-links { list-style: none; padding: 0; margin: 0.35rem 0 0; display: grid; gap: 0.35rem; }
.contact-note { color: var(--muted); font-size: 0.95rem; margin: 0.35rem 0 0; }
.contact-form-title { margin: 0 0 0.35rem; font-family: var(--serif); font-size: 1.45rem; }
.contact-form-hint { margin: 0; color: var(--muted); font-size: 0.92rem; }
.note.success { background: #e7f3ec; color: var(--pine); }
form { display: grid; gap: 0.75rem; align-content: start; }
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
}
select:focus { outline: 2px solid rgba(156, 78, 42, 0.28); border-color: var(--ember); }

/* —— Blog index & posts —— */
.blog-page { padding: 0.25rem 0 1rem; }
.blog-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.35rem;
}
.blog-page-intro { max-width: 38rem; }
.blog-page-intro h1 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.blog-page-lede { margin: 0; max-width: 34rem; }
.blog-page-count {
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.85);
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--muted);
}

.blog-cat-bar {
  margin: 0 0 1.5rem;
  padding-bottom: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.blog-cat-bar::-webkit-scrollbar { display: none; }
.blog-categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  min-width: min-content;
}
.blog-cat-pill {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.75);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--muted);
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.blog-cat-pill:hover { color: var(--ink); transform: translateY(-1px); text-decoration: none; box-shadow: 0 6px 18px rgba(22, 19, 17, 0.06); }
.blog-cat-pill.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 10px 28px rgba(22, 19, 17, 0.14);
}
.blog-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cat, var(--ember-deep));
  background: color-mix(in srgb, var(--cat, var(--ember)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat, var(--ember)) 28%, transparent);
}
.blog-cat:hover { text-decoration: none; filter: brightness(0.95); }
.blog-cat-on-dark {
  color: #fff;
  background: color-mix(in srgb, var(--cat, var(--ember)) 55%, rgba(0, 0, 0, 0.35));
  border-color: rgba(255, 255, 255, 0.25);
}

.blog-hero-card {
  position: relative;
  display: block;
  margin-bottom: 2rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}
.blog-hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 36px 80px rgba(22, 19, 17, 0.18);
  text-decoration: none;
}
.blog-hero-card-media {
  position: relative;
  width: 100%;
  height: clamp(240px, 42vw, 420px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--pine), var(--ink));
}
.blog-hero-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
.blog-hero-card-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(22, 19, 17, 0.88) 0%, rgba(22, 19, 17, 0.55) 42%, rgba(22, 19, 17, 0.2) 100%);
}
.blog-hero-card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  display: grid;
  gap: 0.55rem;
  max-width: 42rem;
}
.blog-hero-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 253, 249, 0.75);
}
.blog-hero-card-body h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.5vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.blog-hero-excerpt {
  margin: 0;
  color: rgba(255, 253, 249, 0.82);
  font-size: 1.02rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-hero-cta {
  margin-top: 0.35rem;
  font-weight: 650;
  color: #f3c9a8;
}

.blog-list-section { padding-top: 0.25rem; }
.blog-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.1rem;
}
.blog-list-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.blog-list-link {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ember-deep);
  text-decoration: none;
}
.blog-list-link:hover { text-decoration: underline; }
.blog-empty {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 2rem;
  border-radius: 1.35rem;
  border: 1px dashed var(--line);
  background: rgba(255, 253, 249, 0.6);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.blog-grid-modern { gap: 1.25rem; }
.blog-grid-compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.blog-card-modern {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 12px 36px rgba(22, 19, 17, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.blog-card-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(22, 19, 17, 0.1);
  border-color: rgba(22, 19, 17, 0.16);
}
.blog-card-modern .blog-card-body {
  padding: 1.05rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, var(--paper-deep), var(--paper));
}
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-card-modern:hover .blog-card-media img { transform: scale(1.05); }
.blog-card-read {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(22, 19, 17, 0.72);
  backdrop-filter: blur(8px);
}
.blog-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(156, 78, 42, 0.15), transparent 55%),
    linear-gradient(225deg, rgba(23, 46, 40, 0.12), transparent 50%),
    var(--paper-deep);
}
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
}
.blog-card-meta time { color: var(--muted); }
.blog-card-title {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.blog-card-title a { text-decoration: none; }
.blog-card-title a:hover { color: var(--ember-deep); }
.blog-excerpt {
  flex: 1;
  color: var(--muted);
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-read {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ember-deep);
  text-decoration: none;
}
.blog-read:hover { text-decoration: underline; }
.blog-pagination {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* —— Blog post detail —— */
.blog-post-page { padding: 0.15rem 0 1.5rem; }
.blog-post-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.blog-post-nav a {
  color: var(--ember-deep);
  text-decoration: none;
}
.blog-post-nav a:hover { text-decoration: underline; }

.blog-post-header {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.75rem;
  border-radius: 1.65rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}
.blog-post-cover {
  position: relative;
  width: 100%;
  height: clamp(220px, 38vw, 400px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--pine), var(--ink));
}
.blog-post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
.blog-post-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(22, 19, 17, 0.55) 100%);
}
.blog-post-header-inner {
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.15rem) 1.65rem;
}
.blog-post-header:not(:has(.blog-post-cover)) .blog-post-header-inner {
  padding-top: 1.65rem;
}
.blog-post-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
}
.blog-post-read {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-post-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 46rem;
}
.blog-post-deck {
  margin: 0.85rem 0 0;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.55;
}
.blog-post-byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.blog-post-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--line);
}
.blog-post-author {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.blog-post-meta-line {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 1.75rem 2rem;
  align-items: start;
}
.blog-post-aside {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 0.85rem;
}
.blog-aside-card {
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.85);
}
.blog-aside-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-share {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.blog-share a,
.blog-share-copy {
  display: block;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ember-deep);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.blog-share a:hover,
.blog-share-copy:hover { text-decoration: underline; }
.blog-aside-keywords {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}
.blog-aside-cta {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 650;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-aside-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(22, 19, 17, 0.18);
  text-decoration: none;
}

.blog-related-modern {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.blog-prose {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  padding: 1.5rem 1.65rem 1.75rem;
  box-shadow: var(--shadow);
}
.blog-prose-article {
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.35rem, 3vw, 2.15rem);
  font-size: 1.06rem;
  line-height: 1.72;
}
.blog-prose-article > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3 { font-family: var(--serif); line-height: 1.25; margin-top: 1.6rem; }
.prose h1:first-child, .prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0.85rem 0; }
.prose a { color: var(--ember-deep); font-weight: 550; }
.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--ember);
  background: rgba(243, 238, 230, 0.6);
  border-radius: 0 0.65rem 0.65rem 0;
  color: var(--muted);
}
.prose pre {
  background: var(--ink);
  color: #f3eee6;
  border: none;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
}
.prose :not(pre) > code {
  background: rgba(22, 19, 17, 0.06);
  padding: 0.12rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.9em;
}
.prose code { font-size: 0.92em; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--paper-deep);
  font-weight: 650;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.prose tbody tr:nth-child(even) { background: rgba(243, 238, 230, 0.35); }

.blog-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.15rem 0 1.35rem;
}
.blog-compare-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 0.85rem 0.95rem 1rem;
  box-shadow: var(--shadow-soft);
}
.blog-compare-card-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-compare-card-title {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
}
.blog-compare-card-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}
@media (max-width: 860px) {
  .blog-compare-grid { grid-template-columns: 1fr; }
}
.page-hero .eyebrow a { color: inherit; }
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  font-size: 0.92rem;
}
.pagination a { color: var(--ember-deep); font-weight: 650; text-decoration: none; }
.pagination-disabled { color: var(--muted); }
.pagination-meta { color: var(--muted); }
label { display: grid; gap: 0.3rem; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid rgba(156, 78, 42, 0.28); border-color: var(--ember); }
.hp { position: absolute; left: -9999px; }
.note { margin: 0; padding: 0.75rem 0.9rem; border-radius: 0.8rem; background: #e7f3ec; color: var(--pine); }
.field-error { color: var(--ember-deep); font-weight: 550; font-size: 0.85rem; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.75rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.footer-brand { display: grid; gap: 0.15rem; }
.footer-brand strong { color: var(--ink); font-weight: 650; letter-spacing: -0.02em; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.65rem;
}
.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 550;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
}
.footer-nav a:hover { color: var(--ink); background: rgba(22, 19, 17, 0.05); }
.footer-meta {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  text-align: right;
}
.footer-meta a { color: var(--ember-deep); font-weight: 650; text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .hero, .work-grid, .more-grid, .contact-grid, .meta-row, .groups, .about-hero, .resume-hero { grid-template-columns: 1fr; }
  .blog-hero-card-media { height: clamp(220px, 52vw, 320px); }
  .blog-post-cover { height: clamp(200px, 48vw, 280px); }
  .blog-post-layout { grid-template-columns: 1fr; }
  .blog-post-aside {
    position: static;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: dense;
  }
  .blog-aside-cta { grid-column: 1 / -1; }
  .contact-aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-meta { justify-items: center; text-align: center; }
  .footer-nav { justify-content: center; }
  .portrait img { height: 26rem; }
  .about-photo, .resume-photo { height: 22rem; }
  .section-head, .entry header { flex-direction: column; align-items: start; }
  .nav-toggle {
    display: inline-flex;
    border: 0;
    background: var(--ink);
    color: var(--paper);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font: inherit;
    font-weight: 650;
  }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav .btn { margin: 0.2rem 0 0; }
  .site-header { position: sticky; top: max(0.35rem, env(safe-area-inset-top, 0px)); }
  .blog-page-head { flex-direction: column; align-items: flex-start; }
  .blog-page-count { align-self: flex-start; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid-compact { grid-template-columns: 1fr; }
  .blog-hero-card-body {
    padding: 1rem 1.05rem 1.15rem;
    max-width: none;
  }
  .blog-hero-card-body h2 { font-size: clamp(1.3rem, 5.2vw, 1.85rem); }
  .blog-hero-card-shade {
    background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, 0.72) 100%);
  }
  .blog-post-header-inner { padding: 1.15rem 1.1rem 1.35rem; }
  .blog-post-header h1 { font-size: clamp(1.55rem, 6.5vw, 2.15rem); }
  .blog-post-deck { font-size: 1.02rem; }
  .blog-prose-article { padding: 1.1rem 1.05rem 1.35rem; border-radius: var(--radius-lg); }
  .blog-post-aside { grid-template-columns: 1fr; gap: 0.65rem; }
  .blog-list-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .blog-categories { flex-wrap: wrap; }
  .blog-cat-bar { overflow-x: visible; }
  h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); }
  .hero { padding-top: 2rem; gap: 2rem; }
  .meta-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 1.25rem); }
  .site-header { width: calc(100% - 1.25rem); border-radius: 1.15rem; }
  .meta-row { grid-template-columns: 1fr; }
  .blog-post-cover { height: clamp(180px, 56vw, 240px); }
  .blog-hero-card-media { height: clamp(200px, 58vw, 280px); }
  .blog-post-byline { flex-wrap: wrap; }
  .blog-share { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1rem; }
  .blog-card-title { font-size: 1.15rem; }
  .pagination { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (min-width: 861px) and (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-post-layout { grid-template-columns: minmax(0, 1fr) 200px; gap: 1.25rem; }
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: var(--paper);
}
.js .loader { display: grid; }
.js.skip-loader .loader { display: none; }
.loader span {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  animation: loader-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.js body.is-ready .loader {
  animation: loader-out 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}
@keyframes loader-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes loader-out {
  to { opacity: 0; visibility: hidden; }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.js .reveal.in { opacity: 1; transform: none; }
.portrait img { transform-origin: center 18%; }

/* Blog — responsive */
.blog-page { max-width: 100%; }
.blog-post-page { max-width: 100%; overflow-x: clip; }
.blog-prose-article,
.blog-prose {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* —— Work / project case study —— */
.project-page { padding: 0.5rem 0 2rem; max-width: 100%; }
.project-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.project-breadcrumb a { color: var(--accent); text-decoration: none; }
.project-breadcrumb a:hover { text-decoration: underline; }
.project-hero {
  display: grid;
  gap: 1.35rem;
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.project-hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.project-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}
.project-hero-copy h1 {
  font-size: clamp(2rem, 5vw, 2.85rem);
  margin: 0.2rem 0 0.5rem;
}
.project-deck {
  margin: 0;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 42rem;
  line-height: 1.55;
}
.project-meta-line {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.project-meta-line strong { color: var(--ink); }
.project-actions { margin-top: 1.25rem; flex-wrap: wrap; }
.project-section {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.project-section h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  margin: 0 0 1rem;
}
.project-prose p { max-width: 46rem; }
.project-list {
  margin: 0;
  padding-left: 1.15rem;
  max-width: 46rem;
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}
.project-list-outcomes li { color: var(--ink); }
.project-pills { margin-bottom: 0.85rem; }
.project-stack-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 40rem;
}
.project-stack-note a { color: var(--accent); font-weight: 650; }
.project-faq-list { display: grid; gap: 0.65rem; max-width: 46rem; }
.project-faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 0.65rem 0.85rem;
}
.project-faq-item summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
  list-style: none;
}
.project-faq-item summary::-webkit-details-marker { display: none; }
.project-faq-item p {
  margin: 0.65rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}
.project-related .more-grid { margin-top: 0.5rem; }

@media (min-width: 861px) {
  .project-hero:has(.project-hero-media) {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
  }
}

@media (max-width: 860px) {
  .project-actions .btn { flex: 1 1 auto; min-width: min(100%, 12rem); }
  .project-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .project-hero { padding: 1rem; }
  .project-faq-item { padding: 0.55rem 0.7rem; }
}
.blog-prose pre,
.blog-prose table {
  max-width: 100%;
}
.blog-post-layout {
  min-width: 0;
}
.blog-post-header-inner,
.blog-post-header h1,
.blog-post-deck {
  max-width: 100%;
}

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a.card, .site-header { transition: none; }
  .js .loader, .scroll-progress { display: none; }
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    clip-path: none !important;
  }
}
