:root {
  --color-primary: #628d98; /* Desaturated Cyan */
  --color-secondary: #214657; /* Japanese Indigo */
  --color-dark: #0b0b0b; /* Smoky Black */
  --color-accent: #ebb901; /* Chrome Yellow */
  --color-light: #fffef6; /* Whitish */
  --color-darkgrey: #262626; /* Dark Grey  */
  --color-background: #141414; /* Background dark color */

  --color-orange-gradient: linear-gradient(to bottom, #f2680d 0%, #ce3815 100%);
  --color-gray: linear-gradient(to bottom, #262626, #363636);
  --color-gray-v1: linear-gradient(to bottom, #404040, #999999);
  --color-gray-v2: linear-gradient(
    to bottom,
    #8e8e8e 0%,
    #5d5c5c 25%,
    #515050 50%,
    #5d5c5c 75%,
    #8e8e8e 100%
  );
}

/* Strong final override for the desktop side menu so it mirrors the desired spacing & colors. */
@media (min-width: 769px) {
  html body#index header#header aside.hero-right nav.side-links {
    padding-left: 2rem !important;
    padding-right: 1rem !important;
  }

  html body#index header#header aside.hero-right nav.side-links ul {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-end !important;
    gap: 0.6rem !important;
    height: 100% !important;
    text-align: right !important;
  }

  html body#index header#header aside.hero-right nav.side-links ul li {
    width: 100% !important;
  }

  html body#index header#header aside.hero-right nav.side-links ul li a,
  html body#index header#header aside.hero-right nav.side-links ul li a * {
    transform: none !important;
    text-transform: uppercase !important;
    text-align: right !important;
    text-shadow: none !important;
    font-size: 1.6rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.26rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0 !important;
    transition:
      color 0.3s ease !important,
      opacity 0.3s ease !important;
    opacity: 1 !important;
  }

  html body#index header#header aside.hero-right nav.side-links ul li a:hover,
  html body#index header#header aside.hero-right nav.side-links ul li a:focus {
    color: var(--color-accent) !important;
    opacity: 1 !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  scroll-behavior: smooth;
}

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

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

body {
  -webkit-text-size-adjust: none;
}

mark {
  background-color: transparent;
  color: inherit;
}

input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

input,
select,
textarea {
  -moz-appearance: none;
  -webkit-appearance: none;
  -ms-appearance: none;
  appearance: none;
}

/* BASICS */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: var(--color-darkgrey);
  overflow-x: hidden;
  overflow-y: auto;
}

body.is-preload *,
body.is-preload *:before,
body.is-preload *:after {
  -moz-animation: none !important;
  -webkit-animation: none !important;
  -ms-animation: none !important;
  animation: none !important;
  -moz-transition: none !important;
  -webkit-transition: none !important;
  -ms-transition: none !important;
  transition: none !important;
}

body,
input,
select,
textarea {
  font-family: 'Roboto', sans-serif;
  color: var(--color-light);
  font-size: 15pt;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.75em;
}

/* TAUSTAKUVAN ASETUKSET */

#bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

#bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 15% center;
  filter: brightness(0.8) contrast(1.1);
  transition: opacity 0.8s ease-out;
}

/* Dedicated left overlay: dark, translucent, with softened right edge */
#left-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 42vw; /* covers left portion regardless of content */
  max-width: 760px; /* avoids overly wide on large monitors */
  height: 100vh;
  z-index: 1; /* above video, below main content */
  background: rgba(5, 5, 5, 0.68);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  /* soften right edge via gradient mask */
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 85%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 85%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Hide left overlay on mobile */
@media (max-width: 768px) {
  #left-overlay {
    display: none;
  }
}

body.cv #bg,
body.photographs-page #bg,
body.form #bg {
  background-image: var(--form-bg);
  background-size: cover;
  background-position: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  animation: zoom 40s ease-in-out infinite alternate;
}

/* BACKGROUND SETTINGS */

#bg {
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

@-webkit-keyframes bg {
  0% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  100% {
    -moz-transform: translate3d(-2250px, 0, 0);
    -webkit-transform: translate3d(-2250px, 0, 0);
    -ms-transform: translate3d(-2250px, 0, 0);
    transform: translate3d(-2250px, 0, 0);
  }
}

@-ms-keyframes bg {
  0% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  100% {
    -moz-transform: translate3d(-2250px, 0, 0);
    -webkit-transform: translate3d(-2250px, 0, 0);
    -ms-transform: translate3d(-2250px, 0, 0);
    transform: translate3d(-2250px, 0, 0);
  }
}

@keyframes bg {
  0% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  100% {
    -moz-transform: translate3d(-2250px, 0, 0);
    -webkit-transform: translate3d(-2250px, 0, 0);
    -ms-transform: translate3d(-2250px, 0, 0);
    transform: translate3d(-2250px, 0, 0);
  }
}

@-moz-keyframes zoom {
  0% {
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
  }

  100% {
    -moz-transform: scale(1.08);
    -webkit-transform: scale(1.08);
    -ms-transform: scale(1.08);
    transform: scale(1.08);
  }
}

@-webkit-keyframes zoom {
  0% {
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
  }

  100% {
    -moz-transform: scale(1.08);
    -webkit-transform: scale(1.08);
    -ms-transform: scale(1.08);
    transform: scale(1.08);
  }
}

@-ms-keyframes zoom {
  0% {
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
  }

  100% {
    -moz-transform: scale(1.08);
    -webkit-transform: scale(1.08);
    -ms-transform: scale(1.08);
    transform: scale(1.08);
  }
}

@keyframes zoom {
  0% {
    -moz-transform: scale(1);
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
  }

  100% {
    -moz-transform: scale(1.08);
    -webkit-transform: scale(1.08);
    -ms-transform: scale(1.08);
    transform: scale(1.08);
  }
}

/* OVERLAY EFFECTS */

