:root {
  color-scheme: dark light;
  --accent: #00ffc8;
  --bg: linear-gradient(160deg, #0f172a 0%, #1f2937 50%, #0f172a 100%);
  --bg-article: rgba(15, 23, 42, 0.85);
  --border: rgba(0, 255, 200, 0.25);
  --text-light: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
}

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

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-light);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(7, 15, 25, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-wrapper a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-actions button,
.auth-actions a {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.auth-actions button:hover,
.auth-actions a:hover {
  background: var(--accent);
  color: #04121c;
}

main {
  flex: 1;
  padding: 3.5rem 1.5rem 4rem;
}

article {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-article);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 3rem clamp(1.5rem, 5vw, 3.5rem);
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.45);
}

article header {
  position: relative;
  inset: auto;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  padding: 0 0 1rem;
}

article header .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

article h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 6vw, 3.6rem);
  margin-bottom: 1rem;
}

article h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

article p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

article ul,
article ol {
  margin: 1.5rem 0 1.5rem 1.25rem;
  color: var(--text-muted);
}

article a {
  color: var(--accent);
}

blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 2rem 0;
  color: #cdeff5;
  font-style: italic;
}

figure {
  margin: 2rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 200, 0.2);
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  background: rgba(7, 15, 25, 0.9);
}

.breadcrumbs {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.comments {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
  background: rgba(10, 19, 33, 0.85);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.comments h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 10, 18, 0.8);
  color: var(--text-light);
  font-size: 1rem;
}

.comment-form button {
  align-self: flex-start;
  border-radius: 999px;
  border: none;
  padding: 0.6rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #04121c;
  transition: transform 0.3s ease;
}

.comment-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.comment-form button:not(:disabled):hover {
  transform: translateY(-2px);
}

.comment-status {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(4, 10, 18, 0.75);
  border: 1px solid rgba(0, 255, 200, 0.15);
}

.comment-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.comment-header strong {
  font-weight: 600;
}

.comment-header time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-body {
  color: var(--text-light);
  white-space: pre-wrap;
}

.comment-empty {
  text-align: center;
  color: var(--text-muted);
}

.comment-form.is-disabled textarea {
  filter: grayscale(0.5);
}

@media (max-width: 720px) {
  .nav-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  article {
    padding: 2.5rem 1.25rem;
  }

  .comments {
    padding: 2rem 1.25rem;
  }
}
