@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("inter-latin.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 {
  color-scheme: light;
  --background: #e5e8ed;
  --surface: #e5e8ed;
  --text: #222832;
  --muted: #4d5664;
  --shadow: #bdc2cb;
  --highlight: #ffffff;
  --edge: #ffffff85;
  --line: #a8b0bd80;
  --card-top: #ffffff35;
  --card-bottom: #bac1cd14;
  --button-top: #ffffff55;
  --button-bottom: #b7beca35;
  --focus: #6e50b1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #282d35;
  --surface: #2e343d;
  --text: #f3f4f7;
  --muted: #cbd0d8;
  --shadow: #1b1f25;
  --highlight: #424a55;
  --edge: #6d778650;
  --line: #8d97a348;
  --card-top: #ffffff08;
  --card-bottom: #00000008;
  --button-top: #ffffff12;
  --button-bottom: #00000013;
  --focus: #cab4ff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #282d35;
    --surface: #2e343d;
    --text: #f3f4f7;
    --muted: #cbd0d8;
    --shadow: #1b1f25;
    --highlight: #424a55;
    --edge: #6d778650;
    --line: #8d97a348;
    --card-top: #ffffff08;
    --card-bottom: #00000008;
    --button-top: #ffffff12;
    --button-bottom: #00000013;
    --focus: #cab4ff;
  }
}

* { box-sizing: border-box; }

html {
  min-width: 280px;
  background: var(--background);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 48px 28px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  inset: 16px auto auto 20px;
  transform: translateY(-180%);
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus { transform: none; }

.site-panel {
  width: 100%;
  max-width: 1080px;
  padding: 36px 44px 24px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 34px;
  box-shadow: 14px 14px 38px var(--shadow), -14px -14px 38px var(--highlight), inset 1px 1px 1px var(--edge);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  border-radius: 12px;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--edge);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--button-top), var(--button-bottom));
  box-shadow: 4px 4px 9px var(--shadow), -4px -4px 9px var(--highlight), inset 1px 1px 1px var(--edge);
  color: var(--muted);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
}

.theme-switch {
  display: none;
  gap: 3px;
  padding: 4px;
  border-radius: 40px;
  box-shadow: inset 3px 3px 6px var(--shadow), inset -3px -3px 6px var(--highlight);
}

.js .theme-switch { display: inline-flex; }

.theme-button {
  width: 49px;
  height: 39px;
  display: grid;
  place-items: center;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-button svg { width: 23px; height: 23px; }

.theme-button[aria-pressed="true"] {
  border-color: var(--edge);
  background: linear-gradient(145deg, var(--button-top), var(--button-bottom)), var(--surface);
  color: var(--text);
  box-shadow: 3px 3px 7px var(--shadow), -2px -2px 5px var(--highlight);
}

.intro {
  padding: 53px 0 43px;
  text-align: center;
}

.intro h1 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -1.9px;
  text-wrap: balance;
}

.intro p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
  text-wrap: balance;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  scroll-margin-top: 24px;
}

.project { min-width: 0; }

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border: 1px solid var(--edge);
  border-radius: 30px;
  padding: 14px 26px 27px;
  background: linear-gradient(145deg, var(--card-top), var(--card-bottom)), var(--surface);
  box-shadow: 9px 9px 20px var(--shadow), -9px -9px 20px var(--highlight), inset 1px 1px 1px var(--edge);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 12px 14px 26px var(--shadow), -10px -10px 22px var(--highlight), inset 1px 1px 1px var(--edge);
}

.project-card:active { transform: translateY(-1px); }

.project-art {
  display: grid;
  place-items: center;
  height: 257px;
  margin: 0 -12px 8px;
}

.project-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-card--orbi .project-art img { width: 96%; }

.project-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.project-content h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.project-content p {
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.project-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  min-height: 42px;
  margin-top: auto;
  padding: 8px 21px;
  border: 1px solid var(--edge);
  border-radius: 30px;
  background: linear-gradient(160deg, var(--button-top), var(--button-bottom));
  box-shadow: 4px 4px 8px var(--shadow), -3px -3px 7px var(--highlight), inset 1px 1px 1px var(--edge);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.project-action svg { width: 23px; height: 23px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -1px 0 var(--edge);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  padding: 4px 0;
  border-radius: 3px;
  text-decoration: none;
  text-underline-offset: 4px;
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  body { padding: 26px 20px; }
  .site-panel { padding: 26px 23px 20px; border-radius: 27px; }
  .brand { gap: 12px; font-size: 25px; }
  .brand-mark { width: 43px; height: 43px; font-size: 25px; }
  .intro { padding: 43px 0 32px; }
  .intro h1 { letter-spacing: -1px; font-size: 34px; }
  .intro p { font-size: 16px; }
  .projects { gap: 23px; }
  .project-card { padding: 12px 20px 24px; border-radius: 24px; }
  .project-art { height: 204px; margin-bottom: 5px; }
  .project-content h2 { font-size: 24px; }
  .project-content p { font-size: 14px; }
  .project-action { gap: 13px; padding: 8px 17px; }
}

@media (max-width: 560px) {
  body { padding: 20px 16px; }
  .site-panel { padding: 22px 21px 18px; }
  .brand { gap: 10px; font-size: 23px; }
  .brand-mark { width: 41px; height: 41px; font-size: 23px; border-radius: 13px; }
  .theme-switch { gap: 0; padding: 3px; }
  .theme-button { width: 40px; height: 36px; padding: 7px 10px; }
  .theme-button svg { width: 21px; height: 21px; }
  .intro { padding: 37px 0 31px; }
  .intro h1 { font-size: 31px; letter-spacing: -1.1px; }
  .intro p { margin-top: 11px; font-size: 15px; line-height: 1.6; }
  .projects { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .project-card { padding: 11px 23px 24px; }
  .project-art { height: auto; aspect-ratio: 1.45; margin: 0 -13px 8px; }
  .project-content h2 { font-size: 25px; }
  .project-content p { font-size: 15px; margin-bottom: 19px; }
  .site-footer { margin-top: 29px; padding-top: 16px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-card { transition: none; }
  .project-card:hover, .project-card:active { transform: none; }
}
