/* ===== PREMIUM DESIGN SYSTEM — John DeRudder ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Dark palette */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8F9FC;
  --color-bg-dark: #0A0F1C;
  --color-bg-darker: #060A14;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-light: rgba(255, 255, 255, 0.08);
  /* Text */
  --color-text: #1A1A2E;
  --color-text-secondary: #4A5568;
  --color-text-light: #718096;
  --color-text-on-dark: #E2E8F0;
  --color-text-on-dark-secondary: rgba(255, 255, 255, 0.6);
  /* Accent — deep blue to teal gradient feel */
  --color-accent: #3B82F6;
  --color-accent-hover: #2563EB;
  --color-accent-glow: rgba(59, 130, 246, 0.15);
  --color-accent-subtle: rgba(59, 130, 246, 0.06);
  --gradient-accent: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  --gradient-accent-text: linear-gradient(135deg, #60A5FA 0%, #22D3EE 100%);
  --gradient-dark: linear-gradient(180deg, #0A0F1C 0%, #111827 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
  /* Borders */
  --color-border: #E2E8F0;
  --color-border-glass: rgba(255, 255, 255, 0.1);
  --color-white: #FFFFFF;
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --section-padding: 100px 0;
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 16px 0;
  transition: all 0.3s var(--ease-out);
}

nav.scrolled {
  padding: 12px 0;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* Dark nav for dark hero pages */
nav.nav-dark {
  background: rgba(10, 15, 28, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav.nav-dark .nav-logo { color: var(--color-white); }
nav.nav-dark .nav-links a { color: rgba(255, 255, 255, 0.6); }
nav.nav-dark .nav-links a:hover { color: var(--color-white); }
nav.nav-dark .nav-toggle span { background: var(--color-white); }

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

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

.nav-cta {
  font-size: 13.5px !important;
  font-weight: 600;
  color: var(--color-white) !important;
  background: var(--gradient-accent);
  padding: 10px 22px;
  border-radius: 8px;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-accent) !important;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s var(--ease-out);
}

.nav-resume:hover {
  background: var(--color-accent);
  color: var(--color-white) !important;
  border-color: var(--color-accent);
}

.nav-resume svg { width: 13px; height: 13px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ===== SHARED SECTION STYLES ===== */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-label-gradient {
  background: var(--gradient-accent-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 640px;
}

/* Accent threading line */
.accent-line {
  width: 48px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--gradient-accent);
  padding: 14px 32px;
  border-radius: 10px;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 12px 24px;
  border-radius: 10px;
  transition: all 0.3s var(--ease-out);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-secondary svg { width: 14px; height: 14px; }

/* ===== GLASSMORPHISM CARDS ===== */
.glass-card {
  background: var(--gradient-glass);
  border: 1px solid var(--color-border-glass);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s var(--ease-out);
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
  transform: translateY(-4px);
}

/* ===== FOOTER ===== */
footer {
  padding: 40px 0 32px;
  background: var(--color-bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s var(--ease-out);
}

.footer-social a:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
}

/* Social icons in contact section */
.contact-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s var(--ease-out);
}

.contact-social a:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  transform: translateY(-2px);
}

/* ===== CONTACT SECTION (shared) ===== */
.contact-section {
  padding: 120px 0;
  background: var(--gradient-dark);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.contact-section .section-label { color: rgba(255, 255, 255, 0.4); }

.contact-section .section-title {
  color: var(--color-white);
  font-size: 42px;
  margin-bottom: 20px;
}

.contact-text {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 540px;
  margin: 0 auto 40px;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-bg-dark);
  background: var(--color-white);
  padding: 16px 36px;
  border-radius: 10px;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.contact-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.contact-links {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 32px;
}

.contact-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s;
}

.contact-links a:hover { color: var(--color-white); }

/* ===== PAGE HERO (sub-pages) ===== */
.page-hero {
  padding: 140px 0 60px;
  background: var(--color-bg-alt);
  position: relative;
}

.page-hero .section-title { font-size: 42px; margin-bottom: 16px; }

.breadcrumb {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--color-accent);
  transition: color 0.2s;
}

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

/* Dark page hero */
.page-hero-dark {
  padding: 140px 40px 60px;
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
  margin-bottom: 48px;
}

.page-hero-dark::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero-dark .breadcrumb { color: rgba(255, 255, 255, 0.4); }
.page-hero-dark .breadcrumb a { color: rgba(59, 130, 246, 0.8); }
.page-hero-dark .section-label { color: rgba(59, 130, 246, 0.8); }
.page-hero-dark .section-title { color: var(--color-white); font-size: 42px; }
.page-hero-dark .section-intro { color: rgba(255, 255, 255, 0.6); }

/* ===== CATEGORY CARDS (work hub + homepage) ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: all 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.category-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.category-card:hover::before { opacity: 1; }

.category-card-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.category-card-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-white);
}

.category-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}

.category-card .project-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.category-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  flex-grow: 1;
}

.category-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 16px;
  transition: gap 0.3s var(--ease-spring);
}

.category-card:hover .card-link { gap: 10px; }

.card-link svg { width: 14px; height: 14px; }

/* ===== PROJECT LIST (category pages) ===== */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
}

.project-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 36px 40px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.08);
  transform: translateX(4px);
}

.project-card:hover::before { opacity: 1; }

.project-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.project-card .project-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.project-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  max-width: 720px;
}

.project-card .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-subtle);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ===== ARTICLE / THOUGHT LEADERSHIP ===== */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 0 100px;
}

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 16px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 12px;
  color: var(--color-text);
}

.article-content p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.article-content blockquote {
  border-left: 3px solid transparent;
  border-image: var(--gradient-accent) 1;
  padding: 20px 28px;
  margin: 36px 0;
  background: var(--color-bg-alt);
  border-radius: 0 12px 12px 0;
}

.article-content blockquote p {
  font-size: 18px;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 0;
  font-weight: 500;
}

.article-content ul, .article-content ol {
  margin: 16px 0 24px 24px;
  color: var(--color-text-secondary);
}

.article-content li {
  font-size: 17px;
  line-height: 1.85;
  margin-bottom: 8px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.comparison-table th {
  background: var(--color-bg-alt);
  font-weight: 700;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.comparison-table tr:hover td {
  background: rgba(59, 130, 246, 0.02);
}

/* ===== PROJECT DETAIL PAGE ===== */
.project-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0 100px;
}

.project-detail h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 44px 0 16px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.project-detail p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.project-detail ul {
  margin: 12px 0 24px 24px;
  color: var(--color-text-secondary);
}

.project-detail li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.stat-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  transition: all 0.3s var(--ease-out);
}

.stat-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.06);
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient-accent-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--color-text-light);
  font-weight: 500;
}

/* ===== INTERACTIVE DEMO SECTION ===== */
.demo-section {
  margin: 48px 0;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px;
  overflow: hidden;
}

.demo-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-text);
}

.demo-section .demo-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-padding: 72px 0; }
  .container { padding: 0 24px; }
  nav { padding: 14px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .page-hero, .page-hero-dark { padding: 110px 24px 48px; }
  .page-hero .section-title, .page-hero-dark .section-title { font-size: 32px; }
  .section-title { font-size: 28px; }
  .category-grid { grid-template-columns: 1fr; }
  .contact-section .section-title { font-size: 32px; }
  .article-content p, .article-content li { font-size: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
