/* base/_base.css */
/* ===================================================================
   base — design tokens, reset, and shared primitives.
   Folder name sorts first so tokens + reset land before section styles.
   Ported from the static portfolio (mobile-first + native nesting).
   =================================================================== */

:root {
  /* Interest palette */
  --green: #009245;
  --teal: #00a99d;
  --blue: #3fa9f5;
  --orange: #ff931e;
  --red: #e8453c;
  --purple: #93278f;
  --interest-iot: var(--green);
  --interest-telemetry: var(--teal);
  --interest-web: var(--blue);
  --interest-ai: var(--purple);

  /* Surfaces */
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f1f4f7;
  --line: #e4e8ee;

  /* Text */
  --text: #1c2330;
  --text-2: #4d5a70;
  --text-3: #8a94a6;

  --accent: #2979ff;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 99px;

  --maxw: 1100px;
  --maxw-article: 760px;
  --pad-x: 20px;

  --shadow: 0 1px 3px rgba(28,35,48,.06), 0 8px 24px rgba(28,35,48,.05);
  --shadow-lg: 0 4px 10px rgba(28,35,48,.07), 0 18px 40px rgba(28,35,48,.08);

  --section-y: 48px;

  --header-bg: rgba(255,255,255,.88);
  --code-bg: #f6f8fa;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1116;
  --bg-alt: #141922;
  --surface: #161c26;
  --surface-2: #1e2632;
  --line: #2a3340;

  --text: #e7ebf2;
  --text-2: #aeb9c9;
  --text-3: #717d8e;

  --shadow: 0 1px 3px rgba(0,0,0,.40), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 4px 10px rgba(0,0,0,.45), 0 18px 40px rgba(0,0,0,.50);

  --header-bg: rgba(14,17,22,.85);
  --code-bg: #0b0f14;
  color-scheme: dark;
}

@media (min-width: 641px) {
  :root {
    --pad-x: 24px;
    --section-y: 64px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  @media (min-width: 641px) {
    font-size: 16.5px;
  }
}

main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  &:hover {
    color: var(--teal);
  }
}

img {
  max-width: 100%;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Solid interest-area ribbon: hardware, telemetry, software, AI/data. */
.ribbon {
  height: 3px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  & span:nth-child(1) {
    background: var(--interest-iot);
  }
  & span:nth-child(2) {
    background: var(--interest-telemetry);
  }
  & span:nth-child(3) {
    background: var(--interest-web);
  }
  & span:nth-child(4) {
    background: var(--interest-ai);
  }
}

/* ---- Sections ---- */
section {
  padding: var(--section-y) 0;
}

.section-head {
  margin-bottom: 28px;
  @media (min-width: 641px) {
    margin-bottom: 36px;
  }

  & h2 {
    font-size: 1.5rem;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    @media (min-width: 641px) {
      font-size: 1.75rem;
      gap: 14px;
    }

    & .hash {
      width: 26px;
      height: 5px;
      border-radius: 3px;
      display: inline-block;
      background: var(--accent);
      overflow: hidden;
      color: transparent;
      flex: 0 0 auto;
    }
  }
  & p {
    color: var(--text-2);
    margin-top: 8px;
    max-width: 62ch;
  }
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---- Grid ---- */
.grid {
  display: grid;
  gap: 20px;
  @media (min-width: 641px) {
    gap: 24px;
  }
}
.grid-2 {
  grid-template-columns: 1fr;
  @media (min-width: 641px) {
    grid-template-columns: repeat(2, 1fr);
  }
}
.grid-3 {
  grid-template-columns: 1fr;
  @media (min-width: 641px) {
    grid-template-columns: repeat(2, 1fr);
  }
  @media (min-width: 901px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, background .2s, box-shadow .2s;
  &:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  &:hover {
    background: var(--blue);
    color: #fff;
  }
}
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
  &:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  @media (min-width: 641px) {
    padding: 28px;
  }

  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }

  & .card-accent {
    height: 4px;
    border-radius: 4px;
    margin: -24px -24px 22px;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    @media (min-width: 641px) {
      margin: -28px -28px 22px;
    }
  }
  &[data-interest="iot"] .card-accent {
    background: var(--interest-iot);
  }
  &[data-interest="telemetry"] .card-accent {
    background: var(--interest-telemetry);
  }
  &[data-interest="web"] .card-accent {
    background: var(--interest-web);
  }
  &[data-interest="ai"] .card-accent {
    background: var(--interest-ai);
  }
  & h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    letter-spacing: -.01em;
    & a {
      color: var(--text);
      &:hover {
        color: var(--teal);
      }
    }
  }
  & p {
    color: var(--text-2);
    font-size: .95rem;
    flex: 1;
  }
  & .meta {
    font-size: .78rem;
    color: var(--text-3);
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
}

.badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: .05em;
}
.badge-live {
  background: rgba(0,146,69,.1);
  color: var(--green);
}
.badge-dev {
  background: rgba(255,147,30,.13);
  color: #c46a00;
}
.badge-past {
  background: var(--surface-2);
  color: var(--text-2);
}
.badge-oss {
  background: rgba(63,169,245,.12);
  color: #1576c4;
}

