@font-face {
  font-family: Manrope;
  src: url('/static/fonts/manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c1120;
  --panel: rgba(16, 23, 36, .58);
  --panel-hover: rgba(35, 44, 57, .7);
  --card: rgba(17, 24, 36, .64);
  --line: rgba(220, 230, 245, .17);
  --ink: #f1f3ee;
  --muted: #b0b8c5;
  --accent: #cfef76;
  --current: rgba(77, 91, 46, .52);
  --shadow: 0 12px 36px rgba(0, 0, 0, .14);
  --blur: 20px;
  --radius: 20px;
  --font: Manrope, 'Segoe UI', sans-serif;
  --column-gap: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(rgba(5, 10, 22, .16), rgba(5, 10, 22, .38)), url('/static/background.webp') center / cover no-repeat; pointer-events: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--bg); }
[hidden] { display: none !important; }

.layout { width: min(1700px, 100%); margin: 0 auto; padding: 40px 36px 64px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; align-items: start; }
.profile, .board-column, .project-card, .social-link, dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}
.profile { border-radius: var(--radius); position: sticky; top: 24px; overflow: hidden; }
.window-bar { height: 58px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 22px; font-size: 14px; font-weight: 600; }
.window-bar a { margin-left: auto; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 8px; height: 8px; border: 1px solid var(--muted); border-radius: 50%; }
.window-dots i:first-child { background: var(--accent); border-color: var(--accent); }
.profile-body { padding: 0 20px 22px; }
.identity { position: relative; text-align: center; margin: 0 -20px; }
.avatar-wrap { width: 100%; aspect-ratio: 2 / 3; -webkit-mask-image: linear-gradient(#000 0%, #000 63%, rgba(0,0,0,.7) 77%, transparent 100%); mask-image: linear-gradient(#000 0%, #000 63%, rgba(0,0,0,.7) 77%, transparent 100%); }
.avatar-wrap img { width: 100%; height: 100%; object-fit: contain; }
h1 { position: relative; z-index: 1; font-size: 76px; font-weight: 800; letter-spacing: -.065em; line-height: 1.15; margin: -108px 0 0; padding: 0 12px 8px; text-shadow: 0 3px 5px #080c15, 0 8px 30px #080c15; }
.splash { text-align: center; margin: 12px -3px 26px; font-size: 18px; line-height: 1.65; letter-spacing: -.03em; }
.splash p { margin: 0; }
.splash em { color: var(--accent); font-style: normal; }
.social-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.social-link { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 11px; font-size: 14px; font-weight: 600; min-height: 88px; box-shadow: none; background: rgba(27, 34, 45, .3); transition: background .18s, border-color .18s, transform .18s; }
.social-link img { width: 24px; height: 27px; object-fit: contain; }
.social-link:hover { background: var(--panel-hover); border-color: var(--brand, var(--accent)); transform: translateY(-2px); }
.social-links > .social-link:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; min-height: 52px; }
main { min-width: 0; }

/* Один слой размытого стекла под всем контуром папки: стык не темнеет. */
.current-section { position: relative; isolation: isolate; }
.current-section::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius);
  background: var(--current); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  --folder-mask: url('/static/folder-tab.svg') 0 0 / 190px 44px no-repeat, linear-gradient(#000 0 0) 0 44px / calc(100% - 20px) calc(100% - 44px) no-repeat, linear-gradient(#000 0 0) right 64px / 20px calc(100% - 64px) no-repeat, radial-gradient(circle at 0 100%, #000 20px, transparent 20.5px) right 44px / 20px 20px no-repeat;
  -webkit-mask: var(--folder-mask); mask: var(--folder-mask);
}
.folder-tab { display: flex; align-items: center; gap: 9px; height: 44px; width: 170px; margin: 0; padding: 0 0 0 22px; color: var(--accent); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(207, 239, 118, .1); }
.current-panel { padding: 22px 25px 25px; min-height: 240px; }
.featured { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 25px; align-items: stretch; }
.featured-cover { width: 132px; height: 198px; object-fit: cover; border-radius: 9px; background: rgba(0, 0, 0, .18); }
.featured-info { display: flex; flex-direction: column; min-width: 0; padding: 3px 0; }
.featured h3 { font-size: clamp(25px, 2.4vw, 36px); font-weight: 800; line-height: 1.2; letter-spacing: -.04em; margin: 0 0 14px; }
.title-action { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; }
.title-action:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 500; line-height: 1.35; color: #d5dcca; background: rgba(116, 131, 81, .12); border: 1px solid rgba(194, 213, 156, .22); border-radius: 5px; padding: 3px 7px; overflow-wrap: anywhere; }
.tag, .project-cta, .article-link { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.current-work { font-size: 14px; color: #d0d7c2; margin: 14px 0 0; }
.featured-bottom { display: flex; align-items: center; gap: 24px; margin-top: auto; padding-top: 20px; }
.progress-group { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 90px; }
.progress-value { font-size: 21px; font-weight: 700; letter-spacing: -.05em; color: var(--accent); white-space: nowrap; }
.progress-track { height: 7px; background: rgba(207, 239, 118, .17); flex: 1; max-width: 230px; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 10px; }
.project-cta { display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(207, 239, 118, .35); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; background: rgba(45, 56, 28, .25); color: var(--accent); white-space: nowrap; transition: background .2s; }
.project-cta:hover { background: rgba(207, 239, 118, .1); }
.empty-current { font-size: 20px; margin: 35px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 22px; gap: 15px; }
.section-heading h2 { font-size: 31px; letter-spacing: -.04em; line-height: 1.1; margin: 0; font-weight: 700; text-shadow: 0 2px 12px #0005; }
.project-total { color: var(--muted); font-size: 13px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--column-gap); align-items: start; }
.board-column { min-width: 0; border-radius: 14px; padding: 0 9px 10px; }
.column-heading { min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 12px 4px; }
.column-heading h3 { font-size: 14px; font-weight: 600; margin: 0; }
.column-dot { width: 6px; height: 6px; flex: 0 0 6px; border: 1px solid var(--muted); border-radius: 50%; }
.board-column[data-column=current] .column-dot { background: var(--accent); border-color: var(--accent); }
.board-column[data-column=done] .column-dot { background: var(--muted); }
.column-count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.column-items { display: flex; flex-direction: column; gap: 10px; }
.project-card { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; border-radius: 10px; background: var(--card); padding: 10px; position: relative; min-height: 170px; transition: transform .2s, border-color .2s; box-shadow: none; }
.project-card:has(.card-action:hover), .project-card:has(.card-link:hover) { transform: translateY(-2px); border-color: rgba(207, 239, 118, .4); }
.card-cover { width: 82px; height: 123px; align-self: start; object-fit: cover; background: rgba(0, 0, 0, .18); border-radius: 5px; }
.cover-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, rgba(118, 134, 95, .16), rgba(42, 51, 70, .45)); border: 1px solid var(--line); }
.cover-fallback span { font-size: 28px; line-height: 1; font-weight: 700; letter-spacing: -.07em; color: var(--muted); opacity: .6; }
.card-body { display: flex; flex-direction: column; min-width: 0; padding: 0; }
.card-body h4 { font-size: 16px; font-weight: 700; letter-spacing: -.025em; line-height: 1.35; margin: 0 0 9px; overflow-wrap: anywhere; }
.card-body .tags { margin: 0; gap: 4px; }
.card-body .tag { font-size: 12px; padding: 2px 5px; }
.card-action { border: 0; padding: 0; background: none; color: inherit; text-align: left; font: inherit; }
.card-action::after { content: ''; position: absolute; inset: 0; }
.card-action:focus-visible { outline: none; }
.project-card:has(.card-action:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-description { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 9px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-platforms { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.card-footer { display: flex; justify-content: flex-end; align-items: center; margin-top: auto; min-height: 29px; padding-top: 10px; }
.card-link { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; width: fit-content; position: relative; z-index: 2; color: #cbd6bc; border: 0; background: none; padding: 0; font-size: 13px; line-height: 1.4; text-align: right; }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-site-icon { position: static; flex: 0 0 18px; width: 18px; height: 23px; object-fit: contain; }
.platform-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 24px; }
.platform-icon img { width: 18px; height: 18px; object-fit: contain; opacity: .85; }
.empty-column { font-size: 14px; color: var(--muted); padding: 22px 4px; text-align: center; }
.notice { font-size: 14px; color: var(--muted); margin: -4px 0 22px; }
.retry { border: 0; background: none; color: var(--accent); font: inherit; padding: 4px; text-decoration: underline; }
.noscript { padding: 24px; }

dialog { color: var(--ink); background: rgba(15, 22, 35, .82); border-radius: 18px; padding: 0; width: min(740px, calc(100% - 32px)); max-height: 90dvh; box-shadow: 0 30px 120px #0008; }
dialog::backdrop { background: rgba(4, 8, 16, .6); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.article-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.close-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 16px; }
.close-button:hover { background: var(--panel-hover); }
.article-scroll { overflow: auto; max-height: calc(90dvh - 62px); }
.article-cover-image { width: 100%; max-height: 340px; object-fit: contain; background: rgba(0, 0, 0, .1); }
.article-content { padding: 30px 38px 40px; }
.article-content h2 { font-size: 32px; letter-spacing: -.04em; line-height: 1.25; margin: 16px 0 24px; }
.markdown { overflow-wrap: anywhere; font-size: 16px; line-height: 1.8; }
.markdown h1, .markdown h2, .markdown h3 { font-size: 24px; letter-spacing: -.03em; line-height: 1.3; margin: 28px 0 14px; padding: 0; text-shadow: none; }
.markdown a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.markdown pre { padding: 18px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.markdown code { font-size: 14px; }
.markdown blockquote { border-left: 3px solid var(--accent); margin: 22px 0; padding: 0 20px; color: var(--muted); }
.markdown table { display: block; overflow: auto; border-collapse: collapse; }
.markdown td, .markdown th { padding: 8px; border: 1px solid var(--line); }
.article-link { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 15px; margin-top: 24px; font-size: 14px; font-weight: 600; color: var(--accent); }
body:has(dialog[open]) { overflow: hidden; }

@media (min-width: 1550px) {
  .layout { padding-top: 48px; grid-template-columns: 320px minmax(0, 1fr); gap: 42px; }
  .project-card { grid-template-columns: 96px minmax(0, 1fr); min-height: 174px; gap: 14px; }
  .card-cover { width: 96px; height: 144px; }
  .card-body h4 { font-size: 17px; }
}
@media (max-width: 1250px) {
  .layout { padding: 28px 24px 48px; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
  .profile-body { padding: 0 16px 18px; }
  .identity { margin: 0 -16px; }
  h1 { font-size: 68px; margin-top: -100px; }
  .splash { font-size: 16px; }
  .board { gap: 10px; }
  .board-column { padding: 0 7px 8px; }
  .project-card { grid-template-columns: 65px minmax(0, 1fr); padding: 8px; gap: 9px; }
  .card-cover { width: 65px; height: 100px; }
  .card-body h4 { font-size: 15px; }
  .column-heading { gap: 5px; padding-left: 2px; padding-right: 2px; }
  .column-heading h3 { font-size: 14px; }
}
@media (max-width: 1050px) {
  .board { grid-template-columns: 1fr; gap: 16px; }
  .column-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 10px; min-height: 154px; }
  .card-cover { width: 76px; height: 114px; }
  .featured { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; }
  .featured-cover { width: 112px; height: 168px; }
  .featured-bottom { flex-wrap: wrap; gap: 14px; }
  .featured h3 { font-size: 27px; }
  .current-panel { padding: 20px; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); padding: 20px 16px 40px; gap: 18px; }
  .column-items { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 82px minmax(0, 1fr); gap: 15px; }
  .featured-cover { width: 82px; height: 123px; }
  .featured h3 { font-size: 23px; }
  .progress-group { flex-basis: 100%; }
  .current-panel { padding: 16px; }
  .project-cta { padding: 8px 13px; }
  .social-link { font-size: 13px; padding: 12px; }
  .window-bar { padding: 0 17px; }
}
@media (max-width: 600px) {
  :root { --blur: 14px; }
  .layout { display: flex; flex-direction: column; padding: 16px; gap: 26px; }
  .profile { position: static; width: 100%; }
  .window-bar { height: 48px; }
  .profile-body { padding: 0 18px 20px; }
  .identity { margin: 0; }
  .avatar-wrap { width: min(100%, 290px); margin: 0 auto; }
  h1 { font-size: 72px; margin-top: -104px; }
  .splash { font-size: 18px; margin: 10px 0 22px; }
  .social-link { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 50px; gap: 12px; font-size: 14px; }
  .social-link img { width: 22px; height: 25px; }
  main { width: 100%; }
  .current-panel { min-height: 214px; padding: 17px; }
  .featured { grid-template-columns: 90px minmax(0, 1fr); }
  .featured-cover { width: 90px; height: 135px; }
  .featured h3 { font-size: 23px; }
  .current-work { font-size: 13px; }
  .section-heading { margin: 28px 0 19px; }
  .section-heading h2 { font-size: 29px; }
  .board-column { padding: 0 10px 11px; }
  .column-heading { min-height: 54px; padding: 12px 4px; }
  .column-heading h3 { font-size: 15px; }
  .project-card { grid-template-columns: 95px minmax(0, 1fr); min-height: 167px; gap: 15px; }
  .card-cover { width: 95px; height: 143px; }
  .card-body h4 { font-size: 17px; }
  .card-link { font-size: 14px; }
  .card-site-icon { width: 20px; height: 25px; }
  .article-content { padding: 24px; }
  .article-content h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.project-card.without-cover, .featured.without-cover { grid-template-columns: minmax(0, 1fr); }
.project-card.without-cover { min-height: 120px; }
