/* ===================================================================
   Tepuy Tech — design tokens
   Palette inspired by dusk over the Gran Sabana tepuys: a deep night
   sky, warm sedimentary rock strata, and jungle mist at the base.
=================================================================== */

:root {
  --bg-night: #070b14;
  --bg-dusk: #0a0f1c;
  --bg-card: #0d1424;
  --ink: #f5f7fa;
  --ink-dim: #9aa7b5;
  --ink-faint: #687180;

  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --magenta: #d946ef;
  --teal: #2dd4bf;

  --grad-main: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
  --grad-btn: linear-gradient(90deg, var(--cyan), var(--violet));

  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);

  --font-display: "Chakra Petch", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Inter", system-ui, sans-serif;

  --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-night);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* subtle grain overlay for texture, evokes weathered rock */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- focus visibility (accessibility floor) ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

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

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark span { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark.small { font-size: 1.1rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
  margin-right: 24px;
}
.main-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--ink); }

.lang-badge {
  background: var(--grad-btn);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lang-badge:hover { opacity: 0.88; transform: translateY(-1px); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 75% 30%, rgba(59,130,246,0.08), transparent 70%);
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.particles-svg { width: 100%; height: 100%; display: block; }

.glow-dot {
  position: absolute;
  top: 24%;
  left: 47%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 28px 10px rgba(45, 212, 191, 0.55);
}

.blob {
  position: absolute;
  border-radius: 28% / 32%;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}
.blob-1 {
  width: 150px;
  height: 150px;
  top: 40%;
  right: 28%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transform: rotate(18deg);
  animation: float1 7s ease-in-out infinite;
}
.blob-2 {
  width: 130px;
  height: 130px;
  top: 60%;
  right: 16%;
  background: linear-gradient(135deg, #a21caf, var(--magenta));
  transform: rotate(-10deg);
  animation: float2 8s ease-in-out infinite;
}
.blob-3 {
  width: 140px;
  height: 140px;
  top: 56%;
  right: 3%;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  transform: rotate(20deg);
  animation: float3 9s ease-in-out infinite;
}
@keyframes float1 { 0%, 100% { transform: translateY(0) rotate(18deg); } 50% { transform: translateY(-18px) rotate(23deg); } }
@keyframes float2 { 0%, 100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(16px) rotate(-15deg); } }
@keyframes float3 { 0%, 100% { transform: translateY(0) rotate(20deg); } 50% { transform: translateY(-14px) rotate(15deg); } }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 140px 0 80px;
  max-width: 640px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}

.grad-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  color: var(--ink);
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--ink-dim);
  max-width: 520px;
  margin-bottom: 36px;
}

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

.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: var(--grad-btn);
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25); }

.btn-outline {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cyan);
  background: transparent;
  border: 1.5px solid var(--cyan);
  padding: 13px 26px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { background: rgba(34, 211, 238, 0.1); }

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  max-width: 130px;
}

/* ===================== PORTFOLIO ===================== */
.portfolio {
  background: var(--bg-dusk);
  padding: 110px 0 120px;
  border-top: 1px solid var(--border-soft);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  max-width: 600px;
  margin-bottom: 56px;
  color: var(--ink);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.12);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
}

.card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 3px;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  text-transform: uppercase;
}

.card-desc {
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

.card-cta {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  border-radius: 999px;
  padding: 8px 18px;
  margin-top: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}
.card-cta:hover { background: rgba(34, 211, 238, 0.12); }

/* row of 5: 3 + 2, center the last row a bit nicer on wide screens */
.card-grid .card:nth-child(4),
.card-grid .card:nth-child(5) {
  grid-column: span 1;
}

/* ===================== CTA BAND ===================== */
.cta-band {
  background: linear-gradient(180deg, var(--bg-dusk), var(--bg-night));
  padding: 100px 0;
  text-align: center;
  border-top: 1px solid var(--border-soft);
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  max-width: 620px;
  margin: 0 auto 14px;
}
.cta-inner p {
  color: var(--ink-dim);
  margin-bottom: 30px;
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--bg-night);
  padding: 36px 0;
  border-top: 1px solid var(--border-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.footer-copy { font-family: var(--font-mono); font-size: 0.75rem; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .blob-1 { right: 10%; }
  .blob-2 { right: 0%; }
  .blob-3 { display: none; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .header-inner { height: 64px; }
  .hero { min-height: 88vh; }
  .hero-content { padding-top: 120px; padding-bottom: 56px; }
  .hero-actions { margin-bottom: 40px; }
  .hero-stats { gap: 28px; }
  .blob { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .portfolio { padding: 80px 0; }
  .cta-band { padding: 70px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .blob { animation: none; }
}