@-moz-keyframes overlay {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-webkit-keyframes overlay {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-ms-keyframes overlay {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes overlay {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* HEADER KEYFRAMES */

@-moz-keyframes header {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-webkit-keyframes header {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-ms-keyframes header {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes header {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-moz-keyframes nav-icons {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-webkit-keyframes nav-icons {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-ms-keyframes nav-icons {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes nav-icons {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#header {
  -moz-animation: header 1s 0.8s forwards;
  -webkit-animation: header 1s 0.8s forwards;
  -ms-animation: header 1s 0.8s forwards;
  animation: header 1s 0.8s forwards;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  cursor: default;
  display: inline-block;
  opacity: 0;
  position: relative;
  text-align: center;
  top: -1em;
  vertical-align: middle;
  width: 90%;
}

#header h1 {
  font-size: 4.35em;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1em;
}

#header p {
  font-size: 1.2rem;
  color: var(--color-light);
  margin: 0.75em 0 0.25em 0;
  opacity: 0.75;
}

#header nav {
  margin: 1.5em 0 0 0;
}

#header nav li {
  -moz-animation: nav-icons 0.5s ease-in-out forwards;
  -webkit-animation: nav-icons 0.5s ease-in-out forwards;
  -ms-animation: nav-icons 0.5s ease-in-out forwards;
  animation: nav-icons 0.5s ease-in-out forwards;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  display: inline-block;
  height: 5.35em;
  line-height: 5.885em;
  opacity: 0;
  position: relative;
  top: 0;
  width: 5.35em;
}

#header nav li:nth-child(1) {
  -moz-animation-delay: 2.5s;
  -webkit-animation-delay: 2.5s;
  -ms-animation-delay: 2.5s;
  animation-delay: 2.5s;
}

#header nav li:nth-child(2) {
  -moz-animation-delay: 2.75s;
  -webkit-animation-delay: 2.75s;
  -ms-animation-delay: 2.75s;
  animation-delay: 2.75s;
}

#header nav li:nth-child(3) {
  -moz-animation-delay: 3s;
  -webkit-animation-delay: 3s;
  -ms-animation-delay: 3s;
  animation-delay: 3s;
}

#header nav li:nth-child(4) {
  -moz-animation-delay: 3.25s;
  -webkit-animation-delay: 3.25s;
  -ms-animation-delay: 3.25s;
  animation-delay: 3.25s;
}

#header nav li:nth-child(5) {
  -moz-animation-delay: 3.5s;
  -webkit-animation-delay: 3.5s;
  -ms-animation-delay: 3.5s;
  animation-delay: 3.5s;
}

#header nav li:nth-child(6) {
  -moz-animation-delay: 3.75s;
  -webkit-animation-delay: 3.75s;
  -ms-animation-delay: 3.75s;
  animation-delay: 3.75s;
}

#header nav li:nth-child(7) {
  -moz-animation-delay: 4s;
  -webkit-animation-delay: 4s;
  -ms-animation-delay: 4s;
  animation-delay: 4s;
}

#header nav li:nth-child(8) {
  -moz-animation-delay: 4.25s;
  -webkit-animation-delay: 4.25s;
  -ms-animation-delay: 4.25s;
  animation-delay: 4.25s;
}

#header nav li:nth-child(9) {
  -moz-animation-delay: 4.5s;
  -webkit-animation-delay: 4.5s;
  -ms-animation-delay: 4.5s;
  animation-delay: 4.5s;
}

#header nav li:nth-child(10) {
  -moz-animation-delay: 4.75s;
  -webkit-animation-delay: 4.75s;
  -ms-animation-delay: 4.75s;
  animation-delay: 4.75s;
}

#header nav a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  border: 0;
  display: inline-block;
}

#header nav a:before {
  -moz-transition: all 0.2s ease-in-out;
  -webkit-transition: all 0.2s ease-in-out;
  -ms-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  border-radius: 100%;
  border: solid 1px #fff;
  display: block;
  font-size: 1.75em;
  height: 2.5em;
  line-height: 2.5em;
  position: relative;
  text-align: center;
  top: 0;
  width: 2.5em;
}

#header nav a:hover {
  color: var(--color-accent);
  text-shadow:
    0 0 10px rgba(235, 185, 1, 0.45),
    0 0 20px rgba(235, 185, 1, 0.25);
}

#header nav a:hover:before {
  background-color: rgba(255, 255, 255, 0.175);
  color: #fff;
}

#header nav a:active {
  background: none;
}

#header nav a:active:before {
  background-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

#header nav a span {
  display: none;
}

/* FOOTER */

footer {
  background: none;
  color: var(--color-light);
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

footer a {
  color: var(--color-accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

body#index .footer {
  position: fixed;
  right: 40px;
  bottom: 0px;
  font-size: 0.9rem;
  color: #9c9c9c;
  background: none;
  border: none;
  display: flex;
  justify-content: flex-end;
  box-shadow: none;
}

/* MAIN */

/* TOOLTIP CONFIGURATION */

.tooltip {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: 'Roboto', sans-serif;
  color: var(--color-light);
  background-color: rgba(20, 20, 20, 0.85);
  border-radius: 6px;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  line-height: 1.3;
}

.icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.icon-wrapper:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-40%) translateY(0px);
  pointer-events: auto;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

nav li {
  position: relative;
}

.icon:hover {
  transform: scale(1.04);
  color: var(--color-accent);
  filter: drop-shadow(0 0 4px var(--color-accent));
}

/* SOCIAL MEDIA ICONS */

.social-icons {
  margin-top: 1.5rem;
}

.social-icons .icon {
  font-size: 1.8rem;
  margin-left: 0;
  margin-right: 1.5rem;
  margin: 0 1rem;
}

.social-icons .icon:hover {
  color: var(--color-accent);
  transform: scale(1.15);
  transition: all 0.3s ease;
}

.social-icons .icon {
  border-bottom: none !important;
}

/* MAIN CONTAINER */

.container {
  position: relative;
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  margin: 0;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.welcome-text {
  font-family: 'League Spartan', sans-serif;
  font-size: 2.058rem;
  font-style: normal;
  font-weight: 400;
  color: var(--color-light);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-align: left;
  animation: fadeUpStagger 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) 120ms forwards;
  opacity: 0;
}

/* WRAPPER IKONEILLE */

#main {
  width: 100%;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

body#index {
  overflow: hidden;
}

@media (max-width: 768px) {
  body#index {
    overflow-y: auto;
  }
}

body#index #main {
  height: 100vh;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: 0;
  width: 100%;
  padding-top: 0 !important;
  margin-top: 0;
}

@media (max-width: 768px) {
  body#index #main {
    height: auto !important;
    min-height: 0 !important; /* don't force full viewport height */
    padding-top: 0 !important;
    margin-top: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  body#index #header {
    height: auto !important;
    min-height: 0 !important;
  }
}

