/* foid.space — catppuccin (latte / mocha, pink accent) over Metro UI CSS 3.x.
   Metro 3 predates CSS variables, so theming happens by overriding its
   class rules here. Type: Segoe UI on Windows, self-hosted Selawik elsewhere. */

@font-face {
  font-family: "Selawik";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/selawkl.woff2") format("woff2"),
       url("../fonts/selawkl.woff") format("woff");
}
@font-face {
  font-family: "Selawik";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/selawk.woff2") format("woff2"),
       url("../fonts/selawk.woff") format("woff");
}
@font-face {
  font-family: "Selawik";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/selawksb.woff2") format("woff2"),
       url("../fonts/selawksb.woff") format("woff");
}
@font-face {
  font-family: "Selawik";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/selawkb.woff2") format("woff2"),
       url("../fonts/selawkb.woff") format("woff");
}

/* ---- catppuccin latte (light, default) ---- */
:root {
  --ctp-base: #eff1f5;
  --ctp-mantle: #e6e9ef;
  --ctp-crust: #dce0e8;
  --ctp-surface0: #ccd0da;
  --ctp-surface1: #bcc0cc;
  --ctp-overlay0: #9ca0b0;
  --ctp-overlay1: #8c8fa1;
  --ctp-subtext0: #6c6f85;
  --ctp-text: #4c4f69;
  --ctp-pink: #ea76cb;
  --ctp-mauve: #8839ef;
  --ctp-lavender: #7287fd;
  --ctp-teal: #179299;
  --ctp-peach: #fe640b;
  --ctp-green: #40a02b;
  --ctp-on-accent: #eff1f5;
}

/* ---- catppuccin mocha (dark) ----
   only the neutral tokens swap; accents stay latte in both themes so
   the white tile foregrounds always have contrast */
@media (prefers-color-scheme: dark) {
  :root {
    --ctp-base: #1e1e2e;
    --ctp-mantle: #181825;
    --ctp-crust: #11111b;
    --ctp-surface0: #313244;
    --ctp-surface1: #45475a;
    --ctp-overlay0: #6c7086;
    --ctp-overlay1: #7f849c;
    --ctp-subtext0: #a6adc8;
    --ctp-text: #cdd6f4;
  }
}

/* ---- base ---- */
html {
  background: var(--ctp-base);
}

body,
h1, h2, h3, h4, h5, h6,
input, button, select, textarea {
  font-family: "Segoe UI", "Selawik", "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--ctp-base);
  color: var(--ctp-text);
}

a {
  color: var(--ctp-pink);
}
a:hover {
  color: var(--ctp-pink);
  text-decoration: underline;
}

::selection {
  background: var(--ctp-pink);
  color: var(--ctp-on-accent);
}

:focus-visible {
  outline: 2px solid var(--ctp-pink);
  outline-offset: 2px;
}

.accent {
  color: var(--ctp-pink);
}

/* ---- windows 8 enter-page animation ---- */
/* the WinJS deceleration curve: fast start, long glide to rest */
@keyframes metro-enter {
  from {
    opacity: 0;
    transform: translateX(200px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.site-app-name,
.site-title,
.site-nav,
main > *:not(.tile-grid),
.tile-grid .tile,
.tile-grid .tile-wide,
.tile-grid .tile-large {
  animation: metro-enter 0.7s cubic-bezier(0.1, 0.9, 0.2, 1) backwards;
}
.site-nav { animation-delay: 60ms; }
main > *:not(.tile-grid) { animation-delay: 120ms; }
/* tiles get individual stagger via inline animation-delay from the template */

@media (prefers-reduced-motion: reduce) {
  .site-app-name,
  .site-title,
  .site-nav,
  main > *:not(.tile-grid),
  .tile-grid .tile,
  .tile-grid .tile-wide,
  .tile-grid .tile-large {
    animation: none;
  }
}

/* ---- layout shell ---- */
/* mobile first: windows-phone-style tight edges */
.page-shell {
  padding: 1.5rem 0.625rem 2rem;
}
/* desktop: windows 8 start screen — left-anchored, big left margin,
   header and tile field sharing the same left edge */
@media (min-width: 768px) {
  .page-shell {
    padding: 3.5rem 4rem 3rem 7.5rem;
  }
}

/* ---- zune-style header ---- */
/* windows-phone-style small app name above the big page title on subpages */
.site-app-name {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--ctp-subtext0);
}
.site-app-name a {
  color: inherit;
  text-decoration: none;
}
.site-app-name a:hover {
  color: var(--ctp-pink);
}

.site-title {
  margin: 0 0 1.25rem;
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: lowercase;
}
.site-title a {
  color: var(--ctp-text);
  text-decoration: none;
}
.site-title a:hover {
  text-decoration: none;
}

.site-nav {
  margin-top: 0.5rem;
}
.site-nav a {
  display: inline-block;
  margin-right: 1.5rem;
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 300;
  text-transform: lowercase;
  color: var(--ctp-overlay0);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ctp-pink);
  text-decoration: none;
}
.site-nav a.current {
  color: var(--ctp-text);
}

.tagline {
  margin: 1.5rem 0 0;
  color: var(--ctp-subtext0);
  font-size: 1.0625rem;
  text-transform: lowercase;
}

/* ---- tiles ---- */
.tile-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 1rem -5px 0; /* counter the 5px tile margins */
}
@media (min-width: 768px) {
  .tile-grid {
    margin-top: 2.5rem; /* win8 gap between the Start header and the tile field */
  }
}

