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

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(
    180deg,
    #02030a 0%,
    #050814 30%,
    #0a1024 70%,
    #02030a 100%
  );
}
main {
  width: 100%;
}

/* LANDING PAGE STARTS ============= LANDING PAGE STARTS */
.landing-page {
  /* display: flex;
  flex-direction: column; */
  width: 100%;
  height: 100vh;
  overflow: hidden;

  transition:
    opacity 1s ease,
    transform 1s ease;
  transform-origin: 68% 45%;
}
.fade-out {
  opacity: 0;
  transform: scale(4);
}

.landing-mobile-bg {
  width: 100%;
  height: 100%;
  position: relative;
}
.landing-space-mobile {
  position: absolute;
  left: 0rem;
  top: 5rem;

  width: 18rem;
  height: 25rem;
  background-image: url(../assets/images-spacewindow/space.MAYBE.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: contrast(1.25) brightness(0.9);

  animation: space 1200s linear infinite;
  z-index: -2;
}

/* .landing-space-desktop {
  display: none;
} */

.landing-content {
  position: absolute;

  top: 32%;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;

  text-align: center;
  color: white;
  font-family: "Orbitron", sans-serif;

  gap: 1rem;
}

.landing-profile {
  position: absolute;
  left: -1.7rem;
  top: -1.5rem;

  width: 15rem;

  z-index: 1;
}

.landing-profile img {
  width: 100%;
  height: auto;
  mask-image: linear-gradient(to bottom, black 96%, transparent 100%);
}

.landing-intro {
  position: relative;

  text-align: left;
  top: 14rem;
  z-index: 2;
  top: 16rem;
  right: 5.4rem;
  line-height: 1.8rem;

  font-family: "Orbitron", sans-serif;
  z-index: 2;
}

.intro-text,
.landing-intro h2,
.tech-stack h3 {
  color: #00eaff;
  text-shadow: 0 0 2px rgba(0, 234, 255, 0.25);
}
.intro-text {
  z-index: 2;
}

.landing-intro p {
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  font-weight: 600;
}

.landing-intro h1 {
  font-size: 1.5rem;
  max-width: 6ch;
  letter-spacing: 0.18rem;
  line-height: 1.3;
}
.landing-intro h2 {
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  /* color: #00c2ff; */
}

.tech-stack {
  margin-top: 16.5rem;
  font-family: "Orbitron", sans-serif;
  z-index: 2;
}

.section-divider {
  width: 100%;
  border-top: 1px solid #00eaff;
  opacity: 0.3;
  margin-bottom: 0.3rem;
}
.tech-stack h3 {
  font-size: 0.7rem;
  letter-spacing: 0.15rem;
  margin-bottom: 0.4rem;
}

.tech-stack span {
  font-size: 0.9rem;
  /* inline-block = ligger kvar på samma rad men kan få width, height, padding och margin */
  display: inline-block;
  width: 3.8rem;
  padding: 0.4rem;
  margin: 0.2rem;
  border-radius: 6px;
  border: 1px solid #00eaff;
  box-shadow:
    inset 0 0 8px rgba(0, 234, 255, 0.08),
    0 0 6px rgba(0, 234, 255, 0.15);
}

.enter-cta {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 15rem;
  height: 4.5rem;

  border-radius: 6px;
  color: #d7e5f2;
  border: 1px solid #00eaff;
  box-shadow:
    inset 0 0 8px rgba(0, 234, 255, 0.08),
    0 0 6px rgba(0, 234, 255, 0.2);
  font-weight: 500;
  letter-spacing: 0.15rem;
  font-size: 1.1rem;

  text-decoration: none;
  z-index: 2;
}
/* LANDING PAGE ENDS ============= LANDING PAGE ENDS */

.page-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  width: 100%;
}
/* FONTS STARTS ============== FONTS STARTS  */

.hero-name,
.hero-portfolio {
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  color: white;
}

/* FONTS ENDS ============== FONTS ENDS  */

/* NAVBAR STARTS =============== NAVBAR STARTS */
.navbar {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 1rem;
}
.nav-links {
  display: flex;
  gap: 0.7rem;
}