body#index #main:before {
  display: none;
}

body#index #header {
  top: 0;
  margin: 0;
  width: 100%;
  padding: 0;
  margin-top: 0 !important;
}

body#index .container {
  margin: 0 auto;
}

#main:before {
  content: '';
  display: inline-block;
  height: 100%;
  margin-right: 0;
  vertical-align: middle;
  width: 1px;
}

/* PARAGRAPHS, HEADERS AND LINKS */

a {
  -moz-transition: border-color 0.2s ease-in-out;
  -webkit-transition: border-color 0.2s ease-in-out;
  -ms-transition: border-color 0.2s ease-in-out;
  transition: border-color 0.2s ease-in-out;
  color: inherit;
  outline: 0;
  text-decoration: none;
}

a:hover {
  border-color: transparent;
}

.main-heading {
  font-family: 'League Spartan', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #efe92f, #eba129, #f3dc2f, #cdab04);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ===== BIO-TEKSTI ===== */
.specs {
  font-size: 0.618rem;
  font-weight: 100;
  color: var(--color-primary);
  letter-spacing: 0.08rem;
  line-height: 1.618;
  margin-top: 1.2rem;
  margin-bottom: 2rem;
  font-style: normal;
  text-align: left;
  opacity: 0;
  animation: fadeUpStagger 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) 480ms forwards;
}

/* RETRO TERMINAL STYLE CHANGELOG */

.changelog-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5vh;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 9999;
}

.changelog-modal-content::-webkit-scrollbar {
  display: none;
}

.changelog-modal.hidden {
  display: none;
}

.changelog-modal-content {
  background: #0000aa;
  border: 2px solid #fff;
  width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
  position: relative;
}

.changelog-modal-content h2 {
  margin-top: 0;
  font-size: 1.4rem;
  border-bottom: 1px solid #fff;
  padding-bottom: 0.5rem;
}

.close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 1px solid #fff;
  background: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.close-btn:hover {
  background: var(--color-accent);
}

/* Kirjoituskone ja vilkkuva kursori */
.retro-text {
  white-space: pre-wrap;
  line-height: 1.5;
  animation: scan 1s steps(30) infinite alternate;
}

.retro-text::after {
  content: '█';
  animation: blink 1s step-start infinite;
  margin-left: 3px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes scan {
  0% {
    background-color: rgba(255, 255, 255, 0.05);
  }
  100% {
    background-color: transparent;
  }
}

/* I-painike */
.changelog-float-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: #000;
  color: #fff;
  border: 1px solid #555;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
}
.changelog-float-btn:hover {
  background: var(--color-accent);
}

/* NAVBAR */

.custom-navbar {
  top: 1rem;
  width: calc(100% - 2rem);
  max-width: 1200px;
  min-height: 88px;
  margin: 1rem auto 0 auto;
  position: fixed;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-light);
  padding: 0 2rem;
  z-index: 10000;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* BRAND LOGO */

.custom-navbar .logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 150px;
  min-width: 140px;
  height: 72px;
}

.custom-navbar .logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.is-preload .custom-navbar .logo img {
  visibility: hidden;
}

.nav-center {
  position: relative;
  justify-self: center;
}
.nav-right {
  justify-self: end;
}
.custom-navbar .logo img:hover {
  transform: scale(1.02);
}

/* NAVBAR MENU ITEMS */

.menu-toggle {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fafafa;
  padding: 0.65rem 1.15rem;
  border-radius: 14px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.menu-toggle:hover {
  background: linear-gradient(135deg, rgba(235, 185, 1, 0.18), rgba(235, 185, 1, 0.32));
  border-color: rgba(235, 185, 1, 0.8);
  color: #ffffff;
  transform: translateY(-1px) scale(1.01);
}

.menu-toggle:active {
  transform: scale(0.98);
}

.menu-icon {
  width: 22px;
  height: 16px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  position: relative;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
}

.menu-toggle[aria-expanded='true'] .menu-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded='true'] .menu-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-label {
  letter-spacing: 0.05em;
}

.dropdown {
  min-width: 240px;
  opacity: 0;
  transform: translate(-50%, -10%);
  pointer-events: none;
  transition: all 0.3s ease;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;

  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);

  list-style: none;
  padding: 1rem 0;
  text-align: center;
  z-index: 1001;
}
.dropdown.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.dropdown li {
  text-align: center;
}

.dropdown li a {
  position: relative;
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--color-light);
  text-decoration: none;
  overflow: hidden;
  border: none;
}

.dropdown li a:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.dropdown li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.4rem;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.dropdown li a:hover::after {
  transform: scaleX(1);
}

