:root {
  --navy: #071426;
  --navy-2: #0b1f38;
  --blue: #1479ff;
  --cyan: #14d9e5;
  --industrial-green: #43d17a;
  --dark: #111827;
  --gray: #667085;
  --gray-2: #d0d5dd;
  --light: #f5f7fb;
  --white: #ffffff;
  --danger: #d92d20;
  --success: #047857;
  --radius: 20px;
  --shadow: 0 24px 60px rgba(7, 20, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
}

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

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 20, 38, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrapper {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--cyan), var(--industrial-green));
  box-shadow: 0 0 30px rgba(20, 217, 229, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 1.7rem;
}

.hero {
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 217, 229, 0.22), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(20, 121, 255, 0.22), transparent 34%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
}

.hero-grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 42px;
  padding: 74px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero h1,
.post-hero h1,
.admin-topbar h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 820px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--navy);
  background: linear-gradient(135deg, var(--cyan), var(--industrial-green));
  box-shadow: 0 14px 32px rgba(20, 217, 229, 0.22);
}

.btn-secondary {
  color: var(--white);
  background: var(--blue);
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.admin-page .btn-ghost,
.post-navigation .btn-ghost {
  color: var(--navy);
  border-color: var(--gray-2);
  background: var(--white);
}

.full {
  width: 100%;
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.panel-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.panel-line:last-child {
  border-bottom: 0;
}

.panel-line span {
  color: var(--cyan);
  font-weight: 900;
}

.panel-line strong {
  color: rgba(255, 255, 255, 0.88);
}

.section {
  padding: 64px 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--navy);
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-pill {
  padding: 10px 14px;
  border: 1px solid var(--gray-2);
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  font-weight: 700;
}

.category-pill:hover,
.category-pill.active {
  color: var(--navy);
  border-color: transparent;
  background: linear-gradient(135deg, rgba(20, 217, 229, 0.28), rgba(67, 209, 122, 0.22));
}

.featured-card,
.post-card,
.admin-card,
.auth-card,
.stat-card {
  border: 1px solid rgba(7, 20, 38, 0.08);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.featured-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
}

.featured-card img,
.post-card img,
.post-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-content {
  padding: 34px;
}

.post-category {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(20, 217, 229, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  color: var(--gray);
  font-size: 0.92rem;
}

.post-meta.large {
  justify-content: center;
  font-size: 1rem;
}

.read-more {
  display: inline-flex;
  margin-top: 22px;
  color: var(--blue);
  font-weight: 900;
}

.search-form,
.filters-form {
  display: flex;
  gap: 10px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--gray-2);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--dark);
  background: var(--white);
  font: inherit;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin: 16px 0 6px;
  color: var(--navy);
  font-weight: 800;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  overflow: hidden;
  transition: 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-card img,
.image-placeholder.small {
  height: 190px;
}

.post-card-body {
  padding: 22px;
}

.post-card h3 {
  margin: 14px 0 10px;
  line-height: 1.18;
  font-size: 1.28rem;
}

.post-card p {
  color: var(--gray);
}

.image-placeholder {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 30px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.12em;
  background:
    linear-gradient(135deg, rgba(20, 121, 255, 0.55), rgba(20, 217, 229, 0.20)),
    repeating-linear-gradient(90deg, #0b1f38 0, #0b1f38 12px, #102b4c 12px, #102b4c 24px);
}

.empty-state {
  padding: 42px;
  border: 1px dashed var(--gray-2);
  border-radius: var(--radius);
  text-align: center;
  background: var(--white);
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: var(--navy);
  padding: 52px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr;
  gap: 30px;
}

.site-footer h3,
.site-footer h4 {
  color: var(--white);
  margin-top: 0;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.muted {
  color: var(--gray);
}

.post-layout {
  padding: 64px 0;
}

.post-hero {
  max-width: 860px;
  margin: 0 auto 36px;
  text-align: center;
}

.post-hero h1 {
  margin-top: 16px;
  color: var(--navy);
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.post-excerpt {
  max-width: 760px;
  margin: 22px auto 0;
  color: var(--gray);
  font-size: 1.12rem;
}

.post-featured-image {
  max-height: 520px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.post-content {
  max-width: 820px;
  margin: 42px auto;
  color: #263243;
  font-size: 1.08rem;
}

.post-content p {
  margin: 0 0 1.2rem;
}

.post-navigation {
  max-width: 820px;
  margin: 0 auto;
}

.auth-wrapper {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 76px);
  padding: 48px 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 217, 229, 0.12), transparent 35%),
    linear-gradient(135deg, #eef6ff, #f8fbff);
}

.auth-card {
  width: min(460px, 100%);
  padding: 34px;
}

.auth-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: 2.2rem;
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
}

.alert p {
  margin: 0 0 6px;
}

.alert p:last-child {
  margin-bottom: 0;
}

.alert-error {
  color: #7a271a;
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.admin-shell {
  padding: 46px 0 72px;
}

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

.admin-topbar h1 {
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.admin-topbar p {
  color: var(--gray);
  margin: 8px 0 0;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.admin-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  border: 1px solid var(--gray-2);
  background: var(--white);
  font-weight: 800;
}

.admin-nav a.active,
.admin-nav a:hover {
  border-color: transparent;
  background: rgba(20, 217, 229, 0.2);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  color: var(--gray);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 2.2rem;
  line-height: 1;
}

.admin-card {
  padding: 24px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-card h2 {
  margin: 0;
  color: var(--navy);
}

.table-responsive {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 14px 10px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--gray);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.badge-success {
  color: var(--success);
  background: #ecfdf3;
}

.badge-muted {
  color: #344054;
  background: #f2f4f7;
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.actions-cell a {
  color: var(--blue);
  font-weight: 800;
}

.actions-cell form {
  display: inline;
}

.link-danger {
  padding: 0;
  border: 0;
  color: var(--danger);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filters-form {
  margin-bottom: 22px;
}

.admin-form {
  border: 1px solid rgba(7, 20, 38, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 28px;
  align-items: start;
}

.form-sidebar {
  position: sticky;
  top: 100px;
  padding: 18px;
  border: 1px solid #edf0f5;
  border-radius: 18px;
  background: #fbfcff;
}

.admin-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
}

@media (max-width: 920px) {
  .hero-grid,
  .featured-card,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .post-grid,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-heading.split,
  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form,
  .filters-form {
    width: 100%;
    flex-direction: column;
  }

  .form-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    border-radius: 18px;
    background: var(--navy-2);
  }

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

  .hero-grid {
    min-height: auto;
    padding: 56px 0;
  }

  .post-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .featured-content,
  .admin-card,
  .admin-form,
  .auth-card {
    padding: 20px;
  }

  .actions-cell {
    display: grid;
    gap: 8px;
  }
}


.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.post-content h1 {
  margin: 2.6rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.post-content h2 {
  margin: 2.4rem 0 1rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.post-content h3 {
  margin: 2rem 0 0.85rem;
  color: var(--tech-blue);
  font-size: clamp(1.3rem, 2.3vw, 1.65rem);
}

.post-content h4 {
  margin: 1.6rem 0 0.65rem;
  color: #1f2f46;
  font-size: 1.15rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.4rem 1.4rem;
  padding: 0;
}

.post-content li {
  margin-bottom: 0.55rem;
}

.post-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--cyan);
  background: rgba(14, 165, 233, 0.08);
  color: #1f2f46;
  border-radius: 0 14px 14px 0;
}

.post-content pre {
  margin: 1.6rem 0;
  padding: 1.2rem;
  overflow-x: auto;
  background: #071527;
  color: #e5f4ff;
  border-radius: 16px;
  font-size: 0.95rem;
}

.post-content code {
  padding: 0.15rem 0.35rem;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  font-size: 0.95em;
}

.post-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.post-content hr {
  margin: 2.4rem 0;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
}

.post-content a {
  color: var(--tech-blue);
  font-weight: 700;
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 18px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.8rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-content th,
.post-content td {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  text-align: left;
}

.post-content th {
  background: rgba(15, 23, 42, 0.06);
  color: var(--navy);
}


