/* ---------- Tokens ---------- */
:root {
  --bg: #0a0e17;
  --bg-alt: #0d1220;
  --surface: #111827;
  --surface-2: #161e2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6e9f0;
  --text-dim: #9aa4b7;
  --text-faint: #6b7690;
  --accent-1: #1d263f;
  --accent-2: #4c6fbf;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1140px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --shadow-glow: 0 0 40px rgba(76, 111, 191, 0.18);
}

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

html { scroll-behavior: smooth; }

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

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

main#top { padding-top: 80px; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Background glow ---------- */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.bg-glow-1 {
  width: 560px; height: 560px;
  background: var(--accent-2);
  top: -180px; left: -160px;
  opacity: 0.28;
}
.bg-glow-2 {
  width: 480px; height: 480px;
  background: var(--accent-2);
  top: 30%; right: -160px;
  opacity: 0.16;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 23, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 14, 23, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand-mark {
  color: var(--accent-2);
}
.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  font-size: 0.95rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--accent-grad);
  color: #f4f6fb !important;
  font-weight: 600;
}
.nav-cta:hover { color: #f4f6fb !important; opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 170px 0 100px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  max-width: 1140px;
  margin: 0 auto;
}

.hero-copy { text-align: left; }
.hero-lead { margin: 0 0 36px; }
.hero-actions { justify-content: flex-start; }
.hero-badges { justify-content: flex-start; }

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
.hero-photo {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 28px;
  padding: 5px;
  background: var(--accent-grad);
  box-shadow: 0 20px 60px rgba(29, 38, 63, 0.4);
}
.hero-photo::before {
  content: '';
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: radial-gradient(circle, rgba(76, 111, 191, 0.35), transparent 70%);
  filter: blur(30px);
}
.hero-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  border-radius: 24px;
  background: var(--surface-2);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent-grad);
  color: #f4f6fb;
  box-shadow: 0 8px 30px rgba(76, 111, 191, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 36px rgba(76, 111, 191, 0.5); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-block { width: 100%; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.hero-badges span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--text-dim);
  font-size: 1.02rem;
  margin-top: 10px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 920px;
  margin: 0 auto;
}
.about-text {
  color: var(--text-dim);
  font-size: 1.05rem;
}
.about-text strong { color: var(--text); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 56px auto 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* ---------- Feature / Service Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 111, 191, 0.45);
  box-shadow: var(--shadow-glow);
}
.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- Tech Stack ---------- */
.stack-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 920px;
  margin: 0 auto;
}
.stack-col h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.pill-accent {
  border-color: rgba(76, 111, 191, 0.4);
  color: var(--text);
  background: linear-gradient(135deg, rgba(76, 111, 191, 0.16), rgba(29, 38, 63, 0.4));
}

/* ---------- Work Grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 111, 191, 0.4);
}
.work-card-ai {
  border-color: rgba(76, 111, 191, 0.4);
  background: linear-gradient(160deg, rgba(76, 111, 191, 0.14), rgba(17, 24, 39, 0.4));
}
.work-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.work-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.work-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ---------- Contact ---------- */
.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px;
}
.contact-copy h2 { margin-bottom: 14px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.contact-link:hover { color: var(--accent-2); }
.contact-icon { font-size: 1.1rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 0.85rem;
  color: var(--text-faint);
}
.form-row input,
.form-row textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-1);
}
.form-note {
  font-size: 0.85rem;
  color: var(--accent-2);
  min-height: 18px;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-faint);
}
.footer-inner a { transition: color 0.2s ease; }
.footer-inner a:hover { color: var(--accent-2); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .stack-columns { grid-template-columns: 1fr; }
  .contact-box { grid-template-columns: 1fr; padding: 36px; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-photo img { max-height: 420px; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(10, 14, 23, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav.open { transform: translateY(0); opacity: 1; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 12px; text-align: center; }
  .nav-toggle { display: flex; }

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

  /* Full-screen photo hero with the nav floating on top */
  .hero { padding: 0; }
  .hero-inner { gap: 0; }
  .hero-visual {
    margin: 0 -24px;
    order: -1;
  }
  .hero-photo {
    position: relative;
    display: block;
    width: 100%;
    height: 100vh;
    height: 100svh;
    max-width: none;
    border-radius: 0;
    padding: 0;
    background: var(--surface-2);
    box-shadow: none;
  }
  .hero-photo::before { display: none; }
  .hero-photo::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 180px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
  }
  .hero-photo img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    object-fit: cover;
    object-position: top center;
  }
  .hero-copy { padding: 36px 0 0; }
}
