:root {
  /* Default Dark Theme */
  --color-bg: #050505;
  --color-text: #ffffff;
  --color-primary: #ffffff;
  --color-secondary: #a1a1a6;
  --color-accent: #ffffff;
  --glass-bg: rgba(30, 30, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  --glass-blur: 20px;
  --glass-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);

  --header-bg: rgba(10, 10, 10, 0.85);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Roboto Mono', monospace;

  --spacing-sm: 8px;
  --spacing-md: 20px;
  --spacing-lg: 40px;
  --spacing-xl: 80px;
}

[data-theme="white"] {
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-primary: #000000;
  --color-secondary: #424245;
  --color-accent: #333333;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-highlight: rgba(0, 0, 0, 0.03);
  --glass-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="colorful"] {
  --color-bg: #0f172a;
  --grad-bg: linear-gradient(135deg, #0f172a 0%, #312e81 25%, #581c87 50%, #701a75 75%, #0f172a 100%);
  --color-text: #ffffff;
  --color-primary: #fcd34d;
  /* Amber/Gold */
  --color-secondary: #e2e8f0;
  --color-accent: #22d3ee;
  /* Cyan */
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-highlight: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --header-bg: rgba(15, 23, 42, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: var(--font-main);
  background: var(--color-bg);
  background-image: var(--grad-bg, none);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.5s ease, color 0.5s ease, background-image 0.5s ease;
}

/* Typography Overhaul */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  /* Tighter tracking for headlines */
}

p {
  line-height: 1.6;
  color: var(--color-secondary);
  font-size: 1.05rem;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

/* Layout */
.site-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Premium Header */
/* Site Header - Awwwards Style */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.5s ease, border-color 0.5s ease;
}

.header-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.logo,
.logo-link,
.logo-text {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary) !important;
  text-decoration: none;
  letter-spacing: -0.03em;
  text-shadow: 0 0 20px var(--glass-highlight);
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex: 2;
}

.nav-links a {
  color: var(--color-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  text-transform: capitalize;
}

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

/* --- Dropdown Menu Styles --- */
.nav-item-dropdown {
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
  /* Bridge for hover gap */
  margin-bottom: -20px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(30, 30, 30, 0.95);
  /* High opacity for darker background */
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  padding: 10px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

[data-theme="white"] .dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  /* High opacity for white theme */
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--color-secondary);
  font-size: 0.9rem;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
  transition: all 0.2s ease;
  width: 100%;
}

.dropdown-menu a:hover {
  background: var(--glass-highlight);
  color: var(--color-primary);
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
}

.contact-link {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  margin-right: 15px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}



/* Search Bar Styles (Awwwards Style) */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--glass-highlight);
  border-radius: 100px;
  padding: 6px 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 220px;
  cursor: text;
}

.search-wrapper:focus-within {
  background: var(--glass-bg);
  width: 260px;
  box-shadow: 0 0 0 1px var(--color-accent);
}

.search-icon {
  font-size: 0.95rem !important;
  color: var(--color-secondary);
  margin-right: 8px;
  pointer-events: none;
}

.search-input {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 0.85rem;
  font-family: var(--font-main);
  outline: none;
  width: 100%;
}

.search-input::placeholder {
  color: var(--color-secondary);
  opacity: 0.6;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--color-secondary);
  font-style: italic;
}

/* --- NEW MATERIAL ICONS CHECKBOX HACK --- */

.menu-toggle-input {
  display: none !important;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
}

.mobile-menu-label {
  display: none;
  /* Hidden on desktop */
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.mobile-menu-label::before {
  content: "menu";
  font-family: "Material Icons";
  font-size: 32px;
  color: var(--color-primary);
  transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
  .site-header {
    height: 56px;
    background: var(--header-bg);
  }

  .header-container {
    padding: 0 16px;
  }

  .nav-links,
  .contact-link {
    display: none;
  }

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

  .header-left {
    flex: 0 0 auto;
  }

  .logo {
    font-size: 1.1rem;
  }

  .header-right {
    flex: 1;
    justify-content: flex-end;
  }

  .search-wrapper {
    flex: 1;
    max-width: none;
    width: auto;
    height: 38px;
    background: var(--glass-highlight);
    border-radius: 8px;
    margin-left: 15px;
  }

  .search-wrapper:focus-within {
    width: auto;
    flex: 1;
    background: var(--glass-bg);
  }

  /* Mobile Nav Overlay */
  .nav-links {
    display: flex;
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }

  body.menu-active .nav-links {
    height: calc(100vh - 56px);
  }

  .nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
  }

  /* Mobile Dropdown Fixes */
  .nav-item-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    padding: 8px 0 0 0;
    min-width: auto;
    align-items: center;
    gap: 8px;
  }

  .dropdown-menu a {
    font-size: 0.9rem;
    padding: 3px 0;
    text-align: center;
    color: var(--color-secondary);
    opacity: 0.8;
  }

  .dropdown-menu a:hover {
    background: transparent;
    color: var(--color-primary);
    opacity: 1;
  }

  /* Override desktop hover transform */
  .nav-item-dropdown:hover .dropdown-menu {
    transform: none;
  }
}

@media (max-width: 480px) {
  .logo {
    display: none;
    /* Hide logo text on very small screens, maybe keep 'W' style later */
  }

  .search-wrapper {
    margin-left: 0;
  }
}

/* Hero Section Styles */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 64px;
  /* Offset for fixed header */
  overflow: hidden;
  text-align: center;
  z-index: 5;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  color: var(--color-primary);
  text-shadow: 0 0 30px var(--glass-highlight);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

/* Blog Grid & Cards */
.blog-section {
  padding: var(--spacing-xl) var(--spacing-lg);
  padding-top: 150px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 48px;
  /* More breathing room */
  font-weight: 600;
  letter-spacing: -0.03em;
  border: none;
  /* Removed border */
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.blog-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  /* The Premium Glass Effect */
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);

  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
}

.blog-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.25);
}

.card-image-wrapper {
  overflow: hidden;
  height: 220px;
  width: 100%;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.blog-card:hover .card-image {
  transform: scale(1.1);
}

.card-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.card-excerpt {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.read-more {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
  padding: 8px 16px;
  background: var(--glass-bg);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.read-more:hover {
  background: var(--color-accent);
  color: #fff;
}

.read-more::after {
  content: '→';
  transition: transform 0.3s ease;
}

.read-more:hover::after {
  transform: translateX(3px);
}

/* Footer */
.site-footer {
  padding: 60px 20px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--color-secondary);
  background: var(--color-bg);
  transition: background 0.5s ease;
}

.site-footer a {
  color: var(--color-secondary);
}

.site-footer a:hover {
  color: var(--color-text);
}

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






  .blog-section {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    /* Stack on mobile */
    gap: 24px;
  }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .card-image-wrapper {
    height: 180px;
  }
}