@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg: #0e0e12;
  --bg-elevated: #16161f;
  --bg-card: #1c1c28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e4df;
  --text-muted: #9a958f;
  --purple: #4b3061;
  --purple-deep: #2a1a3a;
  --teal: #1e4d54;
  --teal-bright: #2d7a82;
  --coral: #c65a3a;
  --coral-hover: #d4703a;
  --red: #8b2635;
  --accent: var(--coral);
  --header-height: 4rem;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-width: 72rem;
  --content-width: 42rem;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(75, 48, 97, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(30, 77, 84, 0.2), transparent),
    radial-gradient(circle at 20% 80%, rgba(198, 90, 58, 0.06), transparent);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-bright);
  transition: color 0.15s ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--coral);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.site-logo span {
  color: var(--coral);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: 0.5rem;
}

.article-search {
  width: 10rem;
  padding: 0.4375rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, width 0.15s ease;
}

.article-search::placeholder {
  color: var(--text-muted);
}

.article-search:focus {
  width: 12rem;
  border-color: var(--coral);
  outline: none;
}

.search-btn {
  padding: 0.4375rem 0.75rem;
  background: var(--coral);
  border: none;
  border-radius: var(--radius);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.search-btn:hover {
  background: var(--coral-hover);
}

.site-nav a {
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
  max-width: var(--content-width);
  margin-inline: auto;
}

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-header p {
  margin: 0;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(198, 90, 58, 0.15);
  border: 1px solid rgba(198, 90, 58, 0.3);
  border-radius: 999px;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--coral);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--coral-hover);
}

.btn:active {
  transform: scale(0.98);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  border-color: var(--coral);
  outline: none;
}

.form-message {
  margin-top: 1rem;
  color: var(--teal-bright);
  font-size: 0.9375rem;
}

.form-message:empty {
  display: none;
}

@media (max-width: 640px) {
  .site-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .article-search {
    width: 6rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }

  .article-search:focus {
    width: 8rem;
  }

  .search {
    margin-left: 0.25rem;
    gap: 0.25rem;
  }

  .search-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
}
