/* ═══════════════════════════════════════════════════════════════════
   DRAFTED SELF — Neumorphic Design System
   "Soft UI" Editorial Experience
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=DM+Sans:wght@400;500;700&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  /* Color Palette - Cool Monochromatic Neumorphism */
  --color-bg:           #E0E5EC;    /* Cool grey base surface */
  --color-fg:           #3D4852;    /* Dark blue-grey foreground */
  --color-muted:        #6B7280;    /* Secondary text, WCAG AA on bg */
  --color-accent:       #6C63FF;    /* Soft violet for CTAs */
  --color-accent-light: #8B84FF;    /* Lighter violet */
  --color-accent-secondary: #38B2AC; /* Teal for success states */

  /* Shadow Colors - RGBA for smoothness */
  --shadow-light:  rgba(255, 255, 255, 0.5);
  --shadow-dark:   rgb(163, 177, 198);

  /* Typography */
  --font-display:  'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:     'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing & Layout */
  --container-width: 1280px;
  --article-width:   720px;
  --spacing-xs:      4px;
  --spacing-sm:      8px;
  --spacing-md:      16px;
  --spacing-lg:      24px;
  --spacing-xl:      32px;
  --spacing-2xl:     48px;
  --spacing-3xl:     64px;

  /* Radius - Soft, Pillowed */
  --radius-container: 32px;  /* Cards, large containers */
  --radius-button:    16px;  /* Buttons, medium elements */
  --radius-small:     12px;  /* Inner elements */
  --radius-full:      9999px;

  /* Shadows - Neumorphic depth */
  --shadow-extruded:        9px 9px 16px rgb(163, 177, 198, 0.6), -9px -9px 16px rgba(255, 255, 255, 0.5);
  --shadow-extruded-hover:  12px 12px 20px rgb(163, 177, 198, 0.7), -12px -12px 20px rgba(255, 255, 255, 0.6);
  --shadow-extruded-small:  5px 5px 10px rgb(163, 177, 198, 0.6), -5px -5px 10px rgba(255, 255, 255, 0.5);
  --shadow-inset:           inset 6px 6px 10px rgb(163, 177, 198, 0.6), inset -6px -6px 10px rgba(255, 255, 255, 0.5);
  --shadow-inset-small:     inset 3px 3px 6px rgb(163, 177, 198, 0.6), inset -3px -3px 6px rgba(255, 255, 255, 0.5);
  --shadow-inset-deep:      inset 10px 10px 20px rgb(163, 177, 198, 0.7), inset -10px -10px 20px rgba(255, 255, 255, 0.6);

  /* Transitions */
  --transition-fast:   all 300ms ease-out;
  --transition-smooth: all 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET & BASE ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-accent-light);
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── LAYOUT ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: var(--article-width);
}

/* ── TYPOGRAPHY ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-fg);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  color: var(--color-fg);
  line-height: 1.8;
}

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

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* ── NEUMORPHIC UTILITIES ──────────────────────────────────────── */

/* Extruded (raised) states */
.shadow-extruded {
  box-shadow: var(--shadow-extruded);
}

.shadow-extruded-hover {
  box-shadow: var(--shadow-extruded-hover);
}

.shadow-extruded-small {
  box-shadow: var(--shadow-extruded-small);
}

/* Inset (pressed) states */
.shadow-inset {
  box-shadow: var(--shadow-inset);
}

.shadow-inset-small {
  box-shadow: var(--shadow-inset-small);
}

.shadow-inset-deep {
  box-shadow: var(--shadow-inset-deep);
}

/* Rounded containers */
.rounded-container {
  border-radius: var(--radius-container);
}

/* ── BUTTONS: Neumorphic System ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(2px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
}

/* Primary Button - Violet with neumorphic depth */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-small);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-3px);
}

.btn-primary:active {
  box-shadow: var(--shadow-inset);
  background: var(--color-accent);
}

/* Outline Button  */
.btn-outline {
  background: var(--color-bg);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-extruded-small);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-3px);
}

.btn-outline:active {
  box-shadow: var(--shadow-inset);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-fg);
  box-shadow: none;
  border: 2px solid transparent;
}

.btn-ghost:hover {
  background: var(--color-bg);
  box-shadow: var(--shadow-inset-small);
  color: var(--color-accent);
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-small);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-3px);
}

