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

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'loos-wide', sans-serif;
  background-color: #e0e0e0;
  overflow-y: auto;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  display: none;
}

html {
  -ms-overflow-style: none;
  scrollbar-width: none;
  height: 100%;
}

/* ================================
   GRID BACKGROUND
   ================================ */

.grid-background {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ================================
   CONTAINER LAYOUT
   ================================ */

.container {
  width: 96%;
  height: 96%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  grid-template-rows: min-content;
  position: relative;
  z-index: 1;
  padding-top: 60px;
}

.grid-cell {
  box-sizing: border-box;
}

/* ================================
   TYPOGRAPHY
   ================================ */

.title {
  grid-column: 1 / span 4;
  grid-row: 2;
  text-align: left;
  font-size: 6.5em;
  font-weight: bold;
  font-family: 'loos-extrawide', sans-serif;
  display: flex;
  align-items: center;
  padding-left: 10px;
  line-height: 0.9;
  letter-spacing: 0.02em;
}

.back {
  grid-column: 1 / span 1;
  text-align: left;
  font-size: 1.5em;
  font-weight: bold;
  display: inline-block;
  align-self: start;
  padding: 5px 10px;
  color: #000;
  grid-row: 1;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  justify-self: start;
  width: auto;
  transition: 
    opacity 0.3s ease, 
    letter-spacing 0.3s ease, 
    transform 0.3s ease;
  opacity: 1;
  letter-spacing: 0.02em;
  font-family: 'loos-extrawide', sans-serif;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.back:hover {
  opacity: 1;
  letter-spacing: 0.04em;
  transform: translateX(5px);
  color: #ef4444;
  text-decoration: none;
}

a {
  text-decoration: none;
}

.intro {
  grid-column: 4 / span 1;
  text-align: left;
  font-size: 1.5em;
  grid-row: 1;
  line-height: 1;
  font-weight: bold;
}

.links {
  grid-column: 3 / span 1;
  text-align: right;
  font-size: 1.2em;
  line-height: 1.2;
  grid-row: 1;
}

.links a {
  color: #000;
  text-decoration: none;
  display: inline-block;
  transition: 
    opacity 0.3s ease, 
    letter-spacing 0.3s ease, 
    transform 0.3s ease;
  opacity: 0.5;
  letter-spacing: 0.02em;
}

.links a:hover {
  opacity: 1;
  letter-spacing: 0.04em;
  transform: translateX(5px);
  color: #ff0000;
  text-decoration: none;
}

.info {
  grid-column: 4 / span 1;
  text-align: left;
  font-size: 1.1em;
  grid-row: 2;
  line-height: 1.5;
}

/* ================================
   EXPERIENCE SECTION
   ================================ */

.experience-title {
  grid-column: 1 / span 1;
  grid-row: 3;
  text-align: left;
  font-size: 2.5em;
  font-weight: bold;
  font-family: 'loos-extrawide', sans-serif;
  display: flex;
  align-items: top;
  padding-left: 10px;
}

.experience-topic {
  grid-column: 2 / span 2;
  grid-row: 3;
  text-align: right;
  font-size: 1.4em;
  font-weight: bold;
  line-height: 2;
}

.experience-text {
  grid-column: 4 / span 1;
  grid-row: 3;
  text-align: left;
  font-size: 1.4em;
  font-weight: bold;
  line-height: 2;
}

/* ================================
   PROJECT SECTION
   ================================ */

.project-title {
  grid-column: 1 / span 1;
  grid-row: 4;
  text-align: left;
  font-size: 2.5em;
  font-weight: bold;
  font-family: 'loos-extrawide', sans-serif;
  display: top;
  align-items: center;
  padding-left: 10px;
  letter-spacing: 0.02em;
}

.project-topic1,
.project-topic2,
.project-topic3,
.project-topic4,
.project-topic5,
.project-topic6,
.project-topic7 {
  text-align: right;
  font-size: 1.2em;
  font-weight: bold;
}

.project-text1,
.project-text2,
.project-text3,
.project-text4,
.project-text5,
.project-text6,
.project-text7 {
  text-align: left;
  font-size: 1em;
}

.project-topic1 { grid-column: 2 / span 2; grid-row: 4; }
.project-text1 { grid-column: 4 / span 1; grid-row: 4; }
.project-topic2 { grid-column: 2 / span 2; grid-row: 5; }
.project-text2 { grid-column: 4 / span 1; grid-row: 5; }
.project-topic3 { grid-column: 2 / span 2; grid-row: 6; }
.project-text3 { grid-column: 4 / span 1; grid-row: 6; }
.project-topic4 { grid-column: 2 / span 2; grid-row: 7; }
.project-text4 { grid-column: 4 / span 1; grid-row: 7; }
.project-topic5 { grid-column: 2 / span 2; grid-row: 8; }
.project-text5 { grid-column: 4 / span 1; grid-row: 8; }
.project-topic6 { grid-column: 2 / span 2; grid-row: 9; }
.project-text6 { grid-column: 4 / span 1; grid-row: 9; }
.project-topic7 { grid-column: 2 / span 2; grid-row: 10; }
.project-text7 { grid-column: 4 / span 1; grid-row: 10; }

.project-text1 a,
.project-text2 a,
.project-text3 a,
.project-text4 a,
.project-text5 a,
.project-text6 a,
.project-text7 a {
  color: #000;
  text-decoration: none;
  display: inline-block;
  transition: 
    opacity 0.3s ease, 
    letter-spacing 0.3s ease, 
    transform 0.3s ease;
  opacity: 0.5;
  letter-spacing: 0.02em;
}

.project-text1 a:hover,
.project-text2 a:hover,
.project-text3 a:hover,
.project-text4 a:hover,
.project-text5 a:hover,
.project-text6 a:hover,
.project-text7 a:hover {
  opacity: 1;
  letter-spacing: 0.04em;
  transform: translateX(5px);
  color: #ff0000;
  text-decoration: none;
}

/* ================================
   SPACERS
   ================================ */

.spacer1 { grid-column: 1 / 1; grid-row: 1; height: 400px; }
.spacer2 { grid-column: 1 / 1; grid-row: 2; height: 400px; }
.spacer3 { grid-column: 1 / 1; grid-row: 3; height: 400px; }
.spacerend { grid-column: 1 / 1; grid-row: 11; height: 10px; }

/* ================================
   BACK BUTTON COMPONENT
   ================================ */

.back-btn {
  font-size: 2rem;
  align-self: baseline;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  cursor: pointer;
  color: #000;
  text-decoration: none;
  font-family: 'loos-extrawide', sans-serif;
  display: inline-block;
  font-weight: bold;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  transition: transform 0.1s ease-out;
  user-select: none;
}

.back-btn .typewriter-char {
  display: inline-block;
  transition: transform 0.3s ease;
}

.back-btn:hover .typewriter-char {
  transform: translateX(30px);
}

.back-btn:hover .arrow.show {
  transform: translateX(30px);
}

.back-btn .arrow {
  position: absolute;
  right: 100%;
  top: 0;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  margin-right: 10px;
}

.back-btn .arrow.show {
  opacity: 1;
  transform: translateX(0);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
  body {
    height: auto;
    min-height: 100vh;
    display: block;
    padding: 20px;
    overflow-x: hidden;
  }

  .container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    gap: 25px;
    padding-bottom: 50px;
  }

  .back {
    font-size: 1.2em;
    text-align: left;
    width: fit-content;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background-color: transparent;
    padding: 5px 10px;
    mix-blend-mode: difference;
    color: #000;
  }

  .links {
    text-align: left;
    font-size: 1em;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .title {
    font-size: 3em;
    padding-left: 0;
    margin: 20px 0;
    line-height: 1;
  }

  .intro {
    font-size: 1.2em;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .info {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 30px;
  }

  .experience-title, 
  .project-title {
    font-size: 2em;
    font-weight: bold;
    padding-left: 0;
    margin: 30px 0 15px 0;
  }

  .experience-topic, 
  .experience-text {
    display: block;
    width: 100%;
    font-size: 1.1em;
    line-height: 1.8;
  }

  .experience-topic {
    text-align: left;
    margin-bottom: 5px;
  }

  .experience-text {
    text-align: left;
    margin-bottom: 25px;
  }

  .experience-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
  }

  .experience-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .project-topic1, 
  .project-topic2, 
  .project-topic3,
  .project-topic4, 
  .project-topic5, 
  .project-topic6, 
  .project-topic7 {
    text-align: left;
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .project-text1, 
  .project-text2, 
  .project-text3,
  .project-text4, 
  .project-text5, 
  .project-text6, 
  .project-text7 {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 25px;
  }

  .project-section {
    margin-bottom: 30px;
  }

  .spacer1, 
  .spacer2, 
  .spacer3, 
  .spacerend {
    display: none;
  }

  * {
    cursor: auto !important;
  }

  .cursor {
    display: none;
  }

  .back-btn {
    cursor: pointer !important;
  }
}