@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist/Geist-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/Geist_Mono/GeistMono-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --brand-purple: #4e1d7f;
  --brand-yellow: #faf540;
  --bg: #f1edf4;
  --panel: #f9f8f7;
  --panel-border: #cfc5d9;
  --text: #2f2a35;
  --soft: #74697f;
}

html,
body {
  min-height: 100%;
}

body {
  max-width: 860px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  font-family: "Geist", Roboto, sans-serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.8rem 3rem 0.8rem 1rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}

.brand {
  margin: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border: 1px solid var(--panel-border);
  background: #fff;
}

.brand-title {
  font-weight: 700;
  color: var(--brand-purple);
}

.site-nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-left: 1rem;
}

.site-nav a {
  color: var(--brand-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 1.15rem;
}

@media (max-width: 700px) {
  body {
    padding: 0.8rem;
  }

  .site-header {
    padding: 0.8rem;
    justify-content: center;
  }

  .brand {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .site-nav {
    width: 100%;
    padding-left: 0;
    justify-content: center;
    gap: 0.45rem;
  }

  .site-nav a {
    font-size: 1rem;
    padding: 0.2rem 0.35rem;
  }
}

main {
  flex: 1;
}

.retro-panel,
article,
main > ul,
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 1.5rem 1rem 1rem;
  margin-top: 1.6rem;
}

.title {
  position: absolute;
  top: -12px;
  left: 14px;
  transform: none;
  margin: 0;
  padding: 0 10px;
  background: var(--panel);
  font-size: 1.2rem;
  color: var(--brand-purple);
  font-weight: 700;
  white-space: normal;
  word-break: break-word;
}

.title::before {
  content: "/* ";
}

.title::after {
  content: " */";
}

article h2,
.retro-panel h2 {
  font-size: 1.35rem;
  color: var(--brand-purple);
  margin: 1.25rem 0 0.5rem;
}

article h3,
.retro-panel h3 {
  font-size: 1.1rem;
  color: var(--brand-purple);
  margin: 1rem 0 0.45rem;
}

a {
  color: var(--brand-purple);
}

blockquote {
  margin: 0.5rem 0;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--brand-purple);
  background: #f1edf6;
}

.highlight {
  background: #272822;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "Geist Mono";
}

.highlight pre {
  margin: 0;
  padding: 0.6rem;
}

article p code,
article li code {
  background: #ede7f4;
  border: 1px solid #d8cee5;
  padding: 0.08rem 0.3rem;
}

footer {
  margin-top: 1.6rem;
  padding: 0.8rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--soft);
  font-size: 0.9rem;
}

.field-group {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.required {
  color: var(--brand-purple);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--panel-border);
  background: #fff;
  border-radius: 8px;
}

button {
  border: 1px solid var(--panel-border);
  background: var(--brand-purple);
  color: #fff;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  border-radius: 5px;
}

button:hover {
  background: #3e1765;
}

.hidden {
  display: none;
}

.img-center {
  display: block;
  margin: 0 auto;
}
