@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap");

/* Reset */

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

* {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

#root,
#__next {
  isolation: isolate;
}

/* Foundation */

:root {
  --background: #ffffff;
  --background-inverted: #000000;
  --text: #000000;
  --text-secondary: #6f6f6f;
  --text-inverted: #ffffff;
  --light-grey: #e7e7e7;

  --spacing-xxxxs: 4px;
  --spacing-xxxs: 8px;
  --spacing-xxs: 12px;
  --spacing-xs: 16px;
  --spacing-sm: 24px;
  --spacing-md: 32px;
  --spacing-lg: 100px;
  --spacing-xl: 120px;
  --spacing-xxl: 160px;
  --spacing-xxxl: 200px;

  --border-radius-sm: 20px;
  --border-radius-md: 40px;

  --font-size-h1: 64px;
  --font-size-h2: 26px;
  --font-size-h3: 20px;
  --font-size-body: 16px;

  --font-size-mobile-h1: 32px;
  --font-size-mobile-h2: 20px;
  --font-size-mobile-h3: 16px;
  --font-size-mobile-body: 16px;

  --line-height-h1: 132%;
  --line-height-h2: 140%;
  --line-height-h3: 140%;
  --line-height-body: 140%;

  --line-height-mobile-h1: 132%;
  --line-height-mobile-h2: 140%;
  --line-height-mobile-h3: 140%;
  --line-height-mobile-body: 140%;

  --letter-spacing-h1: -3%;
  --letter-spacing-h2: -1%;
  --letter-spacing-h3: -1%;
  --letter-spacing-body: -1%;

  --letter-spacing-mobile-h1: -3%;
  --letter-spacing-mobile-h2: -1%;
  --letter-spacing-mobile-h3: -1%;
  --letter-spacing-mobile-body: -1%;

  --font-weight-h1: 500;
  --font-weight-h2: 400;
  --font-weight-h3: 400;
  --font-weight-body: 400;

  --font-weight-mobile-h1: 500;
  --font-weight-mobile-h2: 400;
  --font-weight-mobile-h3: 400;
  --font-weight-mobile-body: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
a {
  font-family: "Geist", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  color: var(--text);
}

h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  letter-spacing: var(--letter-spacing-h1);
  font-weight: var(--font-weight-h1);
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2);
  letter-spacing: var(--letter-spacing-h2);
  font-weight: var(--font-weight-h2);
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  letter-spacing: var(--letter-spacing-h3);
  font-weight: var(--font-weight-h3);
}

p,
a,
ul,
ol,
li {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-body);
  font-weight: var(--font-weight-body);
}

a {
  padding: var(--spacing-xxxxs) 0;
  text-decoration: none;
}

@media (max-width: 600px) {
  h1 {
    font-size: var(--font-size-mobile-h1);
    line-height: var(--line-height-mobile-h1);
    letter-spacing: var(--letter-spacing-mobile-h1);
    font-weight: var(--font-weight-mobile-h1);
  }

  h2 {
    font-size: var(--font-size-mobile-h2);
    line-height: var(--line-height-mobile-h2);
    letter-spacing: var(--letter-spacing-mobile-h2);
    font-weight: var(--font-weight-mobile-h2);
  }

  h3 {
    font-size: var(--font-size-mobile-h3);
    line-height: var(--line-height-mobile-h3);
    letter-spacing: var(--letter-spacing-mobile-h3);
    font-weight: var(--font-weight-mobile-h3);
  }

  p,
  a {
    font-size: var(--font-size-mobile-body);
    line-height: var(--line-height-mobile-body);
    letter-spacing: var(--letter-spacing-mobile-body);
    font-weight: var(--font-weight-mobile-body);
  }
}

a::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  vertical-align: middle;
  background-image: url("arrow.svg");
  background-size: contain;
  background-repeat: no-repeat;
}

a:hover {
  text-decoration: underline;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

.link-button-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.link-button {
  display: inline-block;
  padding: var(--spacing-xxxs) var(--spacing-xs);
  background: var(--background-inverted);
  color: var(--text-inverted);
  text-align: center;
  border-radius: var(--border-radius-md);
}

.link-button::after {
  background-image: url("arrow-inverted.svg");
}

.link-button:hover {
  opacity: 0.8;
}

/* Desktop */

body {
  background-color: var(--background);
  color: var(--text);
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-xxxl)
    var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

main {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
}

section,
header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: var(--spacing-md);
}

section {
  margin-bottom: var(--spacing-sm);
}

header {
  width: 100%;
  margin-bottom: var(--spacing-xxl);
}

header h2:nth-child(2) {
  text-align: end;
}

hr {
  border-top: 1px solid var(--text);
  margin-bottom: var(--spacing-sm);
}

img {
  width: 100%;
}

#about {
  margin-bottom: var(--spacing-xxxl);
}

.left-section {
  width: 368px;
  display: flex;
  flex-direction: column;
}

.sticky-text {
  position: sticky;
  top: var(--spacing-md);
  align-self: flex-start;
}

.right-section {
  max-width: 800px;
  width: 100%;
}

#about .right-section h2:first-of-type {
  margin-bottom: var(--spacing-xs);
}

.contact {
  display: flex;
  flex-direction: column;
}

.text-secondary {
  color: var(--text-secondary);
}

.company-name,
.company-description {
  margin-bottom: var(--spacing-xxxxs);
}

.work-description {
  margin-top: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.experience {
  margin-bottom: var(--spacing-xs);
}

.years,
.role {
  margin-bottom: var(--spacing-xxxxs);
  margin-top: var(--spacing-xs);
}

.img-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxs);
}

.img-section-full-page {
  margin-bottom: var(--spacing-md);
}

.img_default {
  border-radius: var(--border-radius-sm);
}

.img_small {
  max-height: 240px;
  height: 240px;
}

.img_big {
  max-height: 800px;
  height: 800px;
}

.img_page-wide {
  margin-bottom: var(--spacing-sm);
}

/* Project Desktop */

#overview {
  margin-bottom: var(--spacing-xxxl);
}

#overview .right-section h1:first-of-type {
  margin-bottom: var(--spacing-xs);
}

.sticky-text_project {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxs);
}

.project-tags {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.tag-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxxxs);
}

.right-subsections {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-xs);
}

.subsection {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xxs);

  width: 50%;
}

/*Mobile*/

@media (max-width: 600px) {
  body {
    padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xxl)
      var(--spacing-xs);
  }

  header {
    margin-bottom: var(--spacing-lg);
  }

  section {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  section#about {
    flex-direction: column-reverse;
  }

  section:not(#about) .right-section hr {
    display: none;
  }

  #about {
    margin-bottom: var(--spacing-xl);
  }

  .left-section {
    width: 100%;
  }

  .experience {
    display: none;
  }

  .sticky-text {
    position: relative;
    top: auto;
  }

  .link-button-container {
    gap: var(--spacing-xs);
  }

  .link-button {
    display: block;
  }

  .img_default {
    border-radius: 12px;
  }

  .img_small {
    max-height: 200px;
    height: 200px;
  }

  .img_big {
    max-height: 480px;
    height: 480px;
  }

  /* Project Mobile */
  section#overview {
    flex-direction: column-reverse;
    margin-bottom: var(--spacing-xl);
  }

  .right-subsections {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .subsection {
    width: 100%;
  }

  header h2.mariia-name {
    display: none;
  }

  .projects-nav {
    justify-content: space-between;
  }
}
