/* ===========================================
   GEO Theme - Swiss Style Cyber-Minimalism
   =========================================== */

/* CSS Custom Properties */
:root {
  /* Colors - Light Mode */
  --primary: #0055FF;
  --primary-foreground: #FFFFFF;
  --background: #FAFAFA;
  --foreground: #0A0A0A;
  --card: #FFFFFF;
  --card-foreground: #0A0A0A;
  --muted: #E4E4E7;
  --muted-foreground: #71717A;
  --border: #E4E4E7;
  --accent: #EFF6FF;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --container-max: 1280px;
  --container-padding: 1rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --primary: #3B82F6;
  --primary-foreground: #FFFFFF;
  --background: #0A0A0A;
  --foreground: #FAFAFA;
  --card: #141414;
  --card-foreground: #FAFAFA;
  --muted: #27272A;
  --muted-foreground: #A1A1AA;
  --border: #27272A;
  --accent: #172554;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================================
   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(--foreground);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

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

a:hover {
  color: var(--foreground);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--muted);
  padding: 0.2em 0.4em;
  border-radius: 0;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
}

/* ===========================================
   Layout
   =========================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

@media (min-width: 640px) {
  :root { --container-padding: 1.5rem; }
}

@media (min-width: 1024px) {
  :root { --container-padding: 2rem; }
}

main {
  flex: 1;
}

/* ===========================================
   Header
   =========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--foreground);
  text-decoration: none;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--foreground);
}

.header__nav a.nav-highlight {
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--primary);
  background: var(--accent);
}

.header__nav a.nav-highlight:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--foreground);
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }

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

  .header__nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 1rem;
  }
}

/* ===========================================
   Hero Section
   =========================================== */
.hero {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  margin-bottom: 2rem;
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero__title {
  margin-bottom: 1.5rem;
}

.hero__title span {
  background: linear-gradient(135deg, var(--primary), #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn--primary:hover {
  background: color-mix(in srgb, var(--primary) 85%, black);
  color: var(--primary-foreground);
}

.btn--outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

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

.btn--ghost {
  background: transparent;
  color: var(--primary);
  padding: 0;
}

.btn--ghost:hover {
  color: var(--foreground);
}

/* ===========================================
   Cards / Expertise Grid
   =========================================== */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
  border-bottom: 1px solid var(--border);
}

.expertise-card {
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color var(--transition-base);
}

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

.expertise-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all var(--transition-base);
}

.expertise-card:hover .expertise-card__icon {
  background: var(--primary);
  color: var(--primary-foreground);
}

.expertise-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.expertise-card__description {
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* ===========================================
   Topics Section (Personal Style)
   =========================================== */
.topics-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.topic-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color var(--transition-base);
}

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

.topic-item__icon {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  min-width: 2rem;
}

.topic-item__title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.topic-item__description {
  color: var(--muted-foreground);
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===========================================
   Blog List
   =========================================== */
.blog-header {
  padding: 4rem 0;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
  border-bottom: 1px solid var(--border);
}

.blog-header__title {
  margin-bottom: 1rem;
}

.blog-header__description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin-bottom: 0;
}

.blog-list {
  padding: 3rem 0;
}

.blog-post-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.blog-post-item:last-child {
  border-bottom: none;
}

.blog-post-item__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.blog-post-item__category {
  color: var(--primary);
  font-weight: 600;
}

.blog-post-item__title {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.blog-post-item__title a {
  color: inherit;
  text-decoration: none;
}

.blog-post-item:hover .blog-post-item__title {
  color: var(--primary);
}

.blog-post-item__excerpt {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

/* ===========================================
   Single Post
   =========================================== */
.post-header {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.post-header__category {
  color: var(--primary);
  font-weight: 600;
}

.post-header__title {
  margin-bottom: 1.5rem;
}

.post-header__description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 700px;
}

/* Key Points Box */
.key-points {
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  padding: 1.5rem;
  margin: 2rem 0;
}

.key-points__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.key-points ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.key-points li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.key-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--primary);
}

