/*
Theme Name: MindWyre
Theme URI: https://mindwyre.org
Author: Malachi Dunn
Author URI: https://mindwyre.org
Description: Custom dark minimal theme for MindWyre — data engineering consultancy by Malachi Dunn.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mindwyre
*/

/* ==========================================================================
   Design System — CSS Custom Properties
   ========================================================================== */

:root {
  /* Colors (HSL, dark-first) */
  --bg-dark: hsl(220, 8%, 6%);
  --bg: hsl(220, 8%, 10%);
  --bg-light: hsl(220, 8%, 15%);
  --text-primary: hsl(220, 10%, 90%);
  --text-secondary: hsl(220, 8%, 60%);
  --accent: hsl(216, 70%, 57%);
  --accent-hover: hsl(216, 70%, 45%);
  --border: hsl(220, 8%, 18%);
  --highlight: hsl(220, 8%, 22%);
  /* Shadows — whosajid dual-shadow: light inset top + dark bottom */
  --shadow-sm: inset 0 1px 0 hsla(220, 8%, 25%, 0.4), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: inset 0 1px 0 hsla(220, 8%, 25%, 0.4), 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: inset 0 1px 0 hsla(220, 8%, 25%, 0.5), 0 8px 24px rgba(0, 0, 0, 0.6);
  /* Inset shadow for recessed elements (tables, inputs) */
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -1px 0 hsla(220, 8%, 20%, 0.3);
  /* Gradient depth — subtle top-to-bottom */
  --gradient-depth: linear-gradient(180deg, var(--bg-dark), var(--bg));
  --gradient-card: linear-gradient(180deg, var(--bg), hsla(220, 8%, 8%, 1));

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Raleway', var(--font-body);
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;
  --lh-body: 1.6;
  --lh-heading: 1.2;

  /* Spacing (rem-based) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-max: 1140px;
  --container-narrow: 780px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition: 0.2s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  background-color: var(--bg-dark);
}

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

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

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

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: var(--lh-heading);
  font-weight: 700;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

.text-muted {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.text-accent {
  color: var(--accent);
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 1px 0 hsla(220, 8%, 15%, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

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

.flex {
  display: flex;
  align-items: center;
}

.flex--between {
  justify-content: space-between;
}

.flex--center {
  justify-content: center;
}

.flex--column {
  flex-direction: column;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: linear-gradient(180deg, hsl(216, 70%, 60%), var(--accent));
  color: #fff;
  box-shadow: inset 0 1px 0 hsla(216, 70%, 72%, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(180deg, var(--accent), var(--accent-hover));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 hsla(216, 70%, 65%, 0.3), 0 4px 14px rgba(0, 0, 0, 0.4);
}

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

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

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-lg);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsla(220, 8%, 6%, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.site-logo:hover {
  color: var(--text-primary);
}

.site-logo__img {
  height: 2.5rem;
  width: auto;
}

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

/* Bio section with photo */
.bio-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.bio-photo {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .bio-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .bio-photo {
    max-width: 280px;
    margin: 0 auto;
  }
}

.nav-menu {
  display: flex;
  gap: var(--space-xl);
}

.nav-menu a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after,
.nav-menu .current_page_item a::after {
  width: 100%;
}

.nav-cta .btn {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-4xl) 0;
  text-align: center;
  background: var(--gradient-depth);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, hsla(216, 70%, 57%, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: var(--lh-body);
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--text-lg);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: hsla(220, 8%, 28%, 0.6);
}

.card:hover {
  border-color: hsla(220, 8%, 22%, 0.8);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, hsla(216, 70%, 57%, 0.15), hsla(216, 70%, 57%, 0.06));
  color: var(--accent);
  border-radius: var(--radius-md);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
  border: 1px solid hsla(216, 70%, 57%, 0.12);
  box-shadow: inset 0 1px 0 hsla(216, 70%, 70%, 0.1);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--lh-body);
}

/* Service card (two-column) */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid var(--border);
}

