/* SparkDrupal — Custom CSS */
/* Framework: Bulma CSS via CDN */
/* Design: Dark-accented tech/developer theme, deep navy + electric orange */

:root {
  --primary: #1a2744;
  --primary-dark: #0f1a32;
  --accent: #f57c00;
  --accent-light: #ff9800;
  --accent-glow: rgba(245, 124, 0, 0.15);
  --text: #1e2a3a;
  --text-light: #4a5568;
  --text-muted: #718096;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --bg-dark: #1a2744;
  --border: #e2e8f0;
  --code-bg: #1e2a3a;
  --code-text: #e2e8f0;
  --nav-height: 68px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 39, 68, 0.14);
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Open Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

code, pre {
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.875em;
}

code {
  background: #f0f2f5;
  color: var(--primary);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary-dark);
  border-bottom: 2px solid var(--accent);
  height: var(--nav-height);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-brand:hover { color: var(--accent-light); }

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.875rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(245, 124, 0, 0.15);
  color: var(--accent-light);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1.1rem !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-light) !important;
  color: #fff !important;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 2px solid var(--accent);
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
}

/* Page body offset for fixed nav */
body { padding-top: var(--nav-height); }

/* Hero */
.hero-section {
  background: var(--primary-dark);
  background-image: linear-gradient(135deg, #0f1a32 0%, #1a2744 50%, #1e3a5f 100%);
  color: #fff;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/images/hero-home.jpg') center/cover no-repeat;
  opacity: 0.12;
}

.hero-section.no-bg-image::before { display: none; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.hero-content .accent { color: var(--accent-light); }

.hero-content p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: #fff;
}

/* Content layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 2rem;
}

.section-alt { background: var(--bg-alt); }

.section-dark {
  background: var(--primary-dark);
  color: #fff;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.section-dark .section-title { color: #fff; }

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.section-dark .section-subtitle { color: rgba(255,255,255,0.7); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.4rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1rem;
  text-decoration: none;
}

.card-link:hover { color: var(--accent-light); }

/* Article / inner page layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

.article-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1.05rem;
}

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1.05rem;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover { color: var(--accent-light); }

.article-image {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-image img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

/* Sidebar */
.sidebar-widget {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links a {
  color: var(--text-light);
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-links a:hover { color: var(--accent); }

/* Page header for inner pages */
.page-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 3rem 2rem 2.5rem;
}

.page-header .container { max-width: 1280px; }

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

.page-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.page-header .lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 680px;
}

/* Blog listing */
.post-list { display: flex; flex-direction: column; gap: 1.5rem; }

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.post-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.post-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h3 a:hover { color: var(--accent); }

.post-card p { color: var(--text-light); font-size: 0.95rem; margin: 0; }

/* Feature strip */
.feature-strip {
  background: var(--primary);
  color: #fff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.feature-strip .strip-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.feature-strip h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.feature-strip p { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin: 0; }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 3rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-item { text-align: center; }

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Contact form */
.contact-form {
  max-width: 640px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-submit:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand .brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--accent-light); }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--accent-light); }

/* Tag badge */
.tag {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(245,124,0,0.25);
  border-radius: 100px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Notice */
.notice {
  background: #f0f7ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #1e3a5f;
}

/* 404 */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 4rem 2rem;
  text-align: center;
}

.error-code {
  font-size: 7rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 480px;
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 0.5rem; }
.accent-color { color: var(--accent); }

/* Responsive adjustments */
@media (max-width: 600px) {
  .section { padding: 3rem 1.25rem; }
  .hero-section { padding: 3rem 1.25rem 2.5rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; }
}
