/* DECYPHER — decypher.work */
:root {
  --bg: #07080a;
  --bg-2: #0d0f13;
  --panel: #111318;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eceef2;
  --muted: #8b909c;
  --dim: #5a5f6b;
  --signal: #f2f1ec;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--signal); color: #000; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--signal); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 255, 255, .05), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(120, 90, 255, .06), transparent 60%);
}
main, .nav, .foot { position: relative; z-index: 2; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  backdrop-filter: blur(14px) saturate(140%);
  background: linear-gradient(to bottom, rgba(7, 8, 10, .85), rgba(7, 8, 10, .55));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .14em; font-size: 14px; }
.brand svg { color: var(--signal); }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  text-decoration: none; font-size: 14px; color: var(--muted);
  padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav nav a i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--dim); margin-right: 6px; }
.nav nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav nav a[aria-current="true"]:not(.nav-cta) { color: var(--text); }
.nav nav a[aria-current="true"]:not(.nav-cta) i { color: var(--signal); }
.nav nav a.nav-cta { color: #000; background: var(--signal); font-weight: 600; }
.nav nav a.nav-cta i { color: rgba(0, 0, 0, .5); }
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font: 600 15px var(--sans);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--signal); color: #000; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text); }

/* HERO */
.hero {
  min-height: calc(100svh - 60px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px var(--gutter) 64px; max-width: var(--max); margin: 0 auto; position: relative;
}
.eyebrow { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; margin: 0 0 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(242, 241, 236, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(242, 241, 236, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 241, 236, 0); } }
.wordmark {
  margin: 0; font-weight: 800; letter-spacing: -.045em; line-height: .86;
  font-size: clamp(52px, 15vw, 196px); width: max-content;
  background: linear-gradient(180deg, #fff 30%, #9aa0ad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.wordmark .g { color: var(--signal); -webkit-text-fill-color: var(--signal); font-family: var(--mono); font-weight: 500; letter-spacing: -.08em; }
.hero-sub { max-width: 640px; font-size: clamp(18px, 2.1vw, 23px); color: #c5c9d2; margin: 36px 0 36px; line-height: 1.5; }
.hero-sub em { font-family: var(--serif); font-size: 1.2em; color: var(--text); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-index { list-style: none; margin: 72px 0 0; padding: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hero-index li { border-right: 1px solid var(--line); }
.hero-index li:last-child { border-right: 0; }
.hero-index a { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px 6px; text-decoration: none; position: relative; transition: background .2s; }
.hero-index a::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .7, .1, 1); }
.hero-index a:hover { background: rgba(255, 255, 255, .025); }
.hero-index a:hover::before, .hero-index a:focus-visible::before { transform: scaleX(1); }
.hero-index span { font-size: 11px; color: var(--accent); }
.hero-index b { font: 600 15px/1.25 var(--sans); color: var(--text); }
.hero-index em { font-style: normal; font-size: 11px; color: var(--dim); }
@media (max-width: 900px) {
  .hero-index { grid-template-columns: 1fr; }
  .hero-index li { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-index a { flex-direction: row; align-items: baseline; gap: 12px; padding: 12px 4px; }
  .hero-index em { margin-left: auto; text-align: right; }
}

/* SECTIONS */
.section { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter); }
.section-head { max-width: 760px; margin-bottom: 72px; }
.kicker { font-size: 12px; color: var(--signal); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 18px; }
h2 { font-size: clamp(38px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -.035em; margin: 0; font-weight: 700; }
h2 .serif { color: #c9ccd4; }
.lede { color: var(--muted); font-size: 19px; margin: 22px 0 0; max-width: 620px; }

/* PROJECT FRAME — shared frame, per-project --accent */
.project {
  --accent: #fff; --accent-2: #fff;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px);
  align-items: center; padding: 56px 0; border-top: 1px solid var(--line); position: relative;
}
.project::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  transition: width 1.2s cubic-bezier(.2, .7, .1, 1);
}
.project.in::before { width: 100%; }
.project.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.project.flip .project-meta { order: 2; }
.file { font-size: 12px; color: var(--accent); letter-spacing: .1em; margin: 0 0 14px; }
.file span { color: var(--dim); }
.project h3 { font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -.035em; line-height: 1; margin: 0; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--accent); margin: 10px 0 18px; }
.project-meta > p { color: #b6bac4; margin: 0 0 18px; }
.project-meta strong { color: var(--text); font-weight: 600; }
.features { list-style: none; padding: 0; margin: 0 0 22px; }
.features li { position: relative; padding: 7px 0 7px 22px; font-size: 15px; color: #d4d7de; border-bottom: 1px dashed var(--line); }
.features li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 2px; background: var(--accent); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.chips li { font-size: 12px; padding: 5px 10px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.status a { color: var(--accent); text-transform: none; letter-spacing: 0; font-size: 13px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

@media (max-width: 900px) {
  .project, .project.flip { grid-template-columns: 1fr; }
  .project.flip .project-meta { order: 0; }
}

/* WINDOWS — the visual frame every project lives inside */
.project-visual { perspective: 1400px; }
.win {
  border-radius: 14px; overflow: hidden; background: #0b0c10;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 0 1px rgba(0, 0, 0, .6);
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .4s cubic-bezier(.2, .7, .1, 1);
  font-size: 12px;
}
.win-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #15171c; border-bottom: 1px solid var(--line); }
.win-bar > span { width: 10px; height: 10px; border-radius: 50%; background: #2a2d35; }
.win-bar b { font: 500 11px var(--mono); color: var(--muted); margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-bar.browser .url { flex: 1; background: #0b0c10; border-radius: 6px; padding: 4px 10px; margin-left: 12px; }
.ext-icon { font: 700 10px var(--mono); font-style: normal; color: #000; background: var(--accent); border-radius: 5px; padding: 3px 5px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

/* Menhir — framed in its own landing-page identity */
.win-menhir { background: #0b0b0c; margin: 0; border-color: rgba(244, 243, 239, .16); }
.mh-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid rgba(244, 243, 239, .16); }
.mh-brand { font: 900 20px "Archivo", var(--sans); letter-spacing: -.02em; color: #f4f3ef; }
.mh-brand i { font-style: normal; color: var(--accent); }
.mh-top span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #6b6b69; text-align: right; }
.mh-video video { display: block; width: 100%; aspect-ratio: 1280 / 760; object-fit: cover; background: #000; }
.mh-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(244, 243, 239, .16); border-top: 1px solid rgba(244, 243, 239, .16); }
.mh-strip figure { margin: 0; background: #0b0b0c; }
.mh-strip img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; opacity: .85; transition: opacity .2s; }
.mh-strip figure:hover img { opacity: 1; }
.mh-strip figcaption { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #a3a3a0; padding: 8px 10px; }
@media (max-width: 560px) { .mh-top span { display: none; } }

/* Screenshot galleries (UNM, Fortece) */
.win-gallery { margin: 0; background: #0d1117; }
.win-gallery .win-bar b { transition: opacity .2s; }
.gal-main { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: #0d1117; }
.gal-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: thin; }
.gal-thumbs button { flex: 0 0 auto; width: 84px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.gal-thumbs button:hover { opacity: .9; }
.gal-thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.gal-thumbs img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

/* SnapDump — real screenshots on its paper tone */
.win-snap { margin: 0; background: #e6e2d8; border-color: #1a1a18; display: flex; justify-content: center; gap: clamp(10px, 2vw, 22px); padding: clamp(14px, 3vw, 32px); box-shadow: 0 40px 80px -30px rgba(230, 226, 216, .25); }
.win-snap img { width: calc(50% - 11px); max-width: 280px; height: auto; display: block; border: 2px solid #1a1a18; box-shadow: 6px 6px 0 #1a1a18; }

/* PartwiseBR — live capture */
.win-pw { margin: 0; background: #070a0a; }
.win-pw .win-bar { background: #0d1212; }
.win-pw img { display: block; width: 100%; height: auto; }

/* Full-size screenshot viewer */
[data-zoom] { cursor: zoom-in; }
.zoom { width: min(96vw, 1800px); max-width: none; max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: #050607; color: var(--text); overflow: hidden; }
.zoom::backdrop { background: rgba(3, 4, 5, .86); backdrop-filter: blur(6px); }
.zoom img { display: block; max-width: 100%; max-height: calc(94vh - 52px); margin: 0 auto; object-fit: contain; }
.zoom-cap { margin: 0; padding: 14px 120px 16px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.zoom-close { position: absolute; right: 10px; bottom: 9px; font-size: 12px; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.zoom-close:hover { background: rgba(255, 255, 255, .12); }

/* RANGE */
.stack { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stack > li {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding-left .3s;
}
.stack > li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .3s; }
.stack > li:hover { padding-left: 18px; }
.stack > li:hover::before { transform: scaleY(1); }
.depth { font-size: 13px; color: var(--accent); }
.stack h4 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.stack p { margin: 0; color: var(--muted); font-size: 15px; }
.stack ul { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.stack ul a { font-size: 11px; text-decoration: none; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--muted); transition: all .2s; }
.stack ul a:hover { color: #000; background: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) { .stack > li { grid-template-columns: 44px 1fr; } .stack ul { grid-column: 2; } }
.toolbelt { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.toolbelt span { font-size: 12px; color: var(--muted); padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .02); }

/* LOG */
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--signal), var(--line) 30%); }
.log li { display: grid; grid-template-columns: 120px 110px 1fr; gap: 20px; padding: 18px 0 18px 32px; position: relative; align-items: baseline; }
.log li::before { content: ""; position: absolute; left: 2px; top: 26px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.log li:first-child::before { background: var(--signal); border-color: var(--signal); }
.log time { font-size: 12px; color: var(--dim); }
.log .tag { --accent: var(--signal); font-size: 11px; color: var(--accent); justify-self: start; }
.log p { margin: 0; color: var(--muted); } .log b { color: var(--text); font-weight: 600; }
@media (max-width: 720px) { .log li { grid-template-columns: 1fr; gap: 4px; } }

/* CONTACT */
.contact { text-align: center; padding-bottom: 160px; }
.contact .lede { margin-left: auto; margin-right: auto; }
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 40px 0 36px; }
.topic { font: 500 14px var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 99px; cursor: pointer; transition: all .2s; }
.topic:hover { color: var(--text); border-color: var(--text); }
.topic.is-on, .topic[aria-pressed="true"] { color: #000; background: var(--signal); border-color: var(--signal); }
.mailrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.mail {
  font-size: clamp(26px, 5.4vw, 64px); font-weight: 700; letter-spacing: -.03em; text-decoration: none;
  background: linear-gradient(90deg, var(--text), var(--text)) 0 100% / 0 3px no-repeat;
  transition: background-size .4s; overflow-wrap: anywhere;
}
.mail:hover { background-size: 100% 3px; }
.copy { font-size: 12px; padding: 10px 16px; }

/* FOOTER */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px var(--gutter); border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.foot a { text-decoration: none; color: inherit; } .foot a:hover { color: var(--text); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .1, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 404 */
.lost { min-height: 80vh; display: grid; place-content: center; text-align: center; padding: 0 var(--gutter); }
.lost h1 { font-size: clamp(80px, 20vw, 200px); margin: 0; letter-spacing: -.05em; line-height: 1; }
.lost p { color: var(--muted); margin: 16px 0 32px; }
