:root {
  --bg: #090b10;
  --surface: #10131a;
  --surface-2: #151923;
  --line: #262c38;
  --text: #f5f7fb;
  --muted: #98a2b3;
  --amber: #ffb800;
  --amber-2: #ffd86b;
  --amber-soft: rgb(255 184 0 / 12%);
  --green: #64e69b;
  --red: #ff7a71;
  --radius: 16px;
  --mono: "JetBrains Mono", monospace;
  --sans: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background-image: linear-gradient(rgb(255 255 255 / 1.8%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 1.8%) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.wrap {
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(760px, calc(100% - 40px));
  margin-inline: auto;
}

nav {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgb(255 255 255 / 6%);
  background: rgb(9 11 16 / 82%);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  height: 52px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #c4cad4;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: white;
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  transition: 0.2s ease;
  cursor: pointer;
}

.nav-cta {
  padding: 9px 15px;
  border: 0;
  background: var(--amber);
  color: #161006;
}

.nav-cta:hover,
.btn-primary:hover {
  background: #ffc533;
  color: #161006;
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--amber);
  background: var(--amber);
  color: #171108;
}

.btn-secondary {
  background: #11151d;
  color: #e9edf4;
}

.btn-secondary:hover {
  border-color: #566071;
  background: #151a24;
}

.menu {
  display: none;
  padding: 8px;
  border: 0;
  background: none;
  color: white;
  cursor: pointer;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-2);
  font: 500 0.78rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 1px;
  background: var(--amber);
  content: "";
}

.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 105px 0 82px;
  border-bottom: 1px solid var(--line);
}

.glow {
  position: absolute;
  z-index: -1;
  top: -350px;
  left: 55%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 184 0 / 14%), transparent 67%);
}

.blog-hero h1,
.article-head h1,
.empty-state h1,
.admin-heading h1,
.admin-panel h1 {
  margin: 16px 0 24px;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.blog-hero h1 span {
  color: var(--amber);
}

.blog-hero p {
  max-width: 680px;
  margin: 0;
  color: #adb5c2;
  font-size: 1.15rem;
}

.blog-listing {
  padding: 80px 0 110px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  padding: 14px 18px;
  border: 1px solid rgb(255 184 0 / 23%);
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber-2);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #121620, #0d1016);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  border-color: #454e5e;
  transform: translateY(-3px);
}

.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.post-image {
  display: block;
  min-height: 250px;
  overflow: hidden;
  background: #0d1016;
}

.post-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-image img {
  transform: scale(1.02);
}

.post-image-placeholder {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 45% 45%, rgb(255 184 0 / 22%), transparent 28%), linear-gradient(135deg, #121620, #090b10);
}

.post-image-placeholder span {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border: 1px solid rgb(255 184 0 / 32%);
  border-radius: 23px;
  background: var(--amber-soft);
  color: var(--amber);
  font: 700 1.4rem var(--mono);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 29px;
}

.post-meta {
  color: #737e8e;
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card h2 {
  margin: 12px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.post-card p {
  margin: 0 0 26px;
  color: var(--muted);
}

.post-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags a {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #8590a0;
  font: 400 0.68rem var(--mono);
}

.tags a:hover {
  border-color: rgb(255 184 0 / 35%);
  color: var(--amber-2);
}

.read-more,
.back-link {
  flex: none;
  color: var(--amber);
  font: 500 0.76rem var(--mono);
}

.empty-panel,
.empty-state {
  padding: 70px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-align: center;
}

.empty-panel h2 {
  margin: 18px 0 8px;
  font-size: 2rem;
}

.empty-panel p,
.empty-state p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  margin-block: 100px;
}

.empty-state h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.empty-state .btn {
  margin-top: 25px;
}

.article {
  padding: 86px 0 40px;
}

.article-head {
  text-align: center;
}

.article-head .back-link {
  display: inline-block;
  margin-bottom: 38px;
}

.article-head h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
}

.article-excerpt {
  margin: 0 auto 25px;
  color: #adb5c2;
  font-size: 1.2rem;
}

.article-head .tags {
  justify-content: center;
}

