:root {
  --bg: #231b3b;
  --bg-2: #2d2350;
  --panel: #483778;
  --text: #c7c1d9;
  --heading: #ffffff;
  --muted: #8f87a8;
  --accent: #5eead4;
  --pink: #ff7fe8;
  --line: rgba(199, 193, 217, 0.18);
  --max: 1080px;
  --read: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--pink); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { color: var(--heading); line-height: 1.2; }
h1 { font-family: "Roboto", sans-serif; font-weight: 700; }
h2, h3 { font-family: "Syne", sans-serif; font-weight: 600; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}
.brand img { height: 54px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 15px; color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--pink); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  min-height: 440px;
  display: grid;
  place-items: center;
  background: #111 center / cover no-repeat;
  padding: 60px 20px;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(15, 10, 30, 0.35); }
.hero-card {
  position: relative;
  background: var(--bg);
  padding: 34px 40px;
  max-width: 520px;
  text-align: center;
}
.hero-card h1 { margin: 0 0 12px; font-size: clamp(36px, 6vw, 56px); letter-spacing: 1px; text-transform: uppercase; }
.hero-card p { margin: 6px 0; font-size: 15px; }

/* Sections */
section { padding: 64px 0; }
.section-title { font-size: 30px; margin: 0 0 28px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Post cards */
.cards { display: grid; gap: 22px; }
.card {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.card-img { background: #140f26; }
.card-img img { width: 100%; height: 100%; object-fit: cover; min-height: 180px; }
.card-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 8px; }
.meta { font-size: 13px; color: var(--muted); }
.card h3 { margin: 0; font-size: 22px; }
.card h3 a { color: var(--heading); }
.card h3 a:hover { color: var(--pink); }
.card p { margin: 0; font-size: 15px; }
.more { margin-top: auto; font-size: 14px; font-weight: 600; }

/* Text blocks */
.prose-block { max-width: var(--read); }
.prose-block p { margin: 0 0 18px; }
.about { background: var(--bg-2); }
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center; }
.about-photo { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); }

/* Resources */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.res {
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.res img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #140f26; }
.res-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.res h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.res p { margin: 0; font-size: 13px; color: #d9d4ea; }
.btn {
  display: inline-block;
  margin-top: auto;
  padding: 8px 16px;
  background: var(--pink);
  color: #231b3b;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  align-self: flex-start;
}
.btn:hover { background: var(--accent); color: #231b3b; }

/* Form */
form { display: grid; gap: 16px; max-width: 560px; }
label { font-size: 14px; color: var(--heading); display: grid; gap: 6px; }
input, textarea {
  font: inherit;
  color: var(--heading);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}
textarea { min-height: 140px; resize: vertical; }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; padding: 11px 26px; margin-top: 0; }
.hp { position: absolute; left: -9999px; }

/* Article */
.article { padding: 48px 0 72px; }
.article .wrap { max-width: var(--read); }
.article h1 { font-size: clamp(28px, 4.5vw, 42px); margin: 0 0 14px; }
.article .meta { margin-bottom: 28px; }
.cover { margin: 0 0 32px; border-radius: 6px; overflow: hidden; }
.article-body h2 { font-size: 27px; margin: 44px 0 14px; }
.article-body h3 { font-size: 21px; margin: 30px 0 10px; }
.article-body p { margin: 0 0 18px; }
.article-body li { margin-bottom: 8px; }
.article-body li p { margin: 0; }
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 20px; }
.article-body strong { color: var(--heading); }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14px; }
.article-body th, .article-body td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.article-body th { background: var(--panel); color: var(--heading); }
.article-body td p { margin: 0; }
.back { display: inline-block; margin-bottom: 20px; font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.social { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .card { grid-template-columns: 1fr; }
  .card-img img { height: 200px; }
  .nav { gap: 18px; }
  .brand img { height: 44px; }
  section { padding: 44px 0; }
  .hero-card { padding: 26px 22px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 280px; margin: 0 auto; }
}

.res-ph { aspect-ratio: 4 / 3; display: grid; place-items: center; background: linear-gradient(135deg, #2d2350, #483778); color: var(--accent); font-family: "Roboto", sans-serif; font-weight: 700; font-size: 34px; letter-spacing: 4px; }