/* windows-phone-style tiles on small screens: two columns, edge to edge.
   page-shell pads 10px each side, tile margins add 5px — so a square is
   half of (100vw - shell padding - gutters) */
@media (max-width: 767px) {
  .tile,
  .tile-square,
  .tile-small {
    width: calc(33.333% - 10px);
    height: auto;
    aspect-ratio: 1;
  }
  .tile-wide {
    width: calc(66.666% - 10px);
    height: auto;
    aspect-ratio: 2.05 / 1; /* two squares plus the gutter between them */
  }
  /* smaller tiles, smaller glyphs */
  .tile-content.iconic .icon {
    width: 48px;
    height: 48px;
    font-size: 48px;
    line-height: 48px;
    margin-top: -28px;
    margin-left: -24px;
  }
  .tile-content.iconic .icon.icon-wordmark {
    width: 7rem;
    margin-left: -3.5rem;
  }
  .tile-content.iconic .icon.icon-mark {
    width: 70px;
    height: 70px;
    font-size: 70px;
    line-height: 70px;
    margin-top: -35px;
    margin-left: -35px;
  }
  /* metro's .tile-content uses height: inherit, which breaks under
     aspect-ratio sizing — make it track the tile instead */
  .tile-content {
    height: 100%;
  }
}

.tile,
.tile-small,
.tile-square,
.tile-wide,
.tile-large,
.tile-big,
.tile-super {
  background-color: var(--ctp-surface0);
  color: var(--ctp-text);
  box-shadow: none;
  text-decoration: none;
  transition: transform 0.1s ease;
}
.tile:hover,
.tile-small:hover,
.tile-square:hover,
.tile-wide:hover,
.tile-large:hover,
.tile-big:hover,
.tile-super:hover {
  outline: 3px solid var(--ctp-overlay1);
  text-decoration: none;
}
.tile:active,
.tile-small:active,
.tile-square:active,
.tile-wide:active,
.tile-large:active,
.tile-big:active,
.tile-super:active {
  transform: scale(0.97);
  outline: 0;
}

.tile-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: lowercase;
}
.tile-content.iconic .icon {
  line-height: 64px;
}
/* wordmark-shaped logos get a wider box than square ones */
.tile-content.iconic .icon.icon-wordmark {
  width: 10rem;
  margin-left: -5rem;
}
/* square glyph marks get a taller AND wider box — wordmark's box only
   grows sideways, which leaves a square logo stuck at the default (small)
   size, just centered in extra empty space */
.tile-content.iconic .icon.icon-mark {
  width: 100px;
  height: 100px;
  font-size: 100px;
  line-height: 100px;
  margin-top: -50px;
  margin-left: -50px;
}
.tile-content.iconic .icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.tile-content.iconic .icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tile-desc {
  position: absolute;
  top: 0.5rem;
  left: 0.625rem;
  right: 0.625rem;
  z-index: 999;
  font-size: 0.8125rem;
  text-transform: lowercase;
  opacity: 0.85;
}

/* catppuccin tile colors (used via `color:` in _data/services.yml) */
.bg-ctp-pink {
  background-color: var(--ctp-pink) !important;
  color: var(--ctp-on-accent) !important;
}
.bg-ctp-mauve {
  background-color: var(--ctp-mauve) !important;
  color: var(--ctp-on-accent) !important;
}
.bg-ctp-lavender {
  background-color: var(--ctp-lavender) !important;
  color: var(--ctp-on-accent) !important;
}
.bg-ctp-teal {
  background-color: var(--ctp-teal) !important;
  color: var(--ctp-on-accent) !important;
}
.bg-ctp-surface {
  background-color: var(--ctp-surface0) !important;
  color: var(--ctp-text) !important;
}
.bg-ctp-green {
  background-color: var(--ctp-green) !important;
  color: var(--ctp-on-accent) !important;
}
.bg-ctp-orange {
  background-color: var(--ctp-peach) !important;
  color: var(--ctp-on-accent) !important;
}
/* "black or white": near-black in mocha, near-white in latte */
.bg-ctp-white {
  background-color: var(--ctp-crust) !important;
  color: var(--ctp-text) !important;
}

/* ---- prose pages (about) ---- */
main h2 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 300;
  text-transform: lowercase;
  margin: 2rem 0 0.5rem;
}
main p,
main li {
  max-width: 62ch;
  line-height: 1.6;
}
main code {
  font-family: "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--ctp-mantle);
  padding: 0.1em 0.3em;
}

/* ---- card lists (friends) ---- */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1rem 0 2rem;
}
.card {
  padding: 1.25rem 1.5rem;
  background: var(--ctp-mantle);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.card-title {
  margin: 0;
  font-size: 1.25rem;
  text-transform: lowercase;
}
.card-handle {
  color: var(--ctp-subtext0);
  font-size: 0.9375rem;
  font-weight: 400;
}
.card-desc {
  margin: 0.5rem 0;
  max-width: 62ch;
}
.card-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
}
.card-link {
  text-decoration: none;
  font-weight: 600;
}

/* ---- footer ---- */
.site-footer {
  margin-top: 3.5rem;
}
.site-footer p {
  color: var(--ctp-subtext0);
  font-size: 0.8125rem;
  text-transform: lowercase;
}

/* ---- 404 ---- */
.not-found-code {
  margin: 2rem 0 0;
  font-size: clamp(6rem, 25vw, 12rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ctp-pink);
}
.not-found-text {
  font-size: 1.25rem;
  text-transform: lowercase;
}
