:root {
  --primary: #2563EB;
  --secondary: #0F172A;
  --accent: #10B981;
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --border: #E2E8F0;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Sora', sans-serif; }

a { text-decoration: none; color: inherit; }

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

::selection { background: var(--accent); color: var(--secondary); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* Accessibility utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 2000;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 16px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 8%;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--secondary);
}

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

.logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

#navMenu ul {
  list-style: none;
  display: flex;
  gap: 18px;
}

#navMenu a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--text-primary);
  position: relative;
  white-space: nowrap;
  transition: color 0.3s;
}

#navMenu a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

#navMenu a:hover, #navMenu a[aria-current="page"] { color: var(--primary); }
#navMenu a:hover::after, #navMenu a[aria-current="page"]::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
  background: none;
  border: none;
  padding: 6px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--primary);
  transition: 0.3s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 6% 60px;
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(16,185,129,0.07) 0%, transparent 45%),
    var(--bg);
}

.hero-tag {
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 22px;
  color: var(--secondary);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero h1 span { color: var(--primary); }

.hero-services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  max-width: 720px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.24s forwards;
}

.hero-services li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s;
}

.hero-services li:hover {
  border-color: var(--accent);
  color: var(--secondary);
  transform: translateY(-2px);
}

.hero p {
  max-width: 660px;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 38px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
}

.btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37,99,235,0.25);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(16,185,129,0.3);
}

.btn-outline {
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--secondary);
  transform: translateY(-3px);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-socials { opacity: 0; animation: fadeUp 0.8s ease 0.55s forwards; }

.social-links a, .social-links button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--secondary);
  transform: translateY(-4px);
}

/* Social profiles with no real URL yet are disabled buttons instead of
   dead "#" anchors -- never fabricate a profile URL, but never leave a
   broken-looking link either. */
.social-links button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  width: 24px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 14px;
}

.scroll-cue::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollDot 1.6s infinite;
}

@keyframes scrollDot {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 20px; }
}

/* Section shared styles */
section {
  padding: 110px 8%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
  text-align: center;
}

.section-title {
  text-align: center;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 20px;
  color: var(--secondary);
}

.section-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  background: var(--accent);
  margin: 18px auto 0;
  border-radius: 2px;
}

.section-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.8;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}

.about-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #eef2ff, #ecfdf5);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--primary);
  position: relative;
  overflow: hidden;
}

.about-photo::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: 10px;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
  font-size: 1.03rem;
}

.value-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.value-chip {
  text-align: center;
  padding: 22px 12px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.value-chip .card-icon {
  margin: 0 auto 12px;
  color: var(--primary);
}

.value-chip span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

/* Expertise pills */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.pill {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(16,185,129,0.15);
}

/* Card grid (services, why, tools, projects) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 26px;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.info-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 20px 40px rgba(15,23,42,0.08);
}

.info-card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(37,99,235,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.info-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Two-column variant (Home core services) */
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Why work with me */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.why-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.why-item:hover {
  border-color: rgba(16,185,129,0.4);
  box-shadow: 0 14px 30px rgba(15,23,42,0.06);
  transform: translateY(-4px);
}

.why-item .card-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(16,185,129,0.1);
  color: var(--accent);
  margin-bottom: 0;
}

.why-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.why-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Tools */
.tool-card {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px 20px;
  transition: all 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 16px 34px rgba(15,23,42,0.07);
}

.tool-card .card-icon { margin: 0 auto 16px; }

.tool-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Placeholder cards (projects, case studies, testimonials) */
.placeholder-badge {
  display: inline-block;
  background: rgba(37,99,235,0.08);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.placeholder-card {
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 44px 30px;
  text-align: center;
}

.placeholder-card .card-icon {
  margin: 0 auto 18px;
  background: rgba(100,116,139,0.08);
  color: var(--text-secondary);
}

.placeholder-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.placeholder-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.placeholder-solo {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 40px;
}

.placeholder-solo .card-icon {
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
}

/* Service / skill category groups (Services, Skills pages) */
.service-group {
  margin-bottom: 60px;
}

.service-group:last-child {
  margin-bottom: 0;
}

.service-group-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  color: var(--secondary);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.service-group-title span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

/* Project cards (Portfolio page) */
.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: linear-gradient(145deg, #eef2ff, #ecfdf5);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
  object-fit: cover;
}

.project-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.project-status.status-live { background: var(--accent); color: var(--secondary); }
.project-status.status-dev { background: var(--primary); color: #fff; }

.project-card-full {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s ease;
}

.project-card-full:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.08);
  border-color: rgba(37,99,235,0.25);
}