.nav-right .home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  text-decoration: none;
  color: #0b0b0b;
  background: linear-gradient(135deg, rgba(235, 185, 1, 0.9), rgba(255, 226, 122, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav-right .home-button:hover {
  background: linear-gradient(135deg, rgba(235, 185, 1, 1), rgba(255, 235, 172, 1));
  color: #000;
  transform: translateY(-1px) scale(1.02);
}

/* DROPDOWN ANIMATION */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MAIN SCREEN ICON SETTINGS */

.icon {
  position: relative;
  color: var(--color-light);
  font-size: 1.1rem;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    color 0.25s ease;
  display: inline-block;
}

.icon:before {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  text-transform: none !important;
  font-family: 'Font Awesome 5 Free';
  font-weight: 400;
}

.icon > .label {
  display: none;
}

.icon.solid:before {
  font-weight: 900;
}

.icon.brands:before {
  font-family: 'Font Awesome 5 Brands';
}

/* BIO PAGE */

body.bio {
  font-family: 'Roboto', sans-serif;
  background: url('/assets/images/dark_wood.jpg') no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
  color: var(--color-light);
}

.bio-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 7rem auto 4rem;
  padding: 3rem 4rem;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.bio-container.reverse {
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

blockquote {
  font-style: italic;
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
}

.bio-text {
  flex: 1;
  padding-right: 1rem;
  animation: slideIn 1s ease forwards;
  opacity: 0;
}

.bio-text h1,
.bio-text h2 {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-align: left;
}

.bio-text h1 {
  margin: 0 0 1.8rem;
}

.bio-text h2 {
  margin: 2.2rem 0 1.8rem;
}

.bio-text p {
  font-weight: 300;
  line-height: 1.75;
  font-size: 1.1rem;
  color: var(--color-light);
  text-align: justify;
  margin-bottom: 1.2rem;
}

.bio-image {
  flex: 0 0 320px;
  max-width: 320px;
}

.bio-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.bio-container + .bio-container {
  margin-top: 3rem;
}

/* CV PAGE */

.cv_suomi,
.cv_english {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

.image-container {
  display: flex;
  transform: translateX(0);
  transition: transform 0.5s ease-in-out;
}

.download-cv {
  text-align: center;
  margin-top: 1rem;
}

.cv-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 900px;
  margin: 3rem auto;
  padding: 1rem;
}

.cv-block {
  text-align: center;
}

.cv-block img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.download-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.2rem;
  background-color: var(--color-dark);
  color: var(--color-light);
  border: 2px solid var(--color-light);
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.download-btn:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.button-container {
  display: flex;
  justify-content: space-between;
}

/* SERTIFIKAATIT  */

.certificates-btn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: var(--color-dark);
  color: var(--color-light);
  border: 2px solid var(--color-light);
  border-radius: 6px 0 0 6px;
  width: 48px;
  height: auto;
  padding: 0.5rem;
  font-size: 0.85rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.guide-download-btn {
  top: 62%;
  background: var(--color-accent);
  color: var(--color-dark);
  border-color: var(--color-accent);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.guide-download-btn:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-light);
}

.certificates-btn:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

.guide-download-btn:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

/* SERTIFIKAATTIPANEELI */

.certificates-panel {
  position: fixed;
  top: 50%;
  right: -320px;
  transform: translateY(-50%);
  width: 300px;
  background: rgba(20, 20, 20, 0.95);
  color: var(--color-light);
  border-left: 2px solid var(--color-accent);
  border-radius: 12px 0 0 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  transition: right 0.3s ease-in-out;
  z-index: 10000;
}

.certificates-panel.show {
  right: 0;
}

.certificate-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.certificate-card {
  background: rgba(255, 255, 255, 0.07);
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.icon-vertical {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(90deg);
  font-size: 1.2rem;
  margin-right: 0.4rem;
}

/* BLOGI SIVU */

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
  width: 100%;
  margin: 0 auto;
}

.form-group {
  text-align: left;
  width: 100%;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.4rem;
  display: block;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

#posts {
  margin-top: 3rem;
  text-align: left;
}

.post {
  padding: 1rem 0;
}

.post:not(:last-child) {
  border-bottom: 1px solid #bbb;
}

.post h3 {
  margin: 0 0 0.5rem 0;
}

.post time {
  font-size: 0.85rem;
  color: #666;
}

#posts h2 {
  text-align: center;
}

#blog-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
  margin: 0 auto;
  width: 100%;
}

.vote-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-start;
}

.vote-buttons button {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color-light);
  font-size: 1rem;
  color: var(--color-light);
  transition: background 0.3s ease;
}

.vote-buttons button:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

/* WIDE WRAPPER */

body.form #header {
  top: 0;
  margin-top: clamp(2.25rem, 6vh, 4rem);
}

body.form #content-wrapper {
  max-width: 900px;
  margin: clamp(1.5rem, 5vh, 3rem) auto 0;
  padding: 2.25rem 2rem 2.75rem;
}

body.form {
  font-family: 'Roboto', sans-serif;
}

body.form #content-wrapper h1,
body.form #content-wrapper h2,
body.form #posts h2,
body.form .blog-post-title,
body.form .modal h2 {
  font-family: 'League Spartan', sans-serif;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  text-transform: none;
}

body.form #content-wrapper h1 {
  font-size: 2.4rem;
  margin: 0 0 1.8rem;
  text-align: left;
}

body.form #content-wrapper h2,
body.form .modal h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1.2rem;
}

body.form #content-wrapper p,
body.form #content-wrapper label,
body.form #posts p,
body.form .blog-post-content,
body.form .form-group label,
body.form small {
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  line-height: 1.75;
  font-weight: 300;
  color: var(--color-light);
}

body.form .form-group label {
  font-weight: 500;
}

body.form small {
  font-size: 0.95rem;
  opacity: 0.85;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  text-align: left;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0.4rem;
  display: block;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* LIST OF POSTS */

#posts {
  margin-top: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.blog-post {
  background-color: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.blog-post-title {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-light);
}

.blog-post-time {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 400;
  margin-bottom: 1rem;
}

.blog-post-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-light);
}

.post {
  padding: 1rem 0;
}

.post:not(:last-child) {
  border-bottom: 1px solid #bbb;
}

.post h3 {
  margin: 0 0 0.5rem 0;
}

.post time {
  font-size: 0.85rem;
  color: #666;
}

/* INPUT FIELDS FORM */

input[type='text'],
textarea {
  color: #333;
  background-color: var(--color-light);
  border: 1px solid #ccc;
  padding: 0.5rem;
  box-sizing: border-box;
  font-size: 1rem;
  width: 100%;
}

input[type='submit'],
input[type='reset'] {
  color: var(--color-light);
  background-color: #555;
  border: none;
  padding: 1rem 1rem;
  cursor: pointer;
  font-size: 1rem;
}

input[type='submit'].primary {
  background-color: var(--color-dark);
}

/* BUTTONS FORM */

input[type='submit'],
input[type='reset'] {
  background-color: var(--color-dark);
  color: var(--color-light);
  padding: 0.5rem 2rem;
  font-size: 1rem;
  border: 1px solid var(--color-light);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input[type='submit']:hover {
  background-color: var(--color-accent);
}

input[type='reset'] {
  background-color: var(--color-dark);
}

input[type='reset']:hover {
  background-color: var(--color-secondary);
}

@-moz-keyframes wrapper {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-webkit-keyframes wrapper {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-ms-keyframes wrapper {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes wrapper {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

#wrapper {
  -moz-animation: wrapper 2s forwards;
  -webkit-animation: wrapper 2s forwards;
  -ms-animation: wrapper 2s forwards;
  animation: wrapper 4s forwards;
  height: 100%;
  min-height: 100vh;
  top: 0;
  left: 0;
  opacity: 0;
  position: relative;
  width: 100%;
  overflow: visible;
  z-index: 0;
}
body:not(#index) #wrapper {
  padding-top: 110px;
}

body.form #wrapper {
  padding-top: 96px;
}

/* PHOTOGRAPHS FEATURE CARDS */

.photo-gallery {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 1rem;
  padding: 60px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  z-index: 1;
}

.photo-gallery__intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.photo-gallery__intro h1 {
  font-family: 'League Spartan', sans-serif;
  font-size: clamp(2.4rem, 2vw + 1.6rem, 3.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-light);
  margin-bottom: 2rem;
}

.photo-gallery__intro p {
  font-size: 1.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.photo-gallery__grid {
  display: grid;
  gap: 40px 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.photo-card {
  position: relative;
  height: 420px;
  background: rgba(22, 22, 22, 0.9);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.photo-card:focus {
  outline: none;
}

.photo-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 6px;
}

.photo-card:hover,
.photo-card:focus-visible,
.photo-card:active {
  transform: scale(1.04);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.55);
}

.photo-card__image {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.photo-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.92) 100%);
  pointer-events: none;
}

.photo-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.02);
}