.key-points li:last-child {
  margin-bottom: 0;
}

/* TL;DR Box */
.tldr {
  background: var(--card);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin: 2rem 0;
}

.tldr__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.tldr p {
  margin-bottom: 0;
  font-size: 1.125rem;
}

/* Post Content */
.post-content {
  padding: 3rem 0;
  max-width: 720px;
}

.post-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted-foreground);
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

/* Responsive tables - horizontal scroll on mobile */
.post-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.post-content th, .post-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
  min-width: 100px;
}

.post-content th {
  background: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .post-content table {
    display: table;
    font-size: 1rem;
  }
}

/* FAQ Section */
.faq-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
}

.faq-section__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item__question {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.faq-item__answer {
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* ===========================================
   Footer
   =========================================== */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer__copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

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

/* ===========================================
   Utilities
   =========================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Syntax Highlighting (GitHub style) */
.highlight {
  margin: 1.5rem 0;
}

.highlight pre {
  margin: 0;
}

/* ===========================================
   Signup Form
   =========================================== */
.signup-form {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.signup-form form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
}

.signup-form input[type="email"]::placeholder {
  color: var(--muted-foreground);
}

/* Course/Waitlist Landing Page */
.course-hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--background));
  border-bottom: 1px solid var(--border);
}

.course-hero__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--background);
  border: 1px solid var(--primary);
  margin-bottom: 1.5rem;
}

.course-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.course-hero__description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.course-modules {
  padding: 3rem 0;
}

.course-module {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
}

.course-module__number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.course-module__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.course-module__description {
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* ===========================================
   Page Layout (About, Contact, Newsletter)
   =========================================== */
.page-content {
  min-height: calc(100vh - 200px);
}

.page-header {
  padding: 5rem 0 3rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--muted) 30%, transparent), var(--background));
  border-bottom: 1px solid var(--border);
}

.page-header__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--foreground), var(--muted-foreground));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header__description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin-bottom: 0;
  line-height: 1.6;
}

.page-body {
  max-width: 720px;
  padding: 3rem 0 4rem;
  font-size: 1.125rem;
}

.page-body h1 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.page-body h1:first-child {
  margin-top: 0;
}

.page-body h2 {
  font-size: 1.625rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.page-body h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.page-body p {
  color: var(--muted-foreground);
  line-height: 1.8;
  font-size: 1.125rem;
}

.page-body strong {
  color: var(--foreground);
  font-weight: 600;
}

.page-body ul, .page-body ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
}

.page-body li {
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
  line-height: 1.7;
  font-size: 1.125rem;
}

.page-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.page-body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.page-body a:hover {
  border-bottom-color: var(--primary);
}

/* Tables in page body */
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.page-body th,
.page-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

.page-body th {
  background: var(--muted);
  font-weight: 600;
  color: var(--foreground);
}

.page-body td {
  color: var(--muted-foreground);
}

.page-body tr:hover td {
  background: color-mix(in srgb, var(--muted) 30%, transparent);
}

/* Currently section on About page */
.page-body li p {
  display: inline;
  margin: 0;
}

/* ===========================================
   Roadmap CTA Section (Homepage)
   =========================================== */
.roadmap-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.roadmap-section__inner {
  max-width: 700px;
}

.roadmap-section__inner .hero__badge {
  margin-bottom: 1.5rem;
}

.roadmap-section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.roadmap-section__description {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 600px;
}

.roadmap-section__form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  max-width: 480px;
}

.roadmap-section__form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  transition: border-color var(--transition-fast);
}

.roadmap-section__form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
}

.roadmap-section__form input[type="email"]::placeholder {
  color: var(--muted-foreground);
}

.roadmap-section .form-message {
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin-bottom: 0.5rem;
}

.roadmap-section .btn--ghost {
  margin-top: 0.5rem;
}
