/* ===== Font Faces ===== */
@font-face {
  font-family: 'BigShoulders';
  src: url('../fonts/BigShoulders-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'BigShoulders';
  src: url('../fonts/BigShoulders-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'WorkSans';
  src: url('../fonts/WorkSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'WorkSans';
  src: url('../fonts/WorkSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrainsMono';
  src: url('../fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* ===== CSS Variables ===== */
:root {
  --bg: #0B0D17;
  --bg2: #141627;
  --bg3: #1C1F3A;
  --ink: #F0F0F5;
  --muted: #8B8FA3;
  --rule: #2A2D4A;
  --accent: #6C3CE1;
  --accent2: #00B4D8;
  --accent3: #FF6B6B;
  --accent-glow: rgba(108, 60, 225, 0.25);
  --accent2-glow: rgba(0, 180, 216, 0.2);
  --gradient-hero: linear-gradient(135deg, #6C3CE1 0%, #00B4D8 50%, #6C3CE1 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 4px 32px rgba(108, 60, 225, 0.2);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'WorkSans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent2); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

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

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 13, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
  transition: all 0.3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'BigShoulders', sans-serif;
  font-size: 1.6rem; font-weight: 700;
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: var(--muted); font-size: 0.9rem; font-weight: 400;
  transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 24px; padding: 6px 16px; color: var(--muted);
  font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.nav-search:hover { border-color: var(--accent); color: var(--ink); }
.nav-search svg { flex-shrink: 0; }
.nav-mobile-btn {
  display: none; background: none; border: none; color: var(--ink);
  cursor: pointer; padding: 4px;
}

/* ===== Hero Section ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 64px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.35; filter: saturate(1.2);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,23,0.6) 0%, rgba(11,13,23,0.9) 80%, var(--bg) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 720px; padding: 80px 0 120px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108, 60, 225, 0.15); border: 1px solid rgba(108, 60, 225, 0.3);
  border-radius: 24px; padding: 6px 16px; font-size: 0.82rem;
  color: var(--accent); margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent3); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.hero h1 {
  font-family: 'BigShoulders', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 20px; letter-spacing: -0.01em;
}
.hero h1 .highlight {
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}
.hero-desc {
  font-size: 1.15rem; color: var(--muted);
  line-height: 1.8; margin-bottom: 36px; max-width: 580px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 24px;
  font-family: 'WorkSans', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.3s;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: #7B50EA; color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 60, 225, 0.4);
}
.btn-secondary {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-secondary:hover {
  border-color: var(--accent2); color: var(--accent2);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex; gap: 48px; margin-top: 64px;
  padding-top: 32px; border-top: 1px solid var(--rule);
}
.hero-stat .num {
  font-family: 'BigShoulders', sans-serif;
  font-size: 2rem; font-weight: 700;
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}
.hero-stat .label { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* ===== Page Hero (smaller, for sub-pages) ===== */
.page-hero {
  position: relative;
  min-height: 40vh;
  display: flex; align-items: center;
  padding-top: 64px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border-bottom: 1px solid var(--rule);
}
.page-hero-content {
  position: relative; z-index: 1;
  padding: 60px 0;
}
.page-hero h1 {
  font-family: 'BigShoulders', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 16px;
}
.page-hero p {
  font-size: 1.1rem; color: var(--muted); max-width: 560px; line-height: 1.7;
}

/* ===== Section Common ===== */
.section { padding: 80px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: 'BigShoulders', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 16px;
}
.section-desc { font-size: 1.05rem; color: var(--muted); max-width: 600px; margin: 0 auto; }

/* ===== Skills Categories ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 32px 24px;
  transition: all 0.3s; cursor: pointer; position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gradient-hero);
  background-size: 200% auto;
  opacity: 0; transition: opacity 0.3s;
  animation: gradientShift 4s ease infinite;
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}
.skill-card:hover::before { opacity: 1; }
.skill-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
}
.skill-icon.purple { background: rgba(108, 60, 225, 0.15); }
.skill-icon.blue { background: rgba(0, 180, 216, 0.15); }
.skill-icon.coral { background: rgba(255, 107, 107, 0.15); }
.skill-icon.green { background: rgba(74, 222, 128, 0.15); }
.skill-icon.amber { background: rgba(251, 191, 36, 0.15); }
.skill-icon.pink { background: rgba(236, 72, 153, 0.15); }
.skill-card h3 {
  font-family: 'WorkSans', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 8px; color: var(--ink);
}
.skill-card p {
  font-size: 0.88rem; color: var(--muted); line-height: 1.6;
}
.skill-count {
  font-family: 'JetBrainsMono', monospace;
  font-size: 0.75rem; color: var(--accent);
  margin-top: 16px; opacity: 0.7;
}

/* ===== Article Cards ===== */
.articles-section { background: var(--bg2); }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.article-card {
  background: var(--bg3); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
  transition: all 0.3s; cursor: pointer;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}
.article-thumb {
  width: 100%; height: 200px; object-fit: cover;
  border-bottom: 1px solid var(--rule);
}
.article-body { padding: 24px; }
.article-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; font-size: 0.8rem;
}
.article-tag {
  padding: 3px 10px; border-radius: 12px;
  font-size: 0.72rem; font-weight: 600;
}
.tag-prompt { background: rgba(108, 60, 225, 0.2); color: var(--accent); }
.tag-tool { background: rgba(0, 180, 216, 0.2); color: var(--accent2); }
.tag-practice { background: rgba(255, 107, 107, 0.2); color: var(--accent3); }
.tag-news { background: rgba(251, 191, 36, 0.2); color: #FBBF24; }
.tag-tutorial { background: rgba(74, 222, 128, 0.2); color: #4ADE80; }
.article-date { color: var(--muted); }
.article-card h3 {
  font-family: 'WorkSans', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 10px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--accent2); }
.article-excerpt {
  font-size: 0.88rem; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.article-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.article-author {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--muted);
}
.author-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff;
}
.article-likes {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.8rem; color: var(--muted);
  transition: color 0.2s;
}
.article-likes:hover { color: var(--accent3); }

/* ===== Table Styles ===== */
.table-wrap { overflow-x: auto; overflow-y: auto; max-height: 600px; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.data-table th {
  text-align: left; padding: 14px 16px;
  background: var(--bg2); color: var(--ink);
  font-weight: 700; border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 2;
}
.data-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.data-table tr:hover td { background: var(--bg2); color: var(--ink); }
.data-table .rank {
  font-family: 'BigShoulders', sans-serif;
  font-size: 1.2rem; font-weight: 700;
}
.rank-1 { color: #FFD700; }
.rank-2 { color: #C0C0C0; }
.rank-3 { color: #CD7F32; }

/* ===== List Styles ===== */
.content-list {
  display: flex; flex-direction: column; gap: 16px;
}
.content-list-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 24px; background: var(--bg2);
  border: 1px solid var(--rule); border-radius: var(--radius);
  transition: all 0.3s; cursor: pointer;
}
.content-list-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
.content-list-num {
  font-family: 'BigShoulders', sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--accent);
  min-width: 36px; text-align: center;
}
.content-list-body h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: 4px;
}
.content-list-body p {
  font-size: 0.85rem; color: var(--muted); line-height: 1.5;
}
.content-list-meta {
  display: flex; gap: 16px; margin-top: 8px;
  font-size: 0.78rem; color: var(--muted);
}

/* ===== Community Section ===== */
.community-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.community-img {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--rule);
}
.community-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.community-img:hover img { transform: scale(1.03); }
.community-content h2 {
  font-family: 'BigShoulders', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 20px;
}
.community-content p {
  font-size: 1rem; color: var(--muted); line-height: 1.7;
  margin-bottom: 16px;
}
.community-features { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.community-feat {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
}
.community-feat-icon {
  flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.community-feat-icon.purple { background: rgba(108, 60, 225, 0.15); }
.community-feat-icon.blue { background: rgba(0, 180, 216, 0.15); }
.community-feat-icon.green { background: rgba(74, 222, 128, 0.15); }
.community-feat h4 {
  font-size: 0.92rem; font-weight: 700; margin-bottom: 4px;
}
.community-feat p { font-size: 0.82rem; color: var(--muted); margin-bottom: 0; }

/* ===== Newsletter ===== */
.newsletter {
  background: var(--bg2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.newsletter-inner {
  max-width: 560px; margin: 0 auto; text-align: center;
}
.newsletter h2 {
  font-family: 'BigShoulders', sans-serif;
  font-size: 1.8rem; font-weight: 700; margin-bottom: 12px;
}
.newsletter p { font-size: 0.95rem; color: var(--muted); margin-bottom: 28px; }
.newsletter-form {
  display: flex; gap: 12px; max-width: 480px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: 12px 20px; border-radius: 24px;
  background: var(--bg); border: 1px solid var(--rule);
  color: var(--ink); font-family: 'WorkSans', sans-serif;
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
  flex-shrink: 0; padding: 12px 24px; border-radius: 24px;
  background: var(--accent); color: #fff; border: none;
  font-family: 'WorkSans', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s;
}
.newsletter-form button:hover {
  background: #7B50EA; transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* ===== Footer ===== */
.footer { padding: 64px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand .footer-logo {
  font-family: 'BigShoulders', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 0.88rem; color: var(--muted);
  padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent2); }
.footer-bottom {
  padding-top: 32px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--muted);
}
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--muted); transition: color 0.2s; }
.footer-social a:hover { color: var(--accent); }

/* ===== Scroll to Top ===== */
.scroll-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; z-index: 99;
  opacity: 0; transform: translateY(16px);
  transition: all 0.3s; box-shadow: var(--shadow-accent);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: #7B50EA; transform: translateY(-2px); }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-search { display: none; }
  .nav-mobile-btn { display: block; }
  .hero-content { padding: 48px 0 80px; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .hero-stat .num { font-size: 1.6rem; }
  .page-hero h1 { font-size: 2rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .skill-card { padding: 24px 16px; }
  .articles-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; gap: 32px; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .data-table { min-width: 600px; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
}