.service-block:last-child {
  border-bottom: none;
}

.service-block--reverse {
  direction: rtl;
}

.service-block--reverse > * {
  direction: ltr;
}

.service-block__content h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.service-block__content p {
  margin-bottom: var(--space-md);
}

.service-block__content ul {
  list-style: none;
  padding: 0;
}

.service-block__content ul li {
  padding: var(--space-xs) 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.service-block__content ul li::before {
  content: '→ ';
  color: var(--accent);
  font-weight: 700;
}

.service-block__visual {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  font-size: var(--text-4xl);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.service-block__visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: hsla(220, 8%, 28%, 0.5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Blog card */
.card--blog {
  padding: 0;
  overflow: hidden;
}

.card--blog__image {
  width: 100%;
  height: 200px;
  background: var(--bg-light);
  overflow: hidden;
}

.card--blog__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card--blog__body {
  padding: var(--space-xl);
}

.card--blog__meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.card--blog__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.card--blog__title a {
  color: var(--text-primary);
}

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

.card--blog__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Testimonial card */
.card--testimonial {
  text-align: center;
  padding: var(--space-2xl);
}

.card--testimonial__quote {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  line-height: var(--lh-body);
}

.card--testimonial__quote::before {
  content: '\201C';
  font-size: var(--text-4xl);
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.card--testimonial__name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-base);
}

.card--testimonial__role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Experience / Logos
   ========================================================================== */

.experience-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-xl);
}

.experience-item {
  text-align: center;
  padding: var(--space-xl);
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}

.experience-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: hsla(220, 8%, 28%, 0.5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.experience-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: hsla(220, 8%, 22%, 0.8);
}

.experience-item__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.experience-item__role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: var(--space-3xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-3xl));
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-dark);
}

.timeline-item__date {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.timeline-item__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.timeline-item__company {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.timeline-item__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Skill Tags
   ========================================================================== */

.skills-group {
  margin-bottom: var(--space-xl);
}

.skills-group__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: inset 0 1px 0 hsla(220, 8%, 22%, 0.4);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: hsla(216, 70%, 57%, 0.08);
  box-shadow: inset 0 1px 0 hsla(216, 70%, 57%, 0.15), 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Process Steps
   ========================================================================== */

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

.process-step {
  text-align: center;
  position: relative;
  counter-increment: step;
}

.process-step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, hsla(216, 70%, 57%, 0.15), hsla(216, 70%, 57%, 0.08));
  color: var(--accent);
  border-radius: 50%;
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 auto var(--space-lg);
  border: 1px solid hsla(216, 70%, 57%, 0.2);
  box-shadow: inset 0 1px 0 hsla(216, 70%, 70%, 0.15), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.process-step h4 {
  margin-bottom: var(--space-sm);
}

.process-step p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  text-align: center;
  padding: var(--space-4xl) 0;
  background: var(--gradient-depth);
  border-top: 1px solid var(--border);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: hsla(220, 8%, 20%, 0.5);
}

.cta-section h2 {
  margin-bottom: var(--space-md);
}

.cta-section p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Gallery — Masonry
   ========================================================================== */

.masonry {
  columns: 3;
  column-gap: var(--space-md);
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.masonry__item img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 0.4s ease;
}

.masonry__overlay {
  position: absolute;
  inset: 0;
  background: hsla(220, 8%, 6%, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--text-primary);
  border-radius: var(--radius-lg);
}

.masonry__item:hover .masonry__overlay {
  opacity: 1;
}

.masonry__item:hover img {
  transform: scale(1.03);
}

.masonry__caption {
  font-size: var(--text-sm);
  text-align: center;
  padding: 0 var(--space-md);
}