/* ---- Tags (pill + coloured dot) ---- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  & .tag:nth-child(6n+1) {
    --tag-dot: var(--green);
  }
  & .tag:nth-child(6n+2) {
    --tag-dot: var(--blue);
  }
  & .tag:nth-child(6n+3) {
    --tag-dot: var(--teal);
  }
  & .tag:nth-child(6n+4) {
    --tag-dot: var(--orange);
  }
  & .tag:nth-child(6n+5) {
    --tag-dot: var(--purple);
  }
  & .tag:nth-child(6n+6) {
    --tag-dot: var(--red);
  }
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 12px 6px 11px;
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease;

  &::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tag-dot, var(--text-3));
  }
  &:hover {
    color: var(--text);
    border-color: var(--text-3);
    box-shadow: var(--shadow);
  }

  &[data-c="green"] {
    --tag-dot: var(--green);
  }
  &[data-c="teal"] {
    --tag-dot: var(--teal);
  }
  &[data-c="blue"] {
    --tag-dot: var(--blue);
  }
  &[data-c="orange"] {
    --tag-dot: var(--orange);
  }
  &[data-c="purple"] {
    --tag-dot: var(--purple);
  }
  &[data-c="red"] {
    --tag-dot: var(--red);
  }
}

/* Article chart figures: light/dark SVG pairs swapped by filename suffix. */
.article figure {
  margin: 28px 0;
}
.article figure img {
  width: 100%;
  height: auto;
}
.article figcaption {
  font-size: .85rem;
  color: var(--text-3);
  margin-top: 8px;
  text-align: center;
}
img[src^="/assets/articles/"][src$="-dark.svg"] {
  display: none;
}
:root[data-theme="dark"] img[src^="/assets/articles/"][src$="-dark.svg"] {
  display: block;
}
:root[data-theme="dark"] img[src^="/assets/articles/"][src$="-light.svg"] {
  display: none;
}

.card-link {
  font-size: .9rem;
  font-weight: 600;
  margin-top: 16px;
  &::after {
    content: " →";
  }
}

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


/* ui-about/_ui-about.css */
/* ui-about — bio + skill columns. */

.about-grid {
  @media (min-width: 901px) {
    grid-template-columns: .85fr 1.65fr;
  }
}

.skill-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  @media (min-width: 641px) {
    grid-template-columns: repeat(2, 1fr);
  }
  @media (min-width: 901px) {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}
.skill-col {
  & h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    & .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }
  }
  & ul {
    list-style: none;
  }
  & li {
    color: var(--text-2);
    font-size: .93rem;
    padding: 5px 0 5px 18px;
    position: relative;
    &::before {
      content: "•";
      position: absolute;
      left: 2px;
      color: var(--text-3);
    }
  }
}


/* ui-contact/_ui-contact.css */
/* ui-contact — contact channels + message form. */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  @media (min-width: 901px) {
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
  }
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.channel {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .15s;
  &:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
  }

  & .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
  }
  & .label {
    font-size: .78rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .07em;
  }
  & .value {
    color: var(--text);
    font-weight: 600;
  }
}
.channel-cta {
  background: var(--teal);
  border-color: transparent;
  & .label {
    color: rgba(255,255,255,.85);
  }
  & .value {
    color: #fff;
    font-weight: 700;
  }
}

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  @media (min-width: 641px) {
    padding: 32px;
  }
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  @media (min-width: 641px) {
    grid-template-columns: 1fr 1fr;
  }
}
.field {
  margin-bottom: 18px;
  & label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 7px;
  }
  & input,
  & textarea,
  & select {
    width: 100%;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    &:focus {
      outline: none;
      border-color: var(--teal);
      background: var(--surface);
      box-shadow: 0 0 0 3px rgba(0,169,157,.13);
    }
  }
  & textarea {
    resize: vertical;
    min-height: 130px;
  }
}


