@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Solarized Dark Palette */
  --base03: #002b36;
  --base02: #073642;
  --base01: #586e75;
  --base00: #657b83;
  --base0: #839496;
  --base1: #93a1a1;
  --base2: #eee8d5;
  --base3: #fdf6e3;
  --yellow: #b58900;
  --orange: #cb4b16;
  --red: #dc322f;
  --magenta: #d33682;
  --violet: #6c71c4;
  --blue: #268bd2;
  --cyan: #2aa198;
  --green: #859900;

  /* Transparent variants for glassmorphism */
  --glass-bg: rgba(7, 54, 66, 0.65);
  --glass-border: rgba(38, 139, 210, 0.2);
  --glass-glow: rgba(42, 161, 152, 0.15);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--base03);
  color: var(--base1);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography styles */
h1, h2, h3, h4, h5 {
  color: var(--base2);
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: 2.5rem;
  color: var(--blue);
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--base0);
}

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

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

/* Background Gradients & Glow Effects */
.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  border-radius: 50%;
  animation: float 10s ease-in-out infinite alternate;
}

.blob-1 {
  top: -10%; left: -10%;
  width: 500px; height: 500px;
  background: var(--blue);
}

.blob-2 {
  bottom: -10%; right: -10%;
  width: 600px; height: 600px;
  background: var(--cyan);
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Navigation */
header {
  padding: 2rem 0;
  position: relative;
  z-index: 10;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 2rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--base3);
  letter-spacing: 1px;
}

.logo span {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--base1);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--cyan);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: var(--base03);
  box-shadow: 0 4px 15px var(--glass-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(38, 139, 210, 0.4);
  color: white;
}

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

.btn-outline:hover {
  background: var(--cyan);
  color: var(--base03);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.hero p {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1.25rem;
}

/* Content Sections for Markdown */
.content-section {
  padding: 6rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0, 0.4);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

#markdown-container {
  width: 100%;
  text-align: left;
}

#markdown-container h1,
#markdown-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

#markdown-container h2:not(:first-child) {
  margin-top: 5rem;
}

/* Intro paragraphs under h2 are full-width and centered, matching the grid below */
#markdown-container p {
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: 0 0 2.5rem 0;
  font-size: 1.1rem;
  color: var(--base0);
}

ul.grid {
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding-left: 0;
}

ul.grid li.glass-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

ul.grid li.glass-card strong {
  display: block;
  font-size: 1.5rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

/* Handle nested lists in Case Studies */
ul.grid li.glass-card ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

ul.grid li.glass-card ul li {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: var(--base0);
}

ul.grid li.glass-card ul li em {
  color: var(--blue);
  font-style: normal;
  font-weight: 600;
  margin-right: 0.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--base1);
  font-weight: 500;
}

input, textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 43, 54, 0.5);
  border: 1px solid var(--base02);
  color: var(--base3);
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(42, 161, 152, 0.2);
}

/* Section Spacing */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* Tiles grid for products */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.app-tile {
  background: var(--base02);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.app-tile:hover {
  background: var(--base03);
  border-color: var(--cyan);
  transform: translateY(-5px);
}

/* Footer */
footer {
  margin-top: auto;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--base02);
  background: var(--base03);
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* Burger button — hidden on desktop */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 20;
  flex-direction: column;
  gap: 5px;
}

.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--base1);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animated X state */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .burger {
    display: flex;
  }

  nav {
    flex-wrap: wrap;
    border-radius: 24px;
    position: relative;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.1rem;
  }
}

/* Utility Animations */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
