/* Poppy Folio. Change the brand colours in :root. */

@font-face { font-family: "Gabarito"; src: url("../fonts/gabarito-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --cream: #fff6e9;
  --white: #ffffff;
  --ink: #1c1712;
  --soft: #5a4f44;
  --tomato: #e8462a;
  --tomato-text: #c23a1f;
  --cobalt: #2d46b9;
  --sun: #ffc93c;
  --mint: #8ed9b8;
  --peach: #ffd2c6;
  --lilac: #cfd6ff;
  --border: 3px solid var(--ink);
  --font: "Gabarito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 var(--font); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
a, button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .7; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--sun); font-weight: 800; }
.skip:focus { top: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: var(--border); border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 800; font-size: 17px; text-decoration: none; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-sm { min-height: 46px; padding: 0 20px; }
.link { border: 0; background: none; padding: 4px 6px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--cream); border-bottom: 3px solid transparent; }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; }
.logo { font-weight: 900; font-size: 26px; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.nav a:hover { background: var(--sun); }
.nav a[aria-current] { background: var(--ink); color: var(--cream); }
.hd-actions { display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 48px; height: 48px; border: var(--border); border-radius: 50%; background: var(--white); }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 3px; margin: auto; border-radius: 2px; background: var(--ink); position: relative; transition: transform .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; left: 12px; right: 12px; top: calc(100% - 4px); flex-direction: column; padding: 10px; border: var(--border); border-radius: 26px; background: var(--white); }
  .nav-open .nav { display: flex; }
  .nav a { min-height: 50px; display: flex; align-items: center; font-size: 20px; }
}
@media (max-width: 480px) { .hd-actions .btn-sm { display: none; } }

/* Hero */
.hero { padding: 32px 0 0; }
.hero-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.kicker { font-weight: 700; color: var(--soft); margin-bottom: 14px; }
.hero h1 { margin-bottom: 20px; font-weight: 900; font-size: clamp(48px, 7vw, 98px); line-height: .94; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; background: var(--sun); padding: 0 .12em; border-radius: .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lead { color: var(--soft); font-size: 20px; font-weight: 500; max-width: 42ch; }
.hero .lead { margin-bottom: 28px; }
.frame { position: relative; justify-self: center; width: min(440px, 100%); }
.frame-bg { position: absolute; inset: 7% -5% -4% 6%; background: var(--cobalt); border-radius: 220px 220px 32px 32px; }
.frame img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--sun); border: var(--border); border-radius: 220px 220px 32px 32px; }
/* Round sticker on the photo frame */
.stk { position: absolute; display: grid; place-items: center; text-align: center; border: var(--border); font-weight: 900; }
.stk-status { right: -18px; top: 26px; width: 124px; height: 124px; padding: 12px; border-radius: 50%; background: var(--mint); rotate: 12deg; font-size: 18px; line-height: 1.05; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 56px; }
.stats div { display: flex; align-items: baseline; gap: 10px; padding: 12px 22px; border: var(--border); border-radius: 999px; background: var(--white); }
.stats div:nth-child(3n+1) { background: var(--peach); } .stats div:nth-child(3n+2) { background: var(--lilac); } .stats div:nth-child(3n) { background: var(--mint); }
.stats b { font-size: 26px; font-weight: 900; }
.stats span { font-weight: 600; }

/* Sections */
.sec { padding: 80px 0; }
.sec h2 { margin-bottom: 28px; font-weight: 900; font-size: clamp(38px, 5vw, 62px); line-height: 1; letter-spacing: -0.02em; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.sec-head h2 { margin: 0; }
.h3 { margin: 40px 0 16px; font-size: 30px; font-weight: 900; }
.load-error { margin: 24px auto; padding: 14px 18px; border: var(--border); border-radius: 18px; background: var(--peach); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; padding: 0 18px; border: var(--border); border-radius: 999px; background: var(--white); font-weight: 800; }
.chips button:hover { background: var(--sun); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.proj-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.proj { display: flex; flex-direction: column; border: var(--border); border-radius: 28px; overflow: hidden; background: var(--white); text-decoration: none; transition: transform .2s; }
.proj:hover { transform: translateY(-4px) rotate(-.5deg); }
.proj-grid .proj:nth-child(6n+1), .proj-grid .proj:nth-child(6n+4), .proj-grid .proj:nth-child(6n+5) { grid-column: span 2; }
.proj-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: var(--border); }
.proj-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 20px; }
.proj-meta { align-self: flex-start; padding: 2px 12px; border-radius: 999px; background: var(--sun); font-size: 14px; font-weight: 800; }
.proj:nth-child(4n+2) .proj-meta { background: var(--mint); }
.proj:nth-child(4n+3) .proj-meta { background: var(--peach); }
.proj:nth-child(4n) .proj-meta { background: var(--lilac); }
.proj-title { margin-top: 6px; font-size: 26px; font-weight: 900; line-height: 1.1; }
.proj-text { color: var(--soft); font-weight: 500; }
.tags { display: none; }

