/* ============================================
   KSSoftware Design System
   ============================================ */

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-subtle: #1c2333;
  --border: #21262d;
  --border-mid: #30363d;
  --border-light: #444c56;

  /* Amber — the ONLY accent */
  --amber: #e8a230;
  --amber-light: #f5b944;
  --amber-dim: rgba(232, 162, 48, 0.12);
  --amber-glow: rgba(232, 162, 48, 0.05);

  --text-1: #f0ede8;
  --text-2: #b0a99e;
  --text-3: #6e6860;
  --text-inv: #0d1117;

  --max-w: 1080px;
  --section-gap: 120px;
  --card-radius: 14px;
  --radius-sm: 8px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

/* ---- Links ---- */

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-gap) 0;
}

/* ---- Typography ---- */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

/* ---- Logo ---- */
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text-1);
}

/* ---- Nav ---- */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    padding 0.3s ease;
}

#site-nav.scrolled {
  padding: 14px 0;
  background: rgba(13, 17, 23, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-links a.btn-primary,
.nav-links a.btn-primary:visited {
  color: var(--text-inv);
}

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

#nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary,
.btn-primary:visited {
  background: var(--amber);
  color: var(--text-inv);
}

.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 162, 48, 0.25);
}

.btn-ghost,
.btn-ghost:visited {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-mid);
}

.btn-ghost:hover {
  border-color: var(--border-light);
  color: var(--text-1);
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 32px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(232, 162, 48, 0.25);
  box-shadow: 0 0 0 1px rgba(232, 162, 48, 0.08);
}

a.card,
a.card:visited {
  color: inherit;
}

/* ---- Divider ---- */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}

/* ---- Grids ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

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

/* ---- Stats ---- */
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--amber);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* ---- Step Numbers ---- */
.step-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 58fr 42fr;
  align-items: center;
  gap: 48px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 68px;
  line-height: 1.1;
  color: var(--text-1);
}

.hero-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 20px;
  color: var(--text-2);
  max-width: 520px;
  margin-top: 24px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---- Credibility / Who Section ---- */
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.pull-quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 34px;
  line-height: 1.35;
  color: var(--text-1);
  max-width: 420px;
}

.pull-quote-mark {
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 0;
  color: var(--amber);
  opacity: 0.3;
  display: block;
  margin-bottom: 24px;
}

.who-body {
  font-weight: 300;
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.7;
}

.who-body p + p {
  margin-top: 16px;
}

.stats-row {
  display: flex;
  gap: 48px;
  margin-top: 40px;
}

/* ---- Services Section ---- */
.service-icon {
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.card-body {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  border-radius: 20px;
  padding: 4px 12px;
  margin-top: 16px;
}

/* ---- Process Section ---- */
.process-connector {
  position: relative;
}

.callout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  margin-top: 48px;
  gap: 24px;
  flex-wrap: wrap;
}

.callout-bar p {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 19px;
  color: var(--text-2);
}

/* ---- Section Headlines ---- */
.section-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 44px;
  line-height: 1.2;
  margin-bottom: 48px;
}

.section-headline-sm {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 20px;
}

/* ---- Hero Accent ---- */
.hero-accent {
  color: var(--amber);
  font-style: italic;
}

/* ---- Testimonial Span ---- */
.testimonial-wide {
  grid-column: 1 / -1;
  max-width: 640px;
}

/* ---- Contact CTA Large Button ---- */
.btn-large {
  font-size: 1.05rem;
  padding: 16px 32px;
}

/* ---- About Preview ---- */
.about-preview-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
}

.about-preview-img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--card-radius);
  object-fit: cover;
  aspect-ratio: 4 / 5;
  outline: 1px solid rgba(232, 162, 48, 0.2);
  outline-offset: 6px;
}

.about-preview-link {
  color: var(--amber);
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  transition: gap 0.2s;
}

.about-preview-link:hover {
  gap: 10px;
}

/* ---- Testimonials ---- */
.testimonial-quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.8;
  color: var(--amber);
  opacity: 0.25;
  margin-bottom: 16px;
}

.testimonial-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 24px;
}

.testimonial-attr {
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ---- Project Card (featured) ---- */
.section-sub {
  font-weight: 300;
  font-size: 18px;
  color: var(--text-2);
  max-width: 680px;
  margin-bottom: 48px;
}

.project-card {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 48px;
  padding: 48px;
  max-width: 1000px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-badge {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  color: var(--text-2);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.metric-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--amber);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-3);
  margin-top: 2px;
}

.project-subtitle {
  font-weight: 400;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 32px;
  margin-bottom: 20px;
}

.project-desc {
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
}

.project-desc p + p {
  margin-top: 14px;
}

.project-desc strong {
  color: var(--text-1);
  font-weight: 500;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.project-link {
  color: var(--amber);
  text-decoration: none;
  font-size: 0.95rem;
  transition: gap 0.2s;
}

.project-link:hover {
  text-decoration: underline;
}

/* ---- Contact CTA ---- */
.contact-section {
  background: var(--bg-subtle);
  text-align: center;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 52px;
  line-height: 1.15;
}

.contact-sub {
  font-weight: 300;
  font-size: 18px;
  color: var(--text-2);
  margin-top: 16px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.contact-email {
  font-size: 0.9rem;
  color: var(--text-2);
}

.contact-email a {
  color: var(--amber);
  text-decoration: none;
}

.contact-linkedin {
  font-size: 0.9rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-linkedin:hover {
  color: var(--text-2);
}

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

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-3);
}

.site-footer a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--text-2);
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

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

/* ---- Skill Chips (about page) ---- */
.skill-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.82rem;
  color: var(--text-2);
  white-space: nowrap;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-gap: 72px;
  }

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

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }

  #nav-toggle {
    display: flex;
  }

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

  .hero h1 {
    font-size: 42px;
  }

  .hero-graphic {
    display: none;
  }

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

  .pull-quote {
    font-size: 26px;
  }

  .stats-row {
    flex-wrap: wrap;
    gap: 32px;
  }

  .about-preview-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-preview-img {
    margin: 0 auto;
    max-width: 280px;
  }

  .callout-bar {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px;
  }

  .project-title {
    font-size: 26px;
  }

  .project-actions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .contact-inner h2 {
    font-size: 36px;
  }
}
