:root {
  --bg: #080c14;
  --panel: #0d1823;
  --deep: #060b11;
  --line: rgba(124, 227, 242, .24);
  --ice: #e9f2f7;
  --muted: #a8b9c9;
  --red: #ff3d5e;
  --cyan: #77ebf2;
  --amber: #f0e375;
  --mono: Consolas, 'Courier New', monospace;
  --display: 'Bahnschrift Condensed', 'Arial Narrow', Impact, 'Arial Black', sans-serif;
  --body: 'Segoe UI', Inter, Arial, sans-serif;
  --notch: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; min-width: 280px; background: var(--bg); color: var(--ice); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
::selection { background: var(--red); color: white; }
.content-width { width: min(100%, 1460px); margin-inline: auto; padding-inline: clamp(24px, 6vw, 102px); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 200; padding: 12px; background: white; color: black; }
.skip-link:focus { top: 12px; }

/* Header + desktop menu */
.site-header { position: fixed; inset: 0 0 auto; height: 86px; z-index: 50; display: grid; align-items: center; grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); gap: 28px; padding: 0 clamp(22px, 3.4vw, 56px); background: linear-gradient(180deg, rgba(5, 10, 17, .97), rgba(6, 12, 21, .88)); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(155, 226, 237, .15); }
.site-header::after { position: absolute; content: ''; right: 5%; bottom: -1px; width: 124px; height: 2px; background: var(--red); box-shadow: 0 0 15px rgba(255, 61, 94, .55); }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 12px; }
.brand-avatar { width: 44px; height: 44px; flex: none; background: var(--red); padding: 2px; clip-path: polygon(0 0, 86% 0, 100% 14%, 100% 100%, 15% 100%, 0 85%); }
.brand-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; clip-path: inherit; }
.brand-name { display: flex; flex-direction: column; font: 900 20px/.96 var(--display); letter-spacing: .065em; white-space: nowrap; }
.brand-name strong { color: var(--red); }
.brand-name small { margin-top: 6px; font: 8px var(--mono); letter-spacing: .14em; color: #aebcca; }
.desktop-nav { display: flex; align-self: stretch; align-items: center; justify-content: center; gap: clamp(14px, 2.7vw, 45px); }
.nav-item { height: 100%; display: flex; align-items: center; gap: 11px; position: relative; padding: 0 3px; color: #cad5de; font: 700 11px var(--mono); letter-spacing: .08em; transition: color .2s ease; }
.nav-number { font-size: 9px; color: var(--red); }
.nav-item::after { content: ''; position: absolute; height: 2px; left: 0; right: 0; bottom: 0; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav-item:hover, .nav-item.is-current { color: white; }
.nav-item:hover::after, .nav-item.is-current::after { transform: scaleX(1); }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 23px; }
.connection-status { white-space: nowrap; font: 700 9px var(--mono); letter-spacing: .07em; color: #c4d4dc; }
.status-pulse { width: 6px; height: 6px; display: inline-block; flex: none; vertical-align: middle; background: var(--cyan); box-shadow: 0 0 12px rgba(119, 235, 242, .8); border-radius: 50%; margin-right: 8px; }
.header-connect { min-width: 105px; position: relative; padding: 11px 14px 11px 15px; background: rgba(6, 21, 30, .6); color: white; border: 0; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); font: 700 10px var(--mono); letter-spacing: .07em; box-shadow: inset 0 0 0 1px rgba(119, 235, 242, .55); transition: background .2s; }
.header-connect:hover { background: #193442; }
.header-connect span { color: var(--red); margin-left: 10px; font-size: 16px; }
.menu-toggle { display: none; padding: 9px; width: 42px; height: 42px; border: 1px solid rgba(119, 235, 242, .5); background: rgba(7, 19, 27, .9); clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.menu-toggle span { width: 20px; height: 2px; display: block; margin: 4px auto; background: var(--cyan); }
/* Right-side sliding navigation for touch devices */
.nav-backdrop { position: fixed; inset: 0; z-index: 59; background: rgba(0, 4, 10, .72); backdrop-filter: blur(5px); }
.nav-backdrop[hidden] { display: none; }
.mobile-nav { position: fixed; inset: 0 0 0 auto; width: min(375px, 89vw); height: 100dvh; z-index: 60; padding: 25px 26px 40px; background: #0b1621; border-left: 1px solid var(--red); box-shadow: -20px 0 65px rgba(0,0,0,.6); display: flex; flex-direction: column; transform: translateX(105%); visibility: hidden; transition: transform .28s ease, visibility .28s ease; }
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 42px; border-bottom: 1px solid var(--line); color: var(--cyan); font: bold 10px var(--mono); letter-spacing: .13em; }
.nav-close { width: 35px; height: 35px; color: var(--ice); border: 1px solid var(--line); background: rgba(119,235,242,.06); font-size: 25px; }
.drawer-link { display: flex; gap: 13px; align-items: center; padding: 22px 0; font: 900 clamp(25px, 7vw, 34px) var(--display); border-bottom: 1px solid var(--line); letter-spacing: .02em; transition: color .2s; }
.drawer-link > span:first-child { color: var(--red); font: 11px var(--mono); }
.drawer-link > span:last-child { margin-left: auto; color: var(--cyan); font-size: 22px; }
.drawer-link.is-current, .drawer-link:hover { color: var(--cyan); }
.drawer-bottom { font: 700 12px var(--mono); margin-top: auto; color: #e7f5f8; letter-spacing: .03em; }
.drawer-bottom small { display: block; margin-top: 13px; color: #778b9c; font: 9px var(--mono); letter-spacing: .13em; }

/* Common Cyberpunk button: layered polygon outline, technical slot and trace */
.cyber-button { --button-fill: #0c1b25; --button-border: var(--cyan); --button-color: var(--ice); min-height: 59px; isolation: isolate; position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 19px 16px 21px; border: 0; background: transparent; color: var(--button-color); font: 900 12px var(--mono); letter-spacing: .075em; white-space: nowrap; clip-path: var(--notch); transition: filter .2s, transform .2s; }
.cyber-button::before { content: ''; position: absolute; inset: 0; z-index: -2; clip-path: inherit; background: var(--button-border); }
.cyber-button::after { content: ''; position: absolute; inset: 1px; z-index: -1; clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 15px)); background: var(--button-fill); }
.cyber-button:hover { transform: translateY(-3px); filter: brightness(1.18) drop-shadow(0 0 18px rgba(255, 61, 94, .18)); }
.cyber-button-primary { --button-fill: #f63e5a; --button-border: #ffd1d9; --button-color: #080c14; }
.cyber-button-outline { --button-fill: rgba(7, 22, 31, .91); --button-border: #61abb7; --button-color: var(--ice); }
.button-tag { color: rgba(6, 20, 27, .66); font-size: 10px; flex: none; }
.cyber-button-outline .button-tag { color: var(--cyan); }
.button-arrow { align-self: center; padding-left: 15px; font-size: 21px; font-weight: 400; border-left: 1px solid currentColor; line-height: 22px; }

/* Landing page: one cinematic hero, one secondary invitation */
.hero { position: relative; display: flex; align-items: center; height: max(760px, 100svh); overflow: hidden; background: #080f18; }
.hero-backdrop { position: absolute; inset: 0; overflow: hidden; background: url('assets/night-city-poster.jpg') center / cover no-repeat; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 51% 50%; filter: saturate(.91) brightness(.84); }
.hero-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,9,17,.97) 0%, rgba(5,9,17,.91) 24%, rgba(5,9,17,.71) 53%, rgba(5,9,17,.29) 100%), linear-gradient(0deg, #080c14 0%, transparent 31%), linear-gradient(180deg, rgba(5,8,14,.45), transparent 30%); }
.hero-scanlines { position: absolute; inset: 0; pointer-events: none; opacity: .14; background: repeating-linear-gradient(180deg, transparent 0 4px, rgba(1, 5, 10, .75) 5px 6px); }
.hero-traces { position: absolute; width: 670px; height: 460px; top: 29%; pointer-events: none; background: url('assets/circuit-traces.svg') center/contain no-repeat; mix-blend-mode: screen; }
.trace-right { right: -145px; opacity: .37; }
.trace-left { left: -540px; bottom: 4%; top: auto; opacity: .24; transform: rotate(180deg); }
.edge-label { position: absolute; z-index: 2; pointer-events: none; color: #88a2b4; font: 9px var(--mono); letter-spacing: .19em; }
.edge-label-left { left: 22px; top: 47%; transform: rotate(-90deg) translateX(-50%); transform-origin: left top; }
.edge-label-left span { color: var(--red); margin-left: 8px; }
.edge-label-right { right: 23px; top: 44%; writing-mode: vertical-rl; }
.hero-content { position: relative; z-index: 2; width: 100%; padding-top: 126px; padding-bottom: 80px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .56fr); align-items: center; column-gap: clamp(25px, 4vw, 72px); }
.hero-text { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 15px; color: #e4f0f4; font: 700 11px var(--mono); letter-spacing: .15em; }
.eyebrow-num { color: var(--red); }
.signal-line { height: 1px; width: 40px; flex: none; background: var(--red); box-shadow: 0 0 12px rgba(255,61,94,.65); }
.intro-tag { margin: 38px 0 16px; font: 800 clamp(12px, 1.17vw, 16px) var(--mono); color: var(--cyan); letter-spacing: .13em; }
.hero h1 { margin: 0 0 26px; font: 900 clamp(83px, 10.5vw, 160px)/.79 var(--display); letter-spacing: -.06em; text-transform: uppercase; white-space: nowrap; text-shadow: 3px 5px 0 rgba(0,0,0,.42); }
.hero h1 > span { color: var(--red); font-style: italic; }
.hero .period { color: var(--ice); }
.hero-quote { max-width: 640px; margin: 0 0 16px; color: var(--ice); font: 900 clamp(14px, 1.46vw, 21px) var(--mono); letter-spacing: .045em; line-height: 1.5; }
.hero-quote em { font-style: normal; color: var(--cyan); }
.hero-body { max-width: 525px; margin: 0; color: #bdcbd7; font-size: clamp(13px, 1.16vw, 16px); line-height: 1.8; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.identity-panel { position: relative; transform: rotate(3deg); justify-self: end; width: min(100%, 302px); filter: drop-shadow(20px 25px 29px rgba(0,0,0,.5)); border: 2px solid var(--red); background: var(--deep); }
.identity-top, .identity-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; color: var(--ice); background: #0b1924; font: 700 9px var(--mono); letter-spacing: .08em; }
.identity-top span:last-child, .identity-bottom span { color: var(--cyan); }
.identity-photo { display: block; aspect-ratio: 1; width: 100%; object-fit: cover; }
.identity-bottom { border-top: 2px solid var(--red); }
.identity-bracket { position: absolute; width: 39px; height: 39px; pointer-events: none; }
.identity-bracket-tl { top: -12px; left: -12px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.identity-bracket-br { bottom: -12px; right: -12px; border-right: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); }
.hero-bottom { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2; display: flex; justify-content: space-between; gap: 20px; color: #b8c9d4; font: 10px var(--mono); letter-spacing: .12em; }
.hero-bottom::before { content: ''; position: absolute; left: clamp(24px, 6vw, 102px); right: clamp(24px, 6vw, 102px); top: -16px; border-top: 1px solid rgba(155,226,237,.14); }
.down-arrow { margin-left: 13px; color: var(--red); font-size: 17px; }
.hero-microtext { color: #7799a7; }

.join-section { min-height: 490px; position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; padding-block: 105px; border-top: 1px solid rgba(119,235,242,.19); background: radial-gradient(ellipse at 80% 30%, rgba(29,84,105,.23), transparent 44%), #0a111a; }
.join-section::before { content: ''; position: absolute; inset: 0; z-index: -2; opacity: .11; background: url('assets/night-city-poster.jpg') center 48% / cover; filter: grayscale(.55); }
.join-section::after { content: ''; position: absolute; z-index: -1; left: 0; top: 0; height: 100%; width: 3px; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.join-traces { position: absolute; right: -120px; top: -80px; width: 720px; height: 560px; opacity: .3; background: url('assets/circuit-traces.svg') center/contain no-repeat; }
.join-content { z-index: 2; position: relative; width: 100%; }
.join-content h2 { margin: 22px 0 16px; font: 900 clamp(52px, 6.4vw, 96px)/.94 var(--display); letter-spacing: -.035em; }
.join-content h2 span { color: var(--red); }
.join-content p { max-width: 530px; margin: 0 0 27px; line-height: 1.85; color: #b8c6d2; font-size: 15px; }
.join-footnote { margin-top: 22px; color: #91aeba; font: 10px var(--mono); letter-spacing: .1em; }
.join-watermark { position: absolute; bottom: -83px; right: 7%; font: 900 340px var(--display); letter-spacing: -.08em; color: rgba(119,235,242,.035); user-select: none; pointer-events: none; }

/* Projects archive on its own URL, never a home-page section */
.projects-page { min-height: 100svh; overflow: hidden; isolation: isolate; position: relative; background: #0b121c; }
.projects-grid-bg { position: absolute; inset: 0; z-index: -2; opacity: .5; background-image: linear-gradient(rgba(128, 186, 209, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(128, 186, 209, .075) 1px, transparent 1px); background-size: 64px 64px; }
.projects-circuits { position: absolute; z-index: -1; right: -160px; top: 65px; width: 750px; height: 600px; opacity: .13; background: url('assets/circuit-traces.svg') center / contain no-repeat; }
.projects-layout { padding-top: 175px; padding-bottom: 85px; }
.projects-intro { margin-bottom: 55px; }
.project-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-top: 26px; }
.project-heading-row h1 { margin: 0; font: 900 clamp(59px, 8.2vw, 120px)/.94 var(--display); letter-spacing: -.035em; }
.project-heading-row h1 span { color: var(--cyan); }
.project-heading-row > p { max-width: 310px; color: #b6c6d0; line-height: 1.75; margin: 0 0 9px; font-size: 14px; }
.project-list { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .9fr); gap: 19px; }
.feature-project, .upcoming-project { min-height: 480px; position: relative; overflow: hidden; border: 1px solid rgba(162,226,240,.22); background: #101b27; }
.feature-project { display: flex; flex-direction: column; justify-content: space-between; padding: 25px 30px 20px; }
.feature-project::before { content: ''; position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg, rgba(11,20,32,.98), rgba(11,20,32,.86) 65%, rgba(11,20,32,.42)); pointer-events: none; }
.project-circuit-art { position: absolute; inset: 0; background: radial-gradient(circle at 83% 40%, rgba(181,20,51,.36), transparent 43%), url('assets/circuit-traces.svg') 125% 48% / 660px auto no-repeat; opacity: .76; }
.project-circuit-art .project-huge-number { position: absolute; right: -10px; top: 65px; font: 900 290px var(--display); color: rgba(255,61,94,.13); }
.speed-stripe { position: absolute; width: 210px; height: 4px; background: var(--red); transform: rotate(-45deg); }
.speed-stripe-one { right: 25px; bottom: 60px; }.speed-stripe-two { right: -70px; bottom: 75px; opacity: .3; }
.project-meta, .project-footer { display: flex; justify-content: space-between; position: relative; z-index: 2; gap: 20px; color: #a6bac5; font: 10px var(--mono); letter-spacing: .08em; }
.project-state { color: var(--cyan); }
.feature-content { position: relative; z-index: 2; padding-block: 27px; }
.project-kicker { font: 700 10px var(--mono); color: var(--cyan); letter-spacing: .17em; }
.feature-content h2 { font: 900 clamp(56px, 5.9vw, 90px)/.86 var(--display); letter-spacing: -.02em; margin: 18px 0 22px; }
.feature-content h2 span { color: var(--red); }
.feature-content p { max-width: 430px; margin: 0 0 29px; color: #bdcbd8; font-size: 14px; line-height: 1.75; }
.feature-content .cyber-button { min-height: 54px; }
.upcoming-project { display: flex; flex-direction: column; justify-content: space-between; padding: 25px 27px; background: linear-gradient(140deg, #182934, #0b131d 67%); }
.upcoming-project::before { content: ''; position: absolute; inset: 0; opacity: .3; background: url('assets/circuit-traces.svg') 100% 50% / 670px auto no-repeat; }
.upcoming-top, .upcoming-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; font: 10px var(--mono); letter-spacing: .08em; color: #92acb9; }
.corner-cross { color: var(--cyan); font-size: 22px; }
.upcoming-core { position: relative; }
.upcoming-star { display: block; color: var(--cyan); font-size: 66px; line-height: 1; margin-bottom: 20px; }
.upcoming-core h2 { font: 900 clamp(48px, 4.5vw, 64px)/.95 var(--display); margin: 13px 0 20px; }
.upcoming-core h2 span { color: var(--red); }
.upcoming-core p { max-width: 300px; color: #b6c6d0; font-size: 14px; line-height: 1.75; }
.upcoming-footer { color: var(--red); }
.back-home { display: inline-flex; gap: 14px; margin-top: 40px; padding-bottom: 6px; color: var(--cyan); font: 700 11px var(--mono); letter-spacing: .08em; border-bottom: 1px solid var(--cyan); }
.back-home span { color: var(--red); font-size: 17px; }

/* Footer and placeholder dialogs */
.site-footer { padding: 25px 0 32px; border-top: 1px solid rgba(119,235,242,.14); background: #050911; }
.footer-layout { display: flex; flex-wrap: wrap; gap: 18px 30px; justify-content: space-between; align-items: center; }
.footer-brand { font: 900 20px var(--display); letter-spacing: .04em; white-space: nowrap; }
.footer-brand span { color: var(--red); }
.footer-layout > span, .footer-layout > a:last-child { color: #89a1af; font: 9px var(--mono); letter-spacing: .07em; }
.footer-layout > a:last-child:hover { color: var(--cyan); }
.link-dialog { position: fixed; width: min(435px, calc(100vw - 30px)); padding: 33px; border: 1px solid var(--red); background: #0d1a26; color: white; box-shadow: 0 20px 80px rgba(0,0,0,.7); }
.link-dialog::backdrop { background: rgba(1,5,10,.81); backdrop-filter: blur(7px); }
.dialog-kicker { font: 11px var(--mono); color: var(--cyan); letter-spacing: .08em; }
.link-dialog h2 { font: 900 47px var(--display); margin: 15px 0 12px; }
.link-dialog p { color: #b8c5d1; font-size: 14px; line-height: 1.7; }
.dialog-close { position: absolute; top: 9px; right: 14px; color: white; border: 0; background: transparent; font-size: 28px; }
.dialog-ok { margin-top: 10px; }

@media (max-width: 1240px) {
  .connection-status { display: none; }
  .site-header { gap: 18px; }
  .hero h1 { font-size: clamp(78px, 10.3vw, 132px); }
  .identity-panel { width: 250px; }
}
@media (max-width: 950px) {
  .site-header { height: 74px; grid-template-columns: 1fr auto; }
  .desktop-nav, .header-connect { display: none; }
  .menu-toggle { display: block; }
  .hero { min-height: 850px; height: auto; }
  .hero-content { grid-template-columns: 1fr; padding-top: 180px; padding-bottom: 200px; }
  .hero h1 { font-size: clamp(76px, 12.2vw, 125px); }
  .identity-panel { width: 190px; position: absolute; right: 7%; bottom: 70px; transform: rotate(6deg); opacity: .8; }
  .hero-body { max-width: 490px; }
  .project-list { grid-template-columns: 1fr; }
  .upcoming-project { min-height: 330px; }
  .upcoming-star { position: absolute; right: 8%; top: -10px; }
  .projects-layout { padding-top: 140px; }
}
@media (max-width: 630px) {
  .site-header { padding-inline: 20px; }
  .brand-avatar { height: 39px; width: 39px; }
  .brand-name { font-size: 16px; }
  .brand-name small { font-size: 7px; }
  .hero { min-height: 850px; }
  .hero-backdrop::after { background: linear-gradient(90deg, rgba(5,9,17,.97), rgba(5,9,17,.80)), linear-gradient(0deg,#080c14,transparent 38%); }
  .hero-video { object-position: 61% 50%; }
  .hero-content { padding-top: 155px; padding-bottom: 200px; }
  .hero h1 { font-size: clamp(60px, 16.3vw, 94px); margin-bottom: 23px; }
  .intro-tag { font-size: 10px; margin-top: 37px; }
  .eyebrow { font-size: 9px; gap: 9px; }
  .signal-line { width: 26px; }
  .hero-quote { font-size: 12px; line-height: 1.75; max-width: 350px; }
  .hero-body { max-width: 350px; font-size: 13px; line-height: 1.7; }
  .hero-actions { margin-top: 25px; gap: 11px; }
  .cyber-button { font-size: 10px; min-height: 53px; gap: 12px; padding: 12px 14px; }
  .button-arrow { padding-left: 9px; font-size: 18px; }
  .identity-panel { right: 9%; width: 124px; bottom: 66px; opacity: .68; }
  .identity-top, .identity-bottom { font-size: 6px; padding: 6px; }
  .identity-bracket { width: 22px; height: 22px; }
  .hero-microtext, .edge-label { display: none; }
  .hero-bottom { font-size: 9px; }
  .hero-traces { opacity: .15; right: -425px; }
  .join-section { min-height: 455px; padding-block: 85px; }
  .join-content h2 { font-size: clamp(48px, 11.6vw, 70px); }
  .join-content p { font-size: 13px; }
  .join-watermark { font-size: 195px; right: 4%; bottom: -55px; }
  .join-traces { right: -520px; opacity: .22; }
  .projects-layout { padding-top: 135px; padding-bottom: 60px; }
  .project-heading-row { display: block; }
  .project-heading-row h1 { font-size: clamp(54px, 12vw, 80px); }
  .project-heading-row > p { font-size: 13px; margin-top: 20px; }
  .feature-project { min-height: 470px; padding: 23px 20px 19px; }
  .project-meta { font-size: 8px; }.project-meta span:last-child { display: none; }
  .feature-content h2 { font-size: clamp(48px, 11vw, 66px); }
  .feature-content p, .upcoming-core p { font-size: 13px; }
  .project-footer { font-size: 8px; }
  .upcoming-project { padding: 24px 20px; }
  .footer-layout { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 375px) {
  .hero h1 { font-size: clamp(53px, 16.1vw, 60px); }
  .hero-quote { font-size: 11px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .cyber-button { width: 238px; }
  .hero { min-height: 885px; }
  .identity-panel { width: 110px; right: 5%; bottom: 63px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-video { display: none; }
}
/* Keep the small-screen layout readable: the logo remains visible in the header. */
@media (max-width: 630px) {
  .identity-panel { display: none; }
  .hero-content { padding-bottom: 130px; }
  .hero { min-height: 800px; }
}
/* Decorative circuitry must never compete with content. */
.project-circuit-art { opacity: .42; }
.upcoming-project::before { opacity: .16; }
@media (max-width: 630px) {
  .project-circuit-art { opacity: .19; }
  .upcoming-project::before { opacity: .10; }
}

/* === V4 refinements: better hero balance + atmospheric scroll section === */
.hero-content {
  grid-template-columns: minmax(0, 1.08fr) minmax(220px, 300px) minmax(170px, .5fr);
  column-gap: clamp(24px, 3vw, 56px);
}
.hero-text { max-width: 700px; }
.identity-panel {
  justify-self: center;
  align-self: center;
  width: min(100%, 286px);
  transform: rotate(2.5deg) translateX(-8px);
}
.identity-panel::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 15%;
  width: 20px;
  height: 55%;
  border-left: 2px solid rgba(116, 238, 242, .72);
  border-top: 2px solid rgba(116, 238, 242, .72);
  border-bottom: 2px solid rgba(116, 238, 242, .72);
  opacity: .7;
}
.identity-panel::after {
  content: '';
  position: absolute;
  right: -24px;
  bottom: 12%;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, rgba(116,238,242,0), rgba(116,238,242,.95));
  box-shadow: 0 -13px 0 rgba(116,238,242,.3), 0 13px 0 rgba(116,238,242,.3);
}
.hero-hud {
  position: relative;
  align-self: center;
  justify-self: end;
  width: min(100%, 210px);
  display: grid;
  gap: 16px;
  padding-right: 10px;
}
.hero-hud::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(117,230,240,.6), transparent);
}
.hud-panel {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(113, 231, 242, .45);
  background: linear-gradient(180deg, rgba(9,20,30,.84), rgba(8,15,25,.55));
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  overflow: hidden;
}
.hud-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(115,231,242,.08), transparent 28%), linear-gradient(0deg, transparent calc(100% - 1px), rgba(112, 210, 223, .18) calc(100% - 1px));
  background-size: auto, 100% 28px;
  pointer-events: none;
}
.hud-panel-top { min-height: 168px; }
.hud-panel-bottom { min-height: 140px; }
.hud-rings {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin-inline: auto;
  background:
    radial-gradient(circle at center, transparent 33%, rgba(115,231,242,.95) 34%, rgba(115,231,242,.95) 35%, transparent 36%),
    radial-gradient(circle at center, transparent 51%, rgba(115,231,242,.6) 52%, rgba(115,231,242,.6) 53%, transparent 54%),
    conic-gradient(from 10deg, rgba(115,231,242,.9) 0 12%, transparent 12% 26%, rgba(115,231,242,.75) 26% 37%, transparent 37% 55%, rgba(115,231,242,.55) 55% 66%, transparent 66% 84%, rgba(115,231,242,.88) 84% 100%);
  filter: drop-shadow(0 0 18px rgba(115,231,242,.18));
}
.hud-rings::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0 60%, rgba(115,231,242,.25) 61%, transparent 63%);
  border-radius: 50%;
}
.hud-lines { display: grid; gap: 10px; margin-top: 18px; }
.hud-lines span {
  display: block;
  height: 4px;
  clip-path: polygon(0 0, 92% 0, 100% 100%, 0 100%);
  background: linear-gradient(90deg, rgba(115,231,242,.14), rgba(115,231,242,.8));
}
.hud-lines span:nth-child(1){ width: 74%; }
.hud-lines span:nth-child(2){ width: 92%; }
.hud-lines span:nth-child(3){ width: 61%; }
.hud-lines span:nth-child(4){ width: 84%; }
.hud-heading, .hud-caption {
  font: 10px var(--mono);
  letter-spacing: .14em;
  color: var(--cyan);
}
.hud-heading { margin-bottom: 16px; }
.hud-bars { display: grid; gap: 8px; margin-bottom: 14px; }
.hud-bars i {
  display: block;
  height: 7px;
  background: linear-gradient(90deg, rgba(246,62,90,.85), rgba(115,231,242,.8));
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}
.hud-bars i:nth-child(1){ width: 86%; }
.hud-bars i:nth-child(2){ width: 52%; }
.hud-bars i:nth-child(3){ width: 94%; }
.hud-bars i:nth-child(4){ width: 67%; }
.hud-loading {
  height: 14px;
  border: 1px solid rgba(248,228,61,.6);
  padding: 2px;
  margin-bottom: 11px;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.hud-loading b {
  display: block;
  width: 71%;
  height: 100%;
  background: repeating-linear-gradient(90deg, rgba(248,228,61,.92) 0 10px, rgba(248,228,61,.3) 10px 13px);
}
.hud-caption { color: #8ba8b3; }

.cyber-button { filter: drop-shadow(0 0 0 transparent); }
.cyber-button::selection { color: inherit; }
.cyber-button .button-tag {
  position: relative;
  padding-right: 10px;
}
.cyber-button .button-tag::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: .55;
}
.header-connect {
  position: relative;
  padding: 0 17px;
  height: 42px;
  border: 1px solid rgba(115,231,242,.65);
  background: rgba(8,16,24,.75);
  color: var(--ice);
  font: 800 10px var(--mono);
  letter-spacing: .11em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.header-connect:hover { color: #091019; background: var(--cyan); }

.drift-section {
  position: relative;
  overflow: hidden;
  padding: 135px 0 155px;
  background:
    radial-gradient(ellipse at 10% -10%, rgba(246,62,90,.10), transparent 38%),
    radial-gradient(ellipse at 88% 14%, rgba(115,231,242,.08), transparent 35%),
    linear-gradient(180deg, #090f18 0%, #09111a 38%, #070d15 100%);
}
.drift-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(109, 180, 208, .07) calc(100% - 1px)),
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(109, 180, 208, .07) calc(100% - 1px));
  background-size: 110px 110px;
  mask-image: linear-gradient(180deg, transparent 0, black 16%, black 100%);
  pointer-events: none;
}
.drift-watermark {
  position: absolute;
  right: 2%;
  bottom: -8%;
  font: 900 clamp(180px, 22vw, 360px) var(--display);
  color: rgba(151, 185, 204, .045);
  letter-spacing: -.05em;
  pointer-events: none;
}
.drift-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  gap: clamp(34px, 4vw, 80px);
  align-items: start;
}
.drift-copy h2 {
  margin: 22px 0 24px;
  font: 900 clamp(64px, 7vw, 100px)/.92 var(--display);
  letter-spacing: -.045em;
}
.drift-copy h2 span { color: var(--cyan); }
.drift-copy p {
  max-width: 570px;
  color: #bbcad5;
  font-size: 16px;
  line-height: 1.85;
}
.drift-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 32px;
}
.drift-tags span {
  position: relative;
  padding: 11px 14px 11px 18px;
  border: 1px solid rgba(115,231,242,.3);
  color: #dce8ef;
  font: 700 10px var(--mono);
  letter-spacing: .12em;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  background: rgba(9,18,27,.58);
}
.drift-tags span::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.join-button { margin-bottom: 18px; }
.join-footnote {
  font: 10px var(--mono);
  letter-spacing: .12em;
  color: #9db0bb;
}
.drift-panels {
  display: grid;
  gap: 18px;
}
.drift-card {
  position: relative;
  border: 1px solid rgba(115,231,242,.26);
  background: linear-gradient(180deg, rgba(11,20,30,.86), rgba(8,14,24,.9));
  overflow: hidden;
}
.drift-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(115,231,242,.06), transparent 32%);
  pointer-events: none;
}
.drift-card-main {
  padding: 22px 23px 20px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.drift-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  font: 10px var(--mono);
  letter-spacing: .11em;
  color: #8da2ae;
}
.district-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 15px;
}
.district-list li {
  position: relative;
  padding-left: 18px;
  border-left: 1px solid rgba(115,231,242,.18);
}
.district-list li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: .68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(115,231,242,.6);
}
.district-list strong {
  display: block;
  font: 900 15px var(--display);
  letter-spacing: .04em;
  color: var(--ice);
}
.district-list span {
  display: block;
  margin-top: 4px;
  color: #8da2ae;
  font-size: 13px;
}
.drift-card-hud {
  min-height: 180px;
  padding: 20px;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.mini-rings {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at center, transparent 39%, rgba(115,231,242,.9) 40%, rgba(115,231,242,.9) 42%, transparent 43%),
    conic-gradient(from 30deg, rgba(115,231,242,.85) 0 18%, transparent 18% 35%, rgba(115,231,242,.55) 35% 47%, transparent 47% 67%, rgba(115,231,242,.75) 67% 100%);
}
.mini-trace-grid {
  height: 38px;
  margin: 12px 0 18px;
  background:
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(115,231,242,.2) calc(100% - 1px)),
    linear-gradient(0deg, transparent calc(100% - 1px), rgba(115,231,242,.2) calc(100% - 1px));
  background-size: 24px 24px;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 82% 74%, 82% 100%, 0 100%);
}
.mini-meter {
  border: 1px solid rgba(248,228,61,.55);
  padding: 3px;
  height: 16px;
  width: min(230px, 100%);
}
.mini-meter span {
  display: block;
  width: 64%;
  height: 100%;
  background: repeating-linear-gradient(90deg, rgba(248,228,61,.85) 0 12px, rgba(248,228,61,.24) 12px 15px);
}

@media (max-width: 950px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-hud { display: none; }
  .identity-panel {
    width: 190px;
    position: absolute;
    right: 7%;
    bottom: 70px;
    transform: rotate(6deg);
    opacity: .8;
  }
  .drift-grid { grid-template-columns: 1fr; }
}
@media (max-width: 630px) {
  .drift-section { padding: 92px 0 110px; }
  .drift-copy h2 { font-size: clamp(48px, 11vw, 68px); }
  .drift-copy p { font-size: 13px; max-width: 360px; }
  .drift-tags { gap: 9px; margin: 22px 0 26px; }
  .drift-tags span { font-size: 8px; padding: 9px 11px 9px 15px; }
  .drift-card-main, .drift-card-hud { padding: 18px; }
  .drift-card-hud { min-height: 150px; }
  .drift-watermark { font-size: 180px; right: -1%; bottom: -5%; }
}
@media (max-width: 375px) {
  .drift-copy h2 { font-size: 46px; }
}

/* Kiri's Corner account + project administration: same palette and chamfered HUD geometry. */
[hidden] { display: none !important; }
.header-connect { display: inline-flex; justify-content: center; align-items: center; gap: 7px; text-decoration: none; }
.account-area { position: relative; }
.header-account {
  display: flex; align-items: center; gap: 10px; max-width: 235px; min-height: 44px; padding: 4px 13px 4px 4px;
  border: 1px solid rgba(119,235,242,.5); background: rgba(5,20,29,.92);
  color: var(--ice); font: 700 11px var(--mono); letter-spacing: .04em;
  clip-path: var(--notch);
}
.header-account img { width: 34px; height: 34px; object-fit: cover; }
.header-account #account-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.header-account > span:last-child { color: var(--cyan); margin-left: auto; }
.account-popover {
  position: absolute; z-index: 70; top: calc(100% + 11px); right: 0; min-width: 242px; padding: 21px;
  border: 1px solid var(--cyan); background: rgba(8,17,27,.98); box-shadow: 0 15px 50px rgba(0,0,0,.65);
  clip-path: polygon(0 0, calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px));
}
.account-kicker { display: block; font: 9px var(--mono); color: var(--cyan); letter-spacing: .1em; }
.account-popover strong { display: block; margin-top: 12px; overflow-wrap: anywhere; font: 900 21px var(--display); }
.account-role { display: block; margin: 7px 0 14px; color: var(--red); font: 9px var(--mono); }
.account-projects, .account-logout { display: block; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid rgba(119,235,242,.2); background: none; color: var(--ice); text-align: left; font: 700 11px var(--mono); }
.account-projects:hover, .account-logout:hover { color: var(--cyan); }
.identity-label { min-width: 0; display: inline-flex; align-items: center; }
[data-identity-name] { display: inline-block; max-width: 153px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: middle; }
.identity-bottom > strong { min-width: 0; font: 700 9px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-logout { width: 100%; text-align: left; border: 0; cursor: pointer; background: transparent; }
/* The uploaded index ends right after the cinematic hero: do not introduce a duplicate join section. */
.hero { min-height: 730px; }
.hero-content { grid-template-columns: minmax(0, 1.1fr) minmax(240px, 300px) minmax(60px, .22fr); }
.identity-panel { grid-column: 2; justify-self: center; width: min(100%, 284px); }
.hero-content::after { content:''; grid-column:3; }

.admin-toolbar {
  margin: 8px 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; border: 1px solid rgba(119,235,242,.35);
  background: linear-gradient(90deg,rgba(119,235,242,.11),rgba(8,17,27,.96) 40%);
  clip-path: polygon(0 0,calc(100% - 20px) 0,100% 20px,100% 100%,20px 100%,0 calc(100% - 20px));
}
.admin-kicker { display: block; color: var(--cyan); font: 9px var(--mono); letter-spacing: .13em; margin-bottom: 7px; }
.admin-toolbar strong { display: block; font: 900 23px var(--display); letter-spacing: .04em; }
.admin-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-buttons .cyber-button { min-height: 44px; padding: 11px 14px; font-size: 10px; }
.project-list .feature-content h2 { overflow-wrap: anywhere; }
.project-list .feature-content h2 > span { color: var(--red); }
.project-list .upcoming-project.secondary-project { padding: 25px 30px 20px; display: flex; flex-direction: column; justify-content: space-between; }
.secondary-project .feature-content h2 { font: 900 clamp(38px,4vw,64px)/.95 var(--display); margin: 15px 0 18px; }
.secondary-project .feature-content p { font-size: 13px; }
.secondary-project .feature-content .cyber-button { font-size: 10px; }
.project-cover { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; opacity: .30; filter: saturate(.75); pointer-events: none; }
.project-list .feature-project, .project-list .secondary-project { isolation: isolate; }
.project-circuit-art { z-index: 0; opacity: .45; }
.project-coming-soon { display: inline-block; margin-top: 9px; padding: 12px 0; color: var(--amber); font: 700 11px var(--mono); letter-spacing: .05em; }
.project-admin-actions { display: flex; position: relative; z-index: 4; flex-wrap: wrap; gap: 7px; padding-top: 14px; border-top: 1px solid rgba(119,235,242,.18); }
.project-admin-actions button { background: rgba(9,26,36,.9); border: 1px solid rgba(119,235,242,.52); color: var(--cyan); padding: 9px 11px; font: 700 10px var(--mono); }
.project-admin-actions button:hover:not(:disabled) { background: var(--cyan); color: #07131b; }
.project-admin-actions button[data-delete] { color: #ff98aa; border-color: rgba(255,61,94,.48); }
.project-admin-actions button:disabled { opacity: .35; cursor: not-allowed; }
.project-list .is-draft { border-color: rgba(240,227,117,.58); }
.is-draft .project-state { color: var(--amber); }
.project-empty,.project-loading,.project-error { grid-column: 1/-1; padding: 55px 22px; color: var(--cyan); border: 1px dashed rgba(119,235,242,.35); font: 700 12px var(--mono); line-height: 1.75; }
.project-error { color: var(--red); }
.project-editor { width: min(650px,calc(100vw - 24px)); max-height: min(92vh,920px); padding: 0; border: 1px solid var(--cyan); background: #0d1924; color: var(--ice); box-shadow: 0 30px 100px rgba(0,0,0,.8); }
.project-editor::backdrop { background: rgba(1,5,11,.82); backdrop-filter: blur(8px); }
.project-editor form { padding: clamp(20px,4vw,38px); }
.editor-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid rgba(119,235,242,.25); }
.editor-kicker { color: var(--cyan); font: 700 10px var(--mono); letter-spacing: .13em; }
.editor-top h2 { margin: 10px 0 0; font: 900 clamp(35px,6vw,52px)/.98 var(--display); }
.editor-close { color: var(--red); font: 31px var(--mono); border: 0; background: none; }
.editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.editor-fields > label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font: 700 10px var(--mono); letter-spacing: .09em; color: var(--cyan); }
.editor-fields > label:nth-child(n+3) { grid-column: 1/-1; }
.editor-fields input[type="text"],.editor-fields input[type="file"],.editor-fields textarea {
  width: 100%; min-width: 0; padding: 14px; outline-offset: 3px; border: 1px solid rgba(119,235,242,.3);
  background: #08111b; color: #eef4f7; font: 14px var(--body); letter-spacing: normal; border-radius: 0;
}
.editor-fields input:focus,.editor-fields textarea:focus { outline: 1px solid var(--cyan); }
.editor-fields input[type="file"] { font-size: 12px; }
.editor-fields label > small { display: block; color: #839eac; font: 11px var(--body); letter-spacing: 0; }
.editor-switch { flex-direction: row !important; align-items: center; flex-wrap: wrap; gap: 11px !important; }
.editor-switch input { width: 19px; height: 19px; accent-color: var(--cyan); }
.editor-switch small { flex-basis: 100%; }
.editor-image-preview { grid-column: 1/-1; }
.editor-image-preview img { display: block; max-width: 100%; max-height: 180px; object-fit: contain; border: 1px solid rgba(119,235,242,.4); }
.editor-image-preview button { margin-top: 8px; border: 0; padding: 10px 0; color: var(--red); font: 700 10px var(--mono); background: none; }
.editor-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(119,235,242,.25); }
.editor-actions .cyber-button { min-height: 47px; padding: 10px 17px; font-size: 11px; }
.editor-error { padding: 13px 16px; color: #ffc2cd; background: rgba(255,61,94,.09); border-left: 3px solid var(--red); font: 12px var(--mono); }
.cyber-button:disabled { opacity:.5; cursor: wait; }
@media (max-width: 1240px) { .hero-content { grid-template-columns: minmax(0,1.2fr) minmax(195px,258px) minmax(10px,.08fr); } .identity-panel { width: 246px; } }
@media (max-width: 950px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-content::after { display: none; }
  .identity-panel { grid-column: auto; }
  .header-account { display: none; }
  .account-popover { display: none; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-buttons { justify-content: start; }
}
@media (max-width: 630px) {
  .editor-fields { grid-template-columns: 1fr; gap: 15px; }
  .editor-fields > label { grid-column: 1/-1; }
  .project-admin-actions { gap: 5px; }
  .project-admin-actions button { padding: 8px 9px; }
  .account-area { display: none; }
  .editor-actions .cyber-button { flex: 1; }
}

/* League module — HUD data panels, intentionally separate from the lean home hero. */
.league-page { min-height: 100vh; position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 86% 9%,rgba(255,61,94,.09),transparent 42%), #0a111c; }
.league-grid-bg { position: absolute; inset: 0; z-index: -1; opacity: .45; pointer-events: none; background: linear-gradient(rgba(115,231,242,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(115,231,242,.06) 1px,transparent 1px); background-size: 66px 66px; }
.league-layout { padding-top: 152px; padding-bottom: 110px; }
.league-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: end; margin: 18px 0 34px; }
.league-kicker { color: var(--red); font: 800 10px var(--mono); letter-spacing: .18em; }
.league-hero h1 { margin: 12px 0 17px; font: 900 clamp(55px, 7.6vw, 120px)/.92 var(--display); letter-spacing: -.045em; }
.league-hero h1 span { color: var(--cyan); }
.league-hero p { max-width: 630px; color: #b1c2ce; font-size: 15px; line-height: 1.8; }
.league-season-chip { display: grid; justify-items: start; gap: 8px; min-width: 200px; max-width: 280px; padding: 20px; border: 1px solid rgba(115,231,242,.38); background: rgba(8,20,30,.8); clip-path: var(--notch); }
.league-season-chip strong { font: 900 15px var(--display); }
.league-season-chip small { font: 9px var(--mono); letter-spacing: .12em; color: var(--cyan); }
.league-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 0 0 33px; }
.league-metrics>div { display: grid; gap: 15px; padding: 22px; border: 1px solid rgba(115,231,242,.17); background: rgba(9,19,30,.75); }
.league-metrics small { color: #9fb5c2; font: 9px var(--mono); letter-spacing: .14em; }
.league-metrics strong { font: 900 38px var(--display); color: var(--ice); }
.league-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid rgba(115,231,242,.2); padding-bottom: 12px; margin-bottom: 36px; }
.league-tabs button { padding: 14px 17px; border: 1px solid rgba(115,231,242,.2); background: #0d1a25; color: #a1b9c5; font: 800 10px var(--mono); letter-spacing: .08em; clip-path: polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,10px 100%,0 calc(100% - 10px)); }
.league-tabs button:hover, .league-tabs button.is-active { color: #08131d; background: var(--cyan); border-color: var(--cyan); }
.league-status { padding: 18px 20px; margin: 12px 0 26px; background: rgba(119,235,242,.07); border-left: 2px solid var(--cyan); color: var(--cyan); font: 11px var(--mono); }
.league-status.is-error { color: #ff9caf; border-color: var(--red); }
.league-section-heading { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin: 0 0 28px; }
.league-section-heading h2 { margin: 0; font: 900 clamp(31px,4vw,56px)/.95 var(--display); }
.league-section-heading p { margin: 0; max-width: 360px; color: #99aebc; font-size: 13px; line-height: 1.75; }
.league-section-heading p strong { color: var(--cyan); }
.league-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px; }
.league-card { position: relative; overflow: hidden; padding: 25px; border: 1px solid rgba(119,235,242,.22); background: linear-gradient(120deg,rgba(12,24,36,.96),rgba(12,19,29,.93)); }
.league-card::after { content: ''; position: absolute; right: 0; top: 0; width: 72px; height: 3px; background: var(--team-color); box-shadow: 0 0 14px var(--team-color); }
.league-card-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #a4b7c5; font: 10px var(--mono); letter-spacing: .09em; }
.league-card-top i { display: inline-block; width: 7px; height: 7px; background: var(--team-color); box-shadow: 0 0 12px var(--team-color); margin-right: 7px; }
.league-card h3 { margin: 24px 0 30px; font: 900 clamp(34px,3.2vw,50px)/.99 var(--display); overflow-wrap: anywhere; }
.league-card-stats { display: grid; gap: 15px; }
.stat-line-title { display: flex; justify-content: space-between; font: 10px var(--mono); color: #bfd2dc; margin-bottom: 7px; letter-spacing: .075em; }
.stat-line-title b { color: var(--ice); }
.stat-track { height: 8px; background: #1a3140; border: 1px solid rgba(115,231,242,.14); }
.stat-track i { display: block; height: 100%; background: linear-gradient(90deg,var(--team-color,var(--red)),var(--cyan)); }
.league-card-bottom { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 25px; padding-top: 17px; border-top: 1px solid rgba(119,235,242,.13); color: #a8bac6; font: 10px var(--mono); }
.league-card-bottom b { color: var(--cyan); font: 900 16px var(--display); }
.league-card-edit { display: inline-block; margin-top: 17px; padding: 8px 0; color: var(--cyan); border: 0; border-bottom: 1px solid var(--cyan); background: transparent; font: 800 10px var(--mono); }
.league-card-edit:hover { color: var(--red); }
.league-empty { padding: 42px 20px; grid-column: 1/-1; background: rgba(13,25,36,.7); border: 1px dashed rgba(115,231,242,.32); color: #aec8d2; font: 11px var(--mono); line-height: 1.8; }
.league-standings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.league-table-block { border: 1px solid rgba(115,231,242,.22); background: rgba(11,23,34,.75); min-width: 0; }
.league-table-block h3 { margin: 0; padding: 19px; border-bottom: 1px solid rgba(115,231,242,.15); font: 900 18px var(--display); }
.league-table-scroll { overflow-x: auto; }
.league-table { border-collapse: collapse; width: 100%; min-width: 260px; text-align: left; }
.league-table th { color: var(--cyan); font: 700 9px var(--mono); letter-spacing: .1em; }
.league-table th,.league-table td { padding: 13px 19px; border-bottom: 1px solid rgba(115,231,242,.09); }
.league-table td { color: #d5e1e8; font: 12px var(--body); }
.league-table td:last-child { font: 900 14px var(--mono); color: var(--cyan); }
.league-muted { padding: 20px; color: #a6b5c0; font: 12px var(--body); }
.league-race-title { margin-top: 60px; }
.league-races { display: grid; gap: 11px; }
.league-race { padding: 21px 25px; border: 1px solid rgba(115,231,242,.2); background: #0d1a26; display: flex; justify-content: space-between; gap: 25px; align-items: center; }
.league-race h3 { margin: 10px 0 8px; font: 900 25px var(--display); }
.league-race small { color: #89aab7; font: 10px var(--mono); }
.league-race p { margin: 0; color: #9db6c3; font: 11px var(--body); }
.league-race > div:last-child { display: grid; justify-items: end; gap: 15px; }
.league-race-finished { color: var(--cyan); font: 800 10px var(--mono); }
.league-race-upcoming { color: var(--amber); font: 800 10px var(--mono); }
.league-race button { color: var(--red); font: 800 10px var(--mono); background: none; border: none; padding: 8px 0; }
.rd-team { margin-bottom: 30px; }
.rd-team-top { display: flex; justify-content: space-between; align-items: end; gap: 14px; border-bottom: 1px solid rgba(115,231,242,.25); margin-bottom: 15px; }
.rd-team-top h3 { margin: 0 0 13px; font: 900 28px var(--display); }
.rd-team-top span { margin-bottom: 13px; font: 800 11px var(--mono); color: var(--amber); }
.rd-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.rd-panel { padding: 22px; border: 1px solid rgba(115,231,242,.22); background: #0d1a26; }
.rd-panel>small { display: block; margin-bottom: 25px; color: var(--cyan); font: 800 10px var(--mono); }
.rd-panel .stat-line { margin-bottom: 21px; }
.stat-upgrade { margin-top: 9px; padding: 9px 11px; border: 1px solid rgba(115,231,242,.32); background: rgba(115,231,242,.09); color: var(--cyan); font: 800 9px var(--mono); }
.stat-upgrade:hover:not(:disabled) { background: var(--cyan); color: #08121b; }
.stat-upgrade:disabled { opacity: .3; cursor: not-allowed; }
.league-admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 42px; }
.league-admin-actions button { padding: 15px 17px; clip-path: var(--notch); border: 1px solid rgba(115,231,242,.4); background: #122431; color: var(--cyan); font: 800 10px var(--mono); }
.league-admin-actions button:hover { background: var(--cyan); color: #09131d; }
.league-audit-heading { font: 900 26px var(--display); }
.league-audit-row { display: grid; grid-template-columns: 1fr 95px 1.5fr 80px; gap: 20px; padding: 13px; border-bottom: 1px solid rgba(115,231,242,.13); color: #b6c7d1; font: 11px var(--mono); overflow-wrap: anywhere; }
.league-audit-row span:nth-child(2) { color: var(--cyan); }
.league-audit-row small { color: #768f9d; font: 10px var(--mono); }
.league-dialog { width: min(680px,calc(100vw - 24px)); max-height: 90vh; background: #0b1823; border: 1px solid var(--cyan); color: var(--ice); padding: 0; box-shadow: 0 30px 100px #000d; }
.league-dialog::backdrop { background: rgba(1,4,10,.87); backdrop-filter: blur(9px); }
.league-dialog form { padding: clamp(20px,3vw,35px); }
.league-dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 15px; border-bottom: 1px solid rgba(115,231,242,.2); padding-bottom: 18px; }
.league-dialog-heading small { color: var(--cyan); font: 9px var(--mono); }
.league-dialog-heading h2 { margin: 8px 0 0; font: 900 35px var(--display); }
.league-dialog-heading button { color: var(--red); border: 0; background: none; font-size: 28px; }
.league-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin: 22px 0; }
.league-fields>label { display: grid; gap: 7px; min-width: 0; font: 700 10px var(--mono); color: var(--cyan); }
.league-fields input,.league-fields select { width: 100%; padding: 11px 12px; min-width: 0; min-height: 42px; background: #070f18; border: 1px solid rgba(115,231,242,.35); color: var(--ice); font: 13px var(--body); border-radius: 0; }
.league-dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 9px; border-top: 1px solid rgba(115,231,242,.2); padding-top: 18px; }
.league-dialog-actions .cyber-button { min-height: 48px; padding: 10px 17px; font-size: 10px; }
.league-form-error { padding: 12px; color: #ffb8c5; border-left: 3px solid var(--red); background: #8f152323; font: 11px var(--mono); }
.grant-teams { grid-column: 1/-1; display: grid; gap: 12px; border: 1px solid rgba(115,231,242,.28); padding: 18px; }
.grant-teams legend { color: var(--cyan); font: 800 11px var(--mono); }
.grant-teams label { display: flex; gap: 10px; align-items: center; color: var(--ice); font: 12px var(--mono); }
.grant-teams input { width: 16px; min-height: unset; height: 16px; }
.league-results-help { grid-column: 1/-1; color: #a8bfc9; font: 12px var(--body); }
.results-editor-rows { grid-column: 1/-1; display: grid; gap: 10px; }
.results-editor-row { display: grid; grid-template-columns: minmax(0,1fr) 88px 88px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(115,231,242,.12); }
.results-editor-row > span { font: 800 14px var(--display); overflow-wrap: anywhere; }
.results-editor-row small { display: block; margin-top: 3px; color: #8da7b5; font: 10px var(--mono); }
.results-editor-row label { display: grid; gap: 5px; color: var(--cyan); font: 9px var(--mono); }
@media (max-width: 950px) {
  .league-hero { grid-template-columns: 1fr; }
  .league-season-chip { max-width: 100%; }
  .league-section-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 680px) {
  .league-layout { padding-top: 125px; }
  .league-hero h1 { font-size: clamp(46px,10vw,70px); }
  .league-hero p { font-size: 13px; }
  .league-metrics { gap: 6px; }
  .league-metrics>div { padding: 14px 11px; gap: 10px; }
  .league-metrics strong { font-size: 25px; }
  .league-metrics small { font-size: 8px; }
  .league-tabs button { padding: 11px; font-size: 9px; }
  .league-cards,.league-standings,.rd-grid { grid-template-columns: 1fr; }
  .league-race { flex-direction: column; align-items: flex-start; }
  .league-race > div:last-child { justify-items: start; }
  .league-card { padding: 20px; }
  .league-fields { grid-template-columns: 1fr; }
  .league-audit-row { grid-template-columns: 1fr 70px; }
  .results-editor-row { grid-template-columns: minmax(0,1fr) 62px 62px; }
  .league-dialog form { padding: 18px; }
}

@media (max-width: 950px) { .header-connect { display: none !important; } }

.project-list .feature-content h2 { text-transform: uppercase; }

.drawer-profile { display: flex; gap: 14px; align-items: center; margin-top: 22px; padding: 15px; border: 1px solid rgba(119,235,242,.32); background: rgba(119,235,242,.06); }
.drawer-profile img { width: 55px; height: 55px; object-fit: cover; border: 1px solid var(--cyan); }
.drawer-profile div { display: grid; min-width: 0; gap: 5px; }
.drawer-profile small { font: 9px var(--mono); color: var(--cyan); }
.drawer-profile strong { font: 900 17px var(--display); overflow-wrap: anywhere; }
.drawer-profile span { font: 9px var(--mono); color: var(--red); }