.btn-primary:active {
  box-shadow: var(--shadow-inset);
  background: var(--color-accent);
}

.btn-outline {
  background: var(--color-bg);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-extruded-small);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-3px);
}

.btn-outline:active {
  box-shadow: var(--shadow-inset);
}

.btn-ghost {
  background: transparent;
  color: var(--color-fg);
  box-shadow: none;
  border: 2px solid transparent;
}

.btn-ghost:hover {
  background: var(--color-bg);
  box-shadow: var(--shadow-inset-small);
  color: var(--color-accent);
}

/* ── FORMS: Neumorphic Input System ────────────────────────────── */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-fg);
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-inset-small);
  transition: all 300ms ease-out;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.form-control::placeholder {
  color: var(--color-muted);
  opacity: 0.7;
}

.form-control:focus {
  outline: 2px solid var(--color-accent);
  box-shadow: var(--shadow-inset-deep);
  background: var(--color-bg);
}

.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
  font-family: var(--font-body);
}

.form-hint {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
  display: block;
}

/* ── CARDS: Neumorphic Containers ────────────────────────────── */
.card {
  background: var(--color-bg);
  border-radius: var(--radius-container);
  padding: 32px;
  box-shadow: var(--shadow-extruded-small);
  transition: all 300ms ease-out;
}

.card:hover {
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-4px);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: 16px;
}

.card-text {
  color: var(--color-muted);
  line-height: 1.8;
}

/* ── ARTICLE CARDS: Featured with Depth ────────────────────────── */
.article-card {
  background: var(--color-bg);
  border-radius: var(--radius-container);
  overflow: hidden;
  box-shadow: var(--shadow-extruded-small);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-6px);
}

.article-card::before {
  display: none;
}

.card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg);
  border-radius: var(--radius-container) var(--radius-container) 0 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .card-image img {
  transform: scale(1.05);
}

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

.card-category {
  margin-bottom: 12px;
}

.card-category .journal-label {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--color-fg);
  transition: color 300ms ease-out;
}

.article-card:hover .card-title {
  color: var(--color-accent);
}

.card-excerpt {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--color-muted);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
}

/* ── ALERTS: Neumorphic States ──────────────────────────────────── */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-small);
  font-size: 14px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-inset-small);
}

.alert-success {
  background: rgba(56, 178, 172, 0.1);
  color: var(--color-accent-secondary);
}

.alert-error {
  background: rgba(248, 113, 113, 0.1);
  color: #dc2626;
}

/* ── HEADER: Sticky Neumorphic Navigation ────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  box-shadow: var(--shadow-extruded-small);
  transition: all 300ms ease-out;
}

.site-header.scrolled {
  box-shadow: var(--shadow-extruded);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-fg);
  transition: color 300ms ease-out;
}

.site-logo:hover {
  color: var(--color-accent);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 300ms ease-out;
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 300ms ease-out;
}

.site-nav a:hover {
  color: var(--color-fg);
}

.site-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-menu {
  position: relative;
}

.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  box-shadow: var(--shadow-inset-small);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-fg);
  overflow: hidden;
  transition: all 300ms ease-out;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.user-avatar-btn:hover,
.user-avatar-btn:focus {
  box-shadow: var(--shadow-extruded-small);
  outline: 2px solid var(--color-accent);
}

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  background: var(--color-bg);
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-extruded);
  display: none;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--color-fg);
  border-bottom: 1px solid var(--color-bg);
  transition: background 300ms ease-out;
}

.user-dropdown a:last-child {
  border-bottom: none;
}

.user-dropdown a:hover {
  background: var(--color-bg);
  color: var(--color-accent);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border-radius: var(--radius-small);
  transition: all 300ms ease-out;
}

.mobile-menu-btn:hover {
  background: var(--color-bg);
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-fg);
  transition: all 300ms ease-out;
  border-radius: 1px;
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 70px;
  background: var(--color-bg);
  z-index: 99;
  flex-direction: column;
  padding: 24px;
  gap: 0;
  border-right: 2px solid var(--color-fg);
  overflow-y: auto;
}

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

.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-fg);
  border-bottom: 1px solid var(--color-muted);
  transition: color 300ms ease-out;
}

.mobile-nav a:hover {
  color: var(--color-accent);
}

/* Reading Progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  height: 3px;
  width: 0%;
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.6);
  transition: width 0.1s linear;
}

/* ── HERO: Neumorphic Landing ──────────────────────────────────── */
.hero {
  position: relative;
  padding: 120px var(--spacing-lg) 100px;
  background: var(--color-bg);
  overflow: hidden;
}

