:root {
  --bg: #FDF1F3;
  --ink: #3A1F1A;
  --ink-soft: #5A3A33;
  --accent: #A81F48;
  --accent-dark: #7E1535;
  --custard: #F4C34E;
  --pink: #F7C9D4;
  --cocoa: #6B3A2A;
  --white: #FFFFFF;
  --line-dark: #7A5A52;
  --dash: #D9B8B0;
  --ok: #2E8B57;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.page { min-height: 100vh; overflow-x: clip; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
section[id] { scroll-margin-top: 16px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.route { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.h2 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.03em; }
.muted { color: var(--ink-soft); }

/* Header */
.hdr { padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; color: var(--ink); }
.logo span { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.logo:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 14px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav a:hover { background: var(--white); color: var(--accent); }
.lang { display: flex; padding: 3px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); }
.lang button { min-width: 46px; min-height: 40px; border: 0; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; background: transparent; color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 14px; border: 2px solid var(--ink); text-decoration: none; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--white); color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.chip:hover { background: var(--ink); color: var(--white); }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.badge { align-self: flex-start; font-family: var(--mono); font-size: 14px; padding: 6px 12px; border-radius: 8px; background: var(--ink); color: var(--custard); }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 7.4vw, 96px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
.accent { color: var(--accent); }
.caret { display: inline-block; width: 0.08em; height: 0.8em; margin-left: 0.06em; background: var(--accent); vertical-align: -0.05em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-intro { font-size: 20px; max-width: 560px; color: var(--ink-soft); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.response { flex: 1 1 380px; min-width: 0; max-width: 500px; margin: 0 auto; border: 2px solid var(--ink); border-radius: 22px; background: var(--white); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; font-family: var(--mono); font-size: 14.5px; line-height: 1.75; }
.req { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--pink); border-bottom: 2px solid var(--ink); }
.method { padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--custard); font-weight: 500; }
.method-post { background: var(--accent); color: var(--white); }
.url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 999px; background: var(--ok); }
.json { margin: 0; padding: 18px 20px; overflow-x: auto; white-space: pre; font: inherit; color: var(--ink); }
.json .k { color: var(--accent); }
.json .s { color: var(--cocoa); }

/* About */
.band-white { background: var(--white); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.sec { padding-top: 96px; padding-bottom: 96px; }
.about { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.about-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.lead { font-size: 20px; margin-top: 8px; text-wrap: pretty; }
.about-text .muted { text-wrap: pretty; }
.deps { flex: 1 1 420px; min-width: 0; align-self: flex-start; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; }
.deps-hd { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 13px; }
.deps-hd span:last-child { color: var(--custard); }
.deps dl { margin: 0; }
.deps dl > div { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 18px; border-top: 1.5px dashed var(--dash); }
.deps dt { flex: 0 0 150px; font-family: var(--mono); font-size: 13.5px; font-weight: 500; color: var(--accent); }
.deps dd { flex: 1 1 220px; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.deps dd span { padding: 1px 8px; border-radius: 6px; background: var(--bg); font-size: 14px; }

/* Projects */
#projects .h2 { margin: 12px 0; }
.sub { max-width: 600px; margin-bottom: 40px; }
.projects { display: flex; flex-direction: column; gap: 28px; }
.project { display: flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 28px; background: var(--white); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.project-main { flex: 1 1 300px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.project-pink .project-main { background: var(--pink); }
.state { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; }
.state::before { content: ""; width: 10px; height: 10px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--custard); }
.state-live::before { background: var(--ok); }
.project h3 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.05; letter-spacing: -0.025em; }
.project-main p { text-wrap: pretty; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.project-detail { flex: 1.3 1 360px; min-width: 0; padding: 32px; border-left: 2px solid var(--ink); display: flex; flex-direction: column; gap: 18px; }
.points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.points li { display: flex; gap: 14px; align-items: flex-start; text-wrap: pretty; }
.tag { flex: none; margin-top: 2px; padding: 2px 7px; border-radius: 6px; background: var(--custard); border: 1.5px solid var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.stack { margin-top: auto; padding-top: 14px; border-top: 1.5px dashed var(--dash); font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }

/* Journey */
.band-dark { background: var(--ink); color: var(--bg); }
.band-dark .route { color: var(--custard); }
.band-dark .h2 { margin: 12px 0 40px; }
.log { list-style: none; padding: 0; }
.log > li { display: flex; gap: 24px; }
.graph { flex: none; width: 22px; display: flex; flex-direction: column; align-items: center; }
.graph::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 5px; border-radius: 999px; border: 3px solid var(--custard); background: var(--ink); }
.graph::after { content: ""; flex: 1; width: 2px; background: var(--line-dark); }
.log > li:first-child .graph::before { background: var(--custard); }
.entry { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 40px; padding-bottom: 36px; }
.when { flex: 0 0 190px; padding-top: 3px; font-family: var(--mono); font-size: 14px; color: var(--custard); }
.entry > div { flex: 1 1 340px; min-width: 0; }
.entry h3 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.org { margin-bottom: 6px; color: var(--pink); font-weight: 500; }
.entry p:not(.org) { color: #E9D3CE; text-wrap: pretty; }
.certs { margin-top: 8px; padding-top: 28px; border-top: 1.5px solid var(--line-dark); }
.certs h3 { margin-bottom: 16px; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--custard); }
.certs ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.certs li { padding: 6px 14px; border-radius: 10px; border: 1.5px solid var(--line-dark); font-size: 14px; }

/* Contact */
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; }
.contact-text { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cta-title { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5vw, 60px); line-height: 1; letter-spacing: -0.03em; }
.contact-text p { max-width: 440px; text-wrap: pretty; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.compose { flex: 1.2 1 360px; min-width: 0; border: 2px solid var(--ink); border-radius: 22px; background: var(--custard); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.compose .req { background: var(--white); font-family: var(--mono); font-size: 14px; }
.fields { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 13px; }
.fields input, .fields textarea { font-family: var(--body); font-size: 16px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); color: var(--ink); }
.fields input { min-height: 48px; }
.fields textarea { resize: vertical; }
.fields .btn { align-self: flex-start; }
.fields .btn:hover { background: var(--accent); border-color: var(--accent); }

/* Footer */
.ftr { padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 14px; color: var(--ink-soft); }

/* Phones */
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hdr { padding-top: 16px; padding-bottom: 16px; }
  .lang { order: 2; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 0; padding-top: 4px; border-top: 1.5px solid #E9C9C2; font-size: 13px; }
  .nav a { padding: 0 6px; }
  .hero { padding-top: 24px; padding-bottom: 56px; gap: 40px; }
  .hero-intro { font-size: 18px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .response { font-size: 12.5px; box-shadow: 5px 5px 0 var(--ink); }
  .json { padding: 14px 16px; }
  .sec { padding-top: 56px; padding-bottom: 56px; }
  .lead { font-size: 18px; }
  .project-main, .project-detail { padding: 22px; }
  .project-detail { border-left: 0; border-top: 2px solid var(--ink); }
  .log > li { gap: 14px; }
  .compose { box-shadow: 5px 5px 0 var(--ink); }
  .fields .btn { align-self: stretch; justify-content: center; }
  .ftr { padding-bottom: 32px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .caret { animation: none; }
}
