/* https://piccalil.li/blog/a-modern-css-reset */
*,::after,::before{box-sizing:border-box}blockquote,body,dd,dl,figure,h1,h2,h3,h4,p{margin:0}ol[role=list],ul[role=list]{list-style:none}html:focus-within{scroll-behavior:smooth}body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5}a:not([class]){text-decoration-skip-ink:auto}img,picture{max-width:100%;display:block}button,input,select,textarea{font:inherit}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,::after,::before{animation-duration:0s!important;animation-iteration-count:1!important;transition-duration:0s!important;scroll-behavior:auto!important}}

@font-face {
  font-family: 'Geist Sans';
  src: url('../fonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Geist Sans';
  src: url('../fonts/Geist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Geist Sans';
  src: url('../fonts/Geist-Italic.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: italic;
}

@font-face {
  font-family: 'Geist Sans';
  src: url('../fonts/Geist-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  font-style: italic;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/GeistMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}

:root {
  /* 
    Default Color Schemes (Default is dark mode)
    Primary = Background, Secondary = Text color.

    Other options (From Flexoki):
    Default Light Mode: #F2F0E5 / #1C1B1A;
    Dark Mode Magenta: #24131D / #FEE4E5
    Light Mode Magenta: #F6E6E2 / #24131D
    Cyan Light Mode: #DDF1E4 / #101F1D
    Cyan Dark Mode: #101F1D / #DDF1E4
  */
  --primary-color: #1C1B1A;
  --secondary-color: #F2F0E5;

  /*
    Fonts
    --font-primary:   headings, site title, home page, blog index, breadcrumbs, post meta, pagination.
    --font-secondary: body copy — paragraphs, lists, blockquotes on posts and pages.
    --font-mono:      code blocks and inline code only. Kept separate so changing
                      the primary font (e.g. to a serif) never touches code.
  */
  --font-primary: 'Geist Mono', ui-monospace, 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  --font-secondary: 'Geist Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;

  /* e.g. --font-primary: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; */
  
  --font-weight: 400;
  --flow-space: 1rem; 

  --font-size: clamp(14px, 2vw, 18px);
  --max-site-width: 768px;
}

/* General setup */
@view-transition {
  navigation: auto;
}
::view-transition-group(*) {
  animation-duration: 0.3s;
}

::selection {
  background: var(--secondary-color);
  color: var(--primary-color);
  text-shadow: none;
}

body {
  font-family: var(--font-secondary);
  font-weight: var(--font-weight);
  font-size: var(--font-size);
  max-width: var(--max-site-width);
  margin: 3rem auto;
  padding-inline: 1rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color .15s ease, text-decoration-thickness .15s ease;
}

a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

p {
  line-height: 1.4;
}

.blog:not(.continuous) ul, .home ul {
  list-style: none;
  padding-left: 0
}

.flow ul, .flow ol,
li > ul, li > ol {
  padding-left: 1.25em;
}

ul > li + li, 
ul > li > ul,
ol > li + li, 
ol > li > ol {
  padding-top: .3rem;
}

img {
  width: 100%;
}

/* Horizontal rules use the same · · · motif as the continuous post separator. */
hr {
  border: 0;
  color: inherit;
  text-align: center;
  line-height: 1;
}
hr::before {
  content: '· · ·';
  letter-spacing: .5em;
}
.flow > hr {
  margin-block: 3rem; /* the next element's 1em flow margin collapses into this */
}

figcaption {
  margin-top: 0.5rem;
}

.home > * + *:not(p) {
  margin-block-start: 4rem;
}

.home h1, .home h2, .home h3, .home h4 {
  font-size: inherit;
  margin: 0;
  padding: 0;
}

/* Hierarchy by opacity only — one size, one weight, one tracking. */
.home h1 {
  font-weight: 400;
}

.home h2,
.home .flex-justify p {
  font-weight: 400;
  opacity: .5;
}

.home a h3 {
  font-weight: inherit;
  margin-top: .75rem;
}

/* Prose is sans; labels and lists stay in the primary font. */
.home > p, .home .flow {
  font-family: var(--font-secondary);
}

/* Name left, tagline right; wraps onto two lines when narrow. */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}
.masthead p {
  opacity: .5;
}

.home .flex-justify {
  padding-block: .6rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

/* Project list: underline only on hover. */
.home .flex-justify a {
  text-decoration-color: transparent;
}
.home .flex-justify a:hover {
  text-decoration-color: currentColor;
}

/* Blog index: years are muted labels, titles are sans. */
.blog:not(.continuous) h2 {
  font-size: inherit;
  font-weight: 400;
  opacity: .5;
  padding-top: 2.5rem;
}
.blog:not(.continuous) li + li {
  padding-top: .5rem;
}
.blog:not(.continuous) li a {
  font-family: var(--font-secondary);
}



h1 { font-size: 200%; line-height: 1.15; font-weight: 700; text-wrap: balance; }
h2 { font-size: 140%; line-height: 1.15 }
h3 { font-size: 120%; }
h4, h5, h6 { font-size: 100%; }

h2, h3, h4, h5, h6 { 
  padding-top: 4rem;
}

h1, h2, h3, h4, h5, h6,
.home, .blog:not(.continuous),
.breadcrumbs, .post-date, .meta-info, .rss, .pagination {
  font-family: var(--font-primary);
}

/* Only two weights ship (400 + 700). */
h1, h2, h3, h4, h5, h6, strong, b {
  font-weight: 700;
}

.post h1, .defaultPage h1 {
  margin-bottom: 2rem;
}

/* Breadcrumbs left, date right, on one line; a long title truncates. */
.topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem; /* same gap as h1 → content */
}
.topline .breadcrumbs {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0;
}
.post-date {
  flex-shrink: 0;
  font-size: 75%;
  opacity: .5;
}

.post img, .defaultPage img {
  margin-bottom: .5rem;
}

.continuous .post + .post {
      margin-top: 6rem;
      padding-top: 4rem;
      position: relative;
}

.continuous .post + .post::before {
    content: '· · ·';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--secondary-color);
    letter-spacing: 0.5em;
    line-height: 1;
}

.continuous article:first-of-type {
    margin-top: 4rem
}

.continuous article .flow>h2:first-of-type {
    padding-top:0;
    font-size: 200%;
}

.continuous article .flow>h2 {
    font-size: 150%;
}

.continuous article .flow>h3 {
    font-size: 125%;
}

.continuous article h2 {
    font-size: var(--font-size);
}

.continuous .meta-info {
    margin-bottom: -.5rem;
    font-size: 75%;
}
.continuous .meta-info  svg {
    width: 16px;
    height: 16px;
}



.flow > * + * {
  margin-block-start: var(--flow-space, 1em);
}

/* Subheadings hug the text that follows them. */
.flow > :is(h2, h3, h4, h5, h6) + * {
  margin-block-start: .5em;
}
.flow > :is(h2, h3, h4, h5) + :is(h3, h4, h5, h6) {
  padding-top: 0; /* a heading directly under a heading */
}

/* Images need more breathing room than text. */
.flow > figure {
  margin-block: 2.5rem;
}
.flow > figure + * {
  margin-block-start: 0; /* the figure's bottom margin is the gap */
}
.flow > figure + :is(h2, h3, h4, h5, h6) {
  padding-top: 1.5rem; /* 2.5rem + 1.5rem = the usual 4rem above headings */
}



pre, code {
  font-family: var(--font-mono);
}

/* Code blocks: plain, no syntax highlighting. */
pre {
  background: var(--secondary-color);
  color: var(--primary-color);
  margin: 0;               /* .flow handles vertical rhythm */
  padding: 1rem;
  font-size: 85%;
  line-height: 1.5;
  text-align: left;
  overflow-x: auto;
  tab-size: 4;
  white-space: pre;
  word-break: normal;
  hyphens: none;
}

pre code {
  display: block;
  padding: 0;
  font-size: inherit;
  background: transparent;
  color: inherit;
}

/* Inverted blocks need an inverted selection colour, or selecting is invisible. */
pre ::selection, pre::selection {
  background: var(--primary-color);
  color: var(--secondary-color);
}

/* Inline code stays inline so it can wrap with the sentence. */
code {
  padding: .1em .4em;
  font-size: 85%;
  background: var(--secondary-color);
  color: var(--primary-color);
}



body a:focus-visible {
    outline: 2px dotted currentColor;
    outline-offset: 4px;
}



/* Blockquote: typographic, not boxed. Set in the primary font so it reads as a
   different voice, with a hanging quotation mark and a muted attribution line. */
blockquote {
  position: relative;
  padding-left: 2.5rem;
  font-family: var(--font-primary);
}
blockquote::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -.15em;
  font-size: 250%;
  line-height: 1;
  opacity: .5;
}
blockquote > * + * {
  margin-block-start: .75em;
}
blockquote > p + p:last-child {
  opacity: .5; /* attribution — the last of several paragraphs */
}
.flow > blockquote {
  margin-block: 2.5rem;
}
.flow > blockquote + * {
  margin-block-start: 0; /* the blockquote's bottom margin is the gap */
}


.breadcrumbs {
  font-size: 75%;
  opacity: .5;
  margin-bottom: .5rem;
}

.breadcrumbs a.current {
  text-decoration: none;
}

.meta-info {
  margin-top: 3rem;
}

.meta-info > * + * {
  display: block;
  margin-block-start: .5rem;
}

.meta-info >* {
    display: flex;
    align-items: center;
    gap: .5rem
}

.meta-info svg {
    width: 24px;
    height: 24px;
    margin-top:-2px
}

.flex-justify {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-justified > * { margin:0 }

.rss {
  font-size: 75%;
}

.highlightedProjects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 480px) {
  .highlightedProjects {
    grid-template-columns: 1fr;
  }
}

.highlightedProject img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.highlightedProject h3 {
  padding: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 6rem;
}

