/* Nerede? docs theme: DevFest İstanbul 2026 inspired (poster grey, navy ink, sky-blue braces, outlined pills). */
@font-face {
  font-family: "Outfit";
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/Outfit-latin-ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit";
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/Outfit-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --nd-ink: #14213d;
  --nd-sky: #63c5f2;
  --nd-royal: #5179c1;
  --nd-sea: #2b7bd6;
  --nd-gold: #f2c14e;
  --nd-red: #e30a17;
  --md-text-font: "Outfit";
}
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #14213d;
  --md-primary-fg-color--light: #2a3a5e;
  --md-primary-fg-color--dark: #0b142a;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #2b7bd6;
  --md-accent-fg-color--transparent: #2b7bd61a;
  --md-default-bg-color: #f7f7f4;
  --md-typeset-a-color: #2257b5;
  --md-code-bg-color: #ecedf1;
  --nd-surface: #ffffff;
  --nd-line: #14213d;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0c2552;
  --md-primary-fg-color--light: #1a3a72;
  --md-primary-fg-color--dark: #061a3d;
  --md-primary-bg-color: #eef3ff;
  --md-accent-fg-color: #63c5f2;
  --md-accent-fg-color--transparent: #63c5f21a;
  --md-default-bg-color: #061a3d;
  --md-default-fg-color: #eef3ffde;
  --md-default-fg-color--light: #eef3ff99;
  --md-typeset-a-color: #8fc9ff;
  --md-code-bg-color: #0c2552;
  --md-footer-bg-color: #02102a;
  --nd-surface: #0c2552;
  --nd-line: #8fb4ff;
}
body,
input {
  font-family: "Outfit", system-ui, sans-serif;
}
.md-typeset {
  font-size: 0.82rem;
}
.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
}
.md-typeset h2 {
  font-weight: 650;
}
.md-header {
  box-shadow: inset 0 -4px 0 var(--nd-sky);
}

/* hero on the home pages */
.nd-hero {
  text-align: center;
  margin: -0.4rem 0 1.6rem;
}
.nd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
}
.nd-brace {
  font-size: 5.2rem;
  font-weight: 800;
  line-height: 0.8;
  color: var(--nd-sky);
  -webkit-text-stroke: 2.5px var(--nd-line);
  paint-order: stroke fill;
}
.nd-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.md-typeset .nd-mid h1 {
  margin: 0;
  font-size: 3.6rem;
  line-height: 1;
}
.nd-mid h1 span {
  color: var(--nd-red);
  display: inline-block;
}
.nd-pill {
  border: 2.5px solid var(--nd-line);
  border-radius: 99px;
  padding: 0 1.4rem;
  font-size: 1.2rem;
  background: var(--nd-surface);
}
.nd-time {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0 0.2rem;
}
.nd-time i {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--nd-royal);
  border: 2px solid var(--nd-line);
  margin-left: -0.35rem;
  display: inline-block;
}
.nd-time b {
  width: 5rem;
  height: 2px;
  background: var(--nd-line);
  position: relative;
  transform-origin: left;
}
.nd-time b::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -0.3rem;
  width: 0.6rem;
  height: 0.6rem;
  border-top: 2px solid var(--nd-line);
  border-right: 2px solid var(--nd-line);
  transform: rotate(45deg);
}
.nd-time em {
  font-style: normal;
  border: 2px solid var(--nd-line);
  border-radius: 99px;
  padding: 0 0.8rem;
  background: var(--nd-sky);
  color: var(--nd-ink);
}
/* 480x110 scene; the docs column is narrow, so show the middle 400 columns (the core picture plus a bit of each side) */
.nd-skyline {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 110;
  object-fit: cover;
  image-rendering: pixelated;
  margin-top: 0.8rem;
}
.nd-hero .md-button {
  margin: 0.25rem 0.15rem;
}