.photo-card__content {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 1;
  color: var(--color-light);
  transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    color 0.3s ease;
}

.photo-card:hover .photo-card__content,
.photo-card:focus-visible .photo-card__content,
.photo-card:active .photo-card__content {
  bottom: 48px;
}

.photo-card__content h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.photo-card__content p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* PHOTO MODAL */

.photo-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 48px 24px;
  z-index: 1000;
}

.photo-modal:target {
  opacity: 1;
  pointer-events: auto;
}

.photo-modal__backdrop {
  position: absolute;
  inset: 0;
  display: block;
  background: transparent;
  z-index: 0;
}

.photo-modal__inner {
  position: relative;
  max-width: min(80vw, 720px);
  width: 100%;
  z-index: 1;
}

.photo-modal__inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  max-height: 75vh;
  object-fit: contain;
}

.photo-modal__close {
  position: absolute;
  top: -24px;
  right: -12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: var(--color-light);
  font-size: 2.4rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, background 0.25s ease;
}

.photo-modal__close:hover,
.photo-modal__close:focus-visible {
  background: rgba(0, 0, 0, 0.92);
  transform: scale(1.08);
  outline: none;
}

@media (max-width: 600px) {
  .photo-gallery {
    padding: 48px 16px 72px;
  }
  .photo-gallery__intro h1 {
    margin-bottom: 28px;
    line-height: 1.28;
  }
  .photo-gallery__intro p {
    line-height: 1.75;
  }

  .photo-card {
    height: 340px;
  }

  .photo-card__content {
    left: 20px;
    right: 20px;
    bottom: 22px;
  }

  .photo-card:hover,
  .photo-card:focus-visible,
  .photo-card:active {
    transform: scale(1.02);
  }

  .photo-card:hover .photo-card__content,
  .photo-card:focus-visible .photo-card__content,
  .photo-card:active .photo-card__content {
    bottom: 34px;
  }

  .photo-card__content h2 {
    font-size: 1.5rem;
  }

  .photo-card__content p {
    font-size: 1.1rem;
  }

  .photo-modal {
    padding: 32px 16px;
  }

  .photo-modal__inner {
    max-width: 100%;
  }

  .photo-modal__close {
    top: -16px;
    right: -8px;
    width: 38px;
    height: 38px;
    font-size: 2rem;
  }
}

@media (min-width: 1200px) {
  .photo-gallery__grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
}

/* WEBAPPS */

body.webapps-page {
  font-family: 'Roboto', sans-serif;
  background: url('/assets/images/dark_wood.jpg') no-repeat center center fixed;
  background-size: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  margin: 0;
  padding: 0;
  color: var(--color-light);
  text-align: left;
}

body.webapps-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/assets/images/dark_wood.jpg') no-repeat center center fixed;
  background-size: cover;
  filter: contrast(1.1) brightness(1.05);
  z-index: -1;
}

.webapps-container {
  max-width: 1000px;
  margin: 5rem auto 4rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-title {
  font-family: 'League Spartan', sans-serif;
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--color-accent);
}

.webapp-card {
  background: rgba(0, 0, 0, 0.65);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.webapp-card h2 {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 2rem;
  text-align: left;
}

.webapp-card p {
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 1rem;
  text-align: left !important;
}

.webapp-card ul,
.webapp-card ul li {
  text-align: left !important;
}

.synerra-card {
  position: relative;
  overflow: hidden;
}

.synerra-card .synerra-logo {
  display: block;
  text-align: center;
  margin: -1rem 0 2rem 0;
}

.synerra-card .synerra-logo img {
  width: 140px;
  max-width: 55%;
  height: auto;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(147, 51, 234, 0.4));
}
.webapp-subtitle {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin: 2.5rem 0 0.75rem;
  display: block;
  text-align: left;
}

.webapp-list {
  margin: 0.5rem 0 1.5rem 1.5rem !important;
  padding-left: 1.5rem !important;
  list-style: disc !important;
  list-style-position: inside !important;
  text-align: left;
}

.webapp-list li {
  margin-bottom: 0.6rem !important;
  line-height: 1.7 !important;
  color: var(--color-light) !important;
  display: list-item !important;
  list-style: disc !important;
  list-style-position: inside !important;
  margin-left: 0 !important;
}

.webapp-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  margin-top: 1rem;
  border: 2px solid var(--color-accent);
  color: var(--color-light);
  border-radius: 3px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.webapp-link:hover {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

#philosophical_quotes,
#ai_projects {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-top: 1rem;
  margin-bottom: 2rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.webapp-link.disabled {
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: #999;
  border: 1px solid #444;
  cursor: not-allowed;
  opacity: 0.6;
}
@media (max-width: 640px) {
  .synerra-card .synerra-logo {
    margin: -0.5rem auto 1.4rem;
  }

  .synerra-card .synerra-logo img {
    width: 120px;
  }
}

/* ANIMATIONS */

.animated-bg {
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 10%, #f6f7f8 20%, #f6f7f8 100%);
  background-size: 200% 100%;
  animation: bgPos 1s linear infinite;
}

.animated-bg-text {
  border-radius: 50px;
  display: inline-block;
  margin: 0;
  height: 10px;
  width: 100%;
}

@keyframes bgPos {
  0% {
    background-position: 50% 0;
  }

  100% {
    background-position: -150% 0;
  }
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes modalZoomOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.6);
    opacity: 0;
  }
}

/* RESPONSIVE SETTINGS  */

