/* ikoonman.io — content-first, warm ivory, minimal chrome. */

:root {
  --bg: #fbf8f1;
  --bg-soft: #f4efe4;
  --ink: #24211c;
  --ink-soft: #6b645a;
  --rule: #e3dbcb;
  --accent: #8a5a2b;
  --content: 900px;
  --wide: 1200px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.7 ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

/* --- Shell ---------------------------------------------------------------- */

.site-header,
.site-footer,
main > * {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 1.5rem;
  width: 100%;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem 0;
}

.site-name {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
}

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

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

main {
  flex: 1;
  padding-block: 0 4rem;
}

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.5rem 3rem;
  color: var(--ink-soft);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
}

/* Inset by the shell padding so the rule lines up with the content above it. */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  border-top: 1px solid var(--rule);
}

.site-footer p {
  margin: 0;
  flex: 1 1 0;
}

.footer-icons {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.footer-icon:hover {
  color: var(--ink);
}

.footer-teamcentric {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1 1 0;
}

.footer-teamcentric img {
  width: 54px;
  height: 28px;
  object-fit: contain;
}

/* --- Contact -------------------------------------------------------------- */

.contact-page h1 {
  margin-bottom: 0.5rem;
}

.contact-form {
  max-width: 36rem;
  margin-top: 2rem;
}

.contact-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.contact-legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
}

.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ink-soft);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact-note {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  margin: 0.4rem 0 1.25rem;
}

.contact-form button {
  margin-block: 1rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  cursor: pointer;
}

.contact-form button:hover:not(:disabled) {
  background: var(--ink);
}

.contact-form :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact-form :disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Homepage ------------------------------------------------------------- */

.home-banner:not(:empty) {
  max-width: var(--content);
  margin-block: 0.5rem 2.5rem;
}

.home-banner .banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
}

.page-banner {
  max-width: var(--content);
  margin-block: 0.5rem 0.75rem;
}

.page-banner-trigger {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.page-banner-trigger[hidden] {
  display: none;
}

.page-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
}

.page-banner img:not([src]) {
  display: none;
}

.page-banner-hint {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.92);
}

.page-banner-trigger:focus-visible {
  outline: 3px solid #5aa9ff;
  outline-offset: 4px;
}

