/* Gabriel Dalton — v3, super simple */

:root {
  --ink: #0c1f17;
  --ink-mid: #4a5a52;
  --ink-soft: #586962;
  --green-700: #14613f;
  --green-100: #d9e8df;
  --green-50:  #eef4f0;
  --paper: #fafaf8;
  --rule: #e3e7e4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--green-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--green-100);
  transition: text-decoration-color 150ms;
}
a:hover { text-decoration-color: var(--green-700); }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 1rem;
  color: var(--ink);
}
h3 { font-size: 1.05rem; letter-spacing: -0.005em; }

p { margin: 0 0 1.25rem; }
img { max-width: 100%; height: auto; }
strong { font-weight: 600; color: var(--ink); }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--green-100); color: var(--ink); }

.eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}

/* layout */
.site {
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vh, 2.5rem) clamp(1rem, 4vw, 1.5rem) clamp(3rem, 8vh, 5rem);
}

/* header / nav */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: clamp(2.25rem, 5vh, 3.5rem);
  font-size: 0.92rem;
}
.site-header .brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.site-header .brand:hover { color: var(--green-700); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-header nav a {
  color: var(--ink-mid);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--green-700); }
.site-header nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-footer p { margin: 0; }

/* lede & intro */
.lede {
  margin: 0.6rem 0 2rem;
  color: var(--ink-mid);
  font-size: 1rem;
}

/* homepage hero: name on left, headshot on right */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 4vw, 2rem);
  align-items: center;
  margin-bottom: 1.5rem;
}
.hero-grid .lede { margin-bottom: 0; }
.hero-photo {
  margin: 0;
  width: clamp(5rem, 13vw, 9rem);
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--green-100);
  flex-shrink: 0;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 480px) {
  .hero-grid { gap: 1rem; }
  .hero-photo { width: 5.5rem; }
  .hero-grid h1 { font-size: 1.85rem; }

  /* one row of links: the name already links home, so drop the Home link */
  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.4rem 0.6rem;
    font-size: 0.875rem;
  }
  .site-header nav a[href$="index.html"] { display: none; }
}
@media (max-width: 350px) {
  .hero-photo { width: 4.5rem; }
  .hero-grid h1 { font-size: 1.6rem; }
  .site-header nav { gap: 0.4rem; font-size: 0.8rem; }
}

/* homepage header variant: nav-only */
.site-header--solo { justify-content: flex-end; }

/* elsewhere row — mixes social icons + text links inline */
.elsewhere-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  margin: 0 0 1rem;
}
.elsewhere-row > a:not(.social-icon),
.elsewhere-row > span {
  font-size: 0.95rem;
}
@media (max-width: 480px) {
  /* icons on one row, text links together on the next */
  .elsewhere-row::before { content: ""; flex-basis: 100%; order: 1; }
  .elsewhere-row > a:not(.social-icon),
  .elsewhere-row > span { order: 2; }
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--ink-mid);
  text-decoration: none;
}
.social-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

/* phones: bottom padding left over from the removed newsletter launcher. Removing it shortens every page. */
@media (max-width: 480px) {
  body { padding-bottom: 3.5rem; }
}

.page-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}
.page-intro {
  margin: 0 0 2rem;
  color: var(--ink-mid);
  font-size: 1rem;
  max-width: 36rem;
}

/* now list (homepage) */
.now-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.now-list li {
  color: var(--ink-mid);
  position: relative;
  padding-left: 1.1rem;
}
.now-list li::before {
  content: "•";
  position: absolute;
  left: 0.1rem;
  top: 0;
  color: var(--green-700);
  font-weight: 700;
  line-height: inherit;
}

/* elsewhere inline */
.elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