/* ui-hero/_ui-hero.css */
/* ui-hero — landing hero + profile card. */

.hero {
  padding: 48px 0 36px;
  background: var(--bg);
  @media (min-width: 641px) {
    padding: 72px 0 56px;
  }
  @media (min-width: 901px) {
    padding: 90px 0 70px;
  }

  & h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.12;
    margin: 14px 0 18px;
    letter-spacing: -.025em;
    & .interest-iot {
      color: var(--interest-iot);
    }
    & .interest-telemetry {
      color: var(--interest-telemetry);
    }
    & .interest-web {
      color: var(--interest-web);
    }
    & .interest-ai {
      color: var(--interest-ai);
    }
    & .hero-secondary {
      color: var(--text);
    }
  }
  & .lede {
    color: var(--text-2);
    font-size: 1.08rem;
    max-width: 54ch;
    @media (min-width: 641px) {
      font-size: 1.13rem;
    }
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  @media (min-width: 901px) {
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
  }
}

.kicker {
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  @media (min-width: 641px) {
    margin-top: 30px;
    gap: 14px;
  }
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  text-align: center;
  @media (min-width: 641px) {
    padding: 32px;
  }

  & img.mark {
    width: 96px;
    height: 96px;
    margin-bottom: 14px;
  }
  & h3 {
    font-size: 1.25rem;
    letter-spacing: -.01em;
  }
  & .role {
    color: var(--text-3);
    font-size: .92rem;
    margin-bottom: 18px;
  }
}
.profile-facts {
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 10px;
  & .fact {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: .92rem;
    & .k {
      color: var(--text-3);
    }
    & .v {
      color: var(--text);
      font-weight: 600;
      text-align: right;
    }
    & .v.ok {
      color: var(--green);
    }
  }
}


/* ui-logo-marquee/_ui-logo-marquee.css */
/* ui-logo-marquee — auto-scrolling "companies I've worked with" strip. */

.logos {
  padding: 18px 0 36px;
}
.logos-eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 22px;
}

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);

  &:hover .marquee-track,
  &:focus-within .marquee-track {
    animation-play-state: paused;
  }
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 38px;
  padding: 6px 24px;
  animation: marquee-scroll 28s linear infinite;
  @media (min-width: 641px) {
    gap: 56px;
    padding: 6px 28px;
    animation-duration: 38s;
  }
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.logo {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: var(--text-3);
  white-space: nowrap;
  opacity: .8;
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease, transform .2s ease;
  user-select: none;
  @media (min-width: 641px) {
    font-size: 1.35rem;
  }

  &:hover,
  &:focus {
    text-decoration: none;
    color: var(--text-3);
  }
  &:hover {
    opacity: 1;
    transform: translateY(-1px);
  }
  &:focus-visible {
    opacity: 1;
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
  }

  &[data-c="green"]:hover {
    color: var(--green);
  }
  &[data-c="teal"]:hover {
    color: var(--teal);
  }
  &[data-c="blue"]:hover {
    color: var(--blue);
  }
  &[data-c="orange"]:hover {
    color: var(--orange);
  }
  &[data-c="red"]:hover {
    color: var(--red);
  }
  &[data-c="purple"]:hover {
    color: var(--purple);
  }

  & img {
    height: 30px;
    width: auto;
    display: block;
  }
}

