@font-face {
  font-family: "DS Baltica";
  src: url("/assets/ds-baltica.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --text: #f4f8fc;
  --accent: #80ddff;
  --white-icon: brightness(0) invert(1);
  --glow: var(--white-icon) drop-shadow(0 0 4px #c2f4ff) drop-shadow(0 0 15px #38c9ff);
  font-family: "DS Baltica", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: #000610 var(--background) center / cover no-repeat;
}
.home { --background: url("/assets/home-background.webp"); }
.contacts { --background: url("/assets/contacts-background.webp"); }

a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page {
  width: min(calc(100% - 2 * clamp(16px, 5vw, 64px)), 880px);
  min-height: 100svh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
header {
  position: relative;
  z-index: 1;
  padding-top: clamp(14px, 2.6svh, 38px);
}
.languages {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1rem, 1.08vw, 1.3rem);
  line-height: 1;
}
.languages a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.languages > span { margin-inline: .28em; }
.languages a:last-child { padding-inline-end: 12px; }
.languages a:is(:hover, [aria-current]) { color: #00aae6; }
.languages a[aria-current] { text-decoration: underline; }

main, .contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-block: clamp(20px, 3svh, 52px);
  text-align: center;
}
.anniversary {
  position: relative;
  inset-block-start: calc(-1 * clamp(10px, 3svh, 48px));
  width: min(90%, clamp(220px, 37vw, 540px), max(190px, 43svh));
  aspect-ratio: 681 / 504;
  margin-bottom: clamp(22px, 3.4svh, 56px);
}
.anniversary img {
  position: absolute;
  width: 117.62%;
  height: auto;
  left: -8.81%;
  top: -50.4%;
  pointer-events: none;
}
h1, .contact-content h2 {
  position: relative;
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.95rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.home h1 {
  font-size: clamp(1.25rem, 2.6vw, 2.65rem);
  letter-spacing: clamp(.13em, .85vw, .4em);
  text-wrap: balance;
}
hr {
  width: clamp(42px, 5vw, 96px);
  border: 0;
  border-top: 2px solid #00aae6;
  margin: clamp(16px, 2.6svh, 42px) auto;
}
.intro {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1rem, 1.45vw, 1.45rem);
  line-height: 1.48;
  text-transform: uppercase;
  text-wrap: balance;
}
.contacts .intro {
  text-align: center;
  line-height: 1.3;
  font-size: clamp(1.05rem, 2vw, 2rem);
}
.contacts .intro span { display: block; }
address {
  display: grid;
  gap: clamp(7px, 1.25svh, 18px);
  width: fit-content;
  max-width: 100%;
  margin-top: clamp(18px, 3svh, 42px);
  font: normal clamp(1rem, 1.8vw, 1.85rem)/1.28 "DS Baltica", Georgia, "Times New Roman", serif;
  text-align: left;
}
address > div {
  display: grid;
  grid-template-columns: 1.45em minmax(0, 1fr);
  align-items: center;
  gap: .65em;
  min-height: 44px;
  overflow-wrap: anywhere;
}
address img { filter: var(--white-icon); width: 100%; height: 1.32em; object-fit: contain; }
address a { text-decoration: none; }
.email-link { -webkit-user-select: text; user-select: text; }
address > div:is(:hover, :focus-within) { color: var(--accent); }
address > div:is(:hover, :focus-within) > img { filter: var(--glow); }

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, clamp(280px, 30vw, 500px));
  min-height: clamp(48px, 5.7svh, 76px);
  margin-top: clamp(20px, 3.2svh, 48px);
  padding: 10px 16px;
  border: 1px solid #e8f4ff;
  border-radius: clamp(12px, 1.05vw, 20px);
  background: #0410204d;
  color: var(--text);
  font: inherit;
  font-size: clamp(1rem, 1.6vw, 1.7rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.action:is(:hover, :focus-visible) {
  color: var(--accent);
  border-color: var(--accent);
  background: #80ddff12;
}
#portfolio-status { margin: 12px 0 0; }

footer {
  display: flex;
  align-items: center;
  padding-bottom: max(18px, 2.8svh, env(safe-area-inset-bottom));
}
footer > * {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
footer > * + * {
  border-left: 1px solid #f4f8fc;
  margin-left: clamp(10px, 2vw, 32px);
  padding-left: clamp(10px, 2vw, 32px);
}
.home > .page footer > :first-child { justify-items: start; }
footer img { filter: var(--white-icon); width: 24px; height: auto; }
footer > :hover img, footer a:focus-visible img { filter: var(--glow); }
.contacts footer { justify-content: center; }

@media (min-width: 760px) {
  .address-row > :last-child { white-space: nowrap; }
}

@media (max-width: 600px) {
  body { background-size: auto max(100%, 100svh); }
  .anniversary { width: min(83%, 305px, 42svh); }
  .home .page main .intro { max-width: 33ch; }
  .action { width: min(100%, 330px); }
  .home .page main .intro [lang] > span + span { margin-top: .35em; }
  address { max-width: min(100%, 360px); }
}

@media (orientation: landscape) and (max-height: 560px) {
  main { padding-block: 30px; }
  .anniversary { inset-block-start: -12px; width: min(85%, 250px); margin-bottom: 20px; }
}
