/* George Rusu portfolio — "Acid" personal brand (2027).
   Black ground, off-white type, one acid lime. Heavy display type, mono for everything measured,
   soft panels on a faint grid. Deliberately unlike the FLOWENTIC company brand (warm paper, ochre). */

:root {
  --bg: #08090a;
  --panel: #101214;
  --panel-2: #15181b;
  --ink: #f4f4ee;
  --soft: #9ea3a8;
  --line: #23272b;
  --line-2: #343a40;
  --lime: #c8ff2e;
  --accent-ink: #c8ff2e;
  --em-ink: #c8ff2e;
  --em-bg: transparent;
  --grid: rgba(200, 255, 46, .05);
  --tile-line: #c8ff2e;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1200px;
  --r: 18px;
}
/* Light theme is opt-in through the toggle: lime becomes a highlighter behind black type. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f5f5f2;
  --panel-2: #ecece8;
  --ink: #0a0a0a;
  --soft: #55595e;
  --line: #e2e2dd;
  --line-2: #c9c9c3;
  --accent-ink: #0a0a0a;
  --em-ink: #0a0a0a;
  --em-bg: #c8ff2e;
  --grid: rgba(10, 10, 10, .045);
  --tile-line: #0a0a0a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.55 var(--display); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
h1, h2 { font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; line-height: .9; text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--em-ink); background: var(--em-bg); white-space: nowrap; display: inline-block; line-height: .92; padding: .03em .1em .02em; margin: 0 -.1em; border-radius: .1em; }
h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--lime); color: #0a0a0a; padding: 10px 14px; border-radius: 10px; }

/* Small mono label with an index: "01 / SYSTEMS" */
.tag { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.tag b { color: var(--accent-ink); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(200, 255, 46, .6); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(200, 255, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 255, 46, 0); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 1px solid var(--line-2); border-radius: 999px; font: 700 15px/1 var(--display); letter-spacing: .01em; cursor: pointer; background: var(--panel); color: var(--ink); transition: transform .15s, border-color .15s, background .15s, color .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); border-color: var(--lime); }
.btn.solid { background: var(--lime); border-color: var(--lime); color: #0a0a0a; }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Header */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; letter-spacing: -.03em; text-transform: uppercase; white-space: nowrap; }
.brand i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--lime); color: #0a0a0a; font-style: normal; font-size: 17px; }
nav { display: flex; align-items: center; gap: 2px; }
nav > a:not(.btn) { padding: 10px 12px; border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
nav > a:not(.btn):hover { color: var(--ink); background: var(--panel-2); }
.toggle { width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--panel); color: var(--ink); font-size: 15px; cursor: pointer; margin: 0 8px; }

/* Sections */
section { padding: 104px 0; }
.head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.head h2 { font-size: clamp(40px, 6.4vw, 88px); margin-top: 18px; }
.head p { color: var(--soft); font-size: 19px; max-width: 44ch; justify-self: end; }

