:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background-color: var(--bg);
  background-image: url('https://images.unsplash.com/photo-1683119167031-19bf5bd185de?w=1920&q=80');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

/* NAV */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
nav .logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  font-family: 'Arial Black', sans-serif;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
  flex-shrink: 0;
}
.logo-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
}
nav .links { display: flex; gap: 1rem; }
nav .links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: .4rem .9rem;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
nav .links a:hover { background: var(--bg); color: var(--primary); }
nav .links a.btn {
  background: var(--primary);
  color: #fff;
}
nav .links a.btn:hover { background: var(--primary-dark); color: #fff; }

/* PAGE OVERLAY — tasainen tummennus kaikilla sivuilla */
.page-overlay {
  background: rgba(8, 15, 35, 0.50);
  min-height: calc(100vh - 64px);
}

/* HERO */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 0;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 35, 0.20);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 5rem;
  width: 100%;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 1rem; text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.hero p { font-size: 1.2rem; opacity: .92; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f1f5f9; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #059669; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  position: relative;
  z-index: 2;
}
.feature-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  text-align: center;
}
.feature-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.feature-card p { color: var(--muted); font-size: .95rem; }

/* SECTION */
.section-wrap { background: transparent; width: 100%; }
.section { max-width: 800px; margin: 0 auto; padding: 3rem 2rem; }

/* Hakusivu — täysin läpinäkyvä tausta */
.section-glass {
  background: transparent;
  width: 100%;
}
.section h2 { font-size: 1.8rem; margin-bottom: .5rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.section .sub { color: rgba(255,255,255,0.9); margin-bottom: 2rem; text-shadow: 0 1px 6px rgba(0,0,0,.4); }

/* FORM */
.form-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
  font-size: .95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  transition: border .15s;
  color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
}
.hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }

/* EXPERIENCE BLOCK */
.exp-block {
  background: var(--bg);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1.5px solid var(--border);
}
.exp-block h4 { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }

/* SEARCH PAGE */
.search-box {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  margin-bottom: 2rem;
}
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.search-grid input,
.search-grid select {
  padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border .15s;
}
.search-grid input:focus,
.search-grid select:focus { outline: none; border-color: var(--primary); background: #fff; }

/* CANDIDATE CARDS */
#tulokset { display: grid; gap: 1.25rem; }
.kandidaatti-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.kandidaatti-card:hover { box-shadow: 0 4px 20px rgba(37,99,235,.12); border-color: var(--primary); }
.k-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .75rem; flex-wrap: wrap; gap: .5rem; }
.k-name { font-size: 1.2rem; font-weight: 700; }
.k-title { color: var(--muted); font-size: .95rem; }
.k-location { font-size: .85rem; color: var(--muted); }
.k-exp-badge {
  background: #eff6ff;
  color: var(--primary);
  padding: .2rem .7rem;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.k-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.tag {
  background: #f0fdf4;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 500;
}
.k-summary { color: var(--muted); font-size: .92rem; margin-top: .75rem; line-height: 1.5; }
.k-detail { display: none; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.k-detail.open { display: block; }
.k-contact { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.k-contact a { color: var(--primary); text-decoration: none; font-size: .9rem; }
.k-contact a:hover { text-decoration: underline; }
.exp-item { margin-bottom: .75rem; }
.exp-item strong { font-size: .95rem; }
.exp-item .dates { font-size: .82rem; color: var(--muted); }
.exp-item p { font-size: .88rem; color: var(--muted); margin-top: .2rem; }

/* STATS */
#stats-bar { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
#stats-bar span { color: var(--muted); font-size: .9rem; }

/* EMPTY */
.empty { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* FOOTER */
footer {
  background: var(--text);
  color: #94a3b8;
  text-align: center;
  padding: 2rem;
  font-size: .9rem;
  margin-top: 4rem;
}

/* KIITOS */
.kiitos { max-width: 500px; margin: 6rem auto; text-align: center; padding: 2rem; }
.kiitos .check { font-size: 4rem; margin-bottom: 1rem; }
.kiitos h2 { font-size: 2rem; margin-bottom: .75rem; }
.kiitos p { color: var(--muted); margin-bottom: 2rem; }

/* HAMBURGER */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
  padding: .25rem .5rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* MOBILE */
@media (max-width: 700px) {
  /* Nav */
  .hamburger { display: block; }
  .nav-right {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: .75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    z-index: 99;
  }
  .nav-right.open { display: flex; }
  .links { flex-direction: column; width: 100%; gap: .25rem; }
  .links a { display: block; width: 100%; }

  /* Hero */
  .hero { min-height: 420px; }
  .hero-content { padding: 3.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1rem; }
  .hero-btns { flex-direction: column; align-items: center; }

  /* Features */
  .features { margin-top: -1.5rem; padding: 0 1rem; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 2rem 1rem; }
  .form-card { padding: 1.25rem; }

  /* Search */
  .search-grid { grid-template-columns: 1fr; }
  .search-box { padding: 1.25rem; }

  /* Cards */
  .kandidaatti-card { padding: 1.25rem; }
  .k-header { flex-direction: column; gap: .25rem; }
  .k-contact { flex-direction: column; gap: .5rem; }

  /* Stats */
  #stats-bar { flex-direction: column; align-items: flex-start; }
}
