* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "ComingSoon";
  src: url("fonts/ComingSoon.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Annie";
  src: url("fonts/Annie.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Carme";
  src: url("fonts/CarmeRegular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-main: #f6f6f8;
  --bg-image: url("background/back_light.png");

  --text-main: #1a1a1f;
  --text-soft: #3a3a42;
  --text-muted: #6a6a75;

  --ui-main: #111;
  --ui-soft: #1a1a1a;
  --ui-hover: #000;

  --icon-idle: #8c8c95;

  --border-main: rgba(0, 0, 0, 0.35);

  --toast-bg: var(--ui-hover);
  --toast-color: var(--bg-main);
}

body.dark {
  --bg-main: #0e0e11;

  --text-main: #e8e8ee;
  --text-soft: #b8b8c2;
  --text-muted: #8a8a95;

  --ui-main: #e8e8ee;
  --ui-soft: #cfcfda;
  --ui-hover: #ffffff;

  --icon-idle: #7a7a85;

  --border-main: rgba(255, 255, 255, 0.25);

  --modal-overlay: rgba(10, 10, 14, 0.65);
  --modal-card: rgba(20, 20, 26, 0.85);
  --modal-card-border: rgba(255, 255, 255, 0.12);
  --modal-input-bg: rgba(30, 30, 38, 0.75);
  --modal-input-border: rgba(255, 255, 255, 0.18);

  --close-fill: rgba(255, 255, 255, 0.08);
  --close-fill-hover: rgba(255, 255, 255, 0.18);
  --close-fill-text: #ffffff;

  --toast-bg: var(--ui-main);
  --toast-color: var(--bg-main);
}

h1,
h2,
.brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-attachment: fixed;
  z-index: -1;
  transition: opacity 0.6s ease;
}

body::before {
  background-image: url("background/back_light.png");
  opacity: 1;
}

body::after {
  background-image: url("background/back_dark.png");
  opacity: 0;
}

body.dark::before {
  opacity: 0;
}

body.dark::after {
  opacity: 1;
}

body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-main);
  background-repeat: no-repeat;
  background-position: top center;
  background-attachment: fixed;
  background-size: cover;
  transition:
    background-color 0.6s ease,
    color 0.6s ease;
}

/* Header */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 60px;
  z-index: 10;
}

h1 {
  font-family: "Fraunces", serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-main);
  transition:
    color 0.6s ease,
    background-color 0.6s ease;
}

h2 {
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text-soft);
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  font-family: "ComingSoon", serif;
  font-size: 15px;
  letter-spacing: 0.18em;

  text-shadow: none;
}

nav a:hover {
  opacity: 1;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: #111;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
  background: currentColor;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a.active::after {
  transform: scaleX(1);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--icon-idle);
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.6s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.theme-draw {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  transform-origin: center;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.theme-toggle:hover .theme-draw {
  opacity: 1;
  transform: scale(1);
}

.brand {
  line-height: 1.1;
  white-space: nowrap;
  transform-origin: center center;
  font-family: "ComingSoon", serif;
  font-size: 50px;
  letter-spacing: 0.35em;
  font-stretch: normal;
  font-weight: normal;
  line-height: 1;
  text-decoration: none;
  color: var(--text-main);
  text-shadow: none;
  transition: none;
  will-change: opacity, transform;
}

.social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.social a {
  font-size: 13px;
  text-decoration: none;
  color: var(--ui-main);
}

.social-icons {
  display: flex;
  gap: 24px;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--ui-soft);
  text-decoration: none;
  transition:
    color 0.6s ease,
    transform 0.6s ease;
}

.icon {
  width: 24px;
  height: 24px;
}

.icon-base {
  stroke: var(--icon-idle);
  stroke-width: 1.5;
  fill: none;
}

.icon-draw {
  stroke: var(--ui-hover);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.6s ease;
}

.icon-link:hover .icon-draw,
.theme-toggle:hover .theme-draw {
  stroke-dashoffset: 0;
}

.contact-btn {
  position: relative;
  padding: 14px 32px;
  font-family: "ComingSoon", serif;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-decoration: none;
  color: var(--ui-main);
  border: 1.2px solid var(--border-main);
  background: transparent;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  transition:
    color 0.6s ease,
    border-color 0.6s ease;
  white-space: nowrap;
  line-height: 1;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-btn:active {
  transform: translateY(1px);
}

.contact-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--ui-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
  z-index: -1;
}

.contact-btn:hover::before {
  transform: scaleX(1);
}

.contact-btn:hover {
  color: var(--bg-main);
}

.email-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  padding: 12px 20px;
  font-family: "ComingSoon", serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  background: var(--toast-bg);
  color: var(--toast-color);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  z-index: 100;
}

