:root {
  --bg: #05070f;
  --bg2: #0a0f1c;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.055);
  --line: rgba(148, 163, 184, 0.14);
  --text: #e8eef9;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #5b8cff;
  --brand2: #22d3ee;
  --glow: rgba(91, 140, 255, 0.35);
  --radius: 20px;
  --max: 1100px;
  --pad: clamp(20px, 4vw, 24px);
  --section-y: clamp(56px, 10vw, 88px);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brand2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(5, 7, 15, 0.86);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  height: 60px;
  gap: 12px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 17px;
  flex-shrink: 0;
  min-height: 44px;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px var(--glow);
  flex-shrink: 0;
}
.logo-mark { background: none; }
.logo-mark img { width: 32px; height: 32px; display: block; }
.nav-links {
  display: none;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #3b82f6 55%, var(--brand2));
  color: #041018;
  box-shadow: 0 10px 30px var(--glow);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.03);
}
.btn-ghost:hover { border-color: rgba(148,163,184,0.35); }
.nav .btn {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 14px;
  min-height: 40px;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 8vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto;
  height: 70%;
  background:
    radial-gradient(700px 320px at 18% 20%, rgba(91,140,255,0.28), transparent 70%),
    radial-gradient(600px 280px at 85% 10%, rgba(34,211,238,0.18), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: #b7d4ff;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand2);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.15);
  flex-shrink: 0;
}
h1 {
  margin: 16px 0 14px;
  font-size: clamp(30px, 8.2vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 18ch;
}
h1 span {
  background: linear-gradient(90deg, #8eb6ff, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 0 0 24px;
  max-width: 36em;
  font-size: clamp(15.5px, 3.8vw, 18.5px);
  color: var(--soft);
  line-height: 1.6;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cta-row .btn {
  flex: 1 1 auto;
  min-width: min(100%, 148px);
}

.hero-panel {
  display: none; /* mobile: hide decorative panel; content lives in Projekti */
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.stack { display: grid; gap: 10px; }
.stack-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(5,7,15,0.55);
  border: 1px solid var(--line);
  min-width: 0;
}
.stack-item strong {
  display: block;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.stack-item span { color: var(--muted); font-size: 12.5px; }
.badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34,211,238,0.12);
  color: #7ee7f5;
  flex-shrink: 0;
  white-space: nowrap;
}
.badge.soon {
  background: rgba(148,163,184,0.12);
  color: #cbd5e1;
}
.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(91,140,255,0.25), rgba(34,211,238,0.15));
  color: #dff7ff;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.project-ico { margin-block-end: 14px; }

/* Sections */
section {
  padding: var(--section-y) 0;
  position: relative;
}
.section-label {
  color: var(--brand2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h2 {
  margin: 10px 0 12px;
  font-size: clamp(24px, 6vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.18;
}
.sub {
  margin: 0;
  max-width: 40em;
  color: var(--muted);
  font-size: clamp(15px, 3.6vw, 17px);
  line-height: 1.6;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 28px;
}
.about-copy p {
  color: var(--soft);
  font-size: clamp(15px, 3.6vw, 16.5px);
  margin: 0 0 14px;
}
.about-copy p:last-child { margin-bottom: 0; }
.people {
  display: grid;
  gap: 12px;
}
.person {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--card);
}
.person h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.person .role {
  color: var(--brand2);
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}
.person p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.initials {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(135deg, rgba(91,140,255,0.3), rgba(34,211,238,0.2));
  border: 1px solid var(--line);
}

.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 28px;
}
.project-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  color: inherit;
  transition: transform .18s, border-color .18s, background .18s;
}
.project-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(91,140,255,0.4);
  background: var(--card-hover);
}
.project-card.muted {
  opacity: 0.9;
  border-style: dashed;
}
.project-card h3 {
  margin: 0 0 8px;
  font-size: clamp(18px, 4.5vw, 20px);
  letter-spacing: -0.02em;
}
.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
  line-height: 1.55;
}
.project-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 650;
  min-height: 28px;
}
.arrow { color: var(--brand2); }

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 28px;
}
.how-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
  background: #0b1220;
  border: 1px solid var(--line);
  color: var(--brand2);
}
.how-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.how-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.contact-band {
  border-radius: 22px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 220px at 0% 0%, rgba(91,140,255,0.22), transparent 70%),
    radial-gradient(420px 200px at 100% 100%, rgba(34,211,238,0.14), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}
.contact-band h2 { margin: 8px 0 10px; }
.contact-band p {
  margin: 0;
  color: var(--muted);
  max-width: 36em;
  font-size: 15px;
}
.contact-meta {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  color: var(--soft);
  font-size: 14.5px;
}
.contact-meta strong { color: var(--text); font-weight: 650; }
.contact-band .btn {
  width: 100%;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 13px;
}
.footer-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.footer-row a {
  color: var(--soft);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

/* Tablet+ */
@media (min-width: 640px) {
  .nav { height: 68px; min-height: 68px; }
  .nav .btn { min-height: 44px; padding: 12px 18px; font-size: 14.5px; }
  .cta-row .btn { flex: 0 1 auto; }
  .contact-band {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 36px;
  }
  .contact-band .btn { width: auto; }
  .contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
  }
  .footer-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .person { padding: 22px; }
  .project-card { padding: 26px; border-radius: 22px; }
  .how-card { padding: 26px; border-radius: 22px; }
}

/* Desktop */
@media (min-width: 901px) {
  .nav-links { display: flex; }
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
  }
  .hero-panel { display: block; }
  h1 { max-width: none; margin: 18px 0 16px; }
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    margin-top: 40px;
  }
  .projects {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 40px;
  }
  .project-card { min-height: 240px; }
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 40px;
  }
  .contact-band { border-radius: 28px; padding: 48px; }
}