.project-card-full h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--text-primary); }
.project-card-full p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; margin-bottom: 14px; }
.project-card-full a.project-link { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.project-card-full a.project-link:hover { color: var(--secondary); }

/* Status badge + project type label row */
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.project-meta .project-status { margin-bottom: 0; }

.project-type {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Home page teaser sections (condensed cards linking to full pages) */
.teaser-footer {
  text-align: center;
  margin-top: 44px;
}

/* Decorative node/line SVG accent, used behind hero and page headers */
.decorative-nodes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.decorative-nodes svg { position: absolute; opacity: 0.5; }
.decorative-nodes svg.nodes-right { top: 10%; right: -4%; width: 340px; height: 340px; }
.decorative-nodes svg.nodes-left { bottom: 6%; left: -6%; width: 260px; height: 260px; }

@keyframes nodePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.5); }
}

.decorative-nodes .node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: nodePulse 2.8s ease-in-out infinite;
}

.hero > *:not(.decorative-nodes) { position: relative; z-index: 1; }

/* CTA band (Home closing section) */
.cta-band {
  background: var(--secondary);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  max-width: 1200px;
  margin: 0 8%;
}

@media (min-width: 1280px) { .cta-band { margin: 0 auto; } }

.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.cta-band p { color: #94a3b8; font-size: 1rem; margin-bottom: 30px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* FAQ accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item.open { border-color: rgba(37,99,235,0.3); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}

.faq-item.open .faq-answer { max-height: 400px; padding: 0 24px 22px; }

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.75;
}

/* Contact */
.contact-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  transition: all 0.3s;
}

.contact-pill:hover {
  border-color: var(--accent);
  color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(16,185,129,0.15);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
}

.contact-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 32px;
}

.contact-info-card h3 {
  color: var(--secondary);
  margin-bottom: 24px;
  font-size: 1.3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(37,99,235,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-item div h3 {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 4px;
}

.contact-item div a, .contact-item div span {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
}

.contact-item div a:hover { color: var(--primary); }

form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field { display: flex; flex-direction: column; }

input, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
}

input:focus, textarea:focus { border-color: var(--primary); }

textarea { resize: vertical; min-height: 130px; }

form .btn { border: 2px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; font-family: inherit; }
form .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--secondary); }

.form-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 118px 8% 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb span[aria-current] { color: var(--text-primary); font-weight: 500; }

/* Generic page header (blog, legal pages) */
.page-header {
  padding: 20px 8% 50px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: var(--secondary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Blog controls */
.blog-controls {
  max-width: 1200px;
  margin: 0 auto 50px;
  padding: 0 8%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-search { position: relative; max-width: 480px; margin: 0 auto; width: 100%; }

.blog-search input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s;
}

.blog-search input:focus { border-color: var(--primary); }

.blog-search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.filter-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.filter-pill {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}

.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Blog post cards */
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15,23,42,0.08);
  border-color: rgba(37,99,235,0.25);
}

.post-card-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.post-card .post-category {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card h3 { font-size: 1.1rem; color: var(--text-primary); }
.post-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

.post-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
  padding-top: 10px;
}

/* Pagination */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 50px; }

.pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.pagination button.active, .pagination button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Empty state */
.blog-empty {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 70px 30px;
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 16px;
}

.blog-empty .card-icon { width: 64px; height: 64px; margin: 0 auto 22px; background: rgba(37,99,235,0.08); }
.blog-empty h2 { font-size: 1.4rem; color: var(--text-primary); margin-bottom: 12px; }
.blog-empty p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 26px; }