.navbar button {
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: 0.64rem;

  color: white;

  padding: 0.6rem 0.3rem;
  letter-spacing: 0.08rem;
  white-space: nowrap;

  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;

  cursor: pointer;
  display: inline-block;

  transition: 0.3s;
}
.navbar .home-btn {
  background: rgba(255, 255, 255, 0.03);
}
.navbar .resume-btn {
  background: rgba(120, 210, 255, 0.1);
  box-shadow: 0 0 10px rgba(120, 210, 255, 0.12);
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-name {
  font-size: 1.5rem;
  letter-spacing: 0.25rem;
}
.hero-portfolio {
  font-size: 1.1rem;
  letter-spacing: 0.15rem;
  margin-bottom: 0.5rem;
}

.window-space {
  position: absolute;
  inset: 0;

  /* Bakgrundsbilden läggs i CSS för bättre kontroll över storlek,
positionering och framtida animationer. */
  background-image: url(../assets/images-spacewindow/space.MAYBE.webp);

  /* no-repeat förhindrar att bilden upprepas,på webben.*/
  background-repeat: no-repeat;
  /*center centrerar bilden och cover fyller hela containern. */
  background-size: cover;
  background-position: center;

  filter: contrast(1.25) brightness(0.9);

  animation: space 1200s linear infinite;
}

/* NAVBAR ENDS =============== NAVBAR ENDS */

/* HERO PAGE AND BACKGROUND STARTS ========== HERO PAGE AND BACKGROUND STARTS  */
.hero-page {
  position: relative;
  width: 95%;
  height: 72vh;

  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;

  box-shadow:
    /* Ljus kant upptill */
    inset 0 2px 6px rgba(255, 255, 255, 0.18),
    /* Djupare skugga nedtill */ inset 0 -8px 16px rgba(0, 0, 0, 0.75),
    /* Svag inre glow */ inset 0 0 25px rgba(0, 234, 255, 0.04),
    /* Cyan glow runt rutan */ 0 0 12px rgba(0, 234, 255, 0.15),
    0 0 35px rgba(0, 234, 255, 0.08);

  overflow: hidden;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;

  filter: brightness(0.65) saturate(0.7);
}

/* HERO PAGE AND BACKGROUND ENDS ========== HERO PAGE AND BACKGROUND ENDS  */

/* BIOS PANEL STARTS ======================== BIOS PANEL STARTS */
.bios-panel {
  font-family: "Share Tech Mono", monospace;
  border-radius: 2px;
  border: solid 1px #0d4f8b;
  color: #d7e5f2;
  background: #010816;
  width: 95%;
  height: 72vh;

  display: grid;
  /* RESETTEXT RESET  */
  grid-template-rows: auto auto 4fr 1.2fr;
  overflow: hidden;
}
.bios-header {
  border: 1px solid #0d4f8b;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
}

.bios-datetime {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: #d7e5f2;
}

.bios-tabs {
  background: #020d24;
  border: 1px solid #0d4f8b;
  display: flex;

  overflow: hidden;
}
.bios-tabs button {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%; /* eller valfri fast storlek */
  height: 2rem;
  color: white;
  background: linear-gradient(180deg, #0a1d38 0%, #050b16 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  box-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.7),
    0 10px 16px rgba(0, 0, 0, 0.5),
    /* inset skapar “inre skuggor” i elementet – används för att simulera ljus och tryck inuti knappen ger 3D känsla*/
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 3px rgba(0, 0, 0, 0.6);
  font-size: 0.65rem;

  transition: all 0.3s ease;
  overflow: hidden;
}
.bios-tabs img {
  width: 1.5rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 2px #00c2ff);
}

.placeholder-icon {
  width: 4rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 2px #00c2ff);
}
.placeholder-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.5rem;
  gap: 1rem;
}

.system-information {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#system-info {
  /* border: none; */
  background: none;
  padding: 0.35rem 0.3rem 0.3rem;
  font-weight: 500;
  font-size: 0.55rem;
  line-height: 1.6;

  /* styr hur webbläsaren hanterar blanksteg och radbrytningar i texten. */
  white-space: pre-wrap;

  flex: 1;
  min-height: 0;
  overflow: hidden;
  overflow-wrap: normal;
}

.panel-header {
  color: #00bfff;

  padding: 0.35rem 0.2rem 0.05rem 0.2rem;
  margin-bottom: 0;
}
.bios-mode {
  font-size: 0.8rem;
  font-weight: 800;
  color: #00bfff;
}

.panel-divider {
  width: 100%;
  border-top: 1px solid #0d4f8b;
  margin-top: 0.15rem;
}

.bios-main {
  letter-spacing: 0.055rem;
  line-height: 0.9rem;
  width: 100%;

  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 0.5rem;
  padding: 0.5rem;
  min-height: 0;
}
/* //Klass görs i javascript. För att ta bort sidebar vid contact me. För minskat brus. */
/*stänger av grid-layout för att undvika att sidebar påverkar bredden på innehållet */
.bios-main.no-sidebar {
  display: block;
}

.bios-sidebar {
  display: grid;

  grid-template-rows:
    auto
    1fr
    auto;
  gap: 0.3rem;
  font-size: 0.8rem;
}
.bios-content {
  font-size: 0.66rem;

  line-height: 0.8749rem;
  font-weight: 700;

  min-height: 0;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid #0d4f8b;
}

.status-panel {
  display: flex;
  flex-direction: column;
  height: 100%;

  min-height: 0;
  overflow: hidden;
}
.status-panel .panel-content {
  flex: 1;
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.5rem;

  padding: 0.25rem;
  font-size: 0.48rem;
  font-weight: 700;
}

.bios-pic {
  max-height: 22vh;

  overflow: hidden;
}

.bios-pic .panel-content {
  height: 100%;
}
.bios-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;

  filter: contrast(1.08) brightness(0.94) saturate(0.85);

  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);

  transform: scale(1.5);
}

