:root {
  --black: #222220;
  --white: #e0e0e0;
  --ltgray: #b7b7b7;
  --tiger: #f26a21;
  --olympic: #108ec9;

  --desktop-max-width: 960px;
  --desktop-margin-left: 6rem;
  --desktop-margin-right: 6rem;

  --mobile-margin-left: 2.5rem;
  --mobile-margin-right: 2.5rem;
}

html {
  font-size: 18px;

  /* Estä fontin koon vaihtelut mobiililaitteilla */
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Celebes', sans-serif;
  font-weight: 400;
}

a,
a:link,
a:visited {
  color: var(--olympic);
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  filter: brightness(1.2);
  text-decoration: underline;
}

a:active {
  color: var(--white);
}

.nowrap {
  white-space: nowrap;
}

hr {
  height: 2px;
  background-color: var(--olympic);
  border: none;
  margin: 2.5rem 0;
  width: 4rem;
}

header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-image: linear-gradient(180deg, var(--black), rgba(34, 34, 32, 0.5) 60%, transparent);
  height: 2.5rem;
}

.logo-container {
  display: flex;
  justify-content: start;
  max-width: var(--desktop-max-width);
  padding-left: var(--desktop-margin-left);
  padding-right: var(--desktop-margin-right);
  margin-left: auto;
  margin-right: auto;
  user-select: none;
}

#logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  height: 4.5rem;
  padding: 0px;
  margin-left: .5rem;
  margin-top: 2rem;
  font-family: 'Exo 2', sans-serif;
  font-size: 2.5rem;
  font-display: block; /* piilota kunnes ladattu (max 3 sek) */
  font-weight: 500;
  color: var(--black);
  background-color: var(--tiger);
  transform: rotate(-7deg);
  transition: background-color 1s,
              height .5s,
              width .5s,
              font-size .5s,
              transform .5s,
              margin-left .3s;
}

html:not([data-scroll='0']) #logo {
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  font-size: 1.6rem;
  background-color: var(--white);
  transform: rotate(0deg);
  margin-left: -4.75rem;
}

html:not([data-scroll='0']) #logo:hover {
  background-color: var(--olympic);
}

main {
  max-width: var(--desktop-max-width);
  padding-left: var(--desktop-margin-left);
  padding-right: var(--desktop-margin-right);
  margin-left: auto;
  margin-right: auto;
}

h1 {
  margin: 14rem 0 0 0;
  font-family: 'Exo 2', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
}

h2 {
  color: var(--ltgray);
  font-size: 1.6rem;
  font-weight: 500;
  margin: .5rem 0 2rem 0;
}

h2 b {
  color: var(--white);
}

h3 {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-family: 'Exo 2', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

p {
  margin: 1.5rem 0;
}

p:last-child {
  margin-bottom: 0;
}

.intro {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1.5rem;
}

.self-image {
  width: 24vw;
  margin-top: -4rem;
  max-width: 22rem;
}

ul.biz-list {
  padding-left: 1.5rem;
  margin-bottom: 0;
  line-height: 1.4;
}

ul.biz-list ul {
  font-size: .9rem;
  line-height: 1.2;
  color: var(--ltgray);
  padding: .25rem 0 .5rem 1rem;
}

ul.biz-list li {
  list-style-type: square;
  padding-left: .5rem;
}

.tech-specs p {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  font-size: .9rem;
  margin-top: 1.5rem;
  margin-left: -0.5rem;
  margin-bottom: 0;
  padding: .5rem;
  transition: background-color .4s;
  cursor: pointer;
}

.tech-specs:not(.visible) p {
  background: transparent;
}

.tech-specs:is(.visible) p {
  background: black;
}

.tech-specs .expand {
  transition: transform .4s;
  width: 1.5rem;
}

.tech-specs:not(.visible) .expand {
  transform: rotate(-180deg);
}

.tech-specs:is(.visible) .expand {
  transform: rotate(0deg);
}

.tech-specs .tech-list-container {
  overflow: hidden;
  transition: opacity .4s, max-height .4s;
  margin: 0 -0.5rem; 
  background: black;
}

.tech-specs:is(.visible) .tech-list-container {
  opacity: 1;
  max-height: 100vh;
}

.tech-specs:not(.visible) .tech-list-container {
  opacity: 0;
  max-height: 0;
}

.tech-specs ul {
  font-family: 'Ubuntu Mono', monospace;
  font-weight: 400;
  font-size: .9rem;
  padding: .5rem 2rem;
  line-height: 1.15;
  list-style-type: '> ';
}

#contact-link {
  font-weight: 700;
}

footer {
  max-width: var(--desktop-max-width);
  padding-left: var(--desktop-margin-left);
  padding-right: var(--desktop-margin-right);
  margin: 2.5rem auto;
  text-align: right;
}

footer img {
  width: 4rem;
  height: 4rem;
}

/* Välikoko (tabletit, mobiili vaakatasossa) */
@media only screen and (max-width: 1080px) {
  html {
    font-size: 16px;
  }
  .self-image {
    margin-top: 0;
  }
}

/* Mobiili */
@media only screen and (max-width: 720px) {
  html {
    font-size: 14px;
  }

  header {
    height: 5.5rem; /* gradientin korkeus */
  }

  h1 {
    margin: 6rem 0 1.5rem 0;
  }

  .intro {
    flex-direction: column-reverse;
  }

  .logo-container {
    justify-content: end;
  }

  .logo-container,
  main,
  footer {
    padding-left: var(--mobile-margin-left);
    padding-right: var(--mobile-margin-right);
  }

  #logo {
    margin-top: 1rem;
    transform: rotate(7deg);
  }

  html:not([data-scroll='0']) #logo {
    margin-left: 0;
  }

  .self-image {
    width: 14rem;
  }

  footer {
    text-align: left;
  }
}
