@import url('assets/fonts.css');

:root {
  --background:#080808; --surface:#151515; --text:#e7e4dc; --muted-text:#aaa79f; --border:#393936;
  --accent:#cfff57; --paper:#efede7;
  font:14px 'Manrope','Segoe UI',sans-serif; color:var(--text); background:var(--background); color-scheme:dark; font-synthesis:none;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:84px; }
body { margin:0; min-width:320px; overflow-x:clip; background:radial-gradient(ellipse at 50% 24%,#292929 0,#111 27%,#080808 64%); }
::selection { color:#080808; background:var(--accent); }
button,input { font:inherit; accent-color:var(--accent); }
button,a,input,summary { -webkit-tap-highlight-color:transparent; }
button,a { touch-action:manipulation; }
a { color:inherit; text-decoration:none; }
button { color:inherit; cursor:pointer; }
button:disabled { cursor:default; }
svg { width:18px; height:18px; flex-shrink:0; }
img { display:block; max-width:100%; }
[hidden] { display:none!important; }
h1,h2,h3,h4,p { margin:0; }
p { line-height:1.65; }
ul { padding:0; margin:0; list-style:none; }
:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
.shell { width:min(1240px,calc(100% - 64px)); margin-inline:auto; }
.muted { color:var(--muted-text); }
.micro,.nav-link,.tag,.tags,.footer,.preview-badge { font-family:'Consolas','SFMono-Regular',monospace; font-size:10px; letter-spacing:.07em; }

/* Navigation */
.header { position:relative; z-index:10; width:100%; min-height:76px; padding-inline:clamp(8px,.8vw,16px); display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #ffffff18; }
.brand { position:relative; padding:12px 0; font-size:18px; font-weight:800; letter-spacing:-.08em; }
.brand::after { content:''; position:absolute; right:-8px; top:14px; width:4px; height:4px; border-radius:50%; background:var(--accent); }
.header nav { display:flex; gap:26px; }
.nav-link { position:relative; min-height:40px; display:inline-flex; align-items:center; color:#a09f9a; font-size:9px; transition:color .25s,letter-spacing .25s; }
.nav-link::after { content:''; position:absolute; left:0; right:0; bottom:7px; height:1px; background:var(--accent); transform:scaleX(0); transform-origin:right; transition:transform .28s ease; }
.nav-link:hover { color:var(--paper); letter-spacing:.1em; }
.nav-link:hover::after { transform:scaleX(1); transform-origin:left; }

/* Hero */
.hero { position:relative; isolation:isolate; width:100%; padding-bottom:80px; }
.hero-stage { position:relative; isolation:isolate; height:clamp(610px,70vw,830px); min-height:calc(100svh - 76px); overflow:clip; border-bottom:1px solid #ffffff17; background:#0c0c0c url('assets/hero-backdrop.png') center/cover no-repeat; }
.hero-ambient { position:absolute; z-index:0; inset:-18% -12%; width:124%; height:136%; overflow:visible; color:var(--paper); pointer-events:none; opacity:.8; mask-image:linear-gradient(to bottom,transparent 0%,#000 19%,#000 75%,transparent 100%); }
.hero-ambient ellipse { fill:none; stroke:currentColor; stroke-width:1; opacity:.045; }
.hero-lens { position:absolute; z-index:1; inset:1% 0 auto; width:100%; height:76%; overflow:visible; color:var(--paper); pointer-events:none; }
.hero-word-surface { opacity:0; }
.hero-word-surface.is-ready { opacity:1; }
.hero-word-glitch { opacity:0; pointer-events:none; }
.hero-word-glitch.glitch-red { filter:drop-shadow(1px 0 #ff6474); }
.hero-word-glitch.glitch-cyan { filter:drop-shadow(-1px 0 #8de8ed); }
.hero-lens>.lens-guide { fill:none; stroke:currentColor; stroke-width:1; opacity:.1; }
.hero-name { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.hero-headline { position:absolute; z-index:3; left:0; bottom:88px; color:var(--paper); font-size:clamp(28px,5vw,64px); text-transform:uppercase; }
.portrait-wrap { position:absolute; z-index:2; width:clamp(520px,min(68vw,94svh),960px); top:clamp(24px,8svh,84px); left:48%; transform:translateX(-50%); pointer-events:none; mask-image:linear-gradient(#000 72%,#000e 84%,transparent 98%); }
.portrait { width:100%; height:auto; aspect-ratio:1 / 1; object-fit:contain; filter:grayscale(1) drop-shadow(0 18px 32px #0009); mask-mode:luminance; mask-size:100% 100%; mask-repeat:no-repeat; }
.hero-bottom { position:absolute; z-index:4; inset:auto 0 18px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.hero-actions { display:flex; align-items:center; flex-wrap:wrap; gap:26px; }
.button { min-height:48px; padding:12px 20px; display:inline-flex; align-items:center; justify-content:center; gap:18px; border:1px solid #ffffff45; border-radius:2px; font-size:11px; font-weight:650; transition:color .25s,background .25s,border-color .25s; }
.button-light { color:#0b0b0b; background:var(--paper); border-color:var(--paper); }
.button-light:hover { color:var(--paper); background:transparent; border-color:var(--accent); }
.text-link { position:relative; min-height:42px; padding:0; display:inline-flex; align-items:center; gap:10px; background:none; border:0; font-size:11px; }
.text-link::after { content:''; position:absolute; left:0; right:0; bottom:5px; height:1px; background:var(--accent); transform:scaleX(0); transform-origin:right; transition:transform .25s; }
.text-link:hover::after { transform:scaleX(1); transform-origin:left; }
.text-link svg,.contact-link svg { width:14px; height:14px; transition:transform .22s; }
.text-link:hover svg,.contact-link:hover svg { transform:translate(3px,-3px); }
.music-shortcut { min-height:42px; display:inline-flex; align-items:center; gap:9px; color:var(--muted-text); font-size:10px; }
.music-shortcut:hover { color:var(--paper); }
.music-shortcut svg { width:14px; color:var(--accent); }

/* Restrained entrance and scroll motion */
.motion-ready .header { opacity:0; animation:intro-fade .65s .9s ease-out forwards; }
.motion-ready .hero-lens .lens-top { animation:lens-top-open 1.25s .04s cubic-bezier(.2,.75,.2,1) both; transform-box:fill-box; transform-origin:center; }
.motion-ready .hero-lens .lens-bottom { animation:lens-bottom-open 1.25s .04s cubic-bezier(.2,.75,.2,1) both; transform-box:fill-box; transform-origin:center; }
.motion-ready .hero-word-surface.is-ready { animation:word-reveal .82s .44s cubic-bezier(.2,.8,.2,1) both; }
.motion-ready .hero-word-glitch.is-active { animation:word-glitch .42s steps(1,end) both; }
.motion-ready .portrait { opacity:0; animation:portrait-in 1.05s .38s cubic-bezier(.2,.75,.2,1) forwards; }
.motion-ready .hero-bottom { opacity:0; animation:intro-fade .6s 1s ease-out forwards; }
.motion-ready .reveal { opacity:0; transform:translate3d(0,30px,0); transition:opacity .75s ease,transform .75s cubic-bezier(.2,.75,.2,1); }
.motion-ready .reveal.is-visible { opacity:1; transform:translate3d(0,0,0); }
.motion-ready .stack-section.reveal .stack-group li { opacity:0; transform:translate3d(-18px,0,0); transition:opacity .55s ease,transform .55s ease; }
.motion-ready .stack-section.reveal.is-visible .stack-group li { opacity:1; transform:none; }
.motion-ready .stack-section.reveal.is-visible .stack-group li:nth-child(2) { transition-delay:.08s; }
.motion-ready .stack-section.reveal.is-visible .stack-group li:nth-child(3) { transition-delay:.16s; }
.motion-ready .stack-section.reveal.is-visible .stack-group li:nth-child(4) { transition-delay:.24s; }
.motion-ready .projects-section.reveal .project-art { clip-path:inset(0 100% 0 0); transition:clip-path .9s cubic-bezier(.2,.75,.2,1); }
.motion-ready .projects-section.reveal.is-visible .project-art { clip-path:inset(0); }
.motion-ready .contacts-section.reveal .contact-headline { clip-path:inset(0 0 100% 0); transition:clip-path .8s .12s cubic-bezier(.2,.75,.2,1); }
.motion-ready .contacts-section.reveal.is-visible .contact-headline { clip-path:inset(0); }
@keyframes word-reveal { from { opacity:0; transform:translateX(-18px); } to { opacity:1; transform:none; } }
@keyframes word-glitch {
  0%,8%,54%,100% { opacity:0; clip-path:inset(0); transform:none; }
  14% { opacity:.2; clip-path:inset(25% 0 59% 0); transform:translateX(-2px); }
  22% { opacity:.12; clip-path:inset(67% 0 18% 0); transform:translateX(2px); }
  31% { opacity:.15; clip-path:inset(42% 0 40% 0); transform:translateX(-1px); }
  43% { opacity:.07; clip-path:inset(12% 0 78% 0); transform:translateX(1px); }
}
@keyframes lens-top-open { from { opacity:0; transform:translateY(28px) scaleY(.82); } to { opacity:.1; transform:none; } }
@keyframes lens-bottom-open { from { opacity:0; transform:translateY(-28px) scaleY(.82); } to { opacity:.1; transform:none; } }
@keyframes portrait-in { from { opacity:0; transform:translate3d(0,24px,0) scale(1.03); filter:grayscale(1) blur(8px) drop-shadow(0 18px 32px #0009); } to { opacity:1; transform:none; filter:grayscale(1) blur(0) drop-shadow(0 18px 32px #0009); } }
@keyframes intro-fade { from { opacity:0; transform:translate3d(0,10px,0); } to { opacity:1; transform:none; } }
@keyframes ambient-drift { from { transform:translate3d(-.7%,0,0) scale(1.01); } to { transform:translate3d(.7%,1%,0) scale(1.015); } }

/* Content */
.content { display:grid; gap:0; }
.tree-content { position:relative; overflow:hidden; padding-top:108px; }
.tree-content::before { content:''; position:absolute; z-index:0; top:74px; bottom:0; left:34px; width:1px; background:linear-gradient(#77766f,#ffffff1c 18%,#ffffff12); }
.tree-root { position:absolute; z-index:2; top:24px; left:34px; display:flex; align-items:center; gap:14px; color:var(--paper); }
.tree-root-mark { display:grid; place-items:center; width:48px; height:48px; border:1px solid var(--accent); border-radius:50%; background:#0c0c0c; font:26px 'Barlow Condensed',sans-serif; }
.tree-root-name { color:var(--muted-text); font:10px 'Consolas',monospace; letter-spacing:.12em; text-transform:uppercase; }
.tree-branch { position:relative; z-index:1; margin-left:52px; padding-left:32px; }
.tree-branch::before { content:''; position:absolute; z-index:2; top:52px; left:-52px; width:52px; height:1px; background:#ffffff2a; }
.tree-branch::after { content:''; position:absolute; z-index:3; top:48px; left:-57px; width:9px; height:9px; border:1px solid var(--accent); border-radius:50%; background:#0c0c0c; }
.editorial-section,.community-grid,.music-section { border-top:1px solid #ffffff20; background:#0c0c0c; }
.editorial-section { padding:clamp(64px,9vw,118px) 32px; }
.projects-section { padding-block:clamp(64px,8vw,104px); }
.section-heading { min-height:28px; margin-bottom:34px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.section-heading h2 { font-size:11px; font-weight:650; letter-spacing:.16em; text-transform:uppercase; }
.section-heading h2::before { content:''; display:inline-block; width:18px; height:1px; margin:0 12px 3px 0; background:var(--accent); }
.section-heading>svg { width:16px; height:16px; color:#85847f; }
.section-heading .text-link { min-height:28px; color:var(--muted-text); font-size:10px; }
.project-grid,.community-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.project-grid { grid-template-columns:1fr; gap:72px; margin-top:50px; }
.community-grid>:only-child { grid-column:1/-1; }
.community-grid>:not(:first-child) { border-left:1px solid #ffffff18; }
.panel { position:relative; min-width:0; min-height:250px; padding:38px 32px; overflow:hidden; }
.projects-intro { max-width:560px; margin-top:-12px; font-size:15px; }
.project-card { min-width:0; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); align-items:stretch; border-top:1px solid #ffffff28; border-bottom:1px solid #ffffff28; transition:border-color .25s; }
.project-card:nth-child(even) { grid-template-columns:minmax(280px,.75fr) minmax(0,1.25fr); }
.project-card:nth-child(even) .project-art { order:2; }
.project-card:hover,.project-card:focus-within { border-color:#ffffff70; }
.project-art { position:relative; min-height:360px; display:grid; place-items:center; overflow:hidden; background:linear-gradient(135deg,#1b1b1b,#0c0c0c); }
.art-1 { background:linear-gradient(225deg,#202020,#0c0c0c 68%); }
.project-art::after { content:''; position:absolute; width:160px; height:1px; background:#ffffff1f; transform:rotate(-28deg); }
.art-1::after { transform:rotate(28deg); }
.project-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.2,.7,.2,1),opacity .3s; }
.project-card:hover .project-image { transform:scale(1.02); opacity:.9; }
.art-code { position:relative; z-index:1; color:#d4d2cc; font:48px 'Barlow Condensed',sans-serif; }
.project-art .tag { position:absolute; z-index:2; left:14px; bottom:12px; color:#9b9a95; font-size:8px; text-transform:uppercase; }
.project-body { display:flex; flex-direction:column; justify-content:center; padding:clamp(28px,5vw,64px); }
.project-title { display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.project-title h3 { font-size:clamp(28px,4vw,52px); font-weight:500; line-height:1; letter-spacing:-.055em; }
.project-body>p { margin-top:20px; max-width:440px; font-size:13px; }
.project-meta { display:flex; flex-wrap:wrap; gap:10px 22px; margin-top:24px; color:#d3d1ca; font-size:11px; }
.project-meta span+span::before { content:'—'; margin-right:22px; color:#686762; }
.tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:16px; }
.tags li { color:#969590; font-size:9px; }
.tags li+li::before { content:'/'; margin-right:7px; color:#55544f; }
.project-links { display:flex; gap:18px; margin-top:9px; }
.project-details { color:var(--muted-text); font-size:12px; }
.project-details summary { cursor:pointer; padding-block:10px; }
.project-details p { padding-top:8px; }

.cf-identity { min-height:52px; display:flex; align-items:center; gap:17px; }
.cf-identity h3 { font-size:24px; font-weight:600; letter-spacing:-.04em; overflow-wrap:anywhere; }
.cf-identity p { margin-top:3px; font-size:11px; }
.cf-mark { height:32px; display:flex; align-items:end; gap:4px; flex-shrink:0; }
.cf-mark i { display:block; width:8px; height:22px; background:#dedbd4; }
.cf-mark i:nth-child(2) { height:32px; background:#999893; }
.cf-mark i:nth-child(3) { height:15px; background:#5f5e5a; }
.stats { display:flex; gap:55px; margin:26px 0 0; }
.stat { display:flex; flex-direction:column-reverse; gap:5px; }
.stat dt { color:var(--muted-text); font-size:10px; }
.stat dd { margin:0; color:var(--paper); font:44px 'Barlow Condensed',Impact,sans-serif; }
.club-role { max-width:540px; margin:34px 0 12px; font-size:clamp(30px,3vw,43px); font-weight:500; letter-spacing:-.055em; line-height:1.08; }
.club-panel>p,.club-panel>a { max-width:560px; font-size:12px; }
.about-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr); gap:clamp(40px,8vw,120px); align-items:start; }
.about-lead { max-width:680px; font-size:clamp(46px,7.4vw,96px); line-height:.94; letter-spacing:-.065em; }
.about-copy { max-width:480px; padding-top:10px; color:#bbb9b2; font-size:clamp(15px,1.5vw,19px); line-height:1.7; }
.about-facts { display:grid; grid-template-columns:repeat(3,1fr); margin-top:clamp(60px,8vw,100px); border-top:1px solid #ffffff20; }
.about-facts li { padding:24px 18px 4px 0; color:#999893; font-size:12px; }
.about-facts li:not(:last-child) { border-right:1px solid #ffffff17; }
.experience-section .experience { width:min(76%,900px); margin-left:auto; border-top:1px solid #ffffff24; }
.experience li { display:grid; grid-template-columns:130px 1fr; gap:24px; padding:24px 0; border-bottom:1px solid #ffffff18; }
.experience h4 { font-size:clamp(24px,3vw,38px); font-weight:500; letter-spacing:-.045em; }
.experience li p { margin-top:5px; color:#979691; font-size:12px; }
.stack-intro { max-width:480px; margin-top:-10px; font-size:14px; }
.stack-grid { margin-top:54px; border-top:1px solid #ffffff28; }
.stack-group { display:grid; grid-template-columns:1fr 3fr; gap:30px; padding:28px 0; border-bottom:1px solid #ffffff20; }
.stack-group h3 { color:#85847f; font:10px 'Consolas',monospace; letter-spacing:.08em; text-transform:uppercase; }
.stack-group ul { display:flex; flex-wrap:wrap; gap:10px 34px; }
.stack-group li { font-size:clamp(25px,4vw,52px); line-height:1; letter-spacing:-.045em; transition:color .2s,opacity .2s; }
.stack-group ul:hover li { opacity:.35; }
.stack-group ul li:hover { color:var(--paper); opacity:1; }
.skills-tree-grid { position:relative; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; min-width:0; margin-top:54px; padding-top:46px; }
.skills-tree-grid::before { content:''; position:absolute; z-index:0; top:22px; left:12.5%; right:12.5%; height:1px; background:#ffffff36; }
.skill-tree-branch { position:relative; z-index:1; min-width:0; min-height:260px; padding:28px 20px 30px; border:1px solid #ffffff26; background:#0f0f0f; }
.skill-tree-branch::before { content:''; position:absolute; z-index:0; top:-25px; left:50%; width:1px; height:24px; background:#ffffff36; }
.skill-tree-branch::after { content:''; position:absolute; z-index:2; top:-31px; left:calc(50% - 4px); width:7px; height:7px; border:1px solid var(--accent); border-radius:50%; background:#0c0c0c; }
.skill-tree-branch-head { display:flex; align-items:flex-start; gap:14px; min-height:60px; }
.skill-tree-number { color:var(--accent); font:10px 'Consolas',monospace; letter-spacing:.08em; }
.skill-tree-branch h3 { max-width:100%; font-size:clamp(22px,2.8vw,40px); font-weight:500; letter-spacing:-.055em; line-height:.9; overflow-wrap:anywhere; }
.skill-tree-branch-head p { margin-top:8px; font-size:10px; }
.skill-tree-leaves { margin:22px 0 0 16px; padding-left:18px; border-left:1px solid #ffffff2d; }
.skill-tree-leaf { position:relative; display:flex; align-items:baseline; justify-content:space-between; gap:18px; min-width:0; min-height:36px; padding:9px 0 9px 14px; border-bottom:1px solid #ffffff14; }
.skill-tree-leaf::before { content:''; position:absolute; left:-19px; top:18px; width:18px; height:1px; background:#ffffff2d; }
.skill-tree-label { color:#777671; font:8px 'Consolas',monospace; letter-spacing:.08em; }
.skill-tree-leaf strong,.skill-tree-link { min-width:0; color:var(--paper); font-size:14px; font-weight:500; text-align:right; overflow-wrap:anywhere; }
.skill-tree-link { display:inline-flex; align-items:center; gap:8px; }
.skill-tree-link svg { width:12px; height:12px; }
.skill-tree-branch.skill-github { background:linear-gradient(145deg,#151515,#0d0d0d); }
.skill-tree-branch.skill-codeforces { background:linear-gradient(215deg,#141414,#0d0d0d); }
.skill-tree-branch.skill-github { min-height:300px; transform:translateY(8px); }
.skill-tree-branch.skill-codeforces { min-height:240px; transform:translateY(-8px); }
.skill-tree-branch.skill-student { min-height:270px; transform:translateY(18px); }
.skill-tree-branch.skill-languages { min-height:230px; transform:translateY(-2px); }
.skill-languages .skill-tree-leaves { display:flex; flex-wrap:wrap; gap:9px; margin-left:0; padding:0; border-left:0; }
.skill-languages .skill-tree-leaf { flex:1 1 42%; min-height:54px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; padding:10px 12px; border:1px solid #ffffff22; background:#131313; }
.skill-languages .skill-tree-leaf::before { display:none; }
.skill-languages .skill-tree-leaf strong { font-size:18px; text-align:left; }

/* Profile tree */
.profile-tree-content { position:relative; z-index:2; width:100%; max-width:none; overflow:hidden; margin-top:-80px; }
.profile-tree-section { position:relative; padding:0 32px 58px; background:#0c0c0c; }
.profile-graph { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:100px 16%; width:100%; max-width:1120px; padding:180px 0 28px; margin:0 auto; }
.profile-root-anchor { position:absolute; top:64px; left:50%; width:12px; height:12px; transform:translateX(-50%); pointer-events:none; opacity:0; }
.profile-connector-layer,.profile-connectors { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.profile-connector-layer { z-index:3; }
.profile-connectors-mobile { display:none; }
.profile-tree-stem,.profile-connector { fill:none; stroke:#ffffff38; stroke-width:1.2; vector-effect:non-scaling-stroke; stroke-linecap:square; stroke-linejoin:miter; transition:stroke .25s ease,opacity .25s ease; }
.profile-tree-stem { stroke:#ffffff56; }
.profile-junction { fill:#0c0c0c; stroke:var(--accent); stroke-width:2; vector-effect:non-scaling-stroke; transform-box:fill-box; transform-origin:center; }
.profile-endpoint { fill:#0c0c0c; stroke:#c9c7c0; stroke-width:1.2; vector-effect:non-scaling-stroke; transform-box:fill-box; transform-origin:center; transition:stroke .25s ease,fill .25s ease,opacity .25s ease; }
.profile-node-number { color:var(--accent); font:9px 'Consolas',monospace; letter-spacing:.12em; }
.profile-node { position:relative; z-index:2; min-width:0; min-height:240px; padding:28px; border:1px solid #ffffff24; border-radius:20px; background:linear-gradient(145deg,#1d1e1b,#111210 72%); box-shadow:inset 0 1px 0 #ffffff08,0 18px 48px #0003; transition:border-color .25s ease,background .25s ease,opacity .25s ease; }
.profile-node-contacts { grid-column:1/-1; width:42%; justify-self:center; min-height:0; }
.profile-node-head { display:flex; align-items:flex-start; gap:12px; min-height:48px; }
.profile-node h3 { max-width:100%; font-size:clamp(22px,2.5vw,35px); font-weight:500; line-height:.92; letter-spacing:-.05em; overflow-wrap:anywhere; }
.profile-node-fields { margin-top:22px; border-top:1px solid #ffffff1c; }
.profile-node-fields:empty { display:none; }
.profile-node-field { min-width:0; display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:9px 0; border-bottom:1px solid #ffffff14; }
.profile-node-field>span { color:#74736f; font:8px 'Consolas',monospace; letter-spacing:.08em; }
.profile-node-field strong,.profile-node-link { min-width:0; color:var(--paper); font-size:12px; font-weight:500; text-align:right; overflow-wrap:anywhere; }
.profile-node-link { display:inline-flex; align-items:center; gap:7px; }
.profile-node-link svg { width:11px; height:11px; }
.language-list { margin-top:16px; border-top:1px solid #ffffff24; }
.language-item { position:relative; min-width:0; min-height:43px; display:grid; grid-template-columns:22px 26px minmax(0,1fr); align-items:center; gap:9px; padding:7px 0; border-bottom:1px solid #ffffff18; }
.language-item::after { content:''; position:absolute; right:0; bottom:-1px; width:18%; height:1px; background:var(--accent); opacity:.45; }
.language-index { color:#66655f; font:7px 'Consolas',monospace; letter-spacing:.08em; }
.language-icon { width:23px; height:23px; display:grid; place-items:center; border:1px solid #ffffff38; border-radius:50%; color:#aaa8a1; font:7px 'Consolas',monospace; letter-spacing:-.04em; }
.language-item strong { max-width:100%; color:var(--paper); font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.codeforces-feature { margin-top:4px; }
.codeforces-handle { width:max-content; max-width:100%; display:block; color:var(--paper); font:13px 'Consolas',monospace; overflow-wrap:anywhere; }
.codeforces-status { min-height:13px; margin-top:5px; color:#777671; font:7px 'Consolas',monospace; letter-spacing:.12em; }
.codeforces-feature[data-state='loading'] .codeforces-status::before { content:''; width:4px; height:4px; display:inline-block; margin:0 6px 1px 0; border-radius:50%; background:var(--accent); animation:pulse 1.2s ease-in-out infinite; }
.codeforces-primary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:10px; padding-top:12px; border-top:1px solid #ffffff1c; }
.codeforces-primary:empty { display:none; }
.codeforces-metric { min-width:0; }
.codeforces-metric span { display:block; color:#74736f; font:7px 'Consolas',monospace; letter-spacing:.08em; }
.codeforces-metric strong { display:block; margin-top:5px; color:var(--paper); font-size:clamp(11px,1.15vw,17px); font-weight:500; line-height:1; overflow-wrap:anywhere; }
.codeforces-metric:last-child strong { font-size:10px; }
.codeforces-secondary { margin-top:13px; color:#8b8983; font:7px 'Consolas',monospace; line-height:1.5; letter-spacing:.04em; }
.profile-node-favorite-song { min-height:270px; }
.favorite-song-feature { margin-top:3px; }
.song-status { min-height:12px; color:#777671; font:7px 'Consolas',monospace; letter-spacing:.12em; }
.favorite-song-feature[data-state='loading'] .song-status::before { content:''; width:4px; height:4px; display:inline-block; margin:0 6px 1px 0; border-radius:50%; background:var(--accent); animation:pulse 1.2s ease-in-out infinite; }
.song-identity { min-width:0; display:flex; align-items:center; gap:11px; margin-top:9px; }
.song-cover-slot { width:48px; height:48px; flex:0 0 48px; overflow:hidden; background:#181818; }
.favorite-song-cover { width:100%; height:100%; object-fit:cover; filter:grayscale(1); }
.song-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.song-title { color:var(--paper); font-size:11px; font-weight:600; line-height:1.25; overflow-wrap:anywhere; }
.song-artist { color:#a19f98; font-size:9px; overflow-wrap:anywhere; }
.song-details { color:#6f6e69; font:7px 'Consolas',monospace; }
.song-playback { display:flex; align-items:center; gap:11px; margin-top:14px; }
.song-play,.song-mute { display:grid; place-items:center; flex:0 0 auto; color:var(--paper); border:1px solid #ffffff36; border-radius:50%; background:transparent; }
.song-play { width:30px; height:30px; }
.song-mute { width:23px; height:23px; }
.song-play svg { width:12px; height:12px; }
.song-mute svg { width:10px; height:10px; }
.song-play:disabled,.song-mute:disabled { opacity:.35; }
.song-progress { min-width:0; flex:1; }
.song-times { display:flex; justify-content:space-between; margin-top:1px; color:#777671; font:7px 'Consolas',monospace; }
.song-seek,.song-volume-slider { --range-progress:0%; width:100%; height:16px; margin:0; appearance:none; background:transparent; cursor:pointer; }
.song-seek::-webkit-slider-runnable-track,.song-volume-slider::-webkit-slider-runnable-track { height:1px; background:linear-gradient(to right,var(--accent) 0 var(--range-progress),#ffffff32 var(--range-progress) 100%); }
.song-seek::-webkit-slider-thumb,.song-volume-slider::-webkit-slider-thumb { width:6px; height:6px; margin-top:-2.5px; appearance:none; border:0; border-radius:50%; background:var(--paper); }
.song-seek::-moz-range-track,.song-volume-slider::-moz-range-track { height:1px; background:#ffffff32; }
.song-seek::-moz-range-progress,.song-volume-slider::-moz-range-progress { height:1px; background:var(--accent); }
.song-seek::-moz-range-thumb,.song-volume-slider::-moz-range-thumb { width:6px; height:6px; border:0; border-radius:50%; background:var(--paper); }
.song-volume { display:flex; align-items:center; gap:7px; margin-top:7px; color:#74736f; font:7px 'Consolas',monospace; letter-spacing:.08em; }
.song-volume-slider { width:72px; }
.favorite-song-feature audio { display:none; }
.profile-node:hover,.profile-node:focus-within { border-color:var(--accent); background:#141414; }
.profile-graph[data-active-branch] .profile-connector,.profile-graph[data-active-branch] .profile-endpoint { opacity:.14; }
.profile-graph[data-active-branch='student'] .profile-connector[data-branch='student'],
.profile-graph[data-active-branch='codeforces'] .profile-connector[data-branch='codeforces'],
.profile-graph[data-active-branch='main-languages'] .profile-connector[data-branch='main-languages'],
.profile-graph[data-active-branch='github'] .profile-connector[data-branch='github'],
.profile-graph[data-active-branch='dreams'] .profile-connector[data-branch='dreams'],
.profile-graph[data-active-branch='favorite-song'] .profile-connector[data-branch='favorite-song'],
.profile-graph[data-active-branch='contacts'] .profile-connector[data-branch='contacts'] { opacity:1; stroke:var(--accent); stroke-width:1.7; }
.profile-graph[data-active-branch='student'] .profile-endpoint[data-branch='student'],
.profile-graph[data-active-branch='codeforces'] .profile-endpoint[data-branch='codeforces'],
.profile-graph[data-active-branch='main-languages'] .profile-endpoint[data-branch='main-languages'],
.profile-graph[data-active-branch='github'] .profile-endpoint[data-branch='github'],
.profile-graph[data-active-branch='dreams'] .profile-endpoint[data-branch='dreams'],
.profile-graph[data-active-branch='favorite-song'] .profile-endpoint[data-branch='favorite-song'],
.profile-graph[data-active-branch='contacts'] .profile-endpoint[data-branch='contacts'] { opacity:1; fill:var(--accent); stroke:var(--accent); }
.motion-ready .profile-tree-section.reveal .profile-node { opacity:0; transform:translateY(12px); }
.motion-ready .profile-tree-section.reveal .profile-tree-stem,.motion-ready .profile-tree-section.reveal .profile-connector { stroke-dasharray:1; stroke-dashoffset:1; }
.motion-ready .profile-tree-section.reveal .profile-junction,.motion-ready .profile-tree-section.reveal .profile-endpoint { opacity:0; transform:scale(0); }
.motion-ready .profile-tree-section.reveal.is-visible .profile-tree-stem { stroke-dashoffset:0; transition:stroke-dashoffset .35s .1s linear; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-junction { opacity:1; transform:scale(1); transition:opacity .2s .43s ease,transform .25s .43s ease; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-endpoint { opacity:1; transform:scale(1); transition:opacity .2s 1.48s ease,transform .25s 1.48s ease,stroke .25s ease,fill .25s ease; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector { stroke-dashoffset:0; transition:stroke-dashoffset .75s linear,stroke .25s ease,opacity .25s ease; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='student'] { transition-delay:.95s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='codeforces'] { transition-delay:1.02s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='main-languages'] { transition-delay:1.10s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='github'] { transition-delay:1.18s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='dreams'] { transition-delay:1.26s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='favorite-song'] { transition-delay:1.34s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-connector[data-branch='contacts'] { transition-delay:1.42s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node { opacity:1; transform:none; transition:opacity .45s ease,transform .45s ease,border-color .25s ease,background .25s ease; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-student { transition-delay:1.60s,1.60s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-codeforces { transition-delay:1.67s,1.67s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-main-languages { transition-delay:1.75s,1.75s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-github { transition-delay:1.83s,1.83s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-dreams { transition-delay:1.91s,1.91s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-favorite-song { transition-delay:1.99s,1.99s,0s,0s; }
.motion-ready .profile-tree-section.reveal.is-visible .profile-node-contacts { transition-delay:2.10s,2.10s,0s,0s; }

/* Profile cards: a distinct hierarchy for each kind of content. */
.profile-node-head { align-items:center; gap:10px; min-height:38px; margin-bottom:26px; }
.profile-node-number { align-self:flex-start; padding-top:4px; font-size:10px; }
.profile-node h3 { flex:1; font-size:clamp(20px,2vw,28px); line-height:1.05; letter-spacing:-.045em; font-weight:600; }
.profile-node-symbol { display:grid; place-items:center; flex:0 0 36px; height:36px; border:1px solid #ffffff12; border-radius:11px; color:#b5b8a9; background:#ffffff04; }
.profile-node-symbol svg { width:20px; height:20px; }
.profile-node:hover,.profile-node:focus-within { border-color:#cfff5766; background:linear-gradient(145deg,#24261d,#141510 72%); }
.profile-node-fields { margin-top:0; border-top:0; }
.profile-node-field { gap:14px; padding:13px 0; border-bottom-color:#ffffff0e; }
.profile-node-field:last-child { padding-bottom:0; border-bottom:0; }
.profile-node-field>span { color:#a4a69a; font-size:9px; line-height:1.5; }
.profile-node-field strong,.profile-node-link { font-size:14px; line-height:1.5; }
.profile-node-link { min-height:32px; }
.profile-node-link:hover { color:var(--accent); }
.profile-node-student .profile-node-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.profile-node-student .profile-node-field { display:flex; flex-direction:column; align-items:flex-start; gap:7px; padding:0; border:0; }
.profile-node-student .profile-node-field:first-child,.profile-node-student .profile-node-field:last-child { grid-column:1/-1; }
.profile-node-student .profile-node-field:first-child { padding-bottom:18px; border-bottom:1px solid #ffffff12; }
.profile-node-student .profile-node-field:first-child strong { font-size:clamp(25px,3vw,36px); letter-spacing:-.045em; line-height:1.15; }
.profile-node-student .profile-node-field strong { text-align:left; }
.profile-node-student .profile-node-field:last-child strong { color:#c0c3b7; font-size:12px; }
.codeforces-handle { color:var(--accent); font-size:13px; }
.codeforces-status,.song-status { color:#a4a69a; font-size:9px; line-height:1.5; }
.codeforces-status:empty,.song-status:empty { display:none; }
.codeforces-primary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 18px; margin-top:24px; padding-top:22px; border-top-color:#ffffff12; }
.codeforces-metric span { color:#a4a69a; font-size:9px; }
.codeforces-metric strong { margin-top:8px; font:500 clamp(36px,4vw,52px)/1 'Manrope',sans-serif; letter-spacing:-.065em; }
.codeforces-metric:first-child strong { color:var(--accent); }
.codeforces-metric:last-child { grid-column:1/-1; }
.codeforces-metric:last-child strong { display:inline-block; margin-top:8px; padding:7px 10px; border:1px solid #cfff5726; border-radius:6px; background:#cfff5708; font:10px/1.5 'Consolas',monospace; letter-spacing:.05em; }
.codeforces-secondary { margin-top:20px; color:#a4a69a; font-size:9px; line-height:1.8; }
.language-list { display:grid; gap:10px; margin-top:0; border:0; }
.language-item { grid-template-columns:24px 40px minmax(0,1fr); gap:12px; min-height:64px; padding:10px 14px; border:1px solid #ffffff0d; border-radius:10px; background:#ffffff03; }
.language-item::after { display:none; }
.language-index { font-size:9px; color:#929588; }
.language-icon { width:36px; height:36px; border-radius:9px; border-color:#ffffff1a; background:#ffffff04; color:var(--accent); font-size:11px; }
.language-icon svg { width:26px; height:26px; }
.language-item strong { font-size:19px; letter-spacing:-.03em; }
.profile-node-dreams .profile-node-field { align-items:flex-start; padding:15px 0; }
.profile-node-dreams .profile-node-field>span { flex:0 0 60px; padding-top:3px; font-size:8px; }
.profile-node-dreams .profile-node-field strong { flex:1; text-align:left; font-size:16px; font-weight:400; }
.profile-node-dreams .profile-node-symbol { color:var(--accent); }
.profile-node-favorite-song { min-height:0; background:radial-gradient(ellipse at 100% 0%,#cfff570a,transparent 65%),linear-gradient(145deg,#20221c,#12130f); }
.song-identity { position:relative; gap:16px; margin-top:0; }
.song-identity:has(.song-cover-slot[hidden])::before { content:''; flex:0 0 64px; width:64px; height:64px; border:1px solid #ffffff20; border-radius:50%; background:radial-gradient(circle,#10110e 0 3px,#cfff57 4px 12px,transparent 13px),repeating-radial-gradient(circle,#24271f 0 1px,#11130f 2px 4px); box-shadow:0 6px 14px #0005; }
.song-cover-slot { width:64px; height:64px; flex-basis:64px; border-radius:8px; }
.song-title { font-size:14px; line-height:1.4; }
.song-artist { margin-top:3px; color:#b1b5a5; font-size:11px; }
.song-details { font-size:9px; }
.song-playback { gap:16px; margin-top:24px; }
.song-play { width:48px; height:48px; color:#11130d; border-color:var(--accent); background:var(--accent); }
.song-play:hover { background:var(--paper); border-color:var(--paper); }
.song-play svg { width:19px; height:19px; }
.song-mute { width:36px; height:36px; border-color:#ffffff20; }
.song-mute svg { width:14px; height:14px; }
.song-times { font-size:10px; color:#a4a69a; }
.song-volume { gap:10px; margin-top:16px; font-size:9px; color:#a4a69a; }
.song-seek,.song-volume-slider { height:24px; }
.song-volume-slider { width:96px; }
.song-seek::-webkit-slider-runnable-track,.song-volume-slider::-webkit-slider-runnable-track { height:3px; border-radius:3px; }
.song-seek::-webkit-slider-thumb,.song-volume-slider::-webkit-slider-thumb { width:10px; height:10px; margin-top:-3.5px; }
.song-seek::-moz-range-track,.song-volume-slider::-moz-range-track,.song-seek::-moz-range-progress,.song-volume-slider::-moz-range-progress { height:3px; border-radius:3px; }
.song-seek::-moz-range-thumb,.song-volume-slider::-moz-range-thumb { width:10px; height:10px; }
.profile-node-contacts { background:linear-gradient(130deg,#252a1a,#151710); border-color:#cfff5733; }
.profile-node-contacts .profile-node-field { display:flex; align-items:stretch; flex-direction:column; gap:9px; }
.profile-node-contacts .profile-node-link { display:flex; justify-content:space-between; min-height:52px; padding:12px 15px; border:1px solid #cfff5730; border-radius:10px; background:#cfff5709; text-align:left; font-size:18px; }
.profile-node-contacts .profile-node-link svg { width:17px; height:17px; color:var(--accent); }

/* Player */
.track-info { display:flex; align-items:center; gap:18px; }
.track-info>div:last-child { min-width:0; }
.track-info h3 { font-size:20px; font-weight:600; letter-spacing:-.03em; overflow-wrap:anywhere; }
.track-info p { margin-top:5px; font-size:12px; }
.record-cover { width:82px; height:82px; flex-shrink:0; display:grid; place-items:center; overflow:hidden; }
.cover-image { width:100%; height:100%; object-fit:cover; }
.vinyl { width:78px; height:78px; display:grid; place-items:center; border:1px solid #ffffff26; border-radius:50%; background:repeating-radial-gradient(circle,#333 0 1px,#101010 2px 3px); }
.vinyl span { position:relative; width:25px; height:25px; border-radius:50%; background:#b6b3a9; }
.vinyl span::after { content:''; position:absolute; width:5px; height:5px; top:10px; left:10px; border-radius:50%; background:#111; }
.is-playing .vinyl { animation:spin 6s linear infinite; }
.player { display:flex; align-items:center; gap:16px; margin-top:20px; }
.play-button { width:44px; height:44px; flex-shrink:0; display:grid; place-items:center; color:#0b0b0b; background:#c6c3ba; border:0; border-radius:50%; transition:background .2s; }
.play-button:hover { background:var(--accent); }
.play-button svg { width:15px; height:15px; }
.player-progress { flex:1; min-width:0; }
.player-progress input { width:100%; min-height:24px; margin:0; }
.player-times { display:flex; justify-content:space-between; font-size:9px; }
.player-options { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:7px; }
.quality { color:var(--muted-text); font:9px 'Consolas',monospace; }
.volume { display:flex; align-items:center; }
.icon-button { width:44px; height:44px; display:grid; place-items:center; background:none; border:0; }
.volume-slider { width:65px; }
.player-status { min-height:1em; color:var(--muted-text); }
.player-placeholder { opacity:.5; }
.placeholder-progress { flex:1; height:1px; background:#ffffff24; }

/* Contact and footer */
.contacts-section { padding:54px 32px 58px; border-bottom:1px solid #ffffff20; }
.contact-content { max-width:900px; }
.contact-content .section-heading { margin-bottom:26px; }
.contact-headline { margin-bottom:20px; font-size:clamp(38px,5.4vw,70px); line-height:1; letter-spacing:-.065em; }
.contact-intro { margin-bottom:20px; color:var(--muted-text); font-size:13px; }
.contact-links { display:flex; flex-wrap:wrap; gap:8px 28px; }
.contact-link { min-height:44px; display:flex; align-items:center; gap:14px; font-size:14px; overflow-wrap:anywhere; }
.contact-link.preferred { text-decoration:underline; text-decoration-color:var(--accent); text-underline-offset:5px; }
.contact-content>.text-link { margin-top:10px; }
.footer { min-height:84px; display:flex; align-items:center; justify-content:space-between; gap:24px; color:#75746f; font-size:9px; }
.footer>span::before { content:''; display:inline-block; width:4px; height:4px; margin:0 10px 2px 0; border-radius:50%; background:var(--accent); }
.footer .text-link { font-size:9px; }
.preview-badge { width:max-content; max-width:calc(100% - 32px); margin:0 auto 15px; padding:6px 11px; color:#777671; border:1px solid #2c2c2c; font-size:8px; }
.skip-link { position:fixed; z-index:50; top:10px; left:10px; padding:14px; color:#080808; background:var(--paper); transform:translateY(-150%); }
.skip-link:focus { transform:translateY(0); }
.load-error { padding:48px; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes pulse { 50% { opacity:.25; } }

@media (max-width:1000px) {
  .shell { width:calc(100% - 48px); }
  .hero-stage { height:clamp(570px,75vw,710px); min-height:calc(100svh - 76px); }
  .portrait-wrap { width:clamp(500px,78vw,820px); }
  .panel { padding:32px 26px; }
  .profile-graph { column-gap:12%; }
  .profile-node { padding:23px; }
  .profile-node h3 { font-size:22px; }
  .profile-node-head { flex-wrap:wrap; }
  .profile-node-symbol { flex-basis:30px; height:30px; }
}
@media (max-width:700px) {
  .profile-tree-content { margin-top:-65px; }
  .tree-content { padding-top:92px; }
  .tree-content::before { top:66px; left:20px; }
  .tree-root { top:18px; left:20px; }
  .tree-root-mark { width:40px; height:40px; font-size:22px; }
  .tree-root-name { font-size:8px; }
  .tree-branch { margin-left:30px; padding-left:20px; }
  .tree-branch::before { top:42px; left:-30px; width:30px; }
  .tree-branch::after { top:38px; left:-35px; width:9px; height:9px; }
  .profile-tree-section { padding:0 18px 48px; }
  .profile-graph { grid-template-columns:minmax(0,1fr); gap:18px; padding:28px 0 12px; margin-top:0; }
  .profile-connector-layer { display:none; }
  .profile-node { width:100%; min-height:0; padding:24px 22px; border-radius:16px; }
  .profile-node-contacts { grid-column:auto; }
  .profile-node h3 { font-size:23px; }
  .profile-node-head { gap:8px; margin-bottom:24px; }
  .profile-node-symbol { flex-basis:28px; height:28px; border-radius:8px; }
  .profile-node-symbol svg { width:17px; height:17px; }
  .profile-node-student .profile-node-field:first-child strong { font-size:30px; }
  .codeforces-metric strong { font-size:44px; }
  .profile-node-dreams .profile-node-field { flex-direction:row; gap:12px; }
  .profile-node-dreams .profile-node-field>span { flex-basis:52px; }
  .song-identity { gap:12px; }
  .song-identity:has(.song-cover-slot[hidden])::before { width:48px; height:48px; flex-basis:48px; }
  .profile-node-field { align-items:flex-start; flex-direction:column; gap:4px; }
  .profile-node-field strong,.profile-node-link { text-align:left; }
  html { scroll-padding-top:68px; }
  body { background:radial-gradient(ellipse at 50% 17%,#242424 0,#101010 31%,#080808 60%); }
  .shell { width:calc(100% - 28px); }
  .header { min-height:66px; }
  .brand { font-size:16px; }
  .header nav { gap:16px; }
  .nav-link { font-size:8px; }
  .header nav .nav-link:first-child:not(:last-child) { display:none; }
  .hero { padding-bottom:46px; }
  .hero-stage { height:clamp(500px,145vw,650px); min-height:0; }
  .hero-lens { inset:3% 0 auto; width:100%; height:66%; }
  .portrait-wrap { width:118%; top:8%; left:50%; mask-image:linear-gradient(#000 75%,#000e 86%,transparent 99%); }
  .hero-bottom { position:static; padding-top:19px; flex-wrap:wrap; gap:4px 18px; }
  .hero-actions { gap:18px; }
  .button { min-height:44px; padding:10px 14px; font-size:10px; }
  .text-link,.music-shortcut { font-size:10px; }
  .editorial-section { padding:58px 20px; }
  .projects-section { padding-block:58px; }
  .section-heading { margin-bottom:24px; }
  .section-heading h2 { font-size:9px; letter-spacing:.13em; }
  .section-heading h2::before { width:12px; margin-right:8px; }
  .section-heading .text-link { font-size:8px; }
  .project-grid,.community-grid { grid-template-columns:1fr; }
  .project-grid { gap:54px; margin-top:38px; }
  .project-card,.project-card:nth-child(even) { grid-template-columns:1fr; }
  .project-card:nth-child(even) .project-art { order:0; }
  .project-art { min-height:220px; }
  .project-art::after { width:100px; }
  .art-code { font-size:34px; }
  .project-art .tag { left:9px; bottom:9px; font-size:7px; }
  .project-body { min-width:0; padding:28px 0; }
  .project-title h3 { font-size:32px; }
  .project-body>p { margin-top:14px; font-size:12px; }
  .project-links { flex-wrap:wrap; gap:0 12px; }
  .project-links .text-link { min-height:34px; }
  .community-grid>:not(:first-child) { border-top:1px solid #ffffff18; border-left:0; }
  .panel { min-height:0; padding:31px 24px 36px; }
  .cf-identity h3 { font-size:19px; }
  .stats { gap:44px; margin-top:20px; }
  .stat dd { font-size:39px; }
  .club-role { max-width:300px; margin-top:28px; font-size:33px; }
  .about-grid { grid-template-columns:1fr; gap:34px; }
  .about-lead { font-size:48px; }
  .about-copy { padding:0; }
  .about-facts { grid-template-columns:1fr; margin-top:54px; }
  .about-facts li { padding:17px 0; border-bottom:1px solid #ffffff15; }
  .about-facts li:not(:last-child) { border-right:0; }
  .stack-group { grid-template-columns:1fr; gap:22px; }
  .experience-section .experience { width:100%; }
  .experience li { grid-template-columns:1fr; gap:8px; }
  .stack-grid { margin-top:40px; }
  .skills-tree-grid { grid-template-columns:1fr; gap:28px; margin-top:40px; padding:18px 0 0 28px; }
  .skills-tree-grid::before { top:0; bottom:0; left:10px; right:auto; width:1px; height:auto; }
  .skill-tree-branch,.skill-tree-branch:nth-child(3),.skill-tree-branch:nth-child(4) { grid-column:auto; min-height:0; margin:0; padding:24px 20px 26px; transform:none; }
  .skill-tree-branch::before { top:50%; left:-29px; width:28px; height:1px; }
  .skill-tree-branch::after { top:calc(50% - 4px); left:-35px; }
  .skill-tree-branch h3 { font-size:32px; }
  .skill-tree-leaf strong,.skill-tree-link { font-size:12px; }
  .skill-languages .skill-tree-leaf strong { font-size:16px; }
  .stack-group ul { gap:12px 22px; }
  .stack-group li { font-size:31px; }
  .record-cover { width:74px; height:74px; }
  .vinyl { width:72px; height:72px; }
  .contacts-section { padding:58px 20px; }
  .contact-headline { max-width:310px; font-size:42px; }
  .contact-links { flex-direction:column; gap:0; }
  .footer { min-height:74px; font-size:8px; }
  .preview-badge { font-size:7px; }
}
@media (max-width:370px) {
  .profile-tree-section { padding-inline:8px; }
  .profile-node-head { display:grid; grid-template-columns:1fr auto; gap:14px 8px; }
  .profile-node-head h3 { grid-row:2; grid-column:1/-1; }
  .profile-node-number { grid-row:1; }
  .profile-node-symbol { grid-row:1; grid-column:2; width:28px; }
  .codeforces-metric strong { font-size:32px; }
  .header nav { gap:10px; }
  .project-card { grid-template-columns:34% 1fr; }
  .project-body { padding-inline:11px; }
  .project-title h3 { font-size:15px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; }
  .motion-ready .header,.motion-ready .hero-word-surface.is-ready,.motion-ready .portrait,.motion-ready .hero-bottom,.motion-ready .reveal,.motion-ready .hero-lens path { opacity:1; transform:none; clip-path:none; scale:1; }
  .motion-ready .hero-word-glitch { display:none; }
  .motion-ready .hero-stage::before { animation:none; }
  .motion-ready .stack-section.reveal .stack-group li,.motion-ready .projects-section.reveal .project-art,.motion-ready .contacts-section.reveal .contact-headline { opacity:1; transform:none; clip-path:none; }
}
