:root {
  --bg: #190f18;
  --bg-2: #211320;
  --panel: #241724;
  --panel-soft: #2b1b2b;
  --line: #382239;
  --text: #f4e8ff;
  --muted: #c58abf;
  --muted-2: #9b6798;
  --accent: #fff36d;
  --accent-2: #e6a0d7;
  --shadow: rgba(0, 0, 0, 0.22);
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 243, 109, 0.055), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(230, 160, 215, 0.07), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.65;
}

body::selection { background: var(--accent); color: var(--bg); }

a {
  color: inherit;
  text-decoration: none;
}

a:hover { color: var(--accent); }

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin: 10px auto 42px;
  width: min(calc(var(--max) + 10px), calc(100% - 20px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 19, 32, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  min-height: 56px;
  overflow-x: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  align-self: stretch;
  border-right: 1px solid var(--line);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.nav a:not(.brand) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 20px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.nav a[aria-current="page"], .nav a:hover { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  margin-bottom: 52px;
}

.portrait {
  position: sticky;
  top: 98px;
}

.avatar {
  width: min(280px, 75vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 1px solid rgba(255, 243, 109, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 243, 109, .9), rgba(230, 160, 215, .78)),
    var(--panel);
  color: var(--bg);
  font-size: clamp(4.2rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.12em;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.small-card {
  border: 1px solid var(--line);
  background: rgba(36, 23, 36, 0.72);
  border-radius: 8px;
  padding: 18px 20px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.title {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.08em;
}

.subtitle {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  max-width: 880px;
}

.subtitle strong { color: var(--text); font-weight: 800; }

.section {
  margin: 34px 0;
}

.section h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.section p {
  margin: 0 0 16px;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  background: rgba(36, 23, 36, 0.78);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.link-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list a,
.resource-card,
.project-card {
  display: block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(43, 27, 43, 0.52);
}

.link-list a:hover,
.resource-card:hover,
.project-card:hover {
  border-color: rgba(255, 243, 109, .32);
  background: rgba(43, 27, 43, 0.9);
}

.arrow { color: var(--accent); font-weight: 900; }

.muted { color: var(--muted); }
.dim { color: var(--muted-2); }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card h3,
.project-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
}

.resource-card p,
.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 243, 109, 0.06);
  color: var(--muted);
}

.cv-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(43, 27, 43, 0.75);
  color: var(--text);
  font-weight: 800;
}

.button.primary {
  border-color: rgba(255, 243, 109, .45);
  color: var(--bg);
  background: var(--accent);
}
.button.primary:hover { color: var(--bg); filter: brightness(1.05); }
.button:hover { border-color: rgba(255, 243, 109, .45); }

.footer {
  margin: 70px auto 28px;
  color: var(--muted-2);
  text-align: center;
  font-size: .9rem;
}

.table-list {
  width: 100%;
  border-collapse: collapse;
}

.table-list th,
.table-list td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-list th {
  color: var(--accent);
  font-size: .88rem;
  text-transform: uppercase;
}

.table-list td { color: var(--muted); }
.table-list td:first-child { color: var(--text); font-weight: 800; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { position: static; }
  .avatar { width: 220px; }
  .grid, .resource-grid { grid-template-columns: 1fr; }
  .cv-block { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page { width: min(100% - 22px, var(--max)); }
  .site-header { top: 6px; width: calc(100% - 12px); }
  .nav a:not(.brand) { padding: 0 13px; }
  .nav a[aria-current="page"]::after { left: 13px; right: 13px; }
  .panel { padding: 18px; }
  .title { letter-spacing: -0.06em; }
}

.category-title {
  margin: 28px 0 10px;
  color: var(--accent-2);
  font-size: 1rem;
}
.file-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.file-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(43, 27, 43, 0.42);
}
.file-list a:hover {
  border-color: rgba(255, 243, 109, .32);
  background: rgba(43, 27, 43, 0.9);
}
.file-title { color: var(--text); }
.file-path { color: var(--muted-2); font-size: .78rem; white-space: nowrap; }
.breadcrumb {
  margin: -20px 0 24px;
  color: var(--muted-2);
  font-size: .9rem;
}
.breadcrumb a { color: var(--muted); }
@media (max-width: 700px) {
  .file-list a { grid-template-columns: 1fr; gap: 2px; }
  .file-path { white-space: normal; }
}


.lang-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 14px;
  min-height: 56px;
}
.lang-switch a {
  min-height: auto !important;
  padding: 5px 8px !important;
  border-radius: 999px;
  color: var(--muted) !important;
  font-size: .82rem;
}
.lang-switch a[aria-current="page"],
.lang-switch a:hover {
  color: var(--bg) !important;
  background: var(--accent);
}
.lang-switch a::after { display: none !important; }
.item-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: .82rem;
  font-weight: 500;
}
@media (max-width: 560px) {
  .lang-switch { margin-left: 0; padding: 0 8px; }
}
