/* ── Variables ────────────────────────────────────────────── */
:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #eff6ff;
  --secondary:     #7c3aed;
  --accent:        #0ea5e9;
  --tech-color:    #2563eb;
  --science-color: #059669;
  --bg:            #f8fafc;
  --card-bg:       #ffffff;
  --text:          #0f172a;
  --text-secondary:#64748b;
  --text-muted:    #94a3b8;
  --border:        #e2e8f0;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 12px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:     0 20px 40px rgba(0,0,0,.12);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --transition:    all .2s ease;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #0f172a;
  --card-bg:       #1e293b;
  --text:          #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --border:        #334155;
  --primary-light: #1e3a5f;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow-md:     0 4px 12px rgba(0,0,0,.5);
}

[data-theme="dark"] .header {
  background: rgba(15,23,42,.95);
}

[data-theme="dark"] .search-input {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

[data-theme="dark"] .tab {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .footer {
  background: #020617;
}

[data-theme="dark"] .comment-form textarea {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

[data-theme="dark"] .article-content {
  color: #cbd5e1;
}

[data-theme="dark"] .sidebar-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}

[data-theme="dark"] .skeleton-card {
  background: #1e293b;
  border-color: #334155;
}

/* Login / register form inputs in dark mode — keep white bg so typed text is always black */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: #ffffff;
  color: #0f172a;
  border-color: #94a3b8;
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  background: #ffffff;
  color: #0f172a;
}
[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: #94a3b8;
}
[data-theme="dark"] .auth-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
[data-theme="dark"] .auth-subtitle { color: #94a3b8; }
[data-theme="dark"] .auth-tab { color: #64748b; border-color: #334155; }
[data-theme="dark"] .auth-tab.active { color: #f1f5f9; border-color: #2563eb; }
[data-theme="dark"] .form-group label { color: #94a3b8; }

.dark-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  transition: var(--transition);
  color: var(--text-secondary);
}

.dark-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav a:hover, .nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-dropdown { position: relative; display: flex; align-items: center; }

.nav-dropdown-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}
.nav-dropdown-btn:hover { background: var(--primary-light); color: var(--primary); }
.nav-dropdown.open .nav-dropdown-btn { background: var(--primary-light); color: var(--primary); }

.dropdown-chevron { font-size: .65rem; transition: transform .2s; display: inline-block; }
.nav-dropdown.open .dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 220px;
  padding: 6px 0;
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--bg); color: var(--primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
}

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

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: none;
}

.btn-danger:hover { background: #fecaca; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  border-radius: 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.user-chip:hover { background: #dbeafe; }

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--primary);
  border-radius: 50%;
  color: white;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 32px 0;
  min-height: 460px;
  cursor: pointer;
}

.hero img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  transition: transform .4s ease;
}

.hero:hover img { transform: scale(1.02); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
}

.hero-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  max-width: 700px;
  margin-bottom: 16px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,.75);
  font-size: .875rem;
}

.hero-cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #0f172a;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9rem;
  transition: var(--transition);
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.hero-cta:hover { background: var(--primary); color: white; transform: translateX(4px); }

/* ── Search ───────────────────────────────────────────────── */
.search-section { margin-bottom: 32px; }

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-box svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 18px 14px 52px;
  border: 2px solid var(--border);
  border-radius: 40px;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

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

/* ── Category Tabs ────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: .875rem;
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: var(--transition);
}

.tab:hover { border-color: var(--primary); color: var(--primary); }

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ── Articles Grid ────────────────────────────────────────── */
.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  width: fit-content;
}

.category-badge.Technology {
  background: #eff6ff;
  color: var(--tech-color);
}

.category-badge.Science {
  background: #f0fdf4;
  color: var(--science-color);
}

.category-badge.Interactive {
  background: #fff7ed;
  color: #ea580c;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-muted);
}

.card-meta .author { font-weight: 600; color: var(--text-secondary); }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 8px; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.6);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo { color: white; margin-bottom: 12px; }
.footer-brand p { font-size: .875rem; max-width: 280px; }

