/* JoelOlives.com — Principal ServiceNow Architect */

:root {
  --bg-deep: #0a0e17;
  --bg-surface: #111827;
  --bg-elevated: #1a2332;
  --bg-card: rgba(26, 35, 50, 0.6);
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-warm: #f59e0b;
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(16, 185, 129, 0.4);
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

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

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

ul { list-style: none; }

.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

/* Cursor glow */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
}

body:hover .cursor-glow { opacity: 1; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  z-index: 101;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.logo-mark img {
  width: 28px;
  height: 28px;
}

.logo:hover .logo-mark {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-text { font-size: 1.05rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.nav-cta {
  padding: 8px 20px;
  background: var(--accent);
  color: var(--bg-deep) !important;
  border-radius: 8px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

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

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

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

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

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: rgba(16, 185, 129, 0.08);
}

.btn-full { width: 100%; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 14, 23, 0.92) 0%,
    rgba(10, 14, 23, 0.7) 50%,
    rgba(10, 14, 23, 0.85) 100%
  );
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0 120px;
  max-width: 780px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-light);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  background: rgba(16, 185, 129, 0.06);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Stats */
.stats {
  position: relative;
  z-index: 2;
  margin-top: -60px;
  padding-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.stat {
  background: var(--bg-surface);
  padding: 36px 24px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  color: var(--accent-light);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent-light);
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Differentiators */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.diff-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  transition: border-color var(--transition), transform var(--transition);
}

.diff-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.diff-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--accent);
}

.diff-icon svg { width: 100%; height: 100%; }

.diff-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

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

.diff-card strong { color: var(--text-primary); }

/* Services */
.services { background: var(--bg-surface); }

.services-grid {
  display: grid;
  gap: 32px;
}

.service-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}

.service-card:hover { border-color: var(--border-hover); }

.service-card:nth-child(even) {
  direction: rtl;
}

.service-card:nth-child(even) .service-body { direction: ltr; }

.service-image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-card:hover .service-image img { transform: scale(1.05); }

.service-body h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.service-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.service-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Platforms */
.platforms-inner {
  text-align: center;
  padding: 48px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.platforms-inner h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.platform-tags span {
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.platform-tags span:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  padding-left: 48px;
  padding-bottom: 48px;
}

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

.timeline-marker {
  position: absolute;
  left: 4px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--bg-deep);
  border: 2px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
}

.timeline-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin: 4px 0;
}

.timeline-role {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-content > p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.client-card {
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.client-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.client-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Awards */
.awards { padding: 60px 0; }

.awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.award {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.award-icon { font-size: 1.5rem; flex-shrink: 0; }

.award p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Certifications */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.cert-badge {
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.cert-badge:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

.cert-detail {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact */
.contact {
  background: var(--bg-surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 16px 0;
  line-height: 1.2;
}

.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

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

.contact-form {
  padding: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.form-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-domain {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .service-card:nth-child(even) { direction: ltr; }

  .service-image {
    max-height: 240px;
    aspect-ratio: 16/9;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a { font-size: 1.2rem; }

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

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

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

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

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

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

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

  .hero-scroll { display: none; }

  .cursor-glow { display: none; }
}

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

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

  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}