:root {
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  font-weight: 300;
  font-size: 16px;

  color-scheme: light dark;
  --color-bg: #F3EEE6;
  --color-heading: #2B2B2B;
  --color-paragraph: #3A3A3A;
  --color-accent: #412638;
  --color-secondary-accent: #C97B84;
  --color-border: #E3D9D2;

  --accent-soft: rgba(74, 44, 64, 0.06);
  --accent-light: rgba(74, 44, 64, 0.12);
  --accent-medium: rgba(74, 44, 64, 0.25);
  --accent-hover: rgba(74, 44, 64, 0.18);
  --accent-pink-soft: rgba(201, 123, 132, 0.12);

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
}

#main-title a {
  color: var(--color-paragraph);
}

#sub-title {
  color: var(--color-secondary-accent);
}

.nav-link {
  position: relative;
  padding-left: 20px;
  cursor: pointer;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--color-accent);
  border-radius: 50%;
  transform: translateY(-50%) scale(1);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 300ms ease;
  opacity: 0.7;
}

.nav-link.active::before {
  transform: translateY(-50%) scale(1.5);
  opacity: 1;
  transition: transform 200ms ease-in-out;
  box-shadow: 0 0 0 3px rgba(127, 0, 25, 0.05);
}

.nav-link:hover::before {
  transform: translateY(-50%) scale(1.4);
  opacity: 0.8;
  transition: transform 200ms ease-in-out;
  box-shadow: 0 0 0 3px rgba(127, 0, 25, 0.05);
}

.project-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.project-image {
  background: var(--accent-soft);
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);

  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 400ms ease,
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion-item.active .project-image {
  opacity: 1;
  transform: translateX(0);
}

.project-image img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

html,
body {
  background:
    radial-gradient(circle at 20% 10%, rgba(201, 123, 132, 0.06), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(74, 44, 64, 0.05), transparent 45%),
    linear-gradient(to bottom,
      #F7F2EA,
      #F3EEE6 40%,
      #EFE8DF);
  margin: 0;
  padding: 0;
  height: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image: url("/noise_200.png");
  background-repeat: repeat;

  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

#main {
  position: fixed;
  inset: 20px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 5rem 6rem 0 6rem;
  text-align: center;
  display: flex;
  flex-direction: row;
  scrollbar-width: none;
}

h1 {
  color: var(--color-heading);
  margin: 0;
  font-family: "Playfair Display", serif;
  letter-spacing: -0.01em;
  font-weight: 600;
  font-size: 42px;
  line-height: 1.15;
  text-align: left;
  border-bottom: 3px solid black;
}

.project-title,
h1 {
  text-rendering: optimizeLegibility;
  font-weight: 600;
}

h2 {
  color: var(--color-heading);
  font-family: "Crimson Pro", serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.05em;
}

p {
  color: var(--color-paragraph);
  line-height: 1.7;
  font-weight: 300;
}

#experience-container {
  position: relative;
}

#experience-container::before {
  content: "";
  position: absolute;
  left: 125px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
      transparent,
      rgba(0, 0, 0, 0.15) 10%,
      rgba(0, 0, 0, 0.15) 90%,
      transparent);
  transition: background 300ms ease;
}

.years {
  position: relative;
}

.years::after {
  content: "";
  position: absolute;
  right: 11.5px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.experience-link {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.7);
}

section {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#title-nav {
  width: 45%;
  align-items: start;
}

#title-role {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#title-role p {
  margin: 0;
}

#content {
  width: 55%;
  min-height: 100%;
}

#about-text {
  text-align: left;
}

.experience-content {
  display: flex;
  flex-direction: column;
}

.experience-box p {
  margin: 0;
}

.experience-box {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  margin-bottom: 60px;
}

.experience-box::after {
  content: "";
  position: absolute;

  left: 125px;
  top: 0;
  bottom: 0;
  width: 1px;

  background: rgba(127, 0, 25, 0.35);

  opacity: 0;
  transform: scaleY(0.6);
  transform-origin: center;

  transition:
    opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);

  pointer-events: none;
}

.experience-box:hover::after {
  opacity: 0.6;
  transform: scaleY(1);
}

#experience-container:hover::before {
  background: linear-gradient(to bottom,
      transparent,
      rgba(127, 0, 25, 0.2) 10%,
      rgba(127, 0, 25, 0.2) 90%,
      transparent);
}

.experience-box::before {
  content: "";
  position: absolute;
  inset: -10px -20px;
  background: rgba(74, 44, 64, 0.05);
  opacity: 0;
  border-radius: 6px;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1), transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.experience-box>* {
  position: relative;
  z-index: 1;
}

.experience-box:hover {
  cursor: pointer;
}

.experience-box:hover::before {
  opacity: 1;
  transform: scale(1);
}

.experience-box:hover .years::after {
  transform: scale(1.4);
  transition: transform 200ms ease-in-out;
  box-shadow: 0 0 0 2px rgba(127, 0, 25, 0.08);
}

.experience-heading {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
}

.experience-heading p {
  color: var(--color-paragraph);
  font-weight: 800;
  margin-bottom: 12px;
}

.experience-text {
  margin-top: 12px;
}

.years {
  color: var(--color-accent);
}

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

.accordion {
  width: 100%;
}

.accordion-item:first-child {
  border-top: none;
}

.accordion-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 30px 0;
  cursor: pointer;
}

.accordion-item.active {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.accordion-title {
  color: var(--color-paragraph);
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  font-family: "Playfair Display", serif;
  font-size: 32px;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 300ms ease, transform 300ms ease;
}

.accordion-content {
  overflow: hidden;
  height: 0;
  opacity: 0;
  transition: height 400ms ease, opacity 300ms ease;
}

.project-text {
  max-width: 55ch;
  line-height: 1.75;
  margin: 0;
}

.accordion-item.active .project-title {
  display: inline-block;
  transform: translateX(-100%);
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion.has-active .accordion-title {
  opacity: 0.35;
  transition: opacity 250ms ease;
}

.accordion.has-active .accordion-item.active .accordion-title {
  opacity: 1;
}

.accordion.has-active .accordion-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion.has-active .accordion-item.active {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.project-title {
  will-change: transform;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion-item.active .accordion-content {
  opacity: 1;
}

.accordion-item.active .project-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}

.accordion-item.active .project-image {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 200ms;
}

.accordion-item.active .project-links {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 260ms;
}

.accordion-item.active .language-container {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 320ms;
}

.accordion-item.active .project-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}

.accordion-item.active .project-image {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 200ms;
}

.accordion-item.active .project-links {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 260ms;
}

.accordion-item.active .language-container {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 320ms;
}

.project-title {
  transform-origin: right center;
}

.language-container {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: wrap-reverse;
  gap: 8px;
}

.language-tag {
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.8;
  padding: 4px 8px;
  border-radius: 6px;

  color: var(--color-accent);
  background: var(--accent-soft);
}

.project-heading {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.project-heading p {
  font-weight: 500;
}

.accordion-item.active .project-link {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 200ms;
}

.project-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}

.project-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.project-link {
  color: var(--color-accent);
  letter-spacing: 0.02em;
}

.arrow {
  font-size: 10px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: "Crimson Pro", serif;
  color: var(--color-paragraph);
  letter-spacing: 0.05em;
  text-align: left;
  padding: 0;
  margin-top: 200px;
  position: fixed;
  font-size: 18px;
  font-weight: 300;
}

p {
  text-align: left;
}

li {
  margin: 2rem 0 2rem 0;
}

#contact-icons-container {
  color: var(--color-secondary-accent);
}

#contact {
  padding-bottom: 50px;
}

#footer {
  font-family: "Playfair Display", serif;
  color: var(--color-heading);
  opacity: 0.5;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1000px) {

  #main {
    position: relative;
    inset: auto;
    height: auto;
    flex-direction: column;
    padding: 4rem 2rem;
  }

  #title-nav,
  #content {
    width: 100%;
  }

  #title-role {
    position: relative;
  }

  nav {
    position: relative;
    margin-top: 40px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 32px;
  }
}

@media (max-width: 900px) {

  nav {
    position: sticky;
    top: 0;
    background: var(--color-primary);
    padding: 10px 0;
    z-index: 50;
  }

  .project-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-side {
    max-width: 400px;
  }
}

@media (max-width: 700px) {

  .accordion-title {
    justify-content: flex-start;
    font-size: 26px;
  }

  .accordion-item.active .project-title {
    transform: translateX(0) !important;
  }

  .accordion-item {
    overflow: hidden;
    padding: 20px 0;
  }
}

@media (max-width: 700px) {

  #experience-container::before {
    display: none;
  }

  .experience-box::after {
    display: none;
  }

  .years::after {
    display: none;
  }

  .experience-box::before {
    background: var(--accent-soft);
    display: none;
  }

  .experience-box {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #experience-container::before {
    display: none;
  }

  .years::after {
    display: none;
  }
}

@media (max-width: 600px) {
  #main {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 600px) {
  nav {
    font-size: 16px;
    gap: 16px;
  }

  .nav-link {
    padding-left: 18px;
  }
}

img {
  max-width: 100%;
  height: auto;
}

#content {
  max-width: 720px;
}

@media (hover: none) {

  .experience-box:hover::before,
  .experience-box:hover::after,
  .experience-box:hover .years::after {
    display: none;
  }

}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }

  a:hover {
    color: rgb(120, 119, 198, 0.1);
    ;
  }

  button {
    background-color: #f9f9f9;
  }
}
