/* fedeguzman.com — mobile-first. Tokens first, then layout, then console. */

:root {
  --navy: #012456;          /* PowerShell console blue */
  --navy-2: #0a3470;
  --prompt: #f2d04b;        /* PowerShell prompt yellow */
  --cyan: #5fd4e6;
  --paper: #f4f6fa;
  --surface: #ffffff;
  --ink: #16202e;
  --muted: #586579;
  --line: #d9dfe8;
  --link: #1e7f86;
  --chip: #e8edf4;
  --focus: #e0a800;
  --shadow: 0 1px 0 rgba(1, 36, 86, .06), 0 12px 32px -18px rgba(1, 36, 86, .35);

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.8rem, 4vw, 2.4rem);
  --step-4: clamp(2.6rem, 9vw, 5.2rem);

  --gutter: 16px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1522; --surface: #131d2d; --ink: #e8edf4; --muted: #9aa7ba;
    --line: #26344a; --link: #6fd0d6; --chip: #1c2a3f;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 12px 32px -18px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1522; --surface: #131d2d; --ink: #e8edf4; --muted: #9aa7ba;
  --line: #26344a; --link: #6fd0d6; --chip: #1c2a3f;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 12px 32px -18px rgba(0,0,0,.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--prompt); color: var(--navy); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; }
.mark img { width: 34px; height: auto; }
:root[data-theme="dark"] .mark img { filter: brightness(0) invert(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark img { filter: brightness(0) invert(.92); } }
.mark span { display: none; }
.nav { display: none; gap: 18px; margin-left: auto; font-size: var(--step--1); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.mode {
  display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px;
  background: var(--chip); border: 1px solid var(--line); position: relative;
}
.mode button {
  appearance: none; border: 0; background: none; cursor: pointer; position: relative; z-index: 1;
  font: 600 13px/1 var(--body); color: var(--muted); padding: 8px 12px; border-radius: 999px; min-height: 32px;
}
.mode button[aria-pressed="true"] { color: var(--surface); }
.mode::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--ink); transition: transform .25s ease;
}
.mode[data-mode="console"]::before { transform: translateX(100%); background: var(--navy); }
.mode[data-mode="console"] button[aria-pressed="true"] { color: var(--prompt); }
.icon-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }

@media (min-width: 900px) {
  .mark span { display: inline; }
  .nav { display: flex; }
  .tools { margin-left: 18px; }
}

