:root {
  --bg: #07070b;
  --bg-soft: #111018;
  --surface: rgba(20, 18, 29, 0.82);
  --surface-solid: #17141f;
  --text: #f8f4ef;
  --muted: #b9b0bd;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ff8a3d;
  --accent-2: #e3408a;
  --accent-3: #7b61ff;
  --max-width: 1120px;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 10%, rgba(123, 97, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 10% 45%, rgba(227, 64, 138, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 11, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 76px;
  margin: 0 auto;
  gap: 28px;
}

.brand {
  position: relative;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 650;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.site-nav a[aria-current="page"] {
  color: #160d10;
  background: linear-gradient(135deg, #ffad56, #ff6b72);
}

.home-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.home-page main {
  display: flex;
  flex: 1;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: calc(100svh - 76px);
  overflow: hidden;
  padding: 72px 20px;
  background-image: url("images/Taustakuva.jpg");
  background-position: center 58%;
  background-size: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5, 5, 9, 0.18), rgba(5, 5, 9, 0.68)),
    linear-gradient(90deg, rgba(5, 5, 9, 0.26), transparent 45%, rgba(5, 5, 9, 0.2));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, transparent 10%, rgba(7, 7, 11, 0.25) 80%);
}

.hero-content {
  width: min(100%, 900px);
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(3.4rem, 11vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: 0 10px 44px rgba(0, 0, 0, 0.55);
}

.hero-title span {
  display: block;
  color: transparent;
  background: linear-gradient(115deg, #fff5df 8%, #ffc26f 36%, #ff8274 68%, #f9c4e7);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 21px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 7, 11, 0.68);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(25, 21, 31, 0.88);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 7, 11, 0.9), rgba(7, 7, 11, 0.56)),
    url("images/Taustakuva.jpg") center 58% / cover;
  opacity: 0.75;
}

.page-hero-inner {
  position: relative;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 132px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffc274;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.content {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(166px, 210px) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(20px, 3vw, 42px);
}

.about-content {
  min-width: 0;
}

.space-slider {
  --rail-x: 10px;
  --rocket-half-width: 58px;
  --track-top: 132px;
  --track-bottom: 88px;
  --trail-top: 0px;
  --progress-height: 0px;
  position: relative;
  align-self: stretch;
  min-height: 100%;
  isolation: isolate;
}

.space-slider__track {
  position: absolute;
  left: var(--rail-x);
  width: 2px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.space-slider__track {
  top: var(--track-top);
  bottom: var(--track-bottom);
  z-index: 0;
  background: linear-gradient(180deg, rgba(137, 151, 221, 0.42), rgba(86, 101, 177, 0.64));
  box-shadow: 0 0 12px rgba(123, 97, 255, 0.2);
}

.space-slider__progress {
  position: absolute;
  top: var(--trail-top);
  left: 0;
  width: 100%;
  height: var(--progress-height);
  border-radius: inherit;
  background: linear-gradient(180deg, #fff5e9 0%, #a8d5ff 30%, #7184ff 100%);
  box-shadow: 0 0 12px rgba(201, 231, 255, 0.9), 0 0 28px rgba(112, 132, 255, 0.62);
  transition: top 480ms cubic-bezier(0.22, 1, 0.36, 1), height 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.space-slider__rocket {
  position: absolute;
  top: var(--rocket-top, 0px);
  left: calc(var(--rail-x) - var(--rocket-half-width));
  z-index: 2;
  width: 116px;
  height: 164px;
  object-fit: contain;
  filter: drop-shadow(0 9px 13px rgba(0, 0, 0, 0.68)) drop-shadow(0 0 13px rgba(255, 121, 56, 0.42));
  pointer-events: none;
  transition: top 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.space-slider__list {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 158px 0 74px;
  z-index: 1;
}

.space-slider__item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  align-self: start;
}

.space-slider__item:last-child {
  align-self: end;
}

.space-slider__marker {
  width: 16px;
  height: 16px;
  margin-top: 5px;
  border: 2px solid #ff7e4d;
  border-radius: 50%;
  background: #16121b;
  box-shadow: 0 0 0 4px rgba(9, 8, 13, 0.85);
  transition: background-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.space-slider__item-content {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.space-slider__label {
  font-size: 0.83rem;
  font-weight: 750;
  line-height: 1.25;
  transition: color 220ms ease;
}

.space-slider__image {
  width: 60px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  object-fit: cover;
  background: #0c0c13;
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.45);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.space-slider__item:hover .space-slider__label,
.space-slider__item.is-active .space-slider__label {
  color: var(--text);
}

.space-slider__item:hover .space-slider__image,
.space-slider__item.is-active .space-slider__image {
  border-color: #ff8750;
  box-shadow: 0 0 0 3px rgba(255, 121, 77, 0.16), 0 10px 22px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 100, 77, 0.35);
  transform: translateY(-1px) scale(1.035);
}

.space-slider__item.is-active .space-slider__marker {
  background: #ff694c;
  box-shadow: 0 0 0 4px rgba(9, 8, 13, 0.85), 0 0 14px rgba(255, 104, 75, 0.95), 0 0 28px rgba(255, 81, 83, 0.52);
  transform: scale(1.12);
}

.space-slider__item:focus-visible {
  outline: none;
}

.space-slider__item:focus-visible .space-slider__item-content {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  border-radius: 8px;
}

.intro-grid,
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.section-stack {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(25px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 26, 40, 0.9), rgba(15, 14, 21, 0.92));
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.8;
}

.card h2,
.card h3 {
  margin-top: 0;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.card h2 {
  margin-bottom: 22px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.card h3 {
  margin-bottom: 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}

.card p {
  color: var(--muted);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.clean-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.clean-list li + li {
  margin-top: 10px;
}

.clean-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(227, 64, 138, 0.4);
}

.experience {
  display: grid;
  gap: 18px;
}

.experience-item {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.experience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 20px;
  color: #e7a86e;
  font-size: 0.92rem;
  font-weight: 700;
}

.achievement-title {
  margin: 24px 0 10px;
  color: var(--text) !important;
  font-weight: 800;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills li {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #ece4ee;
  font-size: 0.93rem;
  font-weight: 700;
}

.closing {
  text-align: center;
}

.closing p {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.contact-wrap {
  display: grid;
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
  gap: 20px;
}

.contact-lead {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
}

.contact-lead h2 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.contact-row:first-child {
  padding-top: 0;
}

.contact-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-row dt {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-row dd {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.contact-row a {
  text-decoration-color: rgba(255, 138, 61, 0.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.contact-row a:hover {
  color: #ffc274;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #060609;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 64px;
  margin: 0 auto;
  gap: 20px;
  color: #8f8794;
  font-size: 0.83rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: #d9d1dc;
  text-decoration: none;
}

@media (max-width: 760px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 17px 0 13px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    padding: 8px 11px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: calc(100svh - 122px);
    background-position: 58% 58%;
  }

  .hero-title {
    font-size: clamp(3.5rem, 20vw, 6rem);
  }

  .intro-grid,
  .two-column,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    width: calc(100% + 24px);
    margin-left: -12px;
  }

  .space-slider {
    --rail-x: 24px;
    --rocket-half-width: 30px;
    position: relative;
    top: auto;
    width: auto;
    min-height: 100%;
    margin: 0;
  }

  .space-slider__list {
    padding-top: 90px;
    padding-bottom: 30px;
  }

  .space-slider__rocket {
    width: 60px;
    height: 85px;
  }

  .space-slider__item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px;
  }

  .space-slider__marker {
    width: 12px;
    height: 12px;
    margin-top: 3px;
    margin-left: 18px;
    border-width: 1px;
  }

  .space-slider__image {
    width: 38px;
    border-width: 1px;
  }

  .content {
    padding: 42px 0 64px;
  }

  .experience-item {
    padding: 20px;
  }

  .contact-lead {
    min-height: auto;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 22px 0;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
