/* ===================================
   Blue Sky Fusion - Main Stylesheet
   Modern, Apple-inspired design
   Light/Dark mode responsive
   =================================== */

/* CSS Variables for Light/Dark Mode */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fbfbfd;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent-primary: #0071e3;
  --accent-hover: #0077ed;
  --border-color: #d2d2d7;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --code-bg: #f6f6f6;
  --code-text: #1d1d1f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2d2d2f;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #86868b;
    --accent-primary: #2997ff;
    --accent-hover: #409cff;
    --border-color: #424245;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --code-bg: #1d1d1f;
    --code-text: #f5f5f7;
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: saturate(180%) blur(20px);
  background-color: rgba(255, 255, 255, 0.72);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background-color: rgba(0, 0, 0, 0.8);
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-cta {
  margin-top: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-text {
  background: transparent;
  color: var(--accent-primary);
  padding: 0.75rem 0;
}

.btn-text:hover {
  opacity: 0.7;
}

/* Section Styles */
.section {
  padding: 6rem 1.5rem;
}

.section:nth-child(even) {
  background-color: var(--bg-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-description {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature {
  text-align: center;
  padding: 2rem;
  border-radius: 18px;
  background-color: var(--bg-primary);
  transition: all 0.3s ease;
}

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

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Project Feature Section */
.project-feature {
  background-color: var(--bg-primary);
  border-radius: 24px;
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
}

.project-badge {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.project-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.highlight {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.highlight strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

/* Code Block */
.code-block {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
}

.code-block code {
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--code-text);
  white-space: pre;
  display: block;
}

/* Project Links */
.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.project-links .btn svg {
  flex-shrink: 0;
}

/* Contact Section */
.section-contact {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.contact-info {
  text-align: center;
  margin-top: 2rem;
}

.contact-email a {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.contact-email a:hover {
  opacity: 0.7;
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer-author {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
  }
  
  .nav-menu a {
    font-size: 0.8rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .project-feature {
    padding: 2rem 1.5rem;
  }
  
  .project-highlights {
    grid-template-columns: 1fr;
  }
  
  .project-links {
    flex-direction: column;
  }
  
  .project-links .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-menu {
    gap: 0.75rem;
  }
  
  .section {
    padding: 4rem 1rem;
  }
  
  .code-block {
    padding: 1rem;
  }
  
  .code-block code {
    font-size: 0.75rem;
  }
}

/* Smooth transitions for theme changes */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