/* Image logos — uniform optical height (viewBoxes pre-trimmed to ink bounds). */
.logo-img {
  display: inline-flex;
  align-items: center;
  & img {
    height: var(--logo-h, 24px);
    width: auto;
    display: block;
  }
  & .logo-dark {
    display: none;
  }
}
.logo-img[data-logo="sitestory"] {
  --logo-h: 28px;
}
.logo-img[data-logo="react-iot"] {
  --logo-h: 28px;
}
.logo-img[data-logo="bright-connect"] {
  --logo-h: 34px;
}
.logo-img[data-logo="levirge"] {
  --logo-h: 38px;
}
.logo-img[data-logo="esp32-workbench"] {
  --logo-h: 28px;
}
.logo-img[data-logo="wordpress-mcp"] {
  --logo-h: 28px;
}
:root[data-theme="dark"] .logo-img {
  & .logo-light {
    display: none;
  }
  & .logo-dark {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}


/* ui-page-hero/_ui-page-hero.css */
/* ui-page-hero — subpage heading (/blog, /projects, /contact). */

.page-hero {
  padding: 44px 0 8px;
  @media (min-width: 641px) {
    padding: 64px 0 10px;
  }

  & h1 {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    letter-spacing: -.025em;
    & .slash {
      color: var(--teal);
    }
  }
  & p {
    color: var(--text-2);
    margin-top: 10px;
    max-width: 64ch;
    font-size: 1.05rem;
  }
}

/* gfm/markdown body styling for articles + generic pages. */
.markdown-body {
  &.article {
    max-width: var(--maxw-article);
    margin: 0 auto;
    padding: 48px var(--pad-x);
    @media (min-width: 641px) {
      padding: 70px 24px;
    }
  }
  & .meta-line {
    font-size: .85rem;
    color: var(--text-3);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
  }
  & h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.18;
    letter-spacing: -.025em;
    margin-bottom: 16px;
  }
  & h2 {
    font-size: 1.45rem;
    margin: 44px 0 14px;
    letter-spacing: -.015em;
    padding-left: 16px;
    border-left: 4px solid var(--teal);
  }
  & h3 {
    font-size: 1.15rem;
    margin: 32px 0 10px;
  }
  /* gfm injects anchor-link icons into headings — hide them. */
  & .anchor {
    display: none;
  }
  & p {
    color: var(--text-2);
    margin-bottom: 18px;
    & strong {
      color: var(--text);
    }
  }
  & ul,
  & ol {
    color: var(--text-2);
    margin: 0 0 18px 24px;
  }
  & li {
    margin-bottom: 8px;
  }
  & a {
    color: var(--blue);
    &:hover {
      color: var(--teal);
    }
  }
  & code {
    font-family: var(--font-mono);
    font-size: .85em;
    background: var(--surface-2);
    padding: 2px 7px;
    border-radius: 6px;
    color: #b3491f;
  }
  & pre {
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 22px;
    & code {
      background: none;
      padding: 0;
      color: var(--text);
      font-size: .84rem;
      line-height: 1.7;
    }
  }
  & blockquote {
    border-left: 4px solid var(--blue);
    padding: 4px 0 4px 20px;
    margin-bottom: 18px;
    color: var(--text-2);
    font-style: italic;
  }
  & hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 40px 0;
  }
  & img {
    border-radius: var(--radius);
  }
  & th,
  & td {
    padding: 10px 16px;
    text-align: left;
  }

  /* First-paragraph standfirst for articles (the lede after the h1). */
  &.article > p:first-of-type {
    color: var(--text-2);
    font-size: 1.16rem;
    margin-bottom: 30px;
  }

  & .article-footer {
    margin-top: 50px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 600;
  }
}


/* ui-post-list/_ui-post-list.css */
/* ui-post-list — article rows (used on home "From the blog" + /blog). */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  @media (min-width: 641px) {
    gap: 18px;
  }
}
.post-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: baseline;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .15s;
  @media (min-width: 641px) {
    padding: 24px 28px;
  }
  @media (min-width: 901px) {
    grid-template-columns: 1fr auto;
    gap: 24px;
  }
  &[data-thumb] {
    @media (min-width: 901px) {
      grid-template-columns: 148px 1fr auto;
    }
  }

  &:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
  }

  /* Thumbnail bleeds to the card edge (negative margins cancel the padding). */
  & .thumb-link {
    margin: -20px -22px 8px;
    @media (min-width: 641px) {
      margin: -24px -28px 8px;
    }
    @media (min-width: 901px) {
      margin: -24px 0 -24px -28px;
      align-self: stretch;
    }
  }
  & .thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    @media (min-width: 901px) {
      width: 148px;
      height: 100%;
      min-height: 110px;
      border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
    }
  }

  & .date {
    font-size: .82rem;
    color: var(--text-3);
    display: block;
    margin-top: 8px;
  }
  & h3 {
    font-size: 1.1rem;
    letter-spacing: -.01em;
    & a {
      color: var(--text);
      &:hover {
        color: var(--blue);
      }
    }
  }
  & p {
    color: var(--text-2);
    font-size: .92rem;
    margin-top: 5px;
  }
  & .tag {
    white-space: nowrap;
    justify-self: start;
    @media (min-width: 901px) {
      justify-self: auto;
    }
  }
}