.footer-col h4 {
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.footer-col a {
  display: block;
  margin-bottom: 8px;
  font-size: .875rem;
  transition: color .15s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Article Page ─────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0 64px;
  align-items: start;
}

.article-header { margin-bottom: 32px; }

.article-category {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-category.Technology { background: #eff6ff; color: var(--tech-color); }
.article-category.Science { background: #f0fdf4; color: var(--science-color); }
.article-category.Interactive { background: #fff7ed; color: #ea580c; }

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: .875rem;
  flex-wrap: wrap;
}

.article-meta .author {
  font-weight: 700;
  color: var(--text-secondary);
}

.article-cover {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 36px;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1e293b;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--text);
}

.article-content p { margin-bottom: 18px; }

.article-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 18px;
}

.article-content li { margin-bottom: 8px; }

.article-content strong { color: var(--text); font-weight: 700; }

.article-content table { border-collapse: collapse; width: 100%; margin: 24px 0; font-size: .92rem; }
.article-content td, .article-content th { border: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
.article-content th { background: var(--bg); font-weight: 600; color: var(--text); }
.article-content tr:hover td { background: var(--bg); }

.article-content .table-striped tr:nth-child(even) td { background: var(--bg); }
.article-content .table-striped th { background: var(--primary); color: #fff; border-color: var(--primary); }

.article-content .table-minimal td, .article-content .table-minimal th { border: none; border-bottom: 1px solid var(--border); }
.article-content .table-minimal th { border-bottom: 2px solid var(--primary); background: none; color: var(--text); }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.tag {
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .8rem;
  color: var(--text-secondary);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { position: sticky; top: 84px; }

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.sidebar-card h3 {
  font-size: .875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.fav-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fav-btn:hover { border-color: #f43f5e; color: #f43f5e; background: #fff1f2; }

.fav-btn.favorited {
  background: #fff1f2;
  border-color: #f43f5e;
  color: #f43f5e;
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:hover { opacity: .75; }

.related-item img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.related-item h4 {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Table of Contents ────────────────────────────────────── */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item { margin-bottom: 8px; line-height: 1.4; }

.toc-item a {
  font-size: .85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .2s;
}

.toc-item a:hover { color: var(--primary); }

.toc-h3 { padding-left: 12px; }
.toc-h3 a { font-size: .8rem; color: var(--text-muted); }

/* ── Comments ─────────────────────────────────────────────── */
.comments-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}

.comments-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.comment-form { margin-bottom: 32px; }

.comment-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color .2s;
  color: var(--text);
  background: var(--card-bg);
}

.comment-form textarea:focus { border-color: var(--primary); }

.comment-form .btn { margin-top: 10px; }

.auth-prompt {
  padding: 20px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-prompt a { color: var(--primary); font-weight: 700; }

.comment {
  display: flex;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  color: white;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-body {}

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

.comment-author { font-weight: 700; font-size: .875rem; }
.comment-date { font-size: .8rem; color: var(--text-muted); }
.comment-text { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Auth Page ────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-card .logo { justify-content: center; margin-bottom: 8px; }

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: .875rem;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-weight: 600;
  font-size: .875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

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

.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .2s;
}

.form-group input:focus { border-color: var(--primary); background: white; }

.form-error {
  background: #fee2e2;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 16px;
  display: none;
}

.form-error.visible { display: block; }

.form-success {
  background: #dcfce7;
  color: #16a34a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 16px;
  display: none;
}

.form-success.visible { display: block; }

.btn-full { width: 100%; justify-content: center; padding: 13px; }

/* ── Profile Page ─────────────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 48px 0;
  margin-bottom: 40px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-details h1 { font-size: 1.75rem; font-weight: 800; }
.profile-details p { opacity: .75; font-size: .9rem; margin-top: 4px; }

/* ── Loading Skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.skeleton-img { height: 200px; }
.skeleton-body { padding: 20px; }
.skeleton-line { height: 14px; margin-bottom: 10px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }

/* ── Notification ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #f1f5f9;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 1000;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero h1 { font-size: 1.5rem; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-overlay { padding: 24px; }
  .article-title { font-size: 1.5rem; }
  .auth-card { padding: 28px 20px; }
  .tabs { flex-wrap: wrap; }
}