/* CONTACT EMAIL-FORM STARTS ================ CONTACT EMAIL-FORM STARTS */
.visually-hidden {
  display: none;
}

.content-area.contact {
  border: none;
}
.bios-content .panel-header {
  text-align: center;
}

.bios-content {
  display: flex;

  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 0.5rem;
  height: 100%;
  overflow: hidden;
}

.content-area.contact {
  height: 100%;
}
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.contactform {
  height: 100%;

  display: flex;
  flex-direction: column;
  padding: 0.6rem;
}
.contactform input {
  height: 1.8rem;
}

.name-row input {
  width: 100%;
  height: 1.5rem;
}
.contactform textarea {
  flex: 1;
  min-height: 6rem;
  height: auto;

  /* Användaren kan inte dra i hörnet på textarea och ändra storlek. */
  resize: none;
}

.contactform input,
.contactform textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #0d4f8b;
  color: #00c2ff;
  font-family: "Share Tech Mono", monospace;
  padding: 0.3rem;
}

input::placeholder {
  color: white;
  opacity: 1;
  font-weight: 500;
}
textarea::placeholder {
  color: white;
  opacity: 1;
  font-weight: 500;
}

#privacy-note {
  text-align: center;
  font-size: 0.4rem;
  opacity: 0.6;
}

.contact-privacy {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.8rem;
}
.privacy-policy {
  padding: 0.3rem;
  font-size: 0.55rem;
}

.backToContactForm,
.contactform button,
.close-modal {
  width: 45%;

  align-self: center;
  margin-top: 0.2rem;

  border: 2px solid #0d4f8b;
  border-radius: 8px;

  font-size: 0.8rem;
  color: #00c2ff;

  background: transparent;
  font-family: "Share Tech Mono", monospace;
  font-weight: 700;

  letter-spacing: 0.2rem;
  padding: 0.5rem;

  margin-bottom: 0.5rem;

  cursor: pointer;
  transition: all 0.3s ease;
}

.error-message {
  min-height: 0.6rem;
  text-align: center;
  color: #7fc8ff;
  font-size: 0.5rem;
  font-weight: 700;
  margin-top: 0.1rem;
  text-shadow: 0 0 2px rgba(127, 200, 255, 0.2);
}

.success-modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.6);
}

.success-content {
  width: 22rem;
  background: #010816;
  color: #d7e5f2;
  border: 1px solid #0d4f8b;
  padding: 1.5rem;
  text-align: center;
}