.email-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/*  Main layout */

main {
  padding-top: 200px;
  position: relative;
  z-index: 2;
}

/* Intro text */

.intro {
  max-width: 520px;
  margin: 0 auto 120px;
}

.intro h1 {
  font-weight: 300;
  margin-bottom: 24px;
  text-align: center;
  font-family: "Annie", serif;
}

/* Gallery */

.gallery {
  display: flex;
  flex-direction: column;
  gap: 160px;
  padding-bottom: 200px;
}

.row {
  display: flex;
  justify-content: center;
  gap: 80px;
}

.art {
  width: 420px;
  height: 520px;
  max-width: 40vw;
  object-fit: cover;
  object-position: center;
  display: block;
}

.art-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.art-title {
  margin-bottom: 20px;
  font-family: "Carme", serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--text-main);
  opacity: 0.85;
  transition:
    color 0.6s ease,
    background-color 0.6s ease;
}

/*  Scroll animation  */

.fade-in {
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .intro {
    display: none;
  }

  .art {
    width: 100%;
    max-width: 40vh;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .art-title {
    font-size: 13px;
    letter-spacing: 0.14em;
  }

  .gallery {
    position: relative;
    z-index: 1;
    margin-top: 60px;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }

  .about-photo img {
    width: 260px;
    height: 260px;
  }

  .brand {
    font-size: 32px;
    letter-spacing: 0.18em;
    text-align: center;
    transition: color 0.6s ease;
  }

  .contact-btn {
    font-size: 12px;
    padding: 12px 26px;
  }

  header {
    min-width: auto;
    position: fixed;
    height: auto;
    padding: 20px 20px 16px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 14px;
    align-items: center;
  }

  header,
  header * {
    transition:
      color 0.6s ease,
      opacity 0.6s ease,
      transform 0.6s ease;
  }

  nav {
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .theme-toggle {
    width: 18px;
    height: 18px;
  }

  .main {
    position: relative;
    padding-top: 120px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
  }

  body::before {
    background-image: url("background/back_light_mob.png");
    opacity: 1;
  }

  body::after {
    background-image: url("background/back_dark_mob.png");
    opacity: 0;
  }

  body.dark::before {
    opacity: 0;
  }

  body.dark::after {
    opacity: 1;
  }

  body::before,
  body::after {
    height: 100%;
    bottom: auto;
    display: block;
    position: absolute;
    transition: opacity 0.6s ease;
    inset: 0;
    background-repeat: no-repeat;
    background-position: 5% top;
    background-size: cover;
  }

  body.bg-hidden::before,
  body.bg-hidden::after {
    opacity: 0;
  }

  body {
    background: none;
    position: relative;
  }

  body.dark {
    --ui-main: #e8e8ee;
    --ui-hover: #ffffff;
    --border-main: rgba(255, 255, 255, 0.25);
    background-color: #000000;
    --toast-bg: #ffffff;
    --toast-color: #111111;
  }

  body:not(.dark) {
    --toast-bg: #111111;
    --toast-color: #ffffff;
  }

  .row {
    flex-direction: column;
    gap: 80px;
  }

  .social {
    position: fixed;
    bottom: 16px;
    left: 50%;
    margin-bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
  }

  .social-icons {
    display: flex;
    gap: 12px;
  }

  .social .contact-btn {
    display: inline-flex;
    height: 34px;
    padding: 0 16px;
    font-size: 11px;
    letter-spacing: 0.16em;
    border-width: 1px;
  }

  .social,
  .author-mark,
  .email-toast {
    transition:
      background 0.6s ease,
      color 0.6s ease,
      opacity 0.6s ease;
  }

  .icon-link {
    width: 30px;
    height: 30px;
  }
}