.hero::before,
.hero::after {
  display: none;
}

.hero-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-text {
  /* Base container */
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.hero-label::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-fg);
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: italic;
  color: var(--color-accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-button);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 300ms ease-out;
  box-shadow: var(--shadow-extruded-small);
  text-decoration: none;
}

.hero-cta-btn:hover {
  box-shadow: var(--shadow-extruded-hover);
  transform: translateY(-3px);
  background: var(--color-accent-light);
}

.hero-cta-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 4px;
  transition: all 300ms ease-out;
  display: inline-block;
}

.hero-cta-link:hover {
  color: var(--color-accent-light);
  border-bottom-color: var(--color-accent-light);
  transform: translateX(4px);
}

.hero-tray {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  opacity: 0.5;
  height: 200px;
  display: flex;
  align-items: center;
}

/* ── ARTICLES GRID ─────────────────────────────────────────────── */
.articles-section {
  padding: 100px var(--spacing-lg);
  background: var(--color-bg);
}

.articles-grid {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 40px;
}

/* ── PAGINATION ────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 80px;
  padding-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-button);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-fg);
  background: var(--color-bg);
  box-shadow: var(--shadow-inset-small);
  transition: all 300ms ease-out;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.pagination a:hover {
  box-shadow: var(--shadow-extruded-small);
  transform: translateY(-2px);
  color: var(--color-accent);
}

.pagination a:focus-visible {
  outline: 2px solid var(--color-accent);
}

.pagination .active,
.pagination .current {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-small);
  font-weight: 800;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── ARTICLE DETAIL PAGE ────────────────────────────────────────── */
.article-page-container {
  width: 100%;
  background: var(--color-bg);
  margin: 0 auto;
  padding: 0;
}

.article-main-content,
.article-page {
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 80px var(--spacing-lg);
}

.article-header {
  margin-bottom: 48px;
  text-align: center;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-fg);
  margin: 24px 0 20px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 48px;
}

.article-featured-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin: 0 0 48px;
  display: block;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-extruded-small);
}

.article-content {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--color-fg);
  text-align: justify;
  text-justify: inter-word;
}

.article-content h2,
.article-content h3 {
  font-family: var(--font-display);
  margin: 48px 0 24px;
  font-weight: 700;
  color: var(--color-fg);
  text-align: left;
}

.article-content h2 {
  font-size: 1.8rem;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
}

.article-content h3 {
  font-size: 1.35rem;
}

.article-content p {
  margin-bottom: 24px;
  text-align: justify;
  text-justify: inter-word;
}

.article-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 24px 28px;
  margin: 40px 0;
  background: var(--color-bg);
  box-shadow: var(--shadow-inset-small);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--color-fg);
}

.article-content a {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transition: all 300ms ease-out;
}

.article-content a:hover {
  color: var(--color-accent-light);
  border-bottom-color: var(--color-accent-light);
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 40px auto;
  display: block;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-extruded-small);
}

.article-content ul,
.article-content ol {
  padding-left: 32px;
  margin-bottom: 24px;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 12px;
  text-align: justify;
  text-justify: inter-word;
}

/* Bookmark Button */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-button);
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 300ms ease-out;
  box-shadow: var(--shadow-inset-small);
}

.bookmark-btn:hover,
.bookmark-btn.active {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-small);
  transform: scale(1.05);
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 40px;
}

.tag-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: none;
  background: var(--color-bg);
  color: var(--color-accent);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 300ms ease-out;
  display: inline-block;
  box-shadow: var(--shadow-inset-small);
  text-decoration: none;
}

.tag-pill:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-extruded-small);
  transform: translateY(-2px);
}

/* ── COMMENTS: Neumorphic Discussion ────────────────────────────── */
.comments-section {
  margin-top: 80px;
  padding-top: 48px;
  max-width: var(--article-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-lg);
  padding-right: var(--spacing-lg);
}

.comment {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-muted);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
}

.comment-author-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg);
}

