:root {
  --paper: #EEF3F0;
  --paper-2: #E2EBE6;
  --ink: #0B1210;
  --soft: #46524D;
  --accent: #0F766E;
  --mint: #22C59A;
  --mint-pale: #C9EEDF;
  --desk: #0B1210;
  --desk-2: #141E1B;
  --desk-ink: #D8E5DF;
  --desk-soft: #8FA39A;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-name: clamp(2.5rem, 1.2rem + 3.6vw, 4.75rem);

  --gap: 12px;
  --r: 12px;
  --pad: clamp(24px, 4vw, 64px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-body)/1.5 'General Sans', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2 { font-family: 'Gambarino', Georgia, serif; font-weight: 400; letter-spacing: -0.02em; line-height: 0.92; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
::selection { background: var(--mint); color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px; border-radius: var(--r); background: var(--accent); color: #fff; font: 500 1rem/1 'General Sans', sans-serif; text-decoration: none; transition: transform 140ms var(--ease-out), background-color 200ms ease; }
.btn svg { width: 18px; height: 18px; transition: transform 300ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.link { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.22em; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); }
  .btn:hover svg { transform: translateX(4px); }
  .link:hover { color: var(--accent); }
}

/* ---------- The split ---------- */
.page { display: grid; grid-template-columns: 55fr 45fr; gap: var(--gap); padding: var(--gap); align-items: start; }
.read { padding: 0 var(--pad) 120px; }
.stage { position: sticky; top: var(--gap); height: calc(100svh - 2 * var(--gap)); border-radius: 20px; background: var(--desk); color: var(--desk-ink); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }

/* ---------- Top of the reading column ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1.125rem/1 'General Sans', sans-serif; letter-spacing: -0.01em; }
.mark svg { width: 36px; height: 36px; }
.top nav { display: flex; gap: 24px; font-size: 1rem; }
.top nav a { text-decoration: none; color: var(--soft); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .top nav a:hover { color: var(--ink); } }

.hero { min-height: calc(100svh - 120px); display: flex; flex-direction: column; justify-content: center; padding: 40px 0 80px; }
.hero h1 { font-size: clamp(3rem, 1.2rem + 5vw, 6.5rem); color: var(--ink); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .line > span { display: block; }
.hero h1 .line:last-child > span { color: var(--accent); }
.lead { margin-top: 32px; font-size: var(--step-lead); line-height: 1.35; max-width: 30ch; }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; font-size: 1rem; }

/* ---------- Work: big names, the desktop shows the active one ---------- */
.work { padding-top: 40px; }
.work h2 { font-size: 1.75rem; margin-bottom: 40px; }
.index li a { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 10px 0; text-decoration: none; color: var(--soft); transition: color 250ms ease; }
.index .n { font-family: 'Gambarino', Georgia, serif; font-size: var(--step-name); line-height: 1; letter-spacing: -0.025em; transition: transform 450ms var(--ease-out); }
.index .m { font-size: var(--step-small); white-space: nowrap; }
.index a.is-active { color: var(--ink); }
.index a.is-active .n { transform: translateX(14px); }
.index a.is-active .n::before { content: ""; display: inline-block; width: 0.18em; height: 0.18em; border-radius: 50%; background: var(--mint); margin-right: 0.18em; vertical-align: 0.22em; }
.about-app { margin-top: 32px; max-width: 46ch; font-size: var(--step-body); }
.index .pic { display: none; }

/* ---------- The Hyprland desktop ---------- */
.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 16px; font: 500 0.8125rem/1 'General Sans', sans-serif; color: var(--desk-soft); }
.ws { display: flex; gap: 6px; }
.ws i { font-style: normal; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--desk-2); }
.ws i.on { background: var(--mint); color: var(--ink); }
.host { color: var(--desk-ink); }
.clock { justify-self: end; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-rows: 1.35fr 1fr; gap: 10px; padding: 0 10px 10px; min-height: 0; }
#term-home { min-height: 0; display: grid; }
.win { border-radius: 10px; background: var(--desk-2); box-shadow: inset 0 0 0 2px #26332E; /* taste-skill-ignore: window border of the drawn desktop */ display: grid; grid-template-rows: auto 1fr; overflow: hidden; min-height: 0; }
.win--app { box-shadow: inset 0 0 0 2px var(--mint); /* taste-skill-ignore: active window border */ }
.win__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; font: 500 0.8125rem/1 'General Sans', sans-serif; color: var(--desk-soft); }
.win__title code, .term__in code { font: inherit; font-family: var(--mono); }
.win__open { display: inline-flex; gap: 6px; align-items: center; color: var(--mint); text-decoration: none; font-family: 'General Sans', sans-serif; font-weight: 500; }
.win__open svg { width: 13px; height: 13px; }
.win__body { position: relative; margin: 0 2px 2px; border-radius: 0 0 8px 8px; overflow: hidden; background: #fff; }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity 900ms ease; }
.shot.is-on { opacity: 1; }

/* the terminal (real code-like output: monospace is correct here) */
.term { grid-template-rows: auto 1fr auto auto; font: 400 0.875rem/1.55 'General Sans', sans-serif; }
.term__out { margin: 0; font: 400 0.875rem/1.55 var(--mono); padding: 4px 14px 0; overflow-y: auto; color: var(--desk-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.term__out .c { color: var(--mint); }
.term__out .s { color: var(--desk-soft); }
.term__out a { color: var(--mint); }
.term__in { display: flex; gap: 8px; align-items: center; padding: 6px 14px 4px; }
.term__in label { white-space: nowrap; color: var(--desk-soft); }
.term__in .p { color: var(--mint); }
.term__in .d { color: #7FB8F0; }
.term__in input { flex: 1; min-width: 0; background: none; border: 0; color: var(--desk-ink); font: 400 0.875rem/1.55 var(--mono); caret-color: var(--mint); padding: 6px 0; }
.term__in input:focus { outline: none; }
.term__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 12px; }
.term__chips button { border: 0; border-radius: 6px; background: #1E2B27; color: var(--desk-ink); font: 500 0.8125rem/1 'General Sans', sans-serif; padding: 8px 10px; cursor: pointer; transition: background-color 200ms ease, transform 140ms var(--ease-out); }
.term__chips button:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .term__chips button:hover { background: var(--mint); color: var(--ink); } }

/* ---------- Full-width band ---------- */
.band { margin: 0 var(--gap); border-radius: 20px; background: var(--accent); color: #fff; padding: clamp(56px, 9vw, 140px) clamp(24px, 6vw, 96px); }
.band p { font-family: 'Gambarino', Georgia, serif; font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 26em; }
.band em { font-style: normal; color: #E6F8F0; }

/* ---------- Screens strip ---------- */
.screens { padding: clamp(96px, 11vw, 168px) var(--pad) 0; }
.screens h2 { font-size: var(--step-head); }
.screens__grid { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.screens figure { border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.screens img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 900ms var(--ease-out); }
.screens figcaption { padding: 12px 16px 14px; font-size: var(--step-small); color: var(--soft); }
@media (hover: hover) and (pointer: fine) { .screens figure:hover img { transform: scale(1.03); } }

/* ---------- After the split ---------- */
.after { padding: 0 var(--pad); }
.after__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 112px); align-items: start; margin-top: clamp(96px, 11vw, 168px); }
.letter { max-width: 520px; }
.letter__mark { width: 44px; height: 44px; }
.letter p { margin-top: 1.1em; font-size: 1.0625rem; line-height: 1.6; }
.letter__mark + p { margin-top: 28px; }
.letter .mark { background: var(--mint-pale); padding: 0 4px; border-radius: 4px; }
.letter .sign { margin-top: 36px; font-family: 'Gambarino', Georgia, serif; font-size: 1.75rem; line-height: 1; }
.letter .role { margin-top: 6px; font-size: var(--step-small); color: var(--soft); }

.list { max-width: 560px; }
.list h2 { font: 500 1.625rem/1.1 'General Sans', sans-serif; letter-spacing: -0.02em; margin-bottom: 32px; }
.list .group { margin-top: 40px; font-size: var(--step-small); color: var(--soft); }
.list h2 + .group { margin-top: 0; }
.list li > a, .list li > div { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; text-decoration: none; font-size: 1rem; }
.list i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); transform: translateY(2px); }
.list small { display: block; margin-top: 2px; color: var(--soft); font-size: var(--step-small); }
.list b { font-weight: 400; font-size: var(--step-small); color: var(--soft); white-space: nowrap; }
.list a b { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .list li > a:hover span { color: var(--accent); } }

.contact { margin-top: clamp(96px, 11vw, 168px); background: var(--paper-2); border-radius: 20px; padding: clamp(32px, 6vw, 88px); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px 64px; align-items: start; }
.contact > h2 { grid-column: 1 / -1; }
.contact .field, .contact .hint { grid-column: 1; }
.contact .rows { grid-column: 2; grid-row: 2 / span 2; margin-top: 0; align-self: start; }
.contact h2 { font-family: 'Gambarino', Georgia, serif; font-size: var(--step-head); line-height: 1; letter-spacing: -0.02em; }
.contact h2 span { display: block; }
.contact h2 span:first-child { color: var(--soft); }
.field { position: relative; margin-top: 28px; }
.field input[type="email"] { width: 100%; height: 64px; border: 0; border-radius: var(--r); background: #fff; padding: 0 64px 0 20px; font: inherit; font-size: 1.0625rem; color: var(--ink); transition: box-shadow 200ms ease; }
.field input[type="email"]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); /* taste-skill-ignore: focus ring */ }
.field button { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform 140ms var(--ease-out), background-color 200ms ease; }
.field button svg { width: 18px; height: 18px; }
.field button:active { transform: scale(0.92); }
.field.is-sending button { animation: pulse 900ms ease infinite; }
.field.is-done input[type="email"] { box-shadow: inset 0 0 0 2px var(--mint); /* taste-skill-ignore: sent state */ }
.hint { margin-top: 16px; font-size: var(--step-small); color: var(--soft); min-height: 1.4em; }
.hint.is-done { color: var(--accent); font-weight: 500; }
.hint.is-bad { color: #B42318; font-weight: 500; }
.rows { margin-top: 72px; display: grid; gap: 10px; font-size: 0.9375rem; }
.rows div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; }
.rows dt { color: var(--soft); }

.foot { margin-top: 120px; padding: 0 0 30px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: baseline; font-size: 0.9375rem; color: var(--soft); }
.foot__links { display: flex; gap: 24px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot > :last-child { text-align: right; }
.foot > :last-child a { color: var(--soft); text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes line-up { from { transform: translateY(110%); } to { transform: none; } }
@keyframes pulse { 50% { transform: scale(0.9); } }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .line > span { animation: line-up 1000ms var(--ease-out) both; }
  .js .hero h1 .line:last-child > span { animation-delay: 110ms; }
  .js [data-rise] { animation: rise 800ms var(--ease-out) 350ms both; }
  .js .stage { animation: rise 900ms var(--ease-out) 150ms both; }
  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .index.is-in li { animation: rise 600ms var(--ease-out) both; }
  .js .index.is-in li:nth-child(2) { animation-delay: 60ms; } .js .index.is-in li:nth-child(3) { animation-delay: 120ms; }
  .js .index.is-in li:nth-child(4) { animation-delay: 180ms; } .js .index.is-in li:nth-child(5) { animation-delay: 240ms; }
  .js .index.is-in li:nth-child(6) { animation-delay: 300ms; }
  .shot.is-on { animation: settle 6s ease-out both; }
}
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }

/* ---------- Tablet and phone ---------- */
@media (max-width: 960px) {
  .mark span { display: none; }
  .page { grid-template-columns: 1fr; padding: var(--gap); }
  .stage { order: -1; position: sticky; top: var(--gap); height: 40svh; z-index: 0; }
  .read { position: relative; z-index: 1; background: var(--paper); border-radius: 20px 20px 0 0; margin-top: -40px; padding-top: 4px; }
  .tiles { grid-template-rows: 1fr; }
  #term-home { display: none; }
  .term-phone { padding: 0 var(--gap); margin-top: 12px; }
  .term-phone .term { height: 380px; }
  .hero { min-height: 0; padding: 32px 0 64px; }
  .index li a { flex-direction: column; gap: 4px; padding: 0 0 36px; }
  .index .pic { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--r); margin-bottom: 14px; }
  .after__grid, .contact { grid-template-columns: 1fr; }
  .contact .rows { grid-column: 1; grid-row: auto; margin-top: 32px; }
  .index a.is-active .n { transform: none; }
  .foot { grid-template-columns: 1fr; gap: 8px; }
  .foot > :last-child { text-align: left; }
  .screens { display: none; }
  .term-phone { padding: 0 var(--gap); margin-top: var(--gap); }
}
@media (max-width: 640px) {
  .top nav { gap: 16px; font-size: 0.9375rem; }
  .top nav a:nth-child(2), .top nav a:nth-child(3) { display: none; }
  .top { padding: 20px 0; }
  .mark span { display: none; }
  .screens__grid { grid-template-columns: 1fr; }
  .host { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .clock { white-space: nowrap; }
  .hero h1 { font-size: 11vw; }
  .hero { padding: 16px 0 56px; }
  .lead { margin-top: 20px; font-size: 1.125rem; }
  .band p { font-size: 1.375rem; }
  .contact h2 { font-size: 1.5rem; }
  .contact { padding: 28px 18px; }
  .after { padding: 0 16px; }
  .actions .btn { width: 100%; justify-content: space-between; }
  .index .n { font-size: 11vw; }
  .rows div { grid-template-columns: 1fr; gap: 2px; }
  .band { padding: 48px 22px; }
}