/* ========== 1680px ↓ ========== */
@media screen and (max-width: 1680px) {
  body,
  input,
  select,
  textarea {
    font-size: 13pt;
  }
}

/* ========== 1280px ↓ ========== */
@media screen and (max-width: 1280px) {
  body,
  input,
  select,
  textarea {
    font-size: 12pt;
  }

  #header nav {
    padding: 0 1em;
  }
}

/* ========== 768px ↓ (Tablet / Mobile) ========== */
@media screen and (max-width: 768px) {
  body {
    min-width: 320px;
  }

  body,
  input,
  select,
  textarea {
    font-size: 11pt;
  }

  .changelog-float-btn {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .cv .image-container {
    padding: 0 1rem;
  }

  /* Blog page mobile - center all text */
  body.form #content-wrapper {
    text-align: center !important;
    padding: 1.1rem !important;
    margin: clamp(1.1rem, 8vw, 1.9rem) auto 0 !important;
  }

  body.form #header {
    margin-top: clamp(1.25rem, 9vw, 2.4rem) !important;
  }

  body.form #wrapper {
    padding-top: 64px !important;
  }

  body.form #bg {
    animation: none !important;
    -moz-transform: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    transform: none !important;
    will-change: auto !important;
  }

  body.form #content-wrapper p,
  body.form #content-wrapper > div {
    text-align: center !important;
    justify-content: center !important;
  }

  body.form #content-wrapper > div {
    flex-direction: column !important;
    align-items: center !important;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .custom-navbar {
    padding: 0 1rem;
    margin: 0.75rem auto;
    width: calc(100% - 1.5rem);
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
  }

  /* Hide logo on mobile */
  .custom-navbar .logo {
    display: none !important;
  }

  /* Center nav-center on mobile */
  .nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  /* Hide home button on mobile */
  .nav-right {
    display: none !important;
  }

  .nav-left,
  .nav-right {
    flex: 0;
  }

  .menu-toggle {
    background: none;
    border: 2px solid var(--color-light);
    color: var(--color-light);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    margin: 0 auto;
    width: fit-content;
  }

  .menu-toggle-wrapper {
    width: auto;
    text-align: center;
  }

  .dropdown {
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    list-style: none;
    padding: 0.5rem 0;
    width: 100%;
    max-width: 260px;
    z-index: 1001;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .dropdown li {
    width: 100%;
  }

  .dropdown.show {
    opacity: 2;
    pointer-events: auto;
    display: flex;
  }

  .dropdown li a {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    color: var(--color-light);
    text-decoration: none;
  }

  .dropdown li a:hover {
    background-color: var(--color-accent);
    color: var(--color-dark);
  }

  .dropdown li:last-child a {
    border-bottom: none;
  }

  .bio-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bio-image img {
    max-width: 90vw;
    margin-top: 1rem;
  }

  .bio-text {
    padding-right: 0;
  }

  .bio-text h1,
  .bio-text h2,
  .bio-text p {
    text-align: left;
  }

  .image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: none !important;
    transition: none;
    gap: 0.5rem;
  }

  .cv_suomi,
  .cv_english {
    width: 100%;
    max-width: 90vw;
  }

  .cv_btn {
    display: none;
  }

  .icon {
    font-size: 1.6rem;
  }

  .certificates-btn,
  .guide-download-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    writing-mode: horizontal-tb;
    padding: 0;
    justify-content: center;
  }

  .certificates-btn .btn-text,
  .guide-download-btn .btn-text {
    display: none;
  }

  .certificates-btn .icon-vertical,
  .guide-download-btn .icon-vertical {
    transform: rotate(0deg);
    font-size: 1.4rem;
  }

  .main-heading {
    font-size: 2.2rem;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .social-icons .icon {
    font-size: 1.5rem;
    margin: 0 0.5rem;
  }

  #header h1 {
    font-size: 2.5em;
  }

  #header p,
  #header nav,
  #header nav a,
  #header nav a:hover,
  #header nav a:active {
    font-size: 1em;
  }
}

/* tumma overlay taustan ja sisällön väliin (sijoittuu #bg-container:n päälle) */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(5, 5, 5, 0.6) 0%,
    rgba(5, 5, 5, 0.2) 55%,
    rgba(5, 5, 5, 0.6) 100%
  );
}

/* Hero-grid sisällä headerissä */
#header .hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(420px, 62%) minmax(240px, 1fr);
  align-items: center;
  height: 100vh;
  gap: 3rem;
  padding: 0 4rem;
  margin: 0;
  padding-top: 0;
  margin-top: 0;
}

@media (max-width: 1400px) {
  #header .hero-grid {
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    padding: 0 3rem;
    align-items: center;
  }

  #header .hero-left {
    padding: 0;
  }

  .hero-right {
    justify-content: flex-end;
    padding-right: 1.5rem;
  }
}

@media (max-width: 1200px) {
  #header .hero-grid {
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    padding: 0 3rem;
    align-items: center;
  }

  #header .hero-left {
    padding: 0;
  }

  .hero-right {
    justify-content: flex-end;
    padding-right: 1.5rem;
  }
}

/* Vasemmanpuoleinen sisältö (tekstit) */
#header .hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 0;
  padding-top: 0;
  opacity: 0;
  transform: translateX(-36px);
  animation: heroLeftIn 240ms cubic-bezier(0.2, 0.9, 0.3, 1) 40ms forwards;
}

#header .hero-left .container {
  background: rgba(5, 5, 5, 0.6); /* darker but more see-through */
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-left: none; /* remove left border line */
  border-right: none; /* remove right-hand border line */
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-top: none;
  border-radius: 0;
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.4),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.2);
  max-width: 520px;
  padding: 3.5rem 2.5rem 3rem;
  text-align: left;

  /* Fade edges both sides to soften the column */
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 88%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 88%,
    rgba(0, 0, 0, 0) 100%
  );
}

@keyframes heroLeftIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes trackingExpand {
  0% {
    letter-spacing: 0.02em;
    opacity: 0;
  }
  50% {
    letter-spacing: 0.08em;
  }
  100% {
    letter-spacing: 0.06em;
    opacity: 1;
  }
}

@keyframes fadeUpStagger {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(235, 185, 1, 0.3),
      0 0 20px rgba(235, 185, 1, 0.15);
  }
  50% {
    text-shadow: 
      0 0 20px rgba(235, 185, 1, 0.5),
      0 0 30px rgba(235, 185, 1, 0.25);
  }
}

