@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0d0d0d;
  --fg: #f2f0eb;
  --muted: #9c9a95;
  --line: #343434;
  --serif: "Cormorant Garamond", serif;
  --sans: Inter, sans-serif;
}

/* RESET */

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* HEADER */

.site-header {
  position: relative;
  z-index: 20;
  height: 96px;
  padding-inline: clamp(24px, 5vw, 96px);
  display: flex;
  align-items: center;
}

.brand {
  flex-shrink: 0;
  font: 600 clamp(20px, 2vw, 26px) / 1 var(--serif);
}

nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  margin-right: 0;
}

nav a {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
}

.menu-button {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

/* MOBILE MENU */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 9;
  padding: 130px 28px 40px;
  background: var(--bg);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-nav a {
  display: block;
}

/* MAIN */

main {
  min-height: 70vh;
}

/* HOME VIEWPORT */

@media (min-width: 801px) {
  body:has(.hero) {
    height: 100vh;
    height: 100svh;
    display: grid;
    grid-template-rows: 96px minmax(0, 1fr) auto;
    overflow: hidden;
  }

  body:has(.hero) main {
    min-height: 0;
  }
}

/* HOME HERO */

.hero {
  position: relative;
  min-height: calc(100vh - 96px);
  padding: 10vh clamp(24px, 9vw, 145px) 12vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (min-width: 801px) {
  body:has(.hero) .hero {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding-top: clamp(30px, 4vh, 60px);
    padding-bottom: clamp(30px, 4vh, 60px);
  }
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  left: 50%;
  width: max-content;
  margin: 0.25em 0 0.32em;
  align-self: flex-start;
  transform: translateX(-50%);
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 70px);
  font-weight: 100;
  line-height: 0.82;
  letter-spacing: -0.04em;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
}

.hero h1::before {
  content: "Tomislav Zovko";
  visibility: hidden;
}

.hero h1 > span {
  position: absolute;
  inset: 0 auto auto 0;
}

.typewriter span {
  display: inline-block;
  min-height: 1em;
  padding-right: 0.06em;
  border-right: 1px solid rgba(255, 255, 255, 0.75);
  animation: caret 0.7s step-end infinite;
}

@keyframes caret {
  50% {
    border-color: transparent;
  }
}

/* LINKS */

.text-link,
.outline-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 22px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.text-link span {
  font-size: 18px;
}

.outline-link {
  padding: 18px 28px;
  border: 1px solid var(--line);
  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

.outline-link:hover {
  background: var(--fg);
  color: var(--bg);
}

/* SCROLL INDICATOR */

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 9px / 1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.scroll-indicator i {
  position: relative;
  display: block;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: var(--line);
}

.scroll-indicator i::after {
  content: "";
  position: absolute;
  inset: -100% 0 auto;
  height: 100%;
  background: var(--fg);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    transform: translateY(0);
  }

  65%,
  100% {
    transform: translateY(200%);
  }
}

@media (min-width: 801px) {
  body:has(.hero) .scroll-indicator {
    display: none;
  }
}

/* STANDARD SECTIONS */

.section,
.page-hero {
  padding: clamp(100px, 15vw, 220px) clamp(24px, 9vw, 145px);
}

.intro,
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 10vw;
}

.intro {
  padding-top: clamp(130px, 14vw, 210px);
  padding-bottom: clamp(120px, 12vw, 180px);
}

.intro h2 {
  margin: 0.2em 0;
  font: 500 clamp(60px, 9vw, 120px) / 0.9 var(--serif);
}

.lead {
  max-width: 720px;
  margin: 0;
  color: #c4c1ba;
  font: 400 clamp(21px, 2.2vw, 34px) / 1.35 var(--serif);
}

.intro .lead {
  font-size: clamp(24px, 3.1vw, 30px);
  line-height: 1.25;
}

/* PAGE HERO */