/* Empty state */
.gallery-empty {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.gallery-empty__icon {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.gallery-empty h3 {
  margin-bottom: var(--space-md);
}

.gallery-empty p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: hsla(220, 8%, 4%, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 2rem;
  padding: var(--space-md);
  opacity: 0.6;
  transition: opacity var(--transition);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 1;
}

.lightbox__close {
  top: var(--space-lg);
  right: var(--space-xl);
  font-size: 2.5rem;
}

.lightbox__prev {
  left: var(--space-xl);
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox__next {
  right: var(--space-xl);
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox__caption {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-md);
  text-align: center;
}

@media (max-width: 1024px) {
  .masonry { columns: 2; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .lightbox__prev { left: var(--space-sm); }
  .lightbox__next { right: var(--space-sm); }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
}

.contact-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  margin-bottom: var(--space-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-inset);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-inset), 0 0 0 2px hsla(216, 70%, 57%, 0.15);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-info-item__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(216, 70%, 57%, 0.1);
  color: var(--accent);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
}

.contact-info-item p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.footer-nav {
  display: flex;
  gap: var(--space-lg);
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

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

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

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

/* ==========================================================================
   Single Post
   ========================================================================== */

.post-header {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.post-header__meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.post-header h1 {
  font-size: var(--text-3xl);
}

.post-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

.post-content p {
  margin-bottom: var(--space-lg);
}

.post-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.post-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
  margin-bottom: var(--space-sm);
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-lg);
  font-style: italic;
  color: var(--text-primary);
  margin: var(--space-xl) 0;
}

.post-content img {
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.post-content code {
  background: var(--bg-light);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

.post-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-2xl);
}

.post-nav a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

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

/* ==========================================================================
   404 Page
   ========================================================================== */

.page-404 {
  text-align: center;
  padding: var(--space-4xl) 0;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-404 h1 {
  font-size: 6rem;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.page-404 p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   Badges / Tags
   ========================================================================== */

.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: hsla(216, 70%, 57%, 0.1);
  border: 1px solid hsla(216, 70%, 57%, 0.2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Select Dropdown (Contact Form)
   ========================================================================== */

.contact-form select {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  margin-bottom: var(--space-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-inset);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  cursor: pointer;
}

.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-inset), 0 0 0 2px hsla(216, 70%, 57%, 0.15);
}

/* WPForms select override */
.wpforms-container .wpforms-form select {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
}

.wpforms-container .wpforms-form select:focus {
  border-color: var(--accent) !important;
}

/* ==========================================================================
   Engagement Tiers
   ========================================================================== */

.engagement-tier {
  text-align: center;
  padding: var(--space-2xl);
}

.engagement-tier .card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Case Studies (Work Page)
   ========================================================================== */

.case-studies {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.case-study {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.case-study::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: hsla(220, 8%, 28%, 0.6);
}

.case-study__header {
  margin-bottom: var(--space-xl);
}

.case-study__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.case-study__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.case-study__body p {
  margin-bottom: var(--space-md);
  line-height: var(--lh-body);
}

.case-study__body p:last-child {
  margin-bottom: 0;
}

.case-study__body strong {
  color: var(--text-primary);
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */

.wp-block-image img {
  border-radius: var(--radius-md);
}

.alignwide {
  max-width: calc(var(--container-max) + 4rem);
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100%;
  max-width: 100%;
}

/* WPForms overrides */
.wpforms-container .wpforms-form input,
.wpforms-container .wpforms-form textarea {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
}

.wpforms-container .wpforms-form input:focus,
.wpforms-container .wpforms-form textarea:focus {
  border-color: var(--accent) !important;
}

.wpforms-container .wpforms-form .wpforms-submit {
  background: var(--accent) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 1.75rem !important;
  font-weight: 600 !important;
}

.wpforms-container .wpforms-form .wpforms-submit:hover {
  background: var(--accent-hover) !important;
}

.wpforms-container .wpforms-form label {
  color: var(--text-primary) !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .experience-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .service-block { grid-template-columns: 1fr; }
  .service-block--reverse { direction: ltr; }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
    --space-4xl: 3rem;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile nav */
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-md);
  }

  .nav-menu.is-active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .nav-cta {
    display: none;
  }

  .site-header .container {
    position: relative;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .experience-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: all var(--transition);
}

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

.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