.success-content h2 {
  color: #00c2ff;
  margin-bottom: 0.8rem;
}

/* CONTACT EMAIL-FORM ENDS ================ CONTACT EMAIL-FORM ENDS */

/* PROJECT VIEW STARTS ===================== PROJECT VIEW STARTS */

.content-area.projects {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  align-items: center;
  gap: 0.5rem;
}

.content-area p {
  text-align: center;
}

.project-images {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  align-items: center;
  gap: 0.5rem;
}
.project-images img {
  width: 10rem;
  height: 4.5rem;
  border-radius: 8px;
  object-fit: cover;
}
.project-img3 {
  object-position: center top;
}

.hotel-images {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  align-items: center;
  gap: 0.5rem;
}
.hotel-images img {
  width: 7.8rem;
  height: 6.2rem;
  border-radius: 8px;
  object-fit: cover;
}

.hotel-link {
  display: flex;
  gap: 1rem;
}
.hotel-link a {
  border: 2px solid #0d4f8b;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-links {
  display: flex;
  gap: 1rem;
}
.project-links a {
  border: 2px solid #0d4f8b;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* PROJECT VIEW ENDS ===================== PROJECT VIEW ENDS */

.bios-sidebar > div {
  border-radius: 2px;
  border: 1px solid #0d4f8b;
}

.bios-footer {
  margin-top: 0.7rem;
  min-height: 0;
  background: #010816;
  display: grid;

  grid-template-columns: 1fr 1.4fr 1fr;

  gap: 0.5rem;
  padding: 0.5rem;
  padding-top: 0;
}
.bios-footer > div {
  border-radius: 2px;
  border: 1px solid #0d4f8b;
  font-size: 0.8rem;
}

/* WEATHER API STARTS ======== WEATHER API STARTS  */

.weather-api {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.weather-api,
.current-tab,
.boot-exit {
  min-height: 0;
  overflow: hidden;
}
/* Styling for current tab icon STARTS ========= Styling for current tab icon STARTS*/
.current-tab {
  display: flex;
  flex-direction: column;
}

.current-tab .panel-content {
  /* ta upp återstoden av förälderns höjd. här vill säga allt - header.   */
  flex: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.current-tab img {
  width: 3rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 2px #00c2ff);
  opacity: 0.7;
}

.current-tab .panel-content {
  font-size: 1.1rem;
  opacity: 0.7;
  letter-spacing: 0.1rem;
}
/* Styling for current tab icon ENDS ========= Styling for current tab icon ENDS*/

.weather-api .panel-content {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.05rem;
  padding: 0.25rem;
  font-size: 0.5rem;
  font-weight: 700;
}
.weather-display {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.weather-status {
  color: #ffffff;
  font-weight: 600;
}
.weather-icon {
  width: 0.8rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 1px rgba(255, 220, 80, 1))
    drop-shadow(0 0 4px rgba(255, 220, 80, 0.5));
}
.weather-source {
  margin-top: 0.2rem;
  opacity: 0.7;
}
.weather-source a {
  font-size: 0.5rem;
  color: #7fa8c7;
  text-decoration: none;
}

/* NASA APOD STARTS ================================ */
.nasa-image {
  width: 100%;
  height: 11rem;
  object-fit: cover;
}

.nasa-video {
  width: 100%;
  height: 10rem;
  border: none;
}

/* NASA APOD ENDS================================ */

/* WEATHER API ENDS ======== WEATHER API ENDS  */

/* 
BOOT-rutan använder flex-column så att headern behåller sin naturliga höjd
och .panel-content kan växa med flex:1 och fylla resten av panelen.

.panel-content är också en flex-container för att enkelt centrera
EXIT/SAVE och floppy-ikonen vertikalt och horisontellt.
*/
.boot-exit {
  display: flex;
  flex-direction: column;
}
.boot-exit .panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: center;

  text-decoration: none;

  padding: 0.2rem;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.boot-exit span {
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}
.boot-exit img {
  width: 1.3rem;
  filter: brightness(0) invert(1);
}
.hidden {
  display: none;
}

/* BIOS PANEL ENDS ============ BIOS PANEL ENDS */

/* FLOATING COMPONENTS STARTS =============== FLOATING COMPONENTS STARTS */
.floating-components {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
  align-items: center;

  inset: 0;

  height: 100%;
  width: 100%;
}

.component {
  position: absolute;
  display: grid;
  justify-items: center;
  align-items: center;

  width: 12rem;
  height: 12rem;
}

.component-content {
  position: relative;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.component span {
  position: absolute;
  color: #ffffff;
  font-family: "Oxanium", sans-serif;
  font-weight: 600;

  text-shadow:
    0 0 1px rgba(0, 234, 255, 1),
    0 0 2px rgba(0, 234, 255, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.8);
}

.component img {
  /* Anpassar bilden till component-rutans bredd så den inte visas i sin ursprungliga storlek */
  width: 100%;
  filter: drop-shadow(0 0 3px rgba(0, 234, 255, 0.9))
    drop-shadow(0 0 6px rgba(0, 234, 255, 0.35))
    drop-shadow(0 0 14px rgba(0, 120, 255, 0.2));
}
/* FLOATING COMPONENTS ENDS =============== FLOATING COMPONENTS ENDS */

/* INDIVIDUAL COMPONENT POSITIONING STARTS ==== INDIVIDUAL COMPONENT POSITIONING STARTS */

.gpu {
  left: 2%;
  top: -3%;
  animation: float-gpu 9s ease-in-out infinite;
}
.gpu img {
  width: 12rem;
}
.gpu span {
  top: 54%;
  left: 48%;

  font-size: 0.65rem;
  transform: rotate(-10deg);
  letter-spacing: 0.2rem;
}

.ram {
  right: -2%;
  top: 11%;
  animation: float-ram 8.5s ease-in-out infinite;
}

.ram img {
  width: 10rem;
}
.ram span {
  top: 38%;
  left: 25.9%;

  font-size: 0.75rem;
  transform: rotate(10deg);
  letter-spacing: 0.06rem;
}

.nvme {
  left: 2%;
  top: 25%;
  animation: float-nvme 9.5s ease-in-out infinite;
}
.nvme img {
  width: 11rem;
}

.nvme span {
  top: 36%;
  left: 26%;

  transform: rotate(-9deg);
  font-size: 0.85rem;
  letter-spacing: 0.05rem;
}

.cooling {
  right: 6%;
  top: 42%;
  animation: float-cooling 10s ease-in-out infinite;
}

.cooling img {
  width: 13rem;
}

.cooling span {
  top: 55%;
  right: 32%;

  width: 7ch;
  text-align: center;

  font-size: 0.5rem;
  letter-spacing: 0.03rem;
}

.power {
  left: -4%;
  bottom: 5%;
  animation: float-power 11s ease-in-out infinite;
}

.power img {
  width: 11rem;
}

.power span {
  top: 55.5%;
  left: 20%;

  transform: rotate(22deg) skewX(18deg);
  font-size: 0.65rem;
  letter-spacing: 0.05rem;
}

.cpu {
  right: -2%;
  top: 68%;
  animation: float-cpu 9s ease-in-out infinite;
}

.cpu img {
  width: 8rem;
}

.cpu span {
  top: 36%;
  left: 30%;
  width: 7ch;
  text-align: center;
  font-size: 0.67rem;
  transform: rotate(11deg);
  letter-spacing: 0.03rem;
}

/* INDIVIDUAL COMPONENT POSITIONING ENDS ==== INDIVIDUAL COMPONENT POSITIONING ENDS */

/* FLOATING COMPONENTS ENDS =============== FLOATING COMPONENTS ENDS */
/* FOOTER STARTS =============== FOOTER STARTS */
.footer {
  width: 100%;
  padding: 0.3rem;
  margin-bottom: 1rem;
}

.footer-content {
  display: flex;
  justify-content: center;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  gap: 4rem;
}

.footer-links img {
  width: 2rem;
  filter: brightness(0) invert(1) drop-shadow(0 0 3px rgba(0, 234, 255, 0.9))
    drop-shadow(0 0 6px rgba(0, 234, 255, 0.35));
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

/* FOOTER ENDS =============== FOOTER ENDS */