.page-hero {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-hero.compact {
  min-height: 48vh;
}

.page-hero h1 {
  margin: 0.12em 0 0.3em;
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.04em;
}

/* GALLERY */

.art-grid {
  padding: 0 clamp(24px, 5vw, 80px) 10vh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12vh 28px;
}

.art-card {
  grid-column: span 7;
  margin: 0;
}

.art-card:nth-child(even) {
  grid-column: 6 / span 7;
}

.art-card:nth-child(3n) {
  grid-column: 2 / span 6;
}

.art-open {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.art-open img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  object-position: left center;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.art-open:hover img {
  transform: scale(1.015);
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  font: 500 clamp(20px, 2vw, 29px) / 1.2 var(--serif);
}

figcaption small {
  color: var(--muted);
  font: 400 11px / 1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.center {
  padding: 5vh 0 18vh;
  text-align: center;
}

/* BIOGRAPHY */

.portrait {
  margin: 0 clamp(24px, 9vw, 145px) clamp(110px, 12vw, 180px);
  overflow: hidden;
}

.portrait img {
  display: block;
  width: 100%;
  height: clamp(480px, 65vw, 820px);
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
}

/* BIOGRAPHY TEXT */

.biography-content {
  margin: 0 clamp(24px, 9vw, 145px);
  padding-bottom: clamp(130px, 14vw, 210px);
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(60px, 10vw, 170px);
}

.biography-heading {
  position: sticky;
  top: 70px;
}

.biography-heading h2,
.awards-heading h2 {
  margin: 20px 0 0;
  max-width: 520px;
  font: 400 clamp(48px, 5vw, 82px) / 0.95 var(--serif);
  letter-spacing: -0.035em;
}

.biography-copy {
  width: 100%;
  max-width: 780px;
}

.biography-copy p {
  margin: 0 0 1.35em;
  color: #c9c6c0;
  font: 400 clamp(21px, 2vw, 29px) / 1.45 var(--serif);
}

.biography-copy p:first-child {
  color: var(--fg);
}

.biography-copy p:last-child {
  margin-bottom: 0;
}

/* AWARDS */

.awards {
  margin: 0 clamp(24px, 9vw, 145px);
  padding: clamp(90px, 10vw, 150px) 0 clamp(130px, 14vw, 210px);
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(60px, 10vw, 170px);
  border-top: 1px solid var(--line);
}

.awards-heading h2 {
  font-size: clamp(42px, 4.4vw, 72px);
}

.awards-list {
  width: 100%;
  max-width: 780px;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.awards-list li {
  padding: clamp(24px, 3vw, 40px) 0;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}

.awards-list span {
  padding-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
}

.awards-list p {
  margin: 0;
  color: #c9c6c0;
  font: 400 clamp(19px, 1.7vw, 25px) / 1.4 var(--serif);
}

.awards-list em {
  color: var(--fg);
  font-style: italic;
}

/* REVEAL ANIMATION */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.9s ease,
      transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* LIGHTBOX */

dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  padding: 40px;
  overflow: hidden;
  border: 0;
  background: rgba(8, 8, 8, 0.96);
}

dialog::backdrop {
  background: #080808;
}

dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

dialog button {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 2;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

/* FOOTER */

.site-footer {
  margin-inline: clamp(50px, 5vw, 96px);
  border-top: 1px solid rgba(242, 240, 235, 0.12);
}

.footer-content {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(45px, 5vw, 90px);
}

.footer-item {
  display: flex;
  align-items: baseline;
  gap: 22px;
}

.footer-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.footer-links a,
.footer-email {
  color: var(--fg);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transition: opacity 0.25s ease;
}

.footer-links a:hover,
.footer-email:hover {
  opacity: 0.55;
}

.footer-divider {
  width: 1px;
  height: 28px;
  align-self: center;
  background: rgba(242, 240, 235, 0.14);
}

/* TABLET AND MOBILE */

@media (max-width: 800px) {
  /* HEADER */

  .site-header {
    position: sticky;
    top: 0;
    height: 80px;
    padding-inline: 24px;
    background: var(--bg);
    transition:
      top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.25s ease;
  }

  .site-header.is-hidden {
    top: -81px;
    opacity: 0;
    pointer-events: none;
  }

  body.menu-open .site-header {
    top: 0;
    opacity: 1;
    pointer-events: auto;
  }

  .brand {
    font-size: 22px;
    visibility: hidden;
  }

  .brand-font-ready .brand {
    visibility: visible;
  }

  nav {
    display: none;
  }

  .brand,
  .header-actions {
    position: relative;
    z-index: 16;
  }

  .header-actions {
    margin-left: auto;
  }
  .menu-button {
    position: relative;
    width: 44px;
    height: 44px;
    display: block;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fg);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .menu-button::before,
  .menu-button i {
    position: absolute;
    right: 6px;
    height: 0;
    display: block;
    border-top: 1px solid currentColor;
    background: transparent;
    transform-origin: center;
    transition:
      top 0.3s ease,
      right 0.3s ease,
      width 0.3s ease,
      opacity 0.2s ease,
      transform 0.3s ease;
  }

  .menu-button::before {
    content: "";
    top: 15px;
    width: 20px;
  }

  .menu-button i:first-of-type {
    top: 21px;
    width: 15px;
  }

  .menu-button i:last-of-type {
    top: 27px;
    width: 20px;
  }

  .menu-button:focus-visible {
    outline: 1px solid var(--fg);
    outline-offset: 3px;
  }

  .menu-button[aria-expanded="true"]::before,
  .menu-button[aria-expanded="true"] i:last-of-type {
    top: 21px;
    right: 8px;
    width: 20px;
  }

  .menu-button[aria-expanded="true"]::before {
    transform: rotate(45deg);
  }

  .menu-button[aria-expanded="true"] i:first-of-type {
    opacity: 0;
    transform: scaleX(0);
  }

  .menu-button[aria-expanded="true"] i:last-of-type {
    transform: rotate(-45deg);
  }

  /* MOBILE MENU */

  .mobile-menu {
    z-index: 15;
    padding: 100px 28px 72px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .mobile-menu[hidden] {
    display: none;
  }

  .mobile-menu-nav {
    display: block;
    margin: 42px 0 0;
    counter-reset: mobile-navigation;
  }

  .mobile-menu-nav a {
    counter-increment: mobile-navigation;
    min-height: 72px;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    font-family: var(--serif);
    font-size: clamp(30px, 8.5vw, 34px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--fg);
    text-transform: none;
  }

  .mobile-menu-nav a::before {
    content: "0" counter(mobile-navigation);
    color: var(--muted);
    font-family: var(--sans);
    font-size: 8px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15em;
  }

  .mobile-menu-nav a[aria-current="page"] {
    color: var(--fg);
  }

  .mobile-menu-footer {
    margin-top: auto;
    padding: 40px 0 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    row-gap: 10px;
  }

  .mobile-menu-socials {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: baseline;
    column-gap: 20px;
    row-gap: 5px;
  }

  .mobile-menu-socials::before {
    content: "Follow";
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .mobile-menu-socials a {
    grid-column: 2;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: none;
  }

  .mobile-menu-email {
    grid-column: 1 / -1;
    width: 100% !important;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: baseline;
    gap: 20px;
  }

  .mobile-menu-email::before {
    content: "Email";
  }

  .mobile-menu-socials::before,
  .mobile-menu-email::before {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 7px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .mobile-menu-footer a {
    color: var(--fg);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.25s ease;
  }

  .mobile-menu-footer a:hover,
  .mobile-menu-footer a:focus-visible {
    color: var(--fg);
  }

  .mobile-menu-email {
    color: var(--fg) !important;
    text-transform: none !important;
    letter-spacing: 0.04em !important;
  }

  /* HOME */

  .hero {
    min-height: calc(100vh - 80px);
    min-height: calc(100svh - 80px);
    padding: 12vh 24px 10vh;
  }

  .hero h1 {
    width: max-content;
    font-size: clamp(38px, 11.5vw, 56px);
    line-height: 0.92;
  }

  .scroll-indicator {
    bottom: 28px;
  }

  /* GLOBAL FOOTER */

  .site-footer {
    display: none;
  }

  .footer-content {
    min-height: 0;
    padding: 40px 0;
    flex-direction: column;
    gap: 28px;
  }

  .footer-item {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .footer-divider {
    width: 34px;
    height: 1px;
  }

  /* LIGHTBOX */

  dialog {
    margin: 0;
    padding: 18px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  dialog::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  dialog button {
    top: 14px;
    right: 18px;
    font-size: 36px;
  }

  html,
  body,
  .mobile-menu {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  .mobile-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .typewriter span {
    animation: none;
  }

  .scroll-indicator i::after {
    animation: none;
    transform: translateY(100%);
  }
}
