:root {
  /* Brand Colors */
  --color-brand: #E60033;
  /* Vibrant Japan Red */
  --color-brand-dark: #B30027;
  --color-brand-blue: #558acb;
  /* Deep Blue */
  
  /* Light Mode Defaults */
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #666666;
  --color-border: #E5E5E5;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-main: 'Be Vietnam Pro', sans-serif;
  --font-display: 'Be Vietnam Pro', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --color-bg: #121212;
  --color-surface: #1e1e1e;
  --color-text-primary: #e0e0e0;
  --color-text-secondary: #a0a0a0;
  --color-border: #333333;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
}

ul {
  padding-left: 1rem !important;
}

/* Header */
header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: fixed; /* Changed from sticky to fixed */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--spacing-md) 0;
  transition: transform 0.3s ease-in-out; /* Smooth slide */
}

.header-hidden {
  transform: translateY(-100%); /* Slide up to hide */
}

/* Adjust main container to prevent overlap since header is fixed */
main.container {
  padding-top: 6rem !important;
  margin-top: 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-brand);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-brand);
}

/* Hero Section */
.hero {
  padding: var(--spacing-lg) 0;
  padding-top: 6rem;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, #f3f3f3 100%);
  margin-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--color-text-secondary);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Category Sections */
.category-section {
  margin-bottom: var(--spacing-xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--spacing-lg);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--spacing-sm);
}

.section-title {
  font-size: 2rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-brand);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.article-card {
  background: var(--color-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.article-image {
  height: 200px;
  background-color: #eee;
  background-size: cover;
  background-position: center;
}

.article-content {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brand);
  font-weight: 700;
  display: inline-block;
}

a.article-category:hover {
  text-decoration: underline;
  opacity: 0.8;
}



.video-container {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  margin: var(--spacing-md) 0;
  box-shadow: var(--shadow-md);
}



.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.article-title {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}

.article-overview {
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.article-date {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

/* Navigation Layout */
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Mobile Menu Styles */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 999;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-text-primary);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  transform: translateX(280px);
}

.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-menu a {
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.mobile-menu-settings {
    margin-top: auto; /* Push to bottom */
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    margin-bottom: var(--spacing-md);
}

.settings-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.close-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* Brand Text Colors */
.text-brand-red {
  color: var(--color-brand);
}

.text-brand-blue {
  color: var(--color-brand-blue);
}