:root {
  --colour-1: rgba(138, 138, 138, 0.8);
  --colour-2: rgb(61, 61, 61, 0.8);
  --colour-3: rgb(54, 215, 0, 0.8);
  --colour-4: rgb(232, 80, 158, 0.8);
  --page-background-colour: #5c5959;
  --panel-background-colour: rgba(208, 208, 208, 0.65);
  --text-colour: #464646;
  --highlight-text-colour: #ffffff;
  --highlight-background-colour: #373737;
  --border-colour: #dedede;
  --menu-indicator-colour: var(--colour-4);
  --mask-colour: #000000;
}

h1, h2, h3, blockquote, ul, li {
    font-weight: normal;
    padding: 0;
    margin: 0;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    cursor: crosshair;
}

::-moz-selection {
    color: var(--text-colour);
}
::selection {
    color: var(--text-colour);
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  scroll-behavior: smooth;
}

.website-scroll-wrap {
  height: 200vh;
  position: relative;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    linear-gradient(
      to bottom,
      rgb(255, 255, 255) 0%,
      rgb(191, 191, 191) 100%
    );
  color: var(--text-colour);
  background-attachment: fixed;
}

.svg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.swirl-svg {
  position: absolute;
  width: var(--size);
  height: var(--size);
  transform-origin: center;
  will-change: transform;
}

.swirl-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.top-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10001;
  display: flex;
  background: var(--panel-background-colour);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.top-menu a {
  position: relative;
  padding: 10px 18px;
  color: var(--text-colour);
  text-decoration: none;
  text-align: center;
  background: transparent;
  border: none;
  line-height: 1;
  z-index: 2;
}

.top-menu a.highlight-link {
  color: var(--highlight-text-colour);
  background: var(--highlight-background-colour);
}

.menu-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 90px;
  background: var(--menu-indicator-colour);
  transition:
  transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.top-menu a.active {
  border-bottom: 2px solid var(--menu-indicator-colour);
}

.contact-card {
  position: fixed;
  top: 20px;
  left: 508px;
  width: 360px;
  aspect-ratio: 1.75 / 1;
  z-index: 10001;
  background: var(--panel-background-colour);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text-colour);
  transform: translateY(-140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.contact-card.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.contact-close {
  position: absolute;
  top: 15px;
  right: 15px;
  border: 0;
  background: transparent;
  color: var(--text-colour);
  font: inherit;
}

.contact-card-text {
  position: absolute;
  left: 15px;
  bottom: 15px;
}

.contact-card-text p {
  margin: 0;
}

.contact-card-text a {
  text-decoration: none;
  color: var(--text-colour);
}

.plus-wrapper {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 100px;
  padding-left: 50px;
}

.top {
  align-self: end;
}

.bottom {
  align-self: start;
}

.plus-box {
  width: 390px;
  height: 390px;
  display: grid;
  grid-template-rows: 1fr 1.5fr 1fr;
  gap: 0;
}

.plus-part {
  width: 120px;
  margin: 0 auto;
  padding: 0;
  text-align: justify;
  text-justify: inter-word;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.middle-row {
  padding: 0;
  text-align: justify;
  text-justify: inter-word;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#websitesection {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  align-items: center;
}

#websitesection.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
}

#websitesection.is-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
}

.website-track {
  display: flex;
  gap: 24px;
  width: max-content;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.website-track img {
  width: 520px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  flex: 0 0 auto;

  opacity: 0.65;
  filter: blur(3px);

  transition:
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.website-track img:hover {
  opacity: 1;
  filter: blur(0px);
}

.website-hover-text {
  position: fixed;
  display: none;
  z-index: 10001;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #ffffff;
  padding: 8px 10px;
  max-width: 220px;
}

.website-hover-text {
  text-decoration: none;
}

.website-hover-text:visited,
.website-hover-text:hover,
.website-hover-text:active {
  text-decoration: none;
}

.website-link {
  overflow: hidden;
}

#cvsection {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  padding: 100px 50px;
  gap: 60px;
}

.cv-left {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cv-left p {
  margin: 0;
  max-width: 390px;
  text-align: justify;
}

.cv-right {
  width: 50%;
}

#diarysection {
  min-height: 100vh;
  width: 100vw;
  padding-left: 0px;
  padding-right: 0px;
  position: relative;
  z-index: 10000;
}

.diary-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 10000;
}

.gallery {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  --solid-colour: var(--colour-5);
  overflow: hidden;
}

.image-side,
.colour-side {
  position: relative;
  min-height: calc(100vh - 200px);
  overflow: hidden;
}

.image-side img,
.colour-side img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.colour-side {
  background: var(--solid-colour);
  filter: blur(2px);
}

.colour-cover {
  position: absolute;
  inset: 0;
  background: var(--solid-colour);
  pointer-events: none;
  z-index: 2;
}

.caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: auto;
  max-width: 700px;
  padding: 10px 16px;
  color: var(--text-colour);
  background: var(--panel-background-colour);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.caption-date {
  margin: 0;
  flex-shrink: 0;
}

.caption-text {
  margin: 0;
  max-width: 420px;
}

.controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  gap: 8px;
}

.controls button {
  border: 0;
  padding: 10px 16px;
  background: var(--panel-background-colour);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text-colour);
}

.circle-shape {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--solid-colour);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  filter: blur(2px);
}

.transition-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.transition-image.is-fading-out {
  opacity: 0;
}

.colour-side {
  transition: background-color 0.5s ease;
}

.colour-cover {
  transition: background-color 0.5s ease;
}


@media (max-width: 650px) {
body {
  font-size: 3.7vw;
}

  .top-menu {
  top: 0px;
  left: 0px;
  width: 100vw;
}

.top-menu a {
  padding: 10px 8px;
}

.top-menu a.highlight-link {
  margin-left: auto;
}

.contact-card {
  top: 48px;
  left: 10px;
  width: calc(100vw - 20px);
}


#cvsection {
  padding: 50px 10px;
  gap: 0px;
}

.cv-left {
  width: 100%;
  gap: 20px;
}

.cv-right {
  width: 00%;
}

.plus-wrapper {
  padding-top: 0px;
  padding-left: 0px;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.plus-box {
  width: 100vw;
  height: 100vw;
}

.plus-part {
  width: 33vw;
}

.website-hover-text {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 24px;
  top: auto;
  transform: translateX(-50%);
  display: block;
  z-index: 10001;
  pointer-events: auto;
  color: #ffffff;
  padding: 10px 16px;
  text-decoration: none;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
}

  #diarysection {
    min-height: 100svh;
  }

  .diary-wrapper {
    min-height: 100svh;
  }

  .gallery {
    min-height: 100svh;
    display: block;
  }

  .colour-side {
    display: none;
  }

  .image-side {
    min-height: 100svh;
    width: 100vw;
  }

  .caption {
    top: 48px;
    bottom: auto;
    left: 10px;
    right: 10px;
    max-width: none;
    width: auto;
    padding: 10px;
    gap: 16px;
  }

  .controls {
    left: 0;
    right: 0;
    bottom: calc(20px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 3.7vw;
  }

    #diarysection .controls button {
    font-size: 3.7vw;
    line-height: 1;
  }

  .controls:has(#previousButton[style*="display: none"]) {
    justify-content: flex-end;
  }

  .controls:has(#nextButton[style*="display: none"]) {
    justify-content: flex-start;
  }

  .star path {
    fill: var(--sticker-colour);
    stroke: var(--sticker-colour);
  }

  .image-side {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
  }

  .image-side img {
    pointer-events: none;
  }

  .image-side .star {
    z-index: 20;
  }

  .caption {
    background: var(--solid-colour);
    color: #ffffff;
  }
}