.band-sun { background: var(--sun); border-block: var(--border); }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.services li { padding: 24px; border: var(--border); border-radius: 26px; background: var(--cream); }
.services li:nth-child(2) { rotate: 1deg; } .services li:nth-child(3) { rotate: -1deg; }
.services h3 { margin-bottom: 8px; font-size: 24px; font-weight: 900; }
.services p { color: var(--soft); font-weight: 500; }

.cv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.box { padding: 28px; border: var(--border); border-radius: 28px; background: var(--white); }
.box h3 { margin-bottom: 18px; font-size: 30px; font-weight: 900; }
.box-blue { background: var(--cobalt); color: var(--white); }
.box-blue .tl-org, .box-blue .tl-text { color: #e1e5ff; }
.box-blue .tl-when { background: var(--white); color: var(--ink); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tl li { display: grid; grid-template-columns: 120px 1fr; gap: 4px 14px; }
.tl-when { grid-row: span 3; align-self: start; justify-self: start; padding: 2px 10px; border-radius: 10px; background: var(--sun); font-weight: 800; font-size: 15px; }
.tl-title { font-size: 20px; font-weight: 800; }
.tl-org { color: var(--soft); font-weight: 600; }
.tl-text { color: var(--soft); font-size: 16px; }
.skill-groups { display: grid; gap: 18px; }
.skill-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.skill-group h3 { min-width: 110px; font-size: 20px; font-weight: 900; }
.skill-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skill-group li { padding: 10px 18px; border: var(--border); border-radius: 999px; background: var(--white); font-weight: 800; }
.skill-group li.main:nth-child(odd) { background: var(--peach); }
.skill-group li.main:nth-child(even) { background: var(--lilac); }

.cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cert { display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: center; padding: 18px; border: var(--border); border-radius: 24px; background: var(--white); }
.cert-mark { display: grid; place-items: center; width: 60px; height: 60px; border: var(--border); border-radius: 50%; background: var(--mint); font-weight: 900; }
.cert h3 { font-size: 19px; font-weight: 800; }
.cert p { color: var(--soft); font-weight: 500; }
.cert a { font-weight: 800; color: var(--cobalt); }
.tl-plain li { padding: 18px; border: var(--border); border-radius: 24px; background: var(--white); }

/* Contact */
.contact { background: var(--cobalt); color: var(--white); }
.contact .lead { color: #e1e5ff; margin-bottom: 22px; }
.contact-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.direct { margin-bottom: 22px; font-size: 26px; font-weight: 900; }
.direct a { text-underline-offset: 5px; }
.contact .link { color: var(--white); }
.contact .btn-line { color: var(--white); border-color: var(--white); }
.form { display: grid; gap: 16px; padding: 28px; border: var(--border); border-radius: 30px; background: var(--cream); color: var(--ink); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--white); }
.field textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--tomato-text) !important; background: #fff1ee !important; }
.err { color: var(--tomato-text); font-size: 15px; font-weight: 700; }
.form-note { padding: 12px 16px; border: 2px solid var(--ink); border-radius: 16px; font-weight: 700; }
.form-note.ok { background: var(--mint); }
.form-note.bad { background: var(--peach); }

.foot { background: var(--ink); color: var(--cream); }
.ft { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-block: 32px; }
.ft .logo { font-size: 24px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { padding: 6px 14px; border: 2px solid var(--cream); border-radius: 999px; font-weight: 700; text-decoration: none; }
.social a:hover { background: var(--sun); color: var(--ink); border-color: var(--sun); }

/* Project page */
.case { padding-top: 32px; padding-bottom: 80px; }
.back { display: inline-flex; margin-bottom: 24px; padding: 8px 16px; border: var(--border); border-radius: 999px; background: var(--white); font-weight: 800; text-decoration: none; }
.back::before { content: "← "; white-space: pre; }
.cs-head { max-width: 900px; margin-bottom: 28px; }
.cs-head .proj-meta { display: inline-block; }
.cs-head h1 { margin: 10px 0 14px; font-weight: 900; font-size: clamp(46px, 7vw, 90px); line-height: .95; letter-spacing: -0.03em; }
.cs-lead { color: var(--soft); font-size: 21px; font-weight: 500; margin-bottom: 22px; }
.cs-cover { margin: 0 0 40px; border: var(--border); border-radius: 30px; overflow: hidden; }
.cs-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; max-height: 760px; }
.cs-body { display: grid; grid-template-columns: 300px 1fr; gap: 48px; }
.cs-facts { margin: 0; display: grid; gap: 12px; align-content: start; }
.cs-facts div { padding: 14px 18px; border: var(--border); border-radius: 20px; background: var(--white); }
.cs-facts div:nth-child(1) { background: var(--peach); } .cs-facts div:nth-child(2) { background: var(--lilac); } .cs-facts div:nth-child(3) { background: var(--mint); }
.cs-facts dt { font-size: 14px; font-weight: 800; }
.cs-facts dd { margin: 0; font-size: 18px; font-weight: 700; }
.cs-text { display: grid; gap: 28px; max-width: 68ch; }
.cs-part h2 { margin-bottom: 8px; font-size: 30px; font-weight: 900; }
.cs-part p, .cs-part li { color: var(--soft); font-size: 18px; font-weight: 500; }
.cs-part ul { margin: 0; padding-left: 22px; }
.cs-gallery { margin-top: 56px; display: grid; gap: 22px; }
.cs-gallery h2 { font-size: 34px; font-weight: 900; }
.cs-gallery figure { margin: 0; }
.cs-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: var(--border); border-radius: 28px; }
.cs-gallery figcaption { margin-top: 10px; font-weight: 700; color: var(--soft); }
.cs-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.cs-nav a { display: grid; gap: 2px; padding: 22px; border: var(--border); border-radius: 26px; background: var(--sun); text-decoration: none; font-weight: 900; font-size: 26px; }
.cs-nav a:last-child { background: var(--mint); text-align: right; }
.cs-nav small { font-size: 15px; font-weight: 700; }
.nf { display: grid; gap: 18px; justify-items: start; padding: 60px 0; font-size: 21px; font-weight: 600; }

