/* ============================================================
   liamdgray.com — Modern Dark Theme Stylesheet
   Author: Liam D. Gray
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #14143a;
  --bg-surface: #1a1a3e;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --secondary-accent: #10b981;
  --secondary-accent-hover: #059669;
  --secondary-accent-glow: rgba(16, 185, 129, 0.25);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --border-focus: #3b82f6;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --max-width: 1200px;
  --nav-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 200ms ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
  --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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 {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, var(--accent-glow) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, var(--secondary-accent-glow) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* --- Buttons --- */
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-glow-blue);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent-hover), var(--shadow-glow-blue);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--secondary-accent);
  color: #fff;
  box-shadow: 0 0 0 1px var(--secondary-accent), var(--shadow-glow-green);
}

.btn-success:hover {
  background: var(--secondary-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Sections --- */
section {
  padding: 5rem 1.5rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

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

/* --- Three-Column Icon Layout (Extract → Validate → Surface) --- */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
}

.pipeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.pipeline-step:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}

.pipeline-step .step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.pipeline-step:nth-child(2) .step-icon {
  background: rgba(16, 185, 129, 0.1);
}

.pipeline-step:nth-child(2):hover {
  border-color: var(--secondary-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow-green);
}

.pipeline-step:nth-child(3) .step-icon {
  background: rgba(59, 130, 246, 0.1);
}

.pipeline-step h3 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.pipeline-step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.pipeline-arrow {
  display: none;
}

/* Pipeline connector line on desktop */
@container (min-width: 768px) {
  .pipeline-grid {
    container-type: inline-size;
  }
}

.pipeline-step .step-number {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.pipeline-step:nth-child(2) .step-number {
  background: var(--secondary-accent);
}

.pipeline-step:nth-child(3) .step-number {
  background: var(--accent);
}

/* --- Card Grid (Services, Portfolio) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow-blue);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* --- Service Categories --- */
.service-category {
  margin-bottom: 3rem;
}

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

.service-category h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.service-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all var(--transition);
}

.service-item:hover {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.service-item .service-bullet {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 0.8rem;
}

.service-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-note {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 2.5rem;
}

.pricing-note p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --- Timeline / Flow Diagram --- */
.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 2rem 0;
}

.pipeline-flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  min-width: 140px;
  transition: all var(--transition);
}

.pipeline-flow-node:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow-blue);
}

.pipeline-flow-node .flow-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.pipeline-flow-node .flow-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pipeline-flow-node .flow-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.pipeline-flow-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  padding: 0 0.75rem;
  opacity: 0.6;
}

/* --- About Page --- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text h2 {
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.essence-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 0;
}

.essence-box .essence-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.essence-box p {
  font-style: italic;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0;
  line-height: 1.8;
}

.essence-box p strong {
  color: var(--accent);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.15);
  transition: all var(--transition);
}

.skill-tag:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

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

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

.form-group label .required {
  color: var(--error);
  margin-left: 0.15rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

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

.form-submit {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  justify-content: center;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.form-status.loading {
  display: block;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent);
}

.contact-info {
  padding-top: 0.5rem;
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.contact-detail .detail-icon {
  font-size: 1.1rem;
  width: 32px;
  text-align: center;
}

.contact-detail .detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-detail .detail-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* --- Footer --- */
footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-col p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  transition: color var(--transition);
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.footer-bottom a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Page Header (subpages) --- */
.page-header {
  padding: 7rem 1.5rem 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- Main content wrapper --- */
main {
  flex: 1;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .pipeline-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 5rem 1.25rem 3rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

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

  .service-list {
    grid-template-columns: 1fr;
  }

  .pipeline-flow {
    flex-direction: column;
    gap: 0.5rem;
  }

  .pipeline-flow-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .page-header {
    padding: 5.5rem 1.25rem 2.5rem;
  }
}

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