/* Prose (single blog post + legal pages) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--secondary); margin-bottom: 18px; line-height: 1.3; }
.prose h2 { font-size: 1.5rem; color: var(--secondary); margin: 40px 0 16px; }
.prose h3 { font-size: 1.2rem; color: var(--secondary); margin: 28px 0 12px; }
.prose p { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.9; margin-bottom: 20px; }
.prose ul, .prose ol { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.9; margin: 0 0 20px 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(37,99,235,0.35); }
.prose a:hover { color: var(--secondary); }

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.post-meta-row .post-category { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }

.author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 40px 0;
}

.author-box .avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, #eef2ff, #ecfdf5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

.author-box h3 { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 2px; }
.author-box p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.author-box a { color: var(--primary); }

.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 34px 0; }
.share-row span { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }

.share-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.25s;
}

.share-row a:hover { background: var(--accent); border-color: var(--accent); color: var(--secondary); transform: translateY(-3px); }

.related-posts { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-posts h2 { font-size: 1.3rem; color: var(--secondary); margin-bottom: 22px; }

.template-note {
  max-width: 760px;
  margin: 0 auto 40px;
  background: rgba(37,99,235,0.06);
  border: 1px dashed rgba(37,99,235,0.4);
  border-radius: 12px;
  padding: 18px 22px;
  color: var(--primary);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* Footer */
footer {
  background: var(--secondary);
  color: #cbd5e1;
  padding: 70px 8% 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-logo {
  font-family: 'Sora', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

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

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #94a3b8;
  margin-bottom: 22px;
}

footer .social-links a, footer .social-links button {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
  width: 40px;
  height: 40px;
}

footer .social-links a:hover { background: var(--accent); border-color: var(--accent); color: var(--secondary); }

.footer-links h2, .footer-contact h2 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.footer-links a, .footer-contact a, .footer-contact span {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.3s;
  display: block;
}

.footer-links a:hover, .footer-contact a:hover { color: var(--accent); }

.footer-contact a, .footer-contact span { margin-bottom: 12px; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 26px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-bottom span { color: var(--accent); }

.footer-top-link { font-weight: 600; color: #fff; }
.footer-top-link:hover { color: var(--accent); }

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
  box-shadow: 0 10px 24px rgba(37,99,235,0.3);
  z-index: 900;
}

.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--accent); color: var(--secondary); transform: translateY(-4px); }

/* Reveal animation on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-tag, .hero h1, .hero p, .hero-buttons, .hero-socials, .hero-services { opacity: 1; animation: none; }
  .node-pulse { animation: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .about-grid, .contact-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  #navMenu { position: fixed; top: 0; right: -100%; height: 100vh; width: 270px; background: var(--bg); flex-direction: column; padding: 110px 40px; transition: right 0.4s ease; box-shadow: -10px 0 30px rgba(15,23,42,0.15); }
  #navMenu.open { right: 0; }
  #navMenu ul { flex-direction: column; gap: 26px; }
  .menu-toggle { display: flex; }
  section { padding: 90px 6%; }
  .value-chips { grid-template-columns: 1fr 1fr; }
  .breadcrumb { padding-top: 108px; }
  .back-to-top { width: 42px; height: 42px; bottom: 18px; right: 14px; font-size: 1.1rem; }
  .back-to-top.show { opacity: 0.6; }
  .back-to-top:hover, .back-to-top:focus-visible { opacity: 1; }
}

@media (max-width: 480px) {
  .value-chips { grid-template-columns: 1fr; }
  .contact-highlights { flex-direction: column; align-items: stretch; }
  .contact-pill { justify-content: center; }
}

@media (max-width: 680px) {
  .card-grid-2 { grid-template-columns: 1fr; }
  .decorative-nodes svg { opacity: 0.3; }
  .decorative-nodes svg.nodes-right { top: 4%; right: -14%; width: 200px; height: 200px; }
  .decorative-nodes svg.nodes-left { bottom: 3%; left: -14%; width: 160px; height: 160px; }
}