/* 404 */
.lost { min-height: 100dvh; display: grid; place-items: center; }
.lost-in { display: grid; gap: 18px; justify-items: start; padding-block: 60px; }
.stk-lost { position: static; width: 140px; height: 140px; border-radius: 50%; background: var(--sun); font-size: 40px; rotate: -8deg; }
.lost h1 { font-weight: 900; font-size: clamp(42px, 7vw, 76px); line-height: 1; }
.lost p { color: var(--soft); font-size: 20px; font-weight: 500; }

@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-grid .proj:nth-child(n) { grid-column: auto; }
  .proj-grid .proj:nth-child(3n+1) { grid-column: span 2; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 18px; }
  .hero-in, .cv, .contact-in, .cs-body { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .frame { order: -1; width: 300px; }
  .stk-status { width: 100px; height: 100px; font-size: 15px; right: -8px; }
}
@media (max-width: 600px) {
  .proj-grid, .services, .two, .cs-nav { grid-template-columns: minmax(0, 1fr); }
  .proj-grid .proj:nth-child(n) { grid-column: auto; }
  .tl li { grid-template-columns: minmax(0, 1fr); }
  .tl-when { grid-row: auto; }
  .cs-nav a:last-child { text-align: left; }
  .box, .form { padding: 20px 16px; }
}

/* Print: a clean résumé */
@media print {
  html, body, .contact, .box-blue, .band-sun { background: #fff !important; color: #000 !important; }
  .top, .frame, .hero .row, .stats, #work, #services, .contact form, .contact .row, .foot, .skip, .direct .link, .load-error { display: none !important; }
  body { font-size: 11pt; }
  h1, h2, h3 { break-after: avoid; }
  .wrap { padding: 0; }
  .hero { padding: 0 0 8pt; }
  .hero-in { display: block; }
  .hero h1 { font-size: 26pt; margin-bottom: 6pt; }
  .lead { font-size: 11pt; max-width: none; }
  .sec { padding: 10pt 0; }
  .sec h2, .box h3, .h3 { font-size: 16pt; margin: 0 0 8pt; }
  .cv { gap: 16pt; }
  .box, .cert, .tl-plain li { border: 0; padding: 0; border-radius: 0; }
  .tl li, .cert, .skill-group { break-inside: avoid; }
  .tl-when, .cert-mark, .skill-group li { background: none !important; border: 1px solid #999; }
  .box-blue .tl-org, .box-blue .tl-text, .contact .lead { color: #333 !important; }
  .contact h2 { font-size: 14pt; }
  .direct { font-size: 12pt; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
