@font-face {
  font-family: "Onest";
  src: url("assets/fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Onest";
  src: url("assets/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-cyrillic.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --spruce: #0F1D24;
  --spruce-2: #15272F;
  --mist: #E3E9EA;
  --fog: #9AACB0;
  --ridge: #E2AB7C;
  --line: rgba(227, 233, 234, 0.12);
  --tile: 56px;
  --tile-radius: 16px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 20% 0%, #173039 0%, var(--spruce) 55%) fixed, var(--spruce);
  color: var(--mist);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--ridge);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Live background: topographic lines, a nod to the mountain photo */
.contours {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.contours svg {
  width: 100%;
  height: 100%;
}
.contours path {
  fill: none;
  stroke: var(--mist);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.contours g {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes drift {
  from { transform: rotate(-4deg) scale(1); }
  to { transform: rotate(5deg) scale(1.06); }
}

/* Language switch */
.lang {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 29, 36, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lang button {
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.04em;
  color: var(--fog);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  min-width: 40px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.lang button:hover { color: var(--mist); }
.lang button[aria-pressed="true"] {
  color: var(--spruce);
  background: var(--mist);
}

/* Layout */
.page {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 72px 16px 32px;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.portrait {
  position: relative;
  width: 176px;
  height: 176px;
  padding: 8px;
}
.portrait picture,
.portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.portrait__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.portrait__ring circle {
  fill: none;
  stroke: var(--ridge);
  stroke-width: 1.5;
  stroke-dasharray: 610;
  stroke-dashoffset: 0;
  stroke-linecap: round;
}

.name {
  margin: 22px 0 0;
  font: 600 clamp(44px, 12vw, 64px)/0.95 var(--serif);
  letter-spacing: -0.01em;
  color: #F4F7F7;
}
.role {
  margin: 12px 0 0;
  font: 500 15px/1 var(--sans);
  letter-spacing: 0.18em;
  color: var(--ridge);
  padding-left: 0.18em;
}

/* Tiles: one shape for every icon on the page */
.tile {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--tile);
  height: var(--tile);
  border-radius: var(--tile-radius);
  overflow: hidden;
  color: #fff;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.tile svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.tile--youtube { background: #FF0000; }
.tile--instagram { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.tile--facebook { background: #0866FF; }
.tile--telegram { background: #26A5E4; }
.tile--whatsapp { background: #25D366; }
.tile--phone { background: #34C759; }
.tile--mail { background: var(--ridge); color: var(--spruce); }
.tile--logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}
.tile--mark { background: #fff; }
.tile--mark img {
  width: 76%;
  height: 76%;
  object-fit: contain;
  transform: none;
}

/* Socials */
.socials {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin-top: 32px;
}
.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--fog);
  transition: color 0.2s;
}
.social:hover { color: var(--mist); }
.social:hover .tile,
.row:hover .tile {
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
}

.save {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 13px 22px;
  border: 1px solid rgba(226, 171, 124, 0.5);
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  color: var(--ridge);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.save svg { width: 18px; height: 18px; fill: currentColor; }
.save:hover {
  background: var(--ridge);
  border-color: var(--ridge);
  color: var(--spruce);
}

/* Projects and contacts */
.block { margin-top: 44px; }
.block h2 {
  margin: 0 0 10px;
  font: 600 28px/1.1 var(--serif);
  color: #F4F7F7;
}

.rows { border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  margin: 0 -8px;
  border-radius: 14px;
  transition: background-color 0.25s;
}
.row:hover { background: rgba(227, 233, 234, 0.05); }
.row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.row__title {
  font-weight: 600;
  font-size: 16.5px;
  color: #F4F7F7;
}
.row__sub {
  font-size: 14px;
  line-height: 1.4;
  color: var(--fog);
}
.row__host {
  display: none;
  font-size: 13px;
  color: var(--fog);
  white-space: nowrap;
}

.foot {
  position: relative;
  z-index: 1;
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--fog);
}

/* Desktop: card on the left, lists on the right */
@media (min-width: 1000px) {
  .page {
    max-width: 1120px;
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 96px;
    align-items: start;
    padding: 112px 40px 40px;
  }
  .intro {
    position: sticky;
    top: 96px;
  }
  .portrait { width: 232px; height: 232px; padding: 10px; }
  .name { font-size: 72px; }
  .details { padding-top: 8px; }
  .block:first-child { margin-top: 0; }
  .row__host { display: block; }
  .lang { top: 28px; right: 40px; }
}

/* One orchestrated entrance */
@media (prefers-reduced-motion: no-preference) {
  .contours g { animation: drift 70s ease-in-out infinite alternate; }
  .contours g + g { animation-duration: 90s; animation-direction: alternate-reverse; }
  .social:hover .tile,
  .row:hover .tile { transform: translateY(-3px); }
  .js .portrait__ring circle { animation: ring 1.6s var(--ease) 0.15s both; }
  .js .portrait picture { animation: rise 0.9s var(--ease) both; }
  .js .name,
  .js .role,
  .js .socials li,
  .js .save,
  .js .block h2,
  .js .rows li {
    animation: rise 0.8s var(--ease) both;
    animation-delay: calc(0.25s + var(--i, 0) * 0.06s);
  }
}
@keyframes ring { from { stroke-dashoffset: 610; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