.article-image {
  margin-top: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.article-image img {
  display: block;
  width: 100%;
  max-height: 640px;
  object-fit: cover;
}

.article-body {
  padding: 64px 0 30px;
  color: #c7ced8;
  font-size: 1.08rem;
}

.article-body p,
.article-body ul {
  margin: 0 0 1.55em;
}

.article-body h2,
.article-body h3 {
  margin: 2em 0 0.65em;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.article-body h2 {
  font-size: 2rem;
}

.article-body h3 {
  font-size: 1.45rem;
}

.article-body li::marker {
  color: var(--amber);
}

.article-cta {
  padding: 30px 0 100px;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 42px;
  border-radius: 20px;
  background: var(--amber);
  color: #161006;
}

.cta-box h2 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  letter-spacing: -0.035em;
}

.cta-box p {
  margin: 0;
  color: #5f4507;
}

.cta-box .btn {
  flex: none;
  border-color: #11141a;
  background: #11141a;
  color: white;
}

.admin-shell {
  width: min(1140px, calc(100% - 40px));
  min-height: calc(100vh - 300px);
  margin: 0 auto;
  padding: 70px 0 100px;
}

.admin-login {
  display: grid;
  max-width: 520px;
  place-items: center;
}

.admin-panel,
.editor,
.admin-table-wrap {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.admin-panel {
  padding: 38px;
}

.admin-panel h1,
.admin-heading h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.admin-panel > p,
.admin-heading p {
  color: var(--muted);
}

.admin-panel form,
.editor-main,
.editor-sidebar {
  display: grid;
  gap: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: #d6dbe3;
  font-size: 0.9rem;
  font-weight: 600;
}

label small {
  color: #778191;
  font-size: 0.76rem;
  font-weight: 400;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #303744;
  border-radius: 9px;
  outline: 0;
  background: #0c0f15;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 35px;
}

.admin-heading h1 {
  margin-bottom: 5px;
}

.admin-heading p {
  margin: 0;
}

.notice {
  margin-bottom: 24px;
  padding: 13px 16px;
  border: 1px solid;
  border-radius: 9px;
}

.notice.error {
  border-color: rgb(255 122 113 / 30%);
  background: rgb(255 122 113 / 8%);
  color: #ffaaa4;
}

.notice.success {
  border-color: rgb(100 230 155 / 30%);
  background: rgb(100 230 155 / 8%);
  color: var(--green);
}

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  overflow: hidden;
}

.editor-main,
.editor-sidebar {
  padding: 28px;
}

.editor-sidebar {
  align-content: start;
  border-left: 1px solid var(--line);
  background: #0d1016;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.admin-table th {
  color: #7f8998;
  font: 500 0.7rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td small {
  display: block;
  color: #6d7787;
  font-family: var(--mono);
}

.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 99px;
  font: 500 0.68rem var(--mono);
  text-transform: capitalize;
}

.status-published {
  background: rgb(100 230 155 / 12%);
  color: var(--green);
}

.status-draft {
  background: rgb(255 255 255 / 7%);
  color: #aeb6c3;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.table-actions a,
.table-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  cursor: pointer;
}

.table-actions button {
  color: var(--red);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

footer {
  padding: 55px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-top,
.footer-bottom,
.footer-links {
  display: flex;
  align-items: center;
}

.footer-top {
  justify-content: space-between;
  gap: 30px;
}

.footer-top .brand-logo {
  height: 64px;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  justify-content: space-between;
  margin-top: 35px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #626d7d;
  font: 400 0.7rem var(--mono);
}

@media (max-width: 1180px) {
  .menu {
    display: block;
    font-size: 1.35rem;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: #0d1016;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 11px 5px;
  }

  .nav-links .nav-cta {
    margin-top: 8px;
    padding: 10px 15px;
  }

  .post-grid,
  .post-card.featured,
  .editor {
    grid-template-columns: 1fr;
  }

  .post-card.featured {
    display: flex;
  }

  .editor-sidebar {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .cta-box,
  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .wrap,
  .wrap-narrow,
  .admin-shell {
    width: min(100% - 28px, 1140px);
  }

  .brand-logo {
    height: 44px;
  }

  .footer-top .brand-logo {
    height: 56px;
  }

  .blog-hero {
    padding: 75px 0 60px;
  }

  .blog-listing,
  .article {
    padding-top: 55px;
  }

  .blog-hero h1,
  .article-head h1 {
    font-size: 2.8rem;
  }

  .post-card-body,
  .admin-panel,
  .editor-main,
  .editor-sidebar {
    padding: 22px;
  }

  .post-card-foot,
  .footer-top,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .cta-box {
    padding: 30px;
  }

  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3) {
    display: none;
  }
}
