@font-face { font-family: "Manrope"; font-weight: 400 700; font-display: swap; src: url(/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "Manrope"; font-weight: 400 700; font-display: swap; src: url(/fonts/manrope-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url(/fonts/dmmono-400.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap; src: url(/fonts/dmmono-500.woff2) format("woff2"); }

:root {
  --bg: #0e0a18;
  --surface: #1f172f;
  --border: rgba(225, 214, 255, .11);
  --border-hover: rgba(188, 156, 255, .34);
  --text: #f2edfa;
  --muted: #a79db7;
  --dim: #746b84;
  --purple: #a879ff;
  --purple-light: #ceb4ff;
  --lavender: #e0d2ff;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --radius: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-inline: 20px;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 5%, rgba(132, 78, 221, .18), transparent 35rem),
    radial-gradient(circle at 5% 52%, rgba(101, 63, 178, .1), transparent 30rem),
    var(--bg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { color: var(--bg); background: var(--purple-light); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 4px; }

/* The dot from the "e." mark, reused as the site's one recurring detail. */
.dot { color: var(--purple); }

.page { max-width: 880px; margin: 0 auto; }

/* nav */
.top {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
.top-name { font-size: 15px; font-weight: 700; text-decoration: none; }
.top-links { display: flex; align-items: center; gap: 22px; }
.top-links > a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; transition: color .15s; }
.top-links > a:hover { color: var(--text); }
.lang { display: flex; align-items: center; gap: 2px; font: 500 12px/1 var(--mono); }
.lang a, .lang span { padding: 5px 7px; border-radius: 5px; text-decoration: none; }
.lang a { color: var(--dim); transition: color .15s; }
.lang a:hover { color: var(--text); }
.lang span { color: var(--bg); background: var(--purple-light); }

/* intro */
.intro { padding-block: 88px 56px; }
.intro h1 {
  margin: 0 0 26px;
  font-size: clamp(56px, 10vw, 104px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.055em;
}
.intro p { max-width: 660px; margin: 0 0 18px; font-size: clamp(18px, 2.1vw, 21px); }
.intro p.sub { font-size: 17px; color: var(--muted); }

/* sections */
section { padding-block: 52px; }
h2 { margin: 0 0 26px; font: 500 12px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
h2::after { content: "."; color: var(--purple); }

/* projects: the main one wide, the rest side by side */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.project {
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .2s, box-shadow .25s, border-color .2s;
}
.project:hover { transform: translateY(-2px); border-color: var(--border-hover); box-shadow: 0 14px 36px rgba(0,0,0,.18); }
.project.main { grid-column: 1 / -1; padding: 34px; }
.project h3 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.project.main h3 { font-size: 34px; }
.project { position: relative; cursor: pointer; }
.project:active { transform: translateY(-1px) scale(.992); }
.project h3 a { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; transition: color .15s; }
.project h3 a:focus-visible { outline: none; }
/* The title link covers the whole card; the links in the footer sit above it. */
.project h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.project:has(h3 a:focus-visible) { outline: 2px solid var(--purple-light); outline-offset: 4px; }
.project:hover h3 a { color: var(--purple-light); }
.arrow { font-size: .62em; font-weight: 600; color: var(--purple); opacity: 0; transform: translate(-6px, 4px); transition: opacity .2s, transform .2s; }
.project:hover .arrow, .project h3 a:focus-visible .arrow { opacity: 1; transform: none; }
@media (hover: none) { .arrow { opacity: .7; transform: none; } }
.project-foot { position: relative; z-index: 2; }
.project-meta { margin: 0 0 14px; font: 400 12px/1.5 var(--mono); color: var(--dim); }
.project-lead { margin: 0 0 14px; }
.project.main .project-lead { max-width: 700px; font-size: 18px; }
.project ul { margin: 0 0 20px; padding: 0; list-style: none; }
.project li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15px; }
.project li + li { margin-top: 5px; }
.project li::before { content: ""; position: absolute; left: 1px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }
.project-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font: 400 12px/1.4 var(--mono); }
.project-foot a { color: var(--purple-light); text-decoration: none; border-bottom: 1px solid rgba(206, 180, 255, .3); overflow-wrap: anywhere; }
.project-foot a:hover { border-color: currentColor; }
.project-foot span { color: var(--dim); }
.more { margin: 20px 0 0; font-size: 15px; color: var(--muted); }
.more a { color: var(--purple-light); text-underline-offset: 3px; }

/* tools */
.tools { margin: 0; border-top: 1px solid var(--border); }
.tools div {
  padding: 20px 0;
  position: relative;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}
.tools div::before {
  content: "";
  position: absolute;
  inset: 0 -14px;
  border-radius: 10px;
  background: rgba(168,121,255,.04);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.tools div:hover::before { opacity: 1; }
.tools dt, .tools dd { position: relative; }
.tools dt, .tools dd { transition: transform .25s, color .25s; }
.tools div:hover dt { transform: translateX(6px); color: var(--purple-light); }
.tools div:hover dd { transform: translateX(6px); color: var(--text); }
.tools dt { font-weight: 700; font-size: 16px; }
.tools dd { margin: 0; color: var(--muted); font-size: 15px; }

/* contact */
.contact-card {
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--border-hover);
  border-radius: 25px;
  background: linear-gradient(130deg, rgba(145,91,232,.2), rgba(33,23,49,.84) 42%, rgba(97,54,160,.13));
  transition: transform .2s, box-shadow .25s, border-color .2s;
}
.contact-card:hover { transform: translateY(-2px); border-color: rgba(206, 180, 255, .5); box-shadow: 0 14px 36px rgba(0,0,0,.18); }
.contact-card h2 { margin-bottom: 22px; }
.contact-card p { max-width: 560px; margin: 0 0 28px; font-size: clamp(18px, 2.1vw, 22px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 11px; }
.button {
  min-height: 51px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, background .15s, border-color .15s;
}
.button:hover { transform: translateY(-1px); border-color: var(--border-hover); background: rgba(255,255,255,.065); }
.button.primary { color: var(--bg); border-color: transparent; background: var(--lavender); }
.button.primary:hover { background: #fff; }
.button svg { width: 17px; height: 17px; }

footer {
  padding-block: 25px 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--dim);
  font: 400 10px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .05em;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  .projects { grid-template-columns: 1fr; }
  .project.main { padding: 26px; }
  .project.main h3 { font-size: 28px; }
}

@media (max-width: 640px) {
  body { padding-inline: 14px; font-size: 16px; }
  .top-links { gap: 14px; }
  .intro { padding-block: 56px 36px; }
  section { padding-block: 38px; }
  .project, .project.main { padding: 22px 20px; }
  .tools div { grid-template-columns: 1fr; gap: 4px; }
  .tools div::before { inset: 0 -8px; }
  footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .project, .contact-card, .tools dt, .tools dd { transform: none !important; }
}