#header .main-heading {
  font-size: 5.236rem;
  margin: 0;
  line-height: 1;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  color: var(--color-light);
  text-align: left;
  animation: trackingExpand 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) 80ms forwards,
             glowPulse 4s ease-in-out 900ms infinite;
  opacity: 0;
}

#header .bio-text {
  margin-bottom: 1.25rem;
  color: var(--color-light);
  font-size: 1rem;
  text-align: left;
  animation: fadeUpStagger 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) 300ms forwards;
  opacity: 0;
}

/* Oikeanpuoleinen pystynavigaatio */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  width: clamp(240px, 18vw, 320px);
  padding-right: 3.2rem;
  opacity: 0;
  transform: translateX(36px);
  animation: heroRightIn 160ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  justify-self: end;
}

@keyframes heroRightIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Side-links: pystynavigaatio */
.side-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-end; /* ensure all items align to the right edge */
}

.side-links li {
  opacity: 0;
  line-height: 1.2;
}

.side-links li:nth-child(1) {
  animation: linkFade 0.14s ease 20ms forwards;
}
.side-links li:nth-child(2) {
  animation: linkFade 0.14s ease 70ms forwards;
}
.side-links li:nth-child(3) {
  animation: linkFade 0.14s ease 120ms forwards;
}
.side-links li:nth-child(4) {
  animation: linkFade 0.14s ease 170ms forwards;
}
.side-links li:nth-child(5) {
  animation: linkFade 0.14s ease 220ms forwards;
}

@keyframes linkFade {
  to {
    opacity: 1;
  }
}

.side-links a {
  color: var(--color-light);
  font-family: 'League Spartan', sans-serif;
  font-weight: 500;
  letter-spacing: 0.15rem;
  text-decoration: none;
  font-size: 1.72rem;
  display: block;
  text-align: right;
  padding: 0.2rem 0.4rem;
  position: relative;
  transform: translateX(0) scale(1);
  transform-origin: right center;
  transition:
    color 220ms ease,
    text-shadow 220ms ease,
    transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.side-links a::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent);
  transform: translateY(-50%);
  transition: height 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.side-links a:hover::after {
  height: 80%;
}

.side-links a.active {
  color: var(--color-accent); /* active page highlighted, no motion */
}

.side-links a:hover {
  /* Keep color change and add smooth orange glow. No scaling. */
  color: rgba(235, 185, 1, 0.92);
  font-size: inherit !important;
  /* Subtler orange glow: reduced blur and opacity for a lighter hover */
  text-shadow:
    0 0 6px rgba(235, 185, 1, 0.3),
    0 0 10px rgba(235, 185, 1, 0.12);
  transition:
    color 180ms ease,
    text-shadow 180ms ease,
    transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
  /* Do not override the element's base transform on hover — leave transform
     untouched so translated position for the lower links remains stable. */
}

/* Shift specific side-links (GALLERY, WEBAPPS, CONTACT) slightly to the right */
.side-links li:nth-child(3) a,
.side-links li:nth-child(4) a,
.side-links li:nth-child(5) a {
  /* Move the three lower links slightly to the LEFT so their right edge aligns
     with BIO and CV. Use a smaller offset so they're a bit more to the right
     (less negative) compared to the previous value. */
  transform: translateX(-28px) scale(1) !important; /* negative = move left */
}

@media (min-width: 769px) {
  .hero-right {
    align-items: center;
    padding-right: 3.2rem;
  }

  .side-links ul {
    width: 100%;
  }

  .side-links li {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .side-links a {
    width: 100%;
    display: block;
    text-align: right;
    margin: 0;
  }
}

/* Active (HOME) should not animate on hover */
.side-links a.active:hover {
  color: var(--color-accent);
  text-shadow: none;
  transform: none !important;
  font-size: inherit !important;
}

/* Sosiaalisten linkkien pienempi sijoittelu headerissä */
.header-socials {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

.header-socials a {
  font-size: 1.618rem; /* Golden Ratio */
  color: rgba(255, 255, 255, 0.75);
  transition:
    color 0.3s ease,
    transform 0.2s ease;
}

.header-socials a:hover {
  color: var(--color-accent);
  transform: translateY(-3px);
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet landscape: Valikko pysyy oikealla mutta pienenee */
@media (max-width: 1024px) {
  #header .hero-grid {
    grid-template-columns: 1fr 240px;
    gap: 2rem;
    padding: 0 2.5rem;
    align-items: center;
  }

  #header .hero-left {
    padding: 0;
  }

  #header .hero-left .container {
    max-width: 550px;
    padding: 3rem 3rem 2.5rem;
  }

  #header .main-heading {
    font-size: 4.2rem;
  }

  .welcome-text {
    font-size: 1.8rem;
  }

  .side-links a {
    font-size: 1.4rem;
  }

  .hero-right {
    justify-content: flex-end;
    padding-right: 3.2rem;
  }
}

/* Tablet portrait: Valikko vielä oikealla, asettelut tiivistetty */
@media (max-width: 900px) {
  #header .hero-grid {
    grid-template-columns: 1fr 180px;
    gap: 1.5rem;
    padding: 0 2rem;
    align-items: center;
  }

  #header .hero-left {
    padding: 0;
  }

  #header .hero-left .container {
    max-width: 500px;
    padding: 2.5rem 2.5rem 2rem;
  }

  .hero-right {
    justify-content: flex-end;
    padding-right: 3.2rem;
  }

  #header .main-heading {
    font-size: 3.5rem;
  }

  .welcome-text {
    font-size: 1.5rem;
  }

  .side-links a {
    font-size: 1.3rem;
  }
}