/* Hero */
.hero { position: relative; padding: 72px 0 0; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, #000 30%, transparent 78%); mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, #000 30%, transparent 78%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; margin-top: 28px; }
h1 { font-size: clamp(42px, 6.9vw, 92px); letter-spacing: -.05em; line-height: .92; }
.hero h1 span { display: block; white-space: nowrap; }
.page-head h1 { font-size: clamp(48px, 9vw, 124px); }


/* Run trace: the signature panel */
.trace { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font: 400 13px/1 var(--mono); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8); }
.trace-top { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--soft); }
.trace-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.trace-top span { margin-left: auto; }
.tr { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tr time { color: var(--soft); }
.tr .bar-line { display: block; height: 4px; margin-top: 9px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.tr .bar-line::after { content: ""; position: absolute; inset: 0 auto 0 var(--x, 0); width: var(--w, 30%); border-radius: 2px; background: var(--ink); opacity: .55; }
.tr small { font-size: 11.5px; color: var(--soft); padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 999px; }
.tr.wait .bar-line::after { background: var(--lime); opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.tr.wait small { color: #0a0a0a; background: var(--lime); border-color: var(--lime); }
@keyframes pulse { 50% { opacity: .35; } }
.trace-foot { display: flex; justify-content: space-between; padding: 14px 16px; color: var(--soft); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 72px; }
.stat { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.stat b { display: block; font-weight: 900; font-size: clamp(34px, 3.8vw, 52px); letter-spacing: -.045em; line-height: 1; }
.stat span { display: block; margin-top: 12px; font: 400 12.5px/1.45 var(--mono); color: var(--soft); }

/* Ticker */
.ticker { margin-top: 72px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; font: 500 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
.ticker div { display: inline-block; padding: 18px 0; animation: slide 38s linear infinite; }
.ticker span { margin: 0 22px; }
.ticker span::before { content: "◆"; color: var(--accent-ink); margin-right: 22px; font-size: 9px; vertical-align: 2px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Systems */
.wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); transition: border-color .2s, transform .2s; }
.tile:hover, .tile:focus-within { border-color: var(--tile-line); transform: translateY(-3px); }
.tile-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.num { font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--soft); }
.state { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--soft); }
.state.on { color: #0a0a0a; background: var(--lime); border-color: var(--lime); }
.tile h3 { font-size: clamp(24px, 2.5vw, 32px); }
.tile p { font-size: 16.5px; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.chips span { font: 400 12px/1 var(--mono); padding: 7px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--soft); }
.tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tile-actions .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }
.shot { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(.85); transition: filter .3s, transform .5s; }
.shot:hover img, .shot:focus-visible img { filter: none; transform: scale(1.04); }
.playmark { position: absolute; left: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px; background: var(--lime); color: #0a0a0a; font: 700 14px/1 var(--display); transition: transform .2s; }
.shot:hover .playmark { transform: scale(1.06); }
.tile.next { grid-column: 1 / -1; border-style: dashed; border-color: var(--line-2); background: transparent; }
.tile.next:hover, .tile.next:focus-within { border-color: var(--line-2); transform: none; }
.tile.next .tile-body { display: grid; grid-template-columns: auto 1fr 1.1fr auto; gap: 28px; align-items: center; padding: 28px 30px; }
.tile.next h3 { font-size: clamp(24px, 3vw, 40px); text-transform: uppercase; font-weight: 900; letter-spacing: -.04em; }
.cursor { display: inline-block; width: .42em; height: .82em; margin-left: .12em; background: var(--lime); animation: blink 1.1s steps(2) infinite; vertical-align: -.04em; border-radius: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.link { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--mono); letter-spacing: .04em; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-self: flex-start; }
.link:hover { border-bottom-color: var(--lime); color: var(--accent-ink); }

/* About */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.about h2 { font-size: clamp(38px, 5.4vw, 76px); margin-top: 18px; }
.portrait { position: sticky; top: 96px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.portrait img { width: 100%; height: auto; filter: grayscale(1) contrast(1.05); transition: filter .4s; }
.portrait:hover img { filter: none; }
.portrait figcaption { display: flex; justify-content: space-between; padding: 14px 16px; font: 400 12px/1 var(--mono); color: var(--soft); border-top: 1px solid var(--line); }
.big { font-weight: 500; font-size: clamp(19px, 2vw, 24px); line-height: 1.4; margin: 26px 0 34px; max-width: 36ch; }
.path { list-style: none; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.path li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--soft); }
.path li:last-child { border-bottom: 0; }
.path li span { font: 400 12px/1.9 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.path li b { display: block; font-weight: 800; font-size: 18.5px; color: var(--ink); margin-bottom: 2px; }
.path li.now span { color: var(--accent-ink); }

/* Rules */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.three > div { padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.three .num { display: block; margin-bottom: 18px; color: var(--accent-ink); }
.three h3 { font-size: 25px; margin-bottom: 10px; }
.three p { color: var(--soft); font-size: 16.5px; }

/* Foundation cards + archive */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards .shot { border-radius: var(--r); border: 1px solid var(--line); }
.cards .playmark { height: 38px; font-size: 13px; left: 12px; bottom: 12px; }
.cards h3 { font-size: 22px; margin: 16px 0 6px; }
.cards p { font-size: 16px; color: var(--soft); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards .meta { font: 400 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin-top: 16px; }
.cards .meta + h3 { margin-top: 8px; }
.cards .link { margin-top: 8px; }
.loom { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; background: #000; }
.loom iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.page-head { position: relative; padding: 72px 0 40px; }
.page-head h1 { margin-top: 22px; }
.page-head p:not(.tag) { color: var(--soft); font-size: 20px; max-width: 52ch; margin-top: 26px; }
.group-title { display: flex; align-items: baseline; gap: 18px; margin-bottom: 32px; }
.group-title span { font: 500 13px/1 var(--mono); letter-spacing: .08em; color: var(--accent-ink); }
.group-title h2 { font-size: clamp(30px, 4.2vw, 54px); }

/* Final block */
.cta { padding-top: 0; }
.cta-box { position: relative; border-radius: 28px; background: var(--lime); color: #0a0a0a; padding: 64px 48px 48px; overflow: hidden; }
.cta-box::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(10, 10, 10, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 10, 10, .07) 1px, transparent 1px); background-size: 56px 56px; pointer-events: none; }
.cta-box > * { position: relative; }
.cta-box .tag { color: rgba(10, 10, 10, .7); }
.cta-box .tag b { color: #0a0a0a; }
.cta h2 { font-size: clamp(40px, 7vw, 100px); margin-top: 18px; }
.cta h2 em { color: #c8ff2e; background: #0a0a0a; padding: 0 .12em; }
.cta-note { margin-top: 16px; font-size: 18px; font-weight: 600; max-width: 46ch; }
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.lane { border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 12px; background: rgba(10, 10, 10, .08); border: 1px solid rgba(10, 10, 10, .22); }
.lane.dark { background: #0a0a0a; color: #f4f4ee; border-color: #0a0a0a; }
.lane .num { color: inherit; opacity: .7; }
.lane h3 { font-size: clamp(24px, 2.6vw, 34px); text-transform: uppercase; font-weight: 900; letter-spacing: -.035em; line-height: 1; }
.lane p { font-size: 17px; opacity: .86; }
.lane .btn { align-self: flex-start; margin-top: auto; }
.lane .btn { background: #0a0a0a; border-color: #0a0a0a; color: #f4f4ee; }
.lane .btn:hover { background: #ffffff; border-color: #ffffff; color: #0a0a0a; }
.lane.dark .btn { background: #c8ff2e; border-color: #c8ff2e; color: #0a0a0a; }
.lane.dark .btn:hover { background: #f4f4ee; border-color: #f4f4ee; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.socials .btn { background: transparent; border-color: rgba(10, 10, 10, .35); color: #0a0a0a; min-height: 46px; padding: 0 18px; font-size: 14px; }
.socials .btn:hover { background: #0a0a0a; border-color: #0a0a0a; color: #f4f4ee; }

footer { border-top: 1px solid var(--line); padding: 26px 0 36px; font: 400 12.5px/1.5 var(--mono); color: var(--soft); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--ink); }

/* Video dialog */
dialog#player { width: min(1100px, 94vw); padding: 0; border: 0; border-radius: var(--r); background: #000; overflow: visible; }
dialog#player::backdrop { background: rgba(0, 0, 0, .88); backdrop-filter: blur(4px); }
dialog#player .frame { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; }
dialog#player iframe { width: 100%; height: 100%; border: 0; display: block; }
dialog#player .close { position: absolute; top: -54px; right: 0; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #f4f4ee; background: transparent; color: #f4f4ee; font-size: 15px; cursor: pointer; }

@media (max-width: 960px) {
  body { font-size: 17px; }
  section { padding: 72px 0; }
  .hide-s { display: none; }
  .head, .hero-grid, .about { grid-template-columns: 1fr; gap: 28px; }
  .head p { justify-self: start; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .wall, .three, .cards, .cards.two, .lanes { grid-template-columns: 1fr; }
  .cards.four { grid-template-columns: 1fr 1fr; }
  .tile.next .tile-body { grid-template-columns: 1fr; gap: 12px; }
  .portrait { position: static; max-width: 440px; }
  .path li { grid-template-columns: 1fr; gap: 2px; }
  .cta-box { padding: 40px 22px 26px; border-radius: 22px; }
  .lane .btn { width: 100%; }
}
@media (max-width: 520px) {
  .bar .wrap { padding: 0 16px; gap: 8px; }
  .brand span { display: none; }
  .toggle { margin: 0 4px; }
  .actions .btn { width: 100%; }
  .cards.four { grid-template-columns: 1fr; }
  .tr { grid-template-columns: 46px 1fr; }
  .tr small { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .dot, .tr.wait .bar-line::after, .ticker div { animation: none; }
  .btn, .shot img, .playmark, .portrait img, .tile { transition: none; }
}

/* AI assistant button and panel */
#chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 18px; border: 0; border-radius: 999px; background: var(--lime); color: #0a0a0a; font: 700 15px/1 var(--display); cursor: pointer; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .7); transition: transform .15s; }
#chat-fab:hover { transform: translateY(-2px); }
#chat-fab[hidden] { display: none; }
#chat-fab svg { width: 22px; height: 22px; fill: currentColor; }
.chat-fab-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #0a0a0a; border: 2px solid var(--lime); }
#chat-panel { position: fixed; z-index: 45; right: 24px; bottom: 24px; width: 500px; height: min(760px, calc(100vh - 48px)); border-radius: var(--r); border: 1px solid var(--line-2); background: #08090a; box-shadow: 0 24px 80px rgba(0, 0, 0, .7); overflow: hidden; }
#chat-panel[hidden] { display: none; }
#chat-panel iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 767px) {
  #chat-fab { right: 16px; bottom: 16px; padding: 0; width: 56px; justify-content: center; }
  .chat-fab-label { display: none; }
  #chat-panel { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { #chat-fab { transition: none; } }