/* ui-site-footer/_ui-site-footer.css */
/* ui-site-footer — footer ribbon, brand, links. */

footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  @media (min-width: 641px) {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 20px;
    padding: 40px 24px;
    flex-wrap: wrap;
  }
  & .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
    color: var(--text-2);
    font-weight: 500;
    & img {
      height: 28px;
    }
  }
}
.footer-links {
  display: flex;
  gap: 16px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  @media (min-width: 641px) {
    gap: 20px;
  }
  & a {
    font-size: .88rem;
    color: var(--text-3);
    font-weight: 500;
    &:hover {
      color: var(--teal);
    }
  }
}
.footer-note {
  font-size: .8rem;
  color: var(--text-3);
}


/* ui-site-header/_ui-site-header.css */
/* ui-site-header — masthead: brand lockup, nav, theme toggle, mobile menu. */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-separator {
  height: 3px;
  background: var(--accent);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--pad-x);
  @media (min-width: 641px) {
    padding: 14px var(--pad-x);
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);

  & .brand-logo {
    display: grid;
    flex: 0 0 auto;
  }
  & .brand-logo img {
    grid-area: 1 / 1;
    height: 38px;
    width: 38px;
  }
  & .brand-logo-dark {
    display: none;
  }
  & .brand-divider {
    width: 1px;
    align-self: stretch;
    min-height: 32px;
    background: var(--line);
    flex: 0 0 auto;
  }
  & .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }
  & .brand-name {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -.02em;
    color: var(--text);
  }
  & .brand-sub {
    font-size: .58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text-3);
    margin-top: 2px;
  }

  @media (min-width: 641px) {
    gap: 14px;
    & .brand-logo img {
      height: 42px;
      width: 42px;
    }
    & .brand-divider {
      min-height: 34px;
    }
    & .brand-name {
      font-size: 1.18rem;
    }
    & .brand-sub {
      font-size: .62rem;
      letter-spacing: .22em;
    }
  }
}

:root[data-theme="dark"] .nav-brand {
  & .brand-logo-light {
    display: none;
  }
  & .brand-logo-dark {
    display: block;
  }
}

.nav-links {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);

  &.open {
    display: flex;
  }

  & a {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 9px 14px;
    border-radius: 8px;
    &:hover {
      color: var(--text);
      background: var(--surface-2);
    }
    &.active {
      color: var(--accent);
      background: rgba(41,121,255,.08);
    }
  }
  & a.btn-contact {
    color: #fff;
    background: var(--accent);
    font-weight: 600;
    margin-left: 0;
    text-align: center;
    &:hover {
      background: var(--blue);
      color: #fff;
    }
  }

  @media (min-width: 641px) {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin-left: auto;
    background: none;
    border-bottom: 0;
    box-shadow: none;
    & a {
      padding: 7px 14px;
    }
    & a.btn-contact {
      margin-left: 8px;
    }
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  @media (min-width: 641px) {
    margin-left: 8px;
  }
}

.nav-toggle {
  display: block;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  @media (min-width: 641px) {
    display: none;
  }
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .15s ease;
  &:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
  }
  &:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}


/* ui-timeline/_ui-timeline.css */
/* ui-timeline — past roles & companies. */

.timeline {
  position: relative;
  padding-left: 30px;
  &::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background: var(--interest-web);
  }
}
.tl-item {
  position: relative;
  padding-bottom: 34px;
  &:last-child {
    padding-bottom: 0;
  }
  &::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--teal);
    box-shadow: var(--shadow);
  }
  & .when {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: .04em;
  }
  & h3 {
    font-size: 1.1rem;
    margin: 4px 0 6px;
    letter-spacing: -.01em;
    & span {
      color: var(--text-3);
      font-weight: 400;
    }
  }
  & p {
    color: var(--text-2);
    font-size: .94rem;
    max-width: 70ch;
  }
}
