/* ═══════════════════════════════════════════════════════════
   Rockhost — site.css
   Code • Deploy • Host
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:          #0a0a0a;
  --bg-1:        #0d0d0d;
  --bg-2:        #111111;
  --bg-card:     #0e1520;
  --bg-card-alt: #0c1219;

  /* Accent — electric blue from logo */
  --accent:        #2196f3;
  --accent-light:  #42a5f5;
  --accent-bright: #64b5f6;
  --accent-dim:    rgba(33, 150, 243, 0.10);
  --accent-mid:    rgba(33, 150, 243, 0.20);
  --accent-glow:   rgba(33, 150, 243, 0.35);

  /* Text */
  --text:        #f0f4f8;
  --text-muted:  #8899aa;
  --text-dim:    #4a5568;

  /* Borders */
  --border:        rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(33, 150, 243, 0.30);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

  /* Layout */
  --max-w:     1280px;
  --header-h:  72px;
  --radius:    12px;
  --radius-sm: 6px;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

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

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

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

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

/* ─── Layout ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 2rem;
}

.site-main { flex: 1; }

/* ─── Header ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 200;
  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-body);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.header-brand:hover {
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.main-nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  padding: 0.5rem 1.25rem !important;
  background: var(--accent-dim) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--accent-light) !important;
  font-weight: 600 !important;
  transition: background 0.2s, box-shadow 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent-mid) !important;
  box-shadow: 0 0 20px rgba(33, 150, 243, 0.2) !important;
  color: var(--accent-light) !important;
  text-decoration: none !important;
}

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

/* ── Background layers ── */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Deep gradient base */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 25%, rgba(21, 101, 192, 0.16) 0%, transparent 60%),
    linear-gradient(175deg, #070c15 0%, #0a0a0a 45%, #050a0a 100%);
}

/* Animated dot grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(33, 150, 243, 0.14) 1px,
    transparent 1px
  );
  background-size: 36px 36px;
  animation: grid-drift 50s linear infinite;
  opacity: 0.65;
}

/* Centre bloom */
.hero-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 1000px;
  height: 750px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(33, 150, 243, 0.16) 0%,
    rgba(33, 150, 243, 0.05) 42%,
    transparent 70%
  );
  animation: glow-breathe 9s ease-in-out infinite;
  pointer-events: none;
}

/* Floating code fragments */
.hero-floats {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-float {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(33, 150, 243, 0.18);
  white-space: nowrap;
  animation: float-up linear infinite;
  pointer-events: none;
  user-select: none;
}

.hero-float:nth-child(1) { left: 5%;  bottom: -40px; animation-duration: 20s; animation-delay:  0s; }
.hero-float:nth-child(2) { left: 18%; bottom: -40px; animation-duration: 25s; animation-delay: -6s; }
.hero-float:nth-child(3) { left: 56%; bottom: -40px; animation-duration: 18s; animation-delay:-12s; }
.hero-float:nth-child(4) { left: 73%; bottom: -40px; animation-duration: 28s; animation-delay:-16s; }
.hero-float:nth-child(5) { left: 87%; bottom: -40px; animation-duration: 22s; animation-delay: -8s; }

/* Subtle scanline overlay for depth */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.035) 3px,
    rgba(0, 0, 0, 0.035) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Hero content ── */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-block: 5rem 8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo-wrap {
  animation: fade-in-up 0.7s var(--ease-out) 0.05s both;
}

.hero-logo {
  max-width: 420px;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(33, 150, 243, 0.4));
  transition: filter 0.4s ease;
}

.hero-logo:hover {
  filter: drop-shadow(0 0 50px rgba(33, 150, 243, 0.6));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: fade-in-up 0.7s var(--ease-out) 0.18s both;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: dot-pulse 2.2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7.5vw, 6.8rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--text);
  animation: fade-in-up 0.9s var(--ease-out) 0.28s both;
}

.hero-title .hero-sep {
  color: var(--accent);
  margin-inline: 0.25em;
  font-weight: 300;
  opacity: 0.8;
}

.hero-title .accent-word {
  color: var(--accent-light);
  position: relative;
  display: inline-block;
}

/* Faint glow underline on "Deploy" */
.hero-title .accent-word::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent) 60%, transparent);
  opacity: 0.5;
  border-radius: 2px;
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.72;
  animation: fade-in-up 0.7s var(--ease-out) 0.42s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-in-up 0.7s var(--ease-out) 0.56s both;
}

/* Subtle scroll-down bar */
.hero-scroll {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: fade-in-up 0.6s var(--ease-out) 0.9s both;
}

.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2.8s ease-in-out infinite;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
  transition: all 0.25s var(--ease-out);
  position: relative;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .btn-arrow { transform: translateX(5px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(33, 150, 243, 0.30);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 30px rgba(33, 150, 243, 0.50);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

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

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-accent);
  background: var(--accent-dim);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ─── Projects Section ──────────────────────────────────── */
.projects {
  padding: 7rem 0 8rem;
  position: relative;
}

/* Horizontal rule separating from hero */
.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-strong) 25%,
    var(--border-strong) 75%,
    transparent 100%
  );
}

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

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 440px;
  margin-inline: auto;
  line-height: 1.65;
}