.comment-date {
  font-size: 11px;
  color: var(--color-muted);
  display: block;
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-fg);
  margin-top: 8px;
}

.comment-replies {
  margin-left: 48px;
  border-left: 2px solid var(--color-accent);
  padding-left: 24px;
  margin-top: 20px;
}

/* Comment Form */
.comment-form {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--color-muted);
}

.comment-form textarea {
  width: 100%;
  padding: 16px;
  border: none;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 14px;
  min-height: 140px;
  resize: vertical;
  transition: all 300ms ease-out;
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-inset-small);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.comment-form textarea:focus {
  box-shadow: var(--shadow-inset-deep);
  outline: 2px solid var(--color-accent);
}

/* ── AUTH PAGES: Neumorphic Sign In/Up ──────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: var(--spacing-2xl) var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.auth-page::before,
.auth-page::after {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg);
  padding: 48px 40px;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-extruded);
  position: relative;
  z-index: 2;
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--color-fg);
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo span {
  color: var(--color-accent);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-fg);
  text-align: center;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 32px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 300ms ease-out;
  border-radius: var(--radius-small);
  box-shadow: var(--shadow-inset-small);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.form-control::placeholder {
  color: var(--color-muted);
}

.form-control:focus {
  box-shadow: var(--shadow-inset-deep);
  outline: 2px solid var(--color-accent);
}

.form-hint {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
}

/* ── SIDEBAR ────────────────────────────────────────────────────── */
.sidebar {
  /* flexible sidebar */
}

.sidebar-widget {
  background: var(--color-bg);
  padding: 24px;
  margin-bottom: 28px;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-extruded-small);
  transition: all 300ms ease-out;
}

.sidebar-widget:hover {
  box-shadow: var(--shadow-extruded);
}

.sidebar-widget-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-accent);
  color: var(--color-fg);
}

/* ── PROFILE PAGE ───────────────────────────────────────────────── */
.profile-page {
  max-width: 600px;
  margin: 60px auto;
  padding: 0 var(--spacing-lg);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--color-accent);
}

/* ── PAGE HERO ──────────────────────────────────────────────────── */
.page-hero {
  padding: 80px var(--spacing-lg) 60px;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

.page-hero::before,
.page-hero::after {
  display: none;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-fg);
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1rem;
  color: var(--color-muted);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 600px;
}

/* ── FOOTER: Dark Neumorphic ────────────────────────────────────── */
.site-footer {
  background: #1a1a24;
  color: #d1d5db;
  padding: 80px 0 0;
  margin-top: auto;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.5);
}

.site-footer::before,
.site-footer::after {
  display: none;
}

.footer-grid {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg) 80px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.footer-brand-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #d1d5db;
  margin-bottom: 16px;
}

.footer-brand-logo span {
  color: var(--color-accent);
}

.footer-brand p {
  font-size: 13px;
  color: #a0aec0;
  line-height: 1.8;
}

.footer-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
  display: inline-block;
}

.footer-nav a {
  display: block;
  font-size: 13px;
  color: #a0aec0;
  margin-bottom: 14px;
  transition: all 300ms ease-out;
  position: relative;
}

.footer-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 300ms ease-out;
}

.footer-nav a:hover {
  color: #d1d5db;
  padding-left: 8px;
}

.footer-nav a:hover::before {
  width: 5px;
}

/* Newsletter */
.newsletter-input-group {
  display: flex;
  border-bottom: 2px solid var(--color-accent);
  border-radius: 0;
  padding: 0;
}

.newsletter-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: #d1d5db;
  padding: 10px 0;
}

.newsletter-input::placeholder {
  color: #666;
}

.newsletter-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: all 300ms ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

.newsletter-btn:hover {
  opacity: 0.8;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(108, 99, 255, 0.2);
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.footer-bottom p {
  font-size: 10px;
  color: #666;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── ANIMATIONS ────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-reveal {
  opacity: 0;
}

.animate-reveal.revealed {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Article Page Layout ────────────────────────────────────────── */
/* (Correct rules defined earlier, these duplicates removed) */

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --container-width: 95%; --article-width: 680px; }
  .header-inner { height: 65px; }
  .hero h1 { font-size: clamp(3rem, 8vw, 5rem); }
  .articles-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px; }
}