/* entry list (writing, portfolio, speaking) */
.entry-list { display: flex; flex-direction: column; }
.entry {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry--photo {
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
}
.entry-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.entry-photo {
  width: 7.5rem;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: var(--green-100);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .entry--photo { gap: 0.9rem; }
  .entry-photo { width: 5rem; }
}

.entry-meta {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.entry-title {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.entry-title a {
  color: var(--ink);
  text-decoration: none;
}
.entry-title a:hover { color: var(--green-700); }
.entry-desc {
  margin: 0;
  color: var(--ink-mid);
  font-size: 0.95rem;
}
.entry-link {
  margin: 0;
  font-size: 0.85rem;
}
.entry-link a { color: var(--green-700); }

/* speaking featured talk */
.featured {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 2rem;
}
.featured .eyebrow { margin-top: 0; }
.featured h2 { margin-top: 0.25rem; }
.featured p { margin-bottom: 0.85rem; }
.featured p:last-child { margin-bottom: 0; }

/* project detail page */
.back-link {
  font-size: 0.78rem;
  margin: 0 0 1.5rem;
}
.back-link a {
  color: var(--ink-soft);
  text-decoration: none;
}
.back-link a:hover { color: var(--green-700); }

.meta-list {
  margin: 0 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.meta-list li {
  font-size: 0.92rem;
  color: var(--ink-mid);
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.meta-list li strong {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex: 0 0 4.5rem;
  padding-top: 0.25rem;
}
.meta-list li a { color: var(--green-700); }
@media (max-width: 420px) {
  .meta-list li { gap: 0.25rem; }
  .meta-list li strong { flex-basis: 100%; padding-top: 0; }
}

.project-logo {
  margin: 0 0 2rem;
  background: #f4f4f0;
  border: 1px solid #e6e6df;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 5 / 2;
  padding: 1.25rem;
}
.project-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.project-quote {
  margin: 2rem 0;
  padding: 1.75rem;
  background: var(--green-50);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.55;
  font-style: normal;
}
.project-quote::before {
  content: "“";
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.25rem;
  line-height: 0.9;
  color: var(--green-700);
  opacity: 0.5;
  margin-bottom: 0.5rem;
}
.project-quote cite {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--green-100);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.project-quote cite::before {
  content: "";
  width: 1.25rem;
  height: 1px;
  background: var(--green-700);
  opacity: 0.4;
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin: 0 0 1.5rem;
}
@media (max-width: 480px) {
  .stats-list { grid-template-columns: 1fr; }
}
.stats-list li {
  color: var(--ink-mid);
  font-size: 0.9rem;
}
.stats-list li strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--green-700);
  letter-spacing: -0.015em;
  margin-bottom: 0.1rem;
}

.hero-stat {
  margin: 0 0 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hero-stat strong {
  display: block;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 600;
  color: var(--green-700);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-stat span {
  display: block;
  margin-top: 0.6rem;
  color: var(--ink-mid);
  font-size: 0.95rem;
  max-width: 30rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}
.tags + .entry-link { margin-top: 1.5rem; }
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--ink-mid);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

/* writing post header */
.post-meta {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem;
}

/* about prose */
.prose p { color: var(--ink); }
.prose h2 {
  margin: 2.25rem 0 0.85rem;
  font-size: 1.1rem;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--green-700);
  color: var(--ink-mid);
  font-style: italic;
}
.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--ink);
}
.prose ul li { margin-bottom: 0.4rem; }

/* Newsletter bodies and the talk player */
:focus-visible { outline: 2px solid var(--green-700); outline-offset: 4px; }
.page-title, .page-intro, .prose, .entry, .post-meta { overflow-wrap: anywhere; }
.prose ol { list-style: decimal; padding-left: 1.5rem; margin: 0 0 1.25rem; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.5rem; }
.prose pre, .table-scroll { max-width: 100%; overflow-x: auto; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { padding: 0.5rem; border: 1px solid var(--rule); }
.video-facade { position: relative; display: block; margin: 1.5rem 0; aspect-ratio: 16 / 9; background: var(--ink); color: #fff; text-decoration: none; overflow: hidden; }
.video-facade img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; top: 50%; left: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; border-radius: 50%; background: var(--green-700); }
.video-play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 0.8rem 0 0.8rem 1.3rem; border-color: transparent transparent transparent #fff; }
.video-label { position: absolute; left: 0; bottom: 0; padding: 0.5rem 0.9rem; background: var(--ink); color: #fff; font-size: 0.95rem; }
.video-length { opacity: 0.8; margin-left: 0.4rem; }
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { background: var(--ink); outline: 2px solid #fff; }
.talk-player { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 1.5rem 0; }