/* ─── Project Cards ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition:
    border-color  0.35s var(--ease-out),
    transform     0.35s var(--ease-out),
    box-shadow    0.35s var(--ease-out);
}

/* Animated top accent bar */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 60%, transparent 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-out);
  border-radius: 2px 2px 0 0;
}

/* Radial glow bloom on hover */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 30% 0%,
    rgba(33, 150, 243, 0.07) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

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

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-7px);
  box-shadow:
    0 0 0 1px rgba(33, 150, 243, 0.12),
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 8px 30px rgba(33, 150, 243, 0.13);
}

.project-card:hover::before { transform: scaleX(1); }
.project-card:hover::after  { opacity: 1; }

/* Featured variant — slightly different base */
.project-card--featured {
  background: linear-gradient(145deg, #0c1522, #0e1420);
  border-color: rgba(33, 150, 243, 0.14);
}

/* Card top row */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

/* Icon box */
.card-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: var(--accent-dim);
  border: 1px solid rgba(33, 150, 243, 0.15);
  border-radius: 10px;
  padding: 11px;
  color: var(--text-muted);
  transition:
    background     0.3s ease,
    border-color   0.3s ease,
    color          0.3s ease,
    box-shadow     0.3s ease;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.project-card:hover .card-icon {
  background: rgba(33, 150, 243, 0.16);
  border-color: rgba(33, 150, 243, 0.35);
  color: var(--accent-light);
  box-shadow: 0 0 16px rgba(33, 150, 243, 0.18);
}

/* Status badge */
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  padding: 0.22rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 99px;
  flex-shrink: 0;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: dot-pulse 2.8s ease-in-out infinite;
}

.status-dot--beta { background: #fb923c; }
.status-dot--dev { background: #a78bfa; }

.card-link--disabled {
  color: var(--text-dim);
  cursor: default;
}
.status-dot--wip  { background: var(--text-dim); animation: none; }

/* Card body */
.card-body { flex: 1; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.project-card:hover .card-title { color: #fff; }

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.62;
  margin-bottom: 1rem;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: rgba(33, 150, 243, 0.07);
  border: 1px solid rgba(33, 150, 243, 0.16);
  border-radius: 4px;
  color: rgba(100, 181, 246, 0.85);
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s;
}

.project-card:hover .tag {
  background: rgba(33, 150, 243, 0.12);
  border-color: rgba(33, 150, 243, 0.30);
}

/* Card footer */
a.card-footer {
  display: block;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
  text-decoration: none;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
}

.link-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}

.project-card:hover .card-link { color: var(--accent-light); }
.project-card:hover .link-arrow { transform: translateX(5px); }

/* ─── CMS content block ─────────────────────────────────── */
.cms-content {
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--border);
}

.cms-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.cms-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ─── About section ─────────────────────────────────────── */
.about {
  padding: 6rem 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-social a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.about-social a:hover {
  text-decoration: underline;
}

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

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-simple p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-simple a {
  color: var(--accent);
  text-decoration: none;
}

.footer-simple a:hover {
  text-decoration: underline;
}

/* ─── Code elements ─────────────────────────────────────── */
pre, code { font-family: var(--font-mono); }

code {
  font-size: 0.875em;
  padding: 0.15em 0.42em;
  background: rgba(33, 150, 243, 0.1);
  border-radius: 4px;
  color: var(--accent-light);
}

pre {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

/* ─── Content page ──────────────────────────────────────── */
.content-page {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 6rem;
}

.content-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.content-page p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
  max-width: 65ch;
}

/* ─── Keyframe animations ───────────────────────────────── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float-up {
  0%   { transform: translateY(0);      opacity: 0;   }
  8%   { opacity: 1;                                  }
  82%  { opacity: 0.35;                               }
  100% { transform: translateY(-105vh); opacity: 0;   }
}

@keyframes grid-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 36px 36px; }
}

@keyframes glow-breathe {
  0%, 100% { opacity: 1;   transform: translate(-50%, -50%) scale(1);    }
  50%       { opacity: 0.6; transform: translate(-50%, -50%) scale(1.10); }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.4; transform: scale(0.85); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.85; transform: scaleY(1);    transform-origin: top; }
  50%       { opacity: 0.25; transform: scaleY(0.55); transform-origin: top; }
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .container { padding-inline: 1.25rem; }

  /* Mobile nav — hide text links, keep CTA */
  .main-nav a:not(.nav-cta) { display: none; }

  .hero-content { padding-block: 4rem 6rem; }

  .hero-logo { max-width: 280px; }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .footer-brand { grid-column: auto; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

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

  .hero-title { letter-spacing: -0.015em; }
}
