/* Fedoniuk portfolio: layout, typography and orbital navigation. */
:root { color-scheme: dark; --bg: #080e20; --surface: #11192c; --ink: #f1f5ff; --text: #bac7df; --muted: #a3b2ce; --line: #33415f; --cyan: #91e9df; --violet: #c0b4ff; --mint: #b3e5ca; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: radial-gradient(ellipse 900px 650px at 65% 260px, #20204a70, transparent), var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--violet); outline-offset: 5px; }
::selection { color: #080e20; background: var(--violet); }
.wrap { width: min(100%, 1224px); margin-inline: auto; padding-inline: 44px; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 15px 18px; color: var(--bg); background: var(--violet); transform: translateY(-180%); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.site-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #33415f80; }
.wordmark { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; min-height: 44px; }
.wordmark-name { font-size: 27px; line-height: 1; letter-spacing: -1.4px; font-weight: 650; }
.wordmark-name span { color: var(--muted); font-weight: 400; }
.wordmark-note { color: var(--muted); font-size: 12px; line-height: 1.6; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
.main-nav { display: flex; gap: 28px; color: var(--text); font-size: 14px; }
.main-nav a, .footer-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; }
.main-nav a:hover, .footer-link:hover, .wordmark:hover { color: var(--cyan); }

.hero { padding-top: 42px; text-align: center; }
.eyebrow { margin: 0 0 15px; color: var(--cyan); font-size: 12px; line-height: 1.8; font-weight: 550; text-transform: uppercase; letter-spacing: 1px; }
.hero h1 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.2; letter-spacing: -1.3px; font-weight: 500; }
.hero-description { max-width: 54ch; margin: 16px auto 0; color: var(--text); font-size: 16px; line-height: 1.75; }
.signal-system { position: relative; isolation: isolate; min-height: 455px; margin-top: 16px; --light-x: 50%; --light-y: 50%; --depth-x: 0px; --depth-y: 0px; }
.signal-system::before { content: ''; position: absolute; z-index: -1; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(210px circle at var(--light-x) var(--light-y), #679cdc40, transparent 75%); opacity: .7; }
.system-art { position: absolute; z-index: -1; inset: 0; overflow: clip; pointer-events: none; }
.orbit-svg { width: 100%; height: 100%; overflow: visible; transform: translate3d(var(--depth-x), var(--depth-y), 0); }
.orbit-path { fill: none; stroke: #394c74; stroke-width: 1; vector-effect: non-scaling-stroke; }
.orbit-habits { stroke-dasharray: 3 8; stroke: #385b63; }
.orbit-crossme { stroke: #514b7b; }
.orbit-dot { fill: var(--cyan); }
.system-axis { stroke: #34415f; stroke-width: .7; stroke-dasharray: 2 7; vector-effect: non-scaling-stroke; }
.signal-system[data-active="skyprint"] .orbit-skyprint { stroke: var(--cyan); stroke-width: 1.7; }
.signal-system[data-active="habits"] .orbit-habits { stroke: var(--mint); stroke-width: 1.7; }
.signal-system[data-active="crossme"] .orbit-crossme { stroke: var(--violet); stroke-width: 1.7; }

.core { position: absolute; top: 49%; left: 50%; width: 190px; margin: 0; transform: translate(-50%, -50%); }
.core-photo { position: relative; width: 190px; height: 190px; padding: 8px; border: 1px solid #6472a0; border-radius: 50%; background: #182443; box-shadow: 0 0 0 11px #6472a025, 0 0 95px #6472a040; }
.core-photo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 24%; }
.core-label { width: max-content; max-width: 220px; margin: 18px auto 0; color: var(--text); font-size: 12px; line-height: 1.6; letter-spacing: .2px; text-transform: none; }
.planet-link { position: absolute; display: flex; align-items: center; gap: 15px; width: 248px; min-height: 84px; padding: 12px; border: 1px solid transparent; border-radius: 16px; text-align: left; background: #080e20e8; }
.planet-link:hover, .planet-link:focus-visible { border-color: var(--planet-accent); background: #111d35; }
.planet-link[aria-current="location"] { border-color: #6472a0; }
.planet-skyprint { top: 31%; left: 3%; --planet-accent: var(--cyan); }
.planet-habits { top: 7%; right: 6%; --planet-accent: var(--mint); }
.planet-crossme { right: 9%; bottom: 9%; --planet-accent: var(--violet); }
.planet { --planet-size: 48px; position: relative; display: block; flex: 0 0 var(--planet-size); width: var(--planet-size); height: var(--planet-size); border: 1px solid #c1e6ff4f; border-radius: 50%; box-shadow: inset -8px -5px 15px #060b2180, 0 0 25px #8caee92b; }
.planet-skyprint .planet { background: radial-gradient(circle at 28% 27%, #d0fffa 0%, #83d6d2 35%, #386a99 75%); }
.planet-skyprint .planet::after { content: ''; position: absolute; inset: 35.4% -18.75%; border: 1px solid #91e9df; border-radius: 50%; transform: rotate(-27deg); }
.planet-habits .planet { background: radial-gradient(circle at 33% 31%, #d4f7df 0%, #8fc5b0 37%, #3d7776 78%); }
.planet-habits .planet::after { content: ''; position: absolute; width: 20.83%; height: 20.83%; top: 22.92%; left: 22.92%; border: 1px solid #3d7776; border-radius: 50%; box-shadow: calc(var(--planet-size) * .3333) calc(var(--planet-size) * .2708) 0 -1px #3d7776; opacity: .55; }
.planet-crossme .planet { background: radial-gradient(circle at 30% 26%, #e1d9ff 0%, #a99be2 35%, #514982 77%); }
.planet-crossme .planet::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background-image: radial-gradient(#20294a66 .7px, transparent .9px); background-size: 5px 5px; }
.planet-copy { display: block; min-width: 0; }
.planet-brand { display: block; color: var(--planet-accent); font-size: 14px; line-height: 1.5; font-weight: 600; }
.planet-title { display: block; margin-top: 4px; color: var(--text); font-size: 12px; line-height: 1.5; }
.system-note { position: absolute; bottom: 5px; left: 50%; width: max-content; max-width: 100%; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; transform: translateX(-50%); }
.system-note::before { content: '+'; margin-right: 9px; color: var(--cyan); }

/* Project list: every description remains visible without JavaScript. */
.showcase { padding-top: 38px; }
.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 44px; padding-bottom: 30px; }
.section-intro .eyebrow { font-size: 12px; letter-spacing: 1.4px; }
.section-intro h2 { margin: 0; font-size: 36px; line-height: 1.2; letter-spacing: -1px; font-weight: 500; }
.section-description { max-width: 40ch; margin: 0; color: var(--text); font-size: 16px; line-height: 1.75; }
.project-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.project-card { --accent: var(--cyan); --scene-light: #6db7e42e; display: grid; grid-template-columns: minmax(0, .44fr) minmax(0, .56fr); grid-template-areas: 'visual heading' 'visual copy' 'visual tags' 'visual footer'; gap: 17px 48px; min-width: 0; padding-block: 42px; border-top: 1px solid var(--line); scroll-margin-top: 28px; }
.project-habits { --accent: var(--mint); --scene-light: #78c4ab30; grid-template-columns: minmax(0, .56fr) minmax(0, .44fr); grid-template-areas: 'heading visual' 'copy visual' 'tags visual' 'footer visual'; }
.project-crossme { --accent: var(--violet); --scene-light: #9e8be236; }
.project-secret { --accent: var(--cyan); --scene-light: #91e9df24; grid-template-columns: minmax(0, .56fr) minmax(0, .44fr); grid-template-areas: 'heading visual' 'copy visual' 'tags visual' 'footer visual'; }
.project-heading { grid-area: heading; min-width: 0; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-bottom: 10px; color: var(--accent); font-size: 14px; line-height: 1.6; }
.project-status { border: 1px solid #526083; padding: 2px 8px; border-radius: 30px; color: var(--violet); font-size: 12px; line-height: 1.6; }
.project-secret .project-status { color: var(--cyan); }
.project-heading h3 { margin: 0; color: var(--ink); font-size: 36px; line-height: 1.22; font-weight: 500; letter-spacing: -1px; }
.project-category { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.project-visual { grid-area: visual; align-self: center; display: flex; flex-direction: column; gap: 16px; min-width: 0; width: 100%; margin: 0; }
.preview-stage { position: relative; isolation: isolate; display: grid; place-items: center; min-width: 0; width: 100%; height: auto; min-height: 296px; padding: 28px 16px; background: radial-gradient(ellipse at 50% 60%, var(--scene-light), transparent 75%); }
.preview-stage::before, .preview-stage::after { content: ''; position: absolute; z-index: -1; box-sizing: border-box; pointer-events: none; border: 1px solid var(--line); border-radius: 3px; }
.preview-stage::before { width: 69%; height: 58%; left: 8%; top: 27%; background: var(--surface); opacity: .7; transform: rotate(-7deg); }
.preview-stage::after { width: 48%; height: 65%; left: 36%; top: 10%; opacity: .85; transform: rotate(7deg); }
.visual-habits .preview-stage::before { width: 78%; height: 44%; left: 4%; top: 40%; background: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 22px 22px; opacity: .48; transform: none; }
.visual-habits .preview-stage::after { width: 30%; height: 72%; left: 47%; top: 9%; background: var(--surface); opacity: .75; transform: rotate(8deg); }
.visual-crossme .preview-stage::before { width: 78%; height: 60%; left: 7%; top: 25%; transform: rotate(-5deg); }
.visual-crossme .preview-stage::after { width: 71%; height: 58%; left: 17%; top: 13%; transform: rotate(5deg); }
.visual-secret .preview-stage::before, .visual-secret .preview-stage::after { display: none; }
.project-visual img.project-mockup { display: block; position: relative; z-index: 1; width: 100%; max-width: 420px; height: 260px; object-fit: contain; border: 0; border-radius: 0; transform: none; filter: drop-shadow(0 17px 22px #02071380); }
.project-visual figcaption { max-width: 35ch; margin-inline: auto; color: var(--text); font-size: 12px; line-height: 1.6; text-align: center; }
.project-copy { grid-area: copy; min-width: 0; max-width: 64ch; color: var(--text); font-size: 16px; line-height: 1.75; }
.project-copy p { margin: 0 0 13px; }
.project-copy p:last-child { margin-bottom: 0; }
.project-tags { grid-area: tags; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; margin: 2px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 1.6; }
.project-tags li::before { content: '·'; padding-right: 7px; color: var(--accent); }
.project-footer { grid-area: footer; min-width: 0; padding-top: 1px; }
.project-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 100%; min-height: 48px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); background: #11192c80; font-size: 16px; line-height: 1.6; font-weight: 600; }
.project-link-label { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.project-link-arrow { flex: 0 0 auto; font-size: 24px; line-height: 1; }
.project-link:hover, .project-link:focus-visible { color: var(--accent); border-color: var(--accent); background: #18243a; box-shadow: 0 4px 22px var(--scene-light); text-decoration: none; }
.telegram-icon { display: block; flex: 0 0 auto; width: 20px; height: 20px; fill: currentColor; }
.teaser-note { display: inline-flex; align-items: center; gap: 11px; min-height: 48px; margin: 0; color: var(--cyan); font-size: 16px; line-height: 1.6; }
.teaser-note::before { content: ''; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; box-shadow: 0 0 12px #91e9df40; }

.contact { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-block: 46px 58px; padding: 35px 0; border-block: 1px solid #33415f; }
.contact .eyebrow { margin-bottom: 12px; }
.contact h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 37px; line-height: 1.2; font-weight: 400; letter-spacing: -1px; }
.contact-description { max-width: 48ch; margin: 15px 0 0; color: var(--text); font-size: 16px; line-height: 1.75; }
.telegram-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 13px 23px; border: 1px solid #6472a0; border-radius: 40px; color: var(--violet); font-size: 22px; line-height: 1.5; white-space: nowrap; }
.telegram-identity { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.telegram-identity .telegram-icon { width: 26px; height: 26px; }
.telegram-arrow { font-size: 29px; }
.telegram-link:hover { background: #182443; border-color: var(--violet); }
.site-footer { background: #050a16; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 102px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--text); font-weight: 500; }

/* Keep media queries in descending width order. */
@media (max-width: 1050px) {
    .wrap { padding-inline: 32px; }
    .project-card { column-gap: 32px; padding-block: 37px; }
    .section-intro { align-items: flex-start; gap: 30px; }
    .project-heading h3 { font-size: 34px; }
    .planet-link { gap: 12px; }
}
@media (max-width: 1050px) and (min-width: 901px) {
    .planet-link { width: 220px; }
    .planet-skyprint { left: 0; }
    .planet-habits, .planet-crossme { right: 0; }
}
@media (max-width: 900px) {
    .hero { padding-top: 39px; }
    .hero h1 { font-size: 36px; letter-spacing: -1px; }
    .signal-system { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; justify-items: center; gap: 25px 18px; max-width: 470px; min-height: 0; margin: 31px auto 0; padding: 12px 14px 22px; }
    .planet-link { position: relative; inset: auto; width: 100%; max-width: 224px; min-height: 112px; flex-direction: column; gap: 10px; text-align: center; padding: 12px 10px; }
    .planet-skyprint { grid-column: 1; grid-row: 1; }
    .planet-habits { grid-column: 2; grid-row: 1; }
    .planet-crossme { grid-column: 1 / -1; grid-row: 3; }
    .core { position: relative; inset: auto; grid-column: 1 / -1; grid-row: 2; width: 160px; transform: none; margin: 4px 0 0; }
    .core-photo { width: 130px; height: 130px; margin-inline: auto; }
    .core-label { margin-top: 16px; }
    .planet { --planet-size: 36px; }
    .system-note { display: none; }
    .orbit-svg { opacity: .72; }
    .contact h2 { font-size: 33px; }
    .telegram-link { padding-inline: 19px; font-size: 19px; }
}
@media (max-width: 800px) {
    .section-intro { display: block; padding-bottom: 27px; }
    .section-intro h2 { font-size: 34px; }
    .section-description { max-width: 48ch; margin-top: 17px; }
    .project-card, .project-habits, .project-secret { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'heading' 'visual' 'copy' 'tags' 'footer'; row-gap: 22px; padding-block: 32px; }
    .project-visual { width: min(460px, 100%); justify-self: center; }
    .preview-stage { min-height: 292px; }
    .project-tags { margin-top: 0; }
}
@media (max-width: 720px) {
    .wrap { padding-inline: 24px; }
    .site-header { min-height: 78px; }
    .main-nav { gap: 20px; }
    .hero h1 { font-size: clamp(28px, 5.6vw, 36px); }
    .hero-description { max-width: 43ch; }
    .contact { display: block; margin-block: 28px 42px; }
    .contact-description { max-width: 47ch; }
    .telegram-link { margin-top: 25px; font-size: 21px; min-height: 59px; }
}
@media (max-width: 600px) {
    .site-header { gap: 12px; }
    .wordmark-name { font-size: 24px; }
    .main-nav { gap: 16px; }
    .main-nav a { gap: 6px; }
}
@media (max-width: 400px) {
    .wrap { padding-inline: 17px; }
    .wordmark-name { font-size: 23px; letter-spacing: -1.1px; }
    .main-nav { gap: 12px; font-size: 13px; }
    .main-nav a { gap: 5px; }
    .hero { padding-top: 32px; }
    .hero h1 { font-size: 29px; letter-spacing: -.8px; }
    .signal-system { gap: 22px 10px; padding-inline: 3px; }
    .planet { --planet-size: 32px; }
    .planet-link { min-height: 108px; padding-inline: 8px; }
    .core-photo { width: 120px; height: 120px; }
    .core-label { max-width: 185px; }
    .showcase { padding-top: 28px; }
    .section-intro h2 { font-size: 32px; }
    .project-card, .project-habits, .project-secret { row-gap: 21px; padding-block: 28px; }
    .project-heading h3 { font-size: 32px; }
    .preview-stage { min-height: 270px; padding: 20px 14px; }
    .project-link { gap: 16px; }
    .contact h2 { font-size: 30px; }
    .footer-inner { align-items: flex-start; padding-block: 24px; gap: 14px; }
    .footer-link { flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .orbit-svg { transform: none; }
}
@media (min-width: 901px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .planet-link { transition: background-color .28s ease, border-color .28s ease; }
    .orbit-path { transition: stroke .38s ease, stroke-width .38s ease; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .project-link { transition: background-color .25s ease, border-color .25s ease, box-shadow .3s ease; }
    .project-link-arrow { transition: transform .25s ease; }
    .project-link:hover .project-link-arrow, .project-link:focus-visible .project-link-arrow { transform: translate(2px, -2px); }
}
