/* Design Tokens (From DESIGN.md) */
:root {
  /* Fonts */
  --font-title: 'Lora', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transitions - standard, stable, no layout shift */
  --transition-normal: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

/* Dark Theme (Charcoal Ink) */
.dark-theme {
  --bg-primary: #090a0c;
  --bg-secondary: #111318;
  --bg-glass: rgba(17, 19, 24, 0.9);
  --bg-glass-highlight: rgba(34, 197, 94, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(34, 197, 94, 0.3);
  
  --text-primary: #f3f4f6;
  --text-secondary: #cbd5e1;
  --text-muted: #6b7280;
  
  --accent-color: #22c55e;
  --accent-secondary: #10b981;
  --accent-gradient: linear-gradient(135deg, #15803d 0%, #0d9488 100%);
  --accent-glow: rgba(34, 197, 94, 0.08);
  
  --badge-bg: rgba(34, 197, 94, 0.1);
  --badge-text: #4ade80;
  --icon-bg: rgba(34, 197, 94, 0.08);
  --icon-border: rgba(34, 197, 94, 0.2);
}

/* Light Theme (Limestone / Cream) */
.light-theme {
  --bg-primary: #f7f5f0;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-glass-highlight: rgba(21, 128, 61, 0.03);
  --border-glass: rgba(17, 24, 39, 0.08);
  --border-highlight: rgba(21, 128, 61, 0.35);
  
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  
  --accent-color: #15803d;
  --accent-secondary: #0d9488;
  --accent-gradient: linear-gradient(135deg, #166534 0%, #0f766e 100%);
  --accent-glow: rgba(21, 128, 61, 0.06);
  
  --badge-bg: rgba(21, 128, 61, 0.08);
  --badge-text: #15803d;
  --icon-bg: rgba(21, 128, 61, 0.05);
  --icon-border: rgba(21, 128, 61, 0.15);
}

/* Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.625;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Ambient Background Glows (Minimal & Subtle Texture) */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.orb-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  right: -50px;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
  animation: pulse-slow 15s infinite alternate;
}

.orb-2 {
  width: 450px;
  height: 450px;
  bottom: 20%;
  left: -150px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  animation: pulse-slow 20s infinite alternate-reverse;
}

@keyframes pulse-slow {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.1) translate(15px, 20px);
  }
}

/* Floating Navigation Header (Modern Editorial Banner) */
.site-header {
  position: sticky;
  top: 24px;
  z-index: 100;
  margin: 24px auto;
  max-width: 800px;
  width: calc(100% - 48px);
  border: 1px solid var(--border-glass);
  background-color: var(--bg-glass);
  border-radius: 12px;
  transition: var(--transition-normal);
}

.header-container {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.logo-svg {
  width: 20px;
  height: 20px;
  color: var(--accent-color);
}

.logo-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.logo-subtext {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 2px;
}

.controls-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Control Buttons */
.btn-control {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-normal);
}

.btn-control:hover {
  background: var(--bg-glass-highlight);
  border-color: var(--border-highlight);
}

.control-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.icon-btn {
  padding: 6px;
  width: 32px;
  height: 32px;
  justify-content: center;
}

.lang-label {
  opacity: 0.45;
  transition: opacity 0.15s ease;
}

.lang-label.label-active {
  opacity: 1;
  font-weight: 700;
  color: var(--accent-color);
}

.lang-divider {
  opacity: 0.2;
}

/* Theme Icons */
.theme-icon {
  width: 15px;
  height: 15px;
  fill: none;
}

.dark-theme .sun-icon {
  display: block;
}

.dark-theme .moon-icon {
  display: none;
}

.light-theme .sun-icon {
  display: none;
}

.light-theme .moon-icon {
  display: block;
}

/* Hero Section */
.hero {
  padding: 56px 0 32px 0;
  text-align: center;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid var(--icon-border);
  font-family: var(--font-body);
}

.hero-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.gradient-text {
  color: var(--text-primary);
  /* A beautiful top-down solid print gradient or simple clean dark/light color */
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.6;
}

/* Main Content Layout */
.main-content {
  padding-bottom: 80px;
}

.lang-section {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.lang-section.active-section {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Editorial-style Cards (Flat Sheets with borders, no drop-shadows) */
.card {
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--transition-normal);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-glass);
}

/* Stable hover animation - border and backdrop color shifts */
.card:hover {
  border-color: var(--border-highlight);
  background-color: var(--bg-glass-highlight);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 14px;
}

.card-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  color: var(--accent-color);
  flex-shrink: 0;
}

.card-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

.card-header h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.975rem;
  margin-bottom: 20px;
  line-height: 1.625;
}

/* Highlighted Contact Card */
.highlighted-card {
  border-color: var(--border-highlight);
  background-color: var(--bg-glass-highlight);
}

/* Badges Row */
.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.security-badge {
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Feature Checklist */
.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.features-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.feature-bullet-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--accent-color);
  margin-top: 3px;
  flex-shrink: 0;
}

.light-theme .feature-bullet-wrapper {
  background: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.2);
  color: var(--accent-color);
}

.feature-bullet-wrapper svg {
  width: 10px;
  height: 10px;
}

.features-list li strong {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.feature-desc {
  margin-top: 2px;
  font-size: 0.88rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

.mt-4 {
  margin-top: 20px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* Minimalist Button Link */
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.email-link:hover {
  opacity: 0.92;
  box-shadow: 0 4px 12px -3px var(--accent-glow);
}

.email-link svg {
  transition: transform 0.2s ease;
}

.email-link:hover svg {
  transform: translate(2px, -2px);
}

/* Focus States for Keyboard Navigation */
.btn-control:focus-visible,
.card:focus-visible,
.email-link:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.775rem;
}

/* Responsive Layouts */
@media (max-width: 640px) {
  .site-header {
    top: 16px;
    width: calc(100% - 32px);
    margin: 16px auto;
  }
  
  .header-container {
    padding: 10px 14px;
  }
  
  .logo-text {
    font-size: 1.05rem;
  }
  
  .hero {
    padding: 40px 0 20px 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .card {
    padding: 24px;
    margin-bottom: 20px;
  }
  
  .card-header h2 {
    font-size: 1.2rem;
  }
  
  .email-link {
    width: 100%;
    justify-content: center;
  }
}