/* ---------- hero ---------- */
.hero { padding: 40px 0 56px; }
.hero .wrap { display: grid; gap: 36px; }
.hello { color: var(--muted); font-size: var(--step-1); margin-bottom: 10px; }
.hero h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.035em; line-height: .95; }
.hero h1 .last { display: block; color: var(--muted); font-weight: 300; }
.roles { margin: 22px 0 0; font-size: var(--step-1); max-width: 34ch; }
.roles strong { font-weight: 600; }
.avail {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 14px 8px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: var(--step--1);
}
.avail i { width: 9px; height: 9px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px rgba(43,182,115,.18); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  font: 600 var(--step-0)/1 var(--body); text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn.primary { background: var(--ink); color: var(--surface); }
.btn.ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.portrait { position: relative; max-width: 460px; justify-self: center; width: 100%; }
.portrait img {
  width: 78%; aspect-ratio: 23 / 24; object-fit: cover; border-radius: 18px; margin-left: auto;
  filter: grayscale(1) contrast(1.05); box-shadow: var(--shadow);
}
.shell {
  background: var(--navy); color: #eeedf0; border-radius: 12px; font: 400 13.5px/1.55 var(--mono);
  box-shadow: 0 24px 48px -24px rgba(1, 36, 86, .7); overflow: hidden;
}
.portrait .shell { position: relative; margin-top: -88px; width: 92%; }
.shell-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; background: var(--navy-2);
  font: 500 12px/1 var(--body); color: #a9bad4;
}
.shell-bar b { font-weight: 500; flex: 1; }
.shell-body { padding: 14px 14px 16px; overflow-x: auto; white-space: pre; }
.shell-body .ps { color: var(--prompt); }
.shell-body .c { color: var(--cyan); }
.shell-body .dim { color: #8ea3c4; }
.copy {
  appearance: none; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #eeedf0;
  font: 500 12px/1 var(--body); padding: 7px 10px; border-radius: 6px; cursor: pointer; min-height: 30px;
}
.copy:hover { background: rgba(255,255,255,.08); }
.copy.done { color: var(--prompt); border-color: var(--prompt); }

@media (min-width: 900px) {
  .hero { padding: 72px 0 96px; }
  .hero .wrap { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .portrait { justify-self: end; }
}

/* ---------- sections ---------- */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
.block-head { display: grid; gap: 10px; margin-bottom: 30px; }
.block-head h2 { font-size: var(--step-3); font-weight: 700; }
.block-head p { color: var(--muted); max-width: 60ch; margin: 0; }
@media (min-width: 900px) {
  section.block { padding: 88px 0; }
  .split { display: grid; grid-template-columns: 280px 1fr; gap: 56px; }
  .split .block-head { position: sticky; top: 92px; align-self: start; }
}

/* about */
.lede { font-size: var(--step-1); max-width: 62ch; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; margin: 34px 0 0; padding: 0; list-style: none; }
.figures li { border-top: 2px solid var(--ink); padding-top: 12px; }
.figures b { display: block; font: 800 var(--step-3)/1 var(--display); letter-spacing: -.02em; }
.figures span { display: block; color: var(--muted); font-size: var(--step--1); margin-top: 6px; }
@media (min-width: 700px) { .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ventures { margin-top: 30px; color: var(--muted); font-size: var(--step--1); }
.ventures a { font-weight: 600; }

/* capabilities */
.caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.caps li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.caps li:first-child { border-top: 1px solid var(--line); }
.caps h3 { font-size: var(--step-1); font-weight: 600; }
.caps p { margin: 0; color: var(--muted); }
@media (min-width: 700px) {
  .caps { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .caps li:nth-child(2) { border-top: 1px solid var(--line); }
}

/* experience timeline: it's a real sequence, so it gets a line */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.job { position: relative; padding: 0 0 36px 32px; }
.job::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.job.now::before { background: var(--prompt); border-color: var(--navy); }
.job .when { font-size: var(--step--1); color: var(--muted); }
.job h3 { font-size: var(--step-2); font-weight: 700; margin: 4px 0 2px; }
.job .org { font-weight: 600; }
.job .org span { color: var(--muted); font-weight: 400; }
.job ul { margin: 12px 0 0; padding-left: 1.1em; max-width: 66ch; }
.job li { margin: 6px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.tags li, .chip {
  font-size: 13px; line-height: 1; padding: 7px 10px; border-radius: 999px; background: var(--chip); color: var(--ink); margin: 0;
}

/* skills */
.skill-find { display: flex; gap: 10px; margin-bottom: 26px; }
.skill-find input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit;
}
.skill-groups { display: grid; gap: 26px; }
@media (min-width: 700px) { .skill-groups { grid-template-columns: 1fr 1fr; gap: 30px 40px; } }
.skill-groups h3 { font: 600 var(--step-0)/1.3 var(--body); margin-bottom: 10px; }
.skill-groups ul { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chip.hit { background: var(--prompt); color: var(--navy); }
.chip.miss { opacity: .35; }
.skill-empty { color: var(--muted); }
.cert { margin-top: 34px; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.cert svg { flex: none; width: 34px; height: 34px; color: var(--link); }
.cert p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.cert strong { display: block; color: var(--ink); font-size: var(--step-0); }

/* projects */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs button {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  font: 600 14px/1 var(--body); padding: 10px 14px; border-radius: 999px; min-height: 40px;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.repo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 700px) { .repo-list { grid-template-columns: 1fr 1fr; } }
.repo {
  position: relative; padding: 18px 18px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.repo:hover { border-color: var(--muted); }
.repo h3 { font-size: var(--step-1); font-weight: 700; }
.repo h3 a { color: var(--ink); text-decoration: none; }
.repo h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.repo p { margin: 0; color: var(--muted); font-size: 15px; }
.repo .meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); margin-top: auto; }
.repo .lang::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lang, #888); margin-right: 6px; }
.more-repos { margin-top: 18px; color: var(--muted); font-size: var(--step--1); }
.simple-list { list-style: none; margin: 0; padding: 0; }
.simple-list li { border-bottom: 1px solid var(--line); }
.simple-list a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; color: var(--ink); text-decoration: none; }
.simple-list a:hover strong { text-decoration: underline; }
.simple-list span { color: var(--muted); text-align: right; font-size: var(--step--1); }

/* goals */
.goals { display: grid; gap: 30px; }
@media (min-width: 700px) { .goals { grid-template-columns: 1fr 1fr; gap: 40px; } }
.goals h3 { font-size: var(--step-1); font-weight: 700; margin-bottom: 10px; }
.goals ul { margin: 0; padding-left: 1.1em; }
.goals li { margin: 8px 0; }
.motto {
  margin: 40px 0 0; font: 700 var(--step-3)/1.15 var(--display); letter-spacing: -.02em; max-width: 24ch;
}
.writing { margin-top: 26px; color: var(--muted); }

/* api band */
.api-band { background: var(--navy); color: #dfe6f1; border-top: 0; }
.api-band .block-head h2 { color: #fff; }
.api-band .block-head p { color: #a9bad4; }
.api-band a { color: var(--cyan); }
.api-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .api-grid { grid-template-columns: 1fr 1fr; } }
.api-band .shell { background: #001a40; }
.api-band .shell-bar { background: #00153a; }
.api-notes { font-size: 15px; color: #a9bad4; }
.api-notes code { font-family: var(--mono); color: var(--prompt); font-size: 14px; }

/* contact */
.contact h2 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.035em; line-height: .95; max-width: 12ch; }
.contact .mail { display: inline-block; margin-top: 24px; font: 600 var(--step-2)/1.2 var(--display); word-break: break-all; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
footer { padding: 30px 0 40px; color: var(--muted); font-size: var(--step--1); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer code { font-family: var(--mono); font-size: 13px; }

.loading { color: var(--muted); }
.error-box { padding: 16px; border-radius: 12px; border: 1px solid #c0392b; color: var(--ink); background: var(--surface); }

/* entrance: one orchestrated moment on the hero only */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero .intro > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.hero .intro > *:nth-child(2) { animation-delay: .06s; }
.hero .intro > *:nth-child(3) { animation-delay: .12s; }
.hero .intro > *:nth-child(4) { animation-delay: .18s; }
.hero .intro > *:nth-child(5) { animation-delay: .24s; }
.hero .portrait { animation: rise .7s .2s cubic-bezier(.2,.7,.2,1) both; }

/* ================= console mode ================= */
#console { display: none; }
body.console-mode { background: var(--navy); }
body.console-mode #web { display: none; }
body.console-mode #console { display: block; }
body.console-mode .top { background: rgba(1, 36, 86, .92); border-bottom-color: #0d3a78; }
body.console-mode .mark, body.console-mode .nav a { color: #dfe6f1; }
body.console-mode .mark img { filter: brightness(0) invert(.92); }
body.console-mode .nav { display: none; }
body.console-mode .mode { background: #0a3470; border-color: #1a4a8a; }
body.console-mode .icon-btn { background: #0a3470; border-color: #1a4a8a; color: #dfe6f1; }

.term {
  min-height: calc(100svh - 60px); color: #eeedf0; font: 400 14px/1.55 var(--mono);
  padding: 18px var(--gutter) 40px; max-width: 980px; margin: 0 auto; cursor: text;
}
@media (min-width: 700px) { .term { font-size: 15px; padding-top: 28px; } }
.term-out { white-space: pre-wrap; word-break: break-word; }
.term-out .y { color: var(--prompt); }
.term-out .c { color: var(--cyan); }
.term-out .w { color: #fff; font-weight: 600; }
.term-out .g { color: #8ea3c4; }
.term-out .r { color: #ff8f8f; }
.term-out .ok { color: #7ee2a8; }
.term-out a { color: var(--cyan); }
.term-out .rule { color: #3b6fb6; }
.term-out .h { color: #fff; font-weight: 600; }
.term-line { display: flex; align-items: baseline; gap: .6ch; margin-top: 4px; }
.term-line label { color: var(--prompt); white-space: nowrap; }
.term-line label b { color: var(--cyan); font-weight: 400; }
.term-line input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff;
  font: inherit; caret-color: var(--prompt); padding: 0;
}
.term-hints { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; }
.term-hints button {
  appearance: none; font: 500 13px/1 var(--mono); color: #dfe6f1; background: #0a3470; border: 1px solid #1a4a8a;
  padding: 9px 11px; border-radius: 6px; cursor: pointer; min-height: 36px;
}
.term-hints button:hover { border-color: var(--prompt); color: var(--prompt); }

/* ---------- sites & apps ---------- */
.site .kind { font-size: 13px; color: var(--muted); margin-top: -4px; }
.site .tags { margin-top: 2px; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.also { font: 600 var(--step-0)/1.3 var(--body); margin: 34px 0 6px; color: var(--muted); }

/* ---------- API guide ---------- */
.inline-code { font-family: var(--mono); font-size: .9em; background: var(--chip); padding: 1px 6px; border-radius: 4px; }
.guide-intro { font-size: var(--step-1); max-width: 62ch; }
.guide-h { font-size: var(--step-2); font-weight: 700; margin: 44px 0 16px; }
.guide-h:first-of-type { margin-top: 30px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 26px 52px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--prompt); font: 600 15px/1 var(--mono);
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 6px; width: 2px; background: var(--line); }
.steps h4 { font: 600 var(--step-1)/1.3 var(--body); margin: 2px 0 4px; }
.steps p { color: var(--muted); margin: 0 0 10px; max-width: 62ch; }
.cmd {
  display: flex; align-items: center; gap: 10px; background: var(--navy); color: #eeedf0; border-radius: 10px;
  padding: 8px 8px 8px 14px; max-width: 100%;
}
.cmd code { flex: 1; min-width: 0; font: 400 13.5px/1.5 var(--mono); overflow-x: auto; white-space: pre; padding: 4px 0; }
.cmd .ps { color: var(--prompt); }
.cmd .c { color: var(--cyan); }
.cmd .copy { flex: none; }
.cmd-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmd-table th, .cmd-table td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmd-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.cmd-table code { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }
.tbl { overflow-x: auto; }
.examples { display: grid; gap: 18px; }
.example p { margin: 0 0 6px; font-weight: 600; }
.shell-name { font: 400 12px/1 var(--mono); color: var(--muted); margin-left: 6px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style-position: outside; }
.faq summary::marker { color: var(--muted); }
.faq details p { color: var(--muted); margin: 0 0 16px; max-width: 64ch; }
.guide-note { margin-top: 30px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.split > * { min-width: 0; }
.examples > *, .steps > li, .faq { min-width: 0; }