@media (max-width: 768px) {
  :root { --article-width: 100%; }
  .site-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-inner { height: 60px; padding: 0 16px; }

  .hero {
    padding: 60px 0 50px;
  }
  .hero::before {
    width: 400px;
    height: 400px;
    top: -30%;
    right: -15%;
  }
  .hero::after {
    width: 350px;
    height: 350px;
    bottom: -30%;
    left: -25%;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-tray { display: none; }
  .hero h1 { font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.1; }
  .hero-sub { font-size: 1rem; margin-bottom: 32px; line-height: 1.7; max-width: 100%; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas > * { width: 100%; }

  .articles-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-card .card-body { padding: 24px; }
  .card-title { font-size: 1.25rem; }

  .page-hero { padding: 50px 0 40px; }
  .page-hero h1 { font-size: 2rem; }

  .article-main-content { padding: 50px 16px; }
  .article-page { padding: 50px 16px; }
  .article-header { margin-bottom: 36px; }
  .article-header h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 16px 0 20px; }
  .article-meta-bar {
    gap: 16px;
    font-size: 9px;
    padding: 20px 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .article-featured-image { max-width: 100%; margin-bottom: 36px; }
  .article-content { font-size: 1rem; line-height: 1.85; }
  .article-content h2 { font-size: 1.55rem; margin: 36px 0 16px; }
  .article-content h3 { font-size: 1.2rem; }
  .article-content blockquote { padding: 20px 24px; font-size: 1.1rem; }
  .article-content img { margin: 32px 0; }

  .comments-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .comment-form textarea { min-height: 120px; }
  .comment-replies { margin-left: 32px; padding-left: 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }

  .container { padding: 0 16px; }
  .header-inner { padding: 0 12px; }
  .site-logo { font-size: 24px; }

  .hero {
    padding: 40px 0 35px;
  }
  .hero::before {
    width: 300px;
    height: 300px;
  }
  .hero::after {
    width: 250px;
    height: 250px;
  }
  .hero h1 { font-size: 1.95rem; }
  .hero-label::before { width: 20px; }
  .hero-sub { font-size: 0.95rem; }

  .articles-grid { gap: 20px; }
  .article-card { border-radius: var(--border-radius); }
  .card-body { padding: 18px; }
  .card-title { font-size: 1.1rem; }
  .card-excerpt { font-size: 0.85rem; margin-bottom: 16px; }
  .card-meta { padding-top: 12px; }

  .page-hero { padding: 35px 0 28px; }
  .page-hero h1 { font-size: 1.5rem; }
  .page-hero p { font-size: 0.9rem; }

  .article-main-content { padding: 30px 16px; }
  .article-page { padding: 30px 16px; }
  .article-header { margin-bottom: 28px; }
  .article-header h1 { font-size: 1.55rem; margin: 10px 0 14px; }
  .article-meta-bar {
    gap: 12px;
    padding: 14px 0;
    font-size: 8px;
    align-items: flex-start;
  }
  .article-featured-image { max-width: 100%; margin-bottom: 28px; aspect-ratio: 3/2; }
  .article-content { font-size: 0.95rem; line-height: 1.75; }
  .article-content h2 { font-size: 1.35rem; margin: 28px 0 12px; }
  .article-content h3 { font-size: 1.1rem; }
  .article-content p { margin-bottom: 16px; }
  .article-content blockquote { padding: 16px 20px; font-size: 1rem; border-left: 3px solid var(--color-accent); }
  .article-content ul, .article-content ol { padding-left: 20px; margin-bottom: 16px; }
  .article-content li { margin-bottom: 6px; }

  .comments-section {
    margin-top: 40px;
    padding-top: 20px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .comments-section .section-heading { margin-bottom: 16px; }
  .comment-header { gap: 12px; }
  .comment-avatar { width: 36px; height: 36px; }
  .comment-form textarea { min-height: 100px; padding: 12px; font-size: 13px; }

  .auth-card { padding: 24px 16px; }
  .btn { padding: 11px 18px; width: 100%; text-align: center; justify-content: center; font-size: 10px; }
  .btn-outline, .btn-primary { width: 100%; }

  .footer-grid { padding: 0 16px; }
  .footer-heading { font-size: 9px; }
  .footer-nav a { font-size: 12px; }

  .pagination { gap: 4px; }
  .pagination a, .pagination span { width: 34px; height: 34px; font-size: 11px; }