/* home page: centered like the hero. Code stays left-aligned inside its centered box. */
.md-typeset:has(> .nd-hero) > :is(h2, p) {
  text-align: center;
}
.md-typeset:has(> .nd-hero) .grid.cards > ul > li {
  text-align: center;
}
.md-typeset:has(> .nd-hero) .md-typeset__scrollwrap {
  text-align: center;
}
.md-typeset:has(> .nd-hero) .md-typeset__table table {
  text-align: left;
}
.md-typeset:has(> .nd-hero) > .highlight {
  max-width: 46rem;
  margin-inline: auto;
}
.md-typeset:has(> .nd-hero) > .admonition {
  max-width: 46rem;
  margin-inline: auto;
}
/* four cards: one row on wide screens, two by two on medium, instead of three plus one alone */
@media (min-width: 60em) {
  .md-typeset:has(> .nd-hero) .grid.cards {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 30em) and (max-width: 59.99em) {
  .md-typeset:has(> .nd-hero) .grid.cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mermaid sizes its boxes with its own default font, so the labels must be drawn in that same font,
   or the wider Outfit letters spill out of the boxes. */
:root > * {
  --md-mermaid-font-family: "trebuchet ms", verdana, arial, sans-serif;
}
.md-typeset .mermaid {
  text-align: center;
}

/* outlined cards, like the poster pills */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 2px solid var(--nd-line);
  border-radius: 1rem;
  box-shadow: 0 3px 0 var(--nd-line);
  background: var(--nd-surface);
}
.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--nd-sky);
  box-shadow: 0 3px 0 var(--nd-sky);
}
/* the "→ Workshop" link at the bottom of a card: a small outlined pill, not an underlined line */
.md-typeset .grid.cards > ul > li {
  display: flex;
  flex-direction: column;
}
.md-typeset .grid.cards > ul > li > p:last-child:has(> a > .twemoji) {
  margin-top: auto;
  padding-top: 0.4rem;
}
.md-typeset .grid.cards a:has(> .twemoji) {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2em 0.9em;
  border: 2px solid var(--nd-line);
  border-radius: 99px;
  color: var(--md-default-fg-color);
  font-weight: 600;
  text-decoration: none;
  background: var(--nd-surface);
}
.md-typeset .grid.cards a:has(> .twemoji):is(:hover, :focus-visible) {
  background: var(--nd-sky);
  color: var(--nd-ink);
  border-color: var(--nd-line);
}

/* links in text: a thin, soft underline that fills in on hover */
.md-typeset a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.md-typeset a:is(:hover, :focus-visible) {
  text-decoration-color: currentColor;
}
.md-typeset .md-button,
.md-typeset .headerlink,
.md-typeset .md-typeset__table th a {
  text-decoration: none;
}
.md-typeset table:not([class]) {
  border: 2px solid var(--nd-line);
  border-radius: 0.8rem;
}
.md-typeset .md-button {
  border-radius: 99px;
  border: 2px solid var(--nd-line);
  font-weight: 600;
  color: var(--md-default-fg-color);
  background: var(--nd-surface);
  box-shadow: 0 3px 0 var(--nd-line);
}
.md-typeset .md-button:is(:hover, :focus) {
  color: var(--md-default-fg-color);
  opacity: 1;
  background: var(--nd-surface);
}
.md-typeset .md-button--primary,
.md-typeset .md-button--primary:is(:hover, :focus) {
  background: var(--nd-sky);
  color: var(--nd-ink);
}
.md-typeset .md-button:focus-visible {
  outline: 3px solid var(--md-accent-fg-color);
  outline-offset: 3px;
}
.md-typeset kbd {
  font-family: "JetBrains Mono", monospace;
}
@media (max-width: 600px) {
  .nd-hero {
    margin-top: -0.8rem;
  }
  .nd-brand {
    gap: 0.35rem;
  }
  .nd-brace {
    font-size: 3.4rem;
    -webkit-text-stroke-width: 2px;
  }
  .md-typeset .nd-mid h1 {
    font-size: 2.4rem;
  }
  .nd-pill {
    font-size: 1rem;
    padding: 0 1rem;
    border-width: 2px;
  }
  .nd-time i {
    width: 0.95rem;
    height: 0.95rem;
  }
  .nd-time b {
    width: 3.6rem;
  }
  .nd-hero .md-button {
    padding: 0.55em 1.4em;
  }
  /* the skyline runs edge to edge on phones, like the app */
  .md-typeset .nd-skyline {
    width: calc(100% + 1.6rem);
    max-width: none;
    margin-left: -0.8rem;
    aspect-ratio: 320 / 110;
  }
}

/* motion: subtle, once on load, and never with prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  .md-typeset .md-button {
    transition:
      transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      box-shadow 0.2s,
      background-color 0.2s;
  }
  .md-typeset .grid.cards > ul > li {
    transition:
      transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
      box-shadow 0.2s,
      border-color 0.2s;
  }
  @media (hover: hover) {
    .md-typeset .md-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 0 var(--nd-line);
    }
    .md-typeset .grid.cards > ul > li:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 0 var(--nd-sky);
    }
  }
  .md-typeset .md-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 var(--nd-line);
    transition-duration: 0.05s;
  }
  .nd-mid {
    animation: nd-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .nd-brace:first-child {
    animation: nd-brace-l 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both;
  }
  .nd-brace:last-child {
    animation: nd-brace-r 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both;
  }
  .nd-mid h1 span {
    animation: nd-nod 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s both;
    transform-origin: 50% 90%;
  }
  .nd-time i {
    animation: nd-pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .nd-time i:nth-child(2) {
    animation-delay: 0.07s;
  }
  .nd-time i:nth-child(3) {
    animation-delay: 0.14s;
  }
  .nd-time b {
    animation: nd-draw 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
  }
  .nd-time em {
    animation: nd-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.75s both;
  }
}
@keyframes nd-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes nd-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}
@keyframes nd-draw {
  from {
    transform: scaleX(0);
  }
}
@keyframes nd-brace-l {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
}
@keyframes nd-brace-r {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
}
@keyframes nd-nod {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: rotate(-12deg);
  }
  60% {
    transform: rotate(6deg);
  }
}
