/*fonts*/
@font-face {
  font-family: "Habil";
  src: url("../fonts/HabilLow-Bold.woff2") format("woff2");
  src: url("../fonts/HabilLow-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "SimplonMono-Regular";
  src: url("../fonts/SimplonMono-Regular-WebS.woff2") format("woff2");
  src: url("../fonts/SimplonMono-Regular-WebS.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "SimplonMono-Bold";
  src: url("../fonts/SimplonMono-Regular-WebXL.woff2") format("woff2");
  src: url("../fonts/SimplonMono-Regular-WebXL.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --font-display: "Habil", cursive;
  --font-body: "SimplonMono-Regular", monospace;
  --accent-color: #37FF00;
  --large-font: 55px;
  --medium-font: 16px;
  --hover-transition: 120ms ease-in-out;
  --footer-height: 40px;
}

body {
  font-family: var(--font-body);
  font-size: var(--medium-font);
  font-weight: normal;
}

.site-title {
  font-family: var(--font-display);
}

/*little details*/
::selection {
  background-color: var(--accent-color); /* Highlight background color */
  color: black;            /* Highlighted text color */
}

/* Older Firefox versions */
::-moz-selection {
  background-color: var(--accent-color);
  color: black;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent-color);
  text-underline-offset: 4px; 
  transition: color var(--hover-transition);
}

a:hover {
  color: var(--accent-color);
}

a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
label[for],
select,
summary,
[role="button"] {
  cursor: url("../imgs/cursor.svg") 0 0,
          url("../imgs/cursor.png") 0 0,
          pointer;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}


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

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
}

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

body {
  min-height: 100vh;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}


main {
  flex: 1;
  min-width: 0;
}

.site-footer {
  margin-top: auto;
}

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

/*header*/

.site-header {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.nav-sticker {
  width: 460px;
  padding: 20px 20px 30px 20px;
  background-color: var(--accent-color);
  font-size: 11px;
  text-transform: uppercase;
}

@media (min-width: 1201px) {
  .nav-sticker {
    width: calc(33.333333vw - 53.333333px);
  }
}

.nav-sticker__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav-sticker__top > :last-child {
  justify-self: end;
}

.nav-sticker a {
  color: black;
  text-decoration: none;
}

.nav-sticker__link.is-active {
  color: black;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-title {
  display: inline-block;
  font-size: 37px;
  -webkit-text-stroke: .5px;
  text-transform: none;
  transform-origin: center;
  transform: translateZ(0) scale(1);
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-title:hover,
.site-title:focus-visible {
  transform: translateZ(0) scale(1.025);
}

.nav-sticker__tagline {
  margin-top: 14px;
  text-align: center;
}


footer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--footer-height);
  flex-shrink: 0;
  background-color: var(--accent-color);
}

footer a {
  color: black;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
}

footer a:hover {
  color: black;
}

/*Work index*/

.work-view {
  background-color: var(--accent-color);
  color: black;
}

.work-view .nav-sticker,
.work-view footer {
  background-color: white;
}

.work-view main {
  padding-top: 0;
}

.work-index {
  min-height: calc(100vh - var(--footer-height));
  display: grid;
  place-items: center;
  padding: 220px 24px 120px;
  text-align: center;
}

.work-list {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  text-transform: uppercase;
}

.work-list__project {
  position: relative;
  display: block;
  color: black;
  text-decoration: none;
  margin-bottom: 25px;
}

.work-list__project:hover,
.work-list__project:focus-visible {
  color: black;
}

.work-list__client,
.work-list__campaign {
  position: relative;
  z-index: 2;
  display: block;
}

.work-list__campaign {
  padding-left: 18px;
}

.work-list__preview {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 120px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--hover-transition);
}

.work-list__preview img,
.work-list__preview video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 170px;
  object-fit: cover;
}

.work-list__project:hover .work-list__preview,
.work-list__project:focus-visible .work-list__preview {
  opacity: 1;
}

/*Home Page*/

.home-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 60px 40px;
  padding: 0 40px 40px;
}

.home-grid__item {
  display: block;
  position: relative;
  align-self: start;
  min-width: 0;
}

.home-grid__tooltip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  color: black;
  font-family: var(--font-body);
  font-size: var(--medium-font);
  line-height: 1.2;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--hover-transition);
}

.home-grid__tooltip span {
  padding: 1px 3px;
  background-color: var(--accent-color);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.home-grid__item:hover .home-grid__tooltip,
.home-grid__item:focus-visible .home-grid__tooltip {
  opacity: 1;
}

.home-grid__item img,
.home-grid__item video {
  display: block;
  width: 100%;
  height: auto;
  outline: 5px solid transparent;
  outline-offset: -5px;
  transition: outline-color var(--hover-transition);
}

.home-grid__item.is-project-active img,
.home-grid__item.is-project-active video {
  outline: 5px solid var(--accent-color);
  outline-offset: -5px;
}

@media (max-width: 1200px) {
  .home-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 50px 30px;
    padding-right: 30px;
    padding-left: 30px;
  }
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 40px 24px;
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 700px) {
  .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
    padding-left: 16px;
  }

  .home-grid__item {
    width: 80%;
    justify-self: center;
  }
}



/*About page*/
.about {
  min-height: 100vh;
  padding: 200px 40px 0;
}

.about__content {
  max-width: 650px;
  margin: 0 auto;
}

.about__contact {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: var(--large-font);
  font-weight: normal;
}

.about__intro {
  margin-bottom: 24px;
}

.about__bio {
  margin-bottom: 30px;
}

.about__intro p,
.about__bio p {
  margin-top: 0;
}

.about__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 45px;
}


.about__portrait {
  width: 130px;
  margin: 0;
}

.about__portrait img {
  width: 100%;
  height: auto;
  display: block;
}

.about__lightbox {
  overflow: visible;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.about__lightbox::backdrop {
  background-color: color-mix(in srgb, var(--accent-color) 80%, transparent);
}

.about__lightbox img {
  width: min(420px, 70vw);
  max-width: none;
  max-height: 80vh;
  object-fit: contain;
}

.about__lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: black;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1;
}


/*case studies*/

.project__hero {
  width: 100%;
}

.project__hero img,
.project__hero video {
  display: block;
  width: 100%;
  height: auto;
}

.project__meta {
  padding: 32px 20px;
  text-align: center;
  text-transform: uppercase;
}

.project__meta p {
  margin: 0;
}

.project__gallery {
  padding: 0 20px;
}

.project__media {
  margin: 0 0 50px;
}

.project__media img,
.project__media video {
  display: block;
  width: 100%;
  height: auto;
}



/*Mobile*/
@media (max-width: 700px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
  }



  .about {
    padding: 60px 40px 60px;
  }

  .nav-sticker {
    width: 100%;
    padding: 18px 24px 22px;
  }

  .nav-sticker__top {
    grid-template-columns: 1fr auto 1fr;
  }

  .nav-sticker__tagline {
    margin-top: 20px;
    white-space: nowrap;
  }
}

main {
  padding-top: 0;
}

@media (max-width: 700px) {
  main {
    padding-top: 108px;
  }
}

:root {
  --mobile-header-height: 108px;
}

@media (max-width: 700px) {
  main {
    padding-top: var(--mobile-header-height);
  }

  .work-view main {
    padding-top: 0;
  }

  .work-index {
    padding: 180px 16px 80px;
  }

  .work-list__preview {
    width: 90px;
  }
}