/* Mobile: left-aligned column, menu under text, socials after that */
@media (max-width: 768px) {
  #header .hero-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    align-items: flex-start !important;
    justify-items: start !important;
    text-align: left !important;
    padding: 0 1rem !important; /* no top padding - start from absolute top */
    gap: 0.5rem !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 0 !important;
  }

  body#index #header {
    padding-top: 0 !important;
    margin-top: 0 !important;
    height: auto !important;
  }

  body#index #main {
    padding-top: 0 !important;
    margin-top: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  #header::before {
    display: none;
  }

  #header .hero-left {
    order: 1;
    padding: 0;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* Keep glass container on mobile and align center */
  #header .hero-left .container {
    text-align: center !important;
    margin: 0 auto !important;
    max-width: min(92vw, 560px);
    padding: 1rem !important;
    background: rgba(5, 5, 5, 0.6) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  #header .main-heading {
    font-size: clamp(2.1rem, 7.5vw, 2.6rem);
    text-align: center !important;
    margin-bottom: 0.35rem;
  }

  #header .bio-text {
    text-align: center !important;
  }

  .welcome-text {
    font-size: clamp(1rem, 4vw, 1.25rem);
    margin-bottom: 0.35rem;
    text-align: center !important;
  }

  .specs {
    font-size: clamp(0.72rem, 3.2vw, 0.9rem);
    margin-bottom: 0.75rem;
    text-align: center !important;
  }

  /* Menu above socials, centered, with thin borders */
  .hero-right {
    order: 2;
    justify-content: center;
    padding-right: 0;
    height: auto;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0 !important;
    z-index: 120;
  }

  .hero-right ul {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem !important;
    width: 100%;
    max-width: 500px !important;
  }

  /* Button-style links on mobile */
  .side-links ul {
    text-align: center;
    width: 100%;
  }

  .side-links a {
    font-size: clamp(0.8rem, 3.2vw, 0.9rem) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    padding: 0.35rem 1.5rem !important;
    width: 90vw !important;
    max-width: 380px !important;
    min-width: 240px !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: saturate(120%) blur(8px) !important;
    -webkit-backdrop-filter: saturate(120%) blur(8px) !important;
    display: block !important;
    margin: 0 auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    line-height: 1.2 !important;
  }

  .side-links a:hover,
  .side-links a:focus {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-light);
    text-decoration: none;
    /* Ensure mobile buttons also show the subtle orange glow on hover like desktop */
    text-shadow:
      0 0 6px rgba(235, 185, 1, 0.18),
      0 0 10px rgba(235, 185, 1, 0.06);
    transition:
      background 160ms ease,
      color 160ms ease,
      text-shadow 160ms ease;
  }

  /* Social icons fixed at bottom, centered */
  .header-socials {
    position: fixed;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    margin-top: 0;
  }
}

/* Small mobile: Vielä pienemmät tekstit */
@media (max-width: 600px) {
  #header .hero-grid {
    padding: 2rem 1.5rem 1.5rem;
  }

  #header .main-heading {
    font-size: 2.8rem;
  }

  .welcome-text {
    font-size: 1.4rem;
  }

  #header .bio-text {
    font-size: 0.95rem;
  }

  #header .hero-left .container {
    padding: 1.5rem 1.5rem 2.5rem;
  }

  .side-links a {
    font-size: 1.1rem;
  }

  .header-socials {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }

  .header-socials a {
    font-size: 1.4rem;
  }
}

/* Extra small: Minimi kokoon */
@media (max-width: 480px) {
  #header .main-heading {
    font-size: 2.2rem;
  }

  .welcome-text {
    font-size: 1.2rem;
  }

  .side-links a {
    font-size: 1rem;
  }
}

/* ==================================================================
   CRITICAL MOBILE OVERRIDES - MUST BE AT END TO WIN SPECIFICITY
   ================================================================== */

@media (max-width: 768px) {
  /* Force content to start from absolute top on mobile */
  body#index,
  body#index #wrapper,
  body#index #main,
  body#index #header,
  body#index #header .hero-grid {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* Hero grid mobile layout - start from VERY top */
  body#index #header .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-top: clamp(2rem, 4vh, 3rem) !important;
    gap: 0 !important;
    margin-top: 0 !important;
  }

  /* Hero left - perfectly centered horizontally */
  body#index #header .hero-left {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Container - centered with equal margins, minimal top padding */
  body#index #header .hero-left .container {
    width: 90% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 0.5rem clamp(1.5rem, 4vw, 2.5rem) !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  /* All text elements centered */
  body#index .welcome-text,
  body#index #header .main-heading,
  body#index .specs,
  body#index #header .bio-text {
    text-align: center !important;
    width: 100% !important;
  }

  /* Social icons - reposition to fixed bottom center */
  body#index .social-icons.header-socials {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: fixed !important;
    bottom: calc(2.5rem + env(safe-area-inset-bottom)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
    padding: 0.75rem 1rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  body#index .social-icons.header-socials a {
    font-size: 1.35rem !important;
    width: 45px !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  /* Prevent horizontal scroll */
  body#index,
  body#index #wrapper,
  body#index #main {
    overflow-x: hidden !important;
  }

  /* Center and fix menu buttons ABOVE social icons */
  body#index .hero-right {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: calc(7.2rem + env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    max-width: 100vw !important;
    display: flex !important;
    justify-content: center !important;
    padding: 0 1rem !important;
    z-index: 99 !important;
  }

  body#index .hero-right ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 500px !important;
    gap: 0.5rem !important;
  }

  body#index .side-links li {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    line-height: 1.05 !important;
  }

  body#index .side-links a {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 95% !important;
    max-width: 450px !important;
    padding: 0 !important;
    line-height: 1.05 !important;
    font-size: 1rem !important;
    letter-spacing: 0.15rem !important;
  }

  /* On mobile reset any desktop translate offsets for the three lower links */
  body#index .side-links li:nth-child(3) a,
  body#index .side-links li:nth-child(4) a,
  body#index .side-links li:nth-child(5) a {
    transform: none !important;
  }
}

/* FINAL OVERRIDES: desktop menu spacing + styling mirrors the provided mock. */
@media (min-width: 769px) {
  .hero-right .side-links {
    padding-left: 2rem;
    padding-right: 1rem;
  }

  .hero-right .side-links ul {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 0.6rem;
    text-align: right;
  }

  .hero-right .side-links li {
    width: 100%;
  }

  .hero-right .side-links a {
    text-transform: uppercase;
    letter-spacing: 0.26rem;
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.68);
    text-shadow: none;
    padding: 0;
    text-align: right;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.82;
  }

  .hero-right .side-links a:hover,
  .hero-right .side-links a:focus {
    color: var(--color-accent);
    opacity: 1;
  }
}
.photo-modal--wide .photo-modal__inner {
  max-width: min(92vw, 960px);
}

.photo-modal--wide .photo-modal__inner img {
  max-height: 85vh;
}
