/*
 * kivu.dev — minimal black design, D-DIN type, whitespace instead of rules.
 * Inspired by kjall.me — softer, more human.
 */

@font-face {
  font-family: "D-DIN";
  src: url("/fonts/D-DIN.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "D-DIN";
  src: url("/fonts/D-DIN-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --body: #d6d6d6;
  --muted: #8f8f8f;
  --sans: "D-DIN", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
  padding: 30px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
}

.brand img {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.brand span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.site-nav {
  display: flex;
  white-space: nowrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-left: 30px;
  padding: 10px 2px;
  margin-top: -10px;
  margin-bottom: -10px;
  transition: color 0.2s ease;
}

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

/* ---------- Hero ---------- */

.hero {
  padding-top: 110px;
}

.hero .s-label {
  margin-bottom: 30px;
}

.hero h1 {
  font-size: clamp(32px, 5.6vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  max-width: 16em;
}

.hero-sub {
  margin-top: 30px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
}

.hero figure {
  margin-top: 72px;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.hero figcaption {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Sections ---------- */

section {
  padding-top: 110px;
}

.s-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 34px;
}

.prose p {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--body);
}

.prose p + p {
  margin-top: 22px;
}

/* ---------- Plain lists ---------- */

.plain-list {
  list-style: none;
  max-width: 620px;
}

.plain-list li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
}

.plain-list li + li {
  margin-top: 24px;
}

.plain-list strong {
  color: var(--fg);
  font-weight: 700;
}

/* ---------- People ---------- */

.people {
  list-style: none;
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 44px 48px;
}

.person {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.person-photo {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 76px;
}

.person-body {
  min-width: 0;
}

.person-name {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.person-role {
  margin-top: 2px;
  font-size: 14px;
  color: var(--body);
}

.person-good {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--body);
}

.person-uni {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Links ---------- */

.plain-link {
  color: inherit;
  text-decoration: none;
}

.plain-link:hover,
.plain-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #555;
  transition: text-decoration-color 0.2s ease;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration-color: var(--fg);
}

/* ---------- X feed ---------- */

.x-list {
  list-style: none;
}

.x-card {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 6px 40px 6px 0;
  text-decoration: none;
  color: var(--fg);
}

.x-list li + li {
  margin-top: 40px;
}

.x-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 40px;
}

.x-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.x-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.4;
}

.x-name {
  font-weight: 700;
}

.x-card:hover .x-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.x-badge {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.x-sub {
  color: var(--muted);
  font-size: 13px;
}

.x-sub time {
  font: inherit;
  color: inherit;
}

.x-text {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
  max-width: 620px;
}

.x-stats {
  display: flex;
  gap: 26px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.x-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.x-stat svg {
  width: 15px;
  height: 15px;
  fill: var(--muted);
}

.x-arrow {
  position: absolute;
  top: 10px;
  right: 2px;
  font-size: 17px;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.x-card:hover .x-arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}

.x-more {
  margin-top: 40px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq-item {
  border-top: 1px solid #262626;
}

.faq-item:last-child {
  border-bottom: 1px solid #262626;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: #cfcfcf;
}

.faq-icon {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.25s ease, background 0.15s ease;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon::after {
  transform: rotate(0deg);
}

.faq-item summary:hover .faq-icon::before,
.faq-item summary:hover .faq-icon::after {
  background: var(--fg);
}

.faq-answer {
  padding: 0 0 26px 2px;
}

.faq-item[open] .faq-answer {
  animation: faq-in 0.25s ease;
}

@keyframes faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.faq-answer p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--body);
  max-width: 620px;
}

.faq-ask-form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  max-width: 620px;
}

.faq-ask-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #444;
  padding: 8px 2px;
  font-family: inherit;
  font-size: 15px;
  color: var(--fg);
  transition: border-color 0.2s ease;
}

.faq-ask-form input::placeholder {
  color: #666;
}

.faq-ask-form input:focus {
  outline: none;
  border-bottom-color: var(--fg);
}

.faq-ask-form button {
  background: transparent;
  border: 1px solid #444;
  color: var(--fg);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.faq-ask-form button:hover {
  border-color: var(--fg);
}

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

.contact-form {
  max-width: 620px;
}

.cf-field {
  margin-bottom: 26px;
}

.cf-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.cf-field input,
.cf-field textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #444;
  padding: 8px 2px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  transition: border-color 0.2s ease;
  resize: vertical;
}

.cf-field input:focus,
.cf-field textarea:focus {
  outline: none;
  border-bottom-color: var(--fg);
}

.cf-privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--body);
  cursor: pointer;
}

.cf-privacy input {
  margin-top: 4px;
  width: 15px;
  height: 15px;
  accent-color: var(--fg);
  cursor: pointer;
  flex: 0 0 15px;
}

.cf-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.cf-send {
  background: transparent;
  border: 1px solid #444;
  color: var(--fg);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 30px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.cf-send:hover {
  border-color: var(--fg);
}

.cf-status {
  font-size: 13px;
  color: var(--muted);
}

.contact-alt {
  margin-top: 26px;
  font-size: 14px;
  color: var(--body);
}

.contact-lines {
  margin-top: 34px;
  max-width: 620px;
}

.contact-lines p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--body);
}

.contact-lines p + p {
  margin-top: 8px;
}

/* ---------- Legal page ---------- */

.legal h1 {
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.legal-updated {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-body {
  margin-top: 54px;
}

.legal-body h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg);
  margin-top: 44px;
  margin-bottom: 12px;
}

.legal-body h2:first-child {
  margin-top: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 880px;
  margin: 110px auto 0;
  padding: 0 24px 46px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--fg);
}

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 300;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .site-header {
    padding: 20px 20px;
  }

  .site-nav {
    flex: 1;
    justify-content: space-between;
  }

  .site-nav a {
    margin-left: 0;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .nav-hide-mobile {
    display: none;
  }

  .hero {
    padding-top: 64px;
  }

  section {
    padding-top: 84px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 84px;
  }
}