.section-title,
.archive-header h1 {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

.archive-count {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: -1rem;
}

/* --- Post lists ----------------------------------------------------------- */

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

main > .post-list {
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.post-item {
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}

.post-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.post-item-title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
}

.post-item-title a {
  color: var(--ink);
  text-decoration: none;
}

.post-item-title a:hover {
  color: var(--accent);
}

.post-excerpt {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

.post-meta {
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.dot {
  margin-inline: 0.5rem;
}

.draft-badge {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.more {
  margin-top: 2rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

.empty {
  color: var(--ink-soft);
  padding-block: 2rem;
}

/* --- Tags ----------------------------------------------------------------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
}

.tag {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  color: var(--ink-soft);
}

/* --- Post ----------------------------------------------------------------- */

.post {
  max-width: var(--content);
  margin: 0 auto;
}

.post-header {
  padding-block: 1rem 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

/* The Markdown H1 duplicates the frontmatter title, so hide the first one. */
.post-body > h1:first-child {
  display: none;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  line-height: 1.25;
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
}

.post-body h2 {
  font-size: 1.6rem;
}

.post-body h3 {
  font-size: 1.3rem;
}

.post-body p,
.post-body ul,
.post-body ol {
  margin: 0 0 1.4rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
  font-style: italic;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.post-body img {
  display: block;
  border-radius: 8px;
  margin: 2rem auto;
}

.image-lightbox-trigger {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 2rem auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.post-body .image-lightbox-trigger img {
  margin: 0;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 4.5rem 1rem 1rem;
  border: 0;
  background: rgba(0, 0, 0, 0.94);
  color: white;
}

.image-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.image-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: #222;
  color: white;
  font: 32px/1 sans-serif;
  cursor: pointer;
}

.image-lightbox-trigger:focus-visible,
.image-lightbox-close:focus-visible {
  outline: 3px solid #5aa9ff;
  outline-offset: 4px;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.post-body th,
.post-body td {
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.post-body .header-anchor {
  color: inherit;
  text-decoration: none;
}

.post-body .header-anchor:hover {
  color: var(--accent);
}

/* --- Code ----------------------------------------------------------------- */

code,
pre,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

:not(pre) > code {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.875em;
}

pre.code-block {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
}

pre.code-block code {
  background: none;
  border: 0;
  padding: 0;
}

/* --- Mermaid -------------------------------------------------------------- */

pre.mermaid {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-align: center;
  overflow-x: auto;
  /* Hidden until Mermaid replaces the source text with an SVG. */
  color: transparent;
}

pre.mermaid[data-processed] {
  color: inherit;
}

pre.mermaid svg {
  max-width: 100%;
  height: auto;
}

/* --- Post navigation ------------------------------------------------------ */

.post-nav {
  position: relative;
  max-width: var(--content);
  margin: 4rem auto 0;
  padding-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
}

/* Inset by the shell padding so the rule lines up with the post above it. */
.post-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  border-top: 1px solid var(--rule);
}

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

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

.post-nav a span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.post-nav .nav-newer {
  text-align: right;
  grid-column: 2;
}

@media (max-width: 600px) {
  .site-footer {
    justify-content: center;
    text-align: center;
  }

  .site-footer p,
  .footer-teamcentric {
    flex: 0 0 auto;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav .nav-newer {
    grid-column: 1;
    text-align: left;
  }
}

/* --- highlight.js theme --- */
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em
}
code.hljs {
  padding: 3px 5px
}
/*!
  Theme: GitHub
  Description: Light theme as seen on github.com
  Author: github.com
  Maintainer: @Hirse
  Updated: 2021-05-15

  Outdated base version: https://github.com/primer/github-syntax-light
  Current colors taken from GitHub's CSS
*/
.hljs {
  color: #24292e;
  background: #ffffff
}
.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
  /* prettylights-syntax-keyword */
  color: #d73a49
}
.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
  /* prettylights-syntax-entity */
  color: #6f42c1
}
.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-variable,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id {
  /* prettylights-syntax-constant */
  color: #005cc5
}
.hljs-regexp,
.hljs-string,
.hljs-meta .hljs-string {
  /* prettylights-syntax-string */
  color: #032f62
}
.hljs-built_in,
.hljs-symbol {
  /* prettylights-syntax-variable */
  color: #e36209
}
.hljs-comment,
.hljs-code,
.hljs-formula {
  /* prettylights-syntax-comment */
  color: #6a737d
}
.hljs-name,
.hljs-quote,
.hljs-selector-tag,
.hljs-selector-pseudo {
  /* prettylights-syntax-entity-tag */
  color: #22863a
}
.hljs-subst {
  /* prettylights-syntax-storage-modifier-import */
  color: #24292e
}
.hljs-section {
  /* prettylights-syntax-markup-heading */
  color: #005cc5;
  font-weight: bold
}
.hljs-bullet {
  /* prettylights-syntax-markup-list */
  color: #735c0f
}
.hljs-emphasis {
  /* prettylights-syntax-markup-italic */
  color: #24292e;
  font-style: italic
}
.hljs-strong {
  /* prettylights-syntax-markup-bold */
  color: #24292e;
  font-weight: bold
}
.hljs-addition {
  /* prettylights-syntax-markup-inserted */
  color: #22863a;
  background-color: #f0fff4
}
.hljs-deletion {
  /* prettylights-syntax-markup-deleted */
  color: #b31d28;
  background-color: #ffeef0
}
.hljs-char.escape_,
.hljs-link,
.hljs-params,
.hljs-property,
.hljs-punctuation,
.hljs-tag {
  /* purposely ignored */
  
}