/* Frederic Jasmin portfolio. Same family as bushcoding.com (paper, ink,
   emerald) with its own type (Archivo) and composition. */

@font-face {
   font-family: "Archivo";
   src: url("../fonts/Archivo-Variable.woff2") format("woff2");
   font-weight: 100 900;
   font-stretch: 62% 125%;
   font-display: swap;
}

:root {
   --paper: #f6f7f5;
   --card: #ffffff;
   --soft: #eef2ef;
   --ink: #0c1a14;
   --body: #33433b;
   --muted: #62716a;
   --rule: #e1e7e3;
   --emerald: #0b7a55;
   --emerald-soft: #e3f2ec;
   --radius: 14px;
   --gutter: clamp(20px, 4vw, 40px);
   --max: 1200px;
   --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
   margin: 0;
   background: var(--paper);
   color: var(--body);
   font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
   font-size: 17px;
   line-height: 1.6;
   overflow-x: clip;
   -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* Buttons and links (hover changes color only) */
.btn {
   display: inline-flex; align-items: center; justify-content: center;
   min-height: 48px; padding: 0 22px; border-radius: 999px;
   font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap;
   border: 1px solid transparent; cursor: pointer;
   transition: background-color .15s, color .15s, border-color .15s;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #1f3329; }
.btn-line { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn-line:hover { border-color: #b9c6bf; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14.5px; }
.link {
   color: var(--ink); font-weight: 600; text-decoration: underline;
   text-decoration-color: #b9c6bf; text-underline-offset: 4px; text-decoration-thickness: 1px;
   transition: text-decoration-color .15s, color .15s;
   background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer;
}
.link:hover { text-decoration-color: var(--ink); }

/* ---------- Bar ---------- */
.bar {
   position: sticky; top: 0; z-index: 50;
   background: rgba(246, 247, 245, .72);
   backdrop-filter: saturate(160%) blur(12px);
   -webkit-backdrop-filter: saturate(160%) blur(12px);
   border-bottom: 1px solid transparent;
   transition: background-color .2s, border-color .2s;
}
.bar.is-scrolled { background: rgba(246, 247, 245, .96); border-bottom-color: var(--rule); }
.bar-in { height: var(--bar-h); display: flex; align-items: center; gap: 24px; }
.mark { color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.links { display: flex; gap: 4px; margin-left: 8px; }
.links a, .sheet a {
   color: var(--muted); text-decoration: none; font-size: 15.5px; white-space: nowrap;
   padding: 8px 12px; border-radius: 999px; transition: color .15s, background-color .15s;
}
.links a:hover { color: var(--ink); background: rgba(12, 26, 20, .05); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn {
   display: none; min-height: 38px; padding: 0 16px; border-radius: 999px;
   border: 1px solid var(--rule); background: var(--card); color: var(--ink);
   font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.menu-btn:hover { border-color: #b9c6bf; }
.sheet { border-top: 1px solid var(--rule); background: var(--paper); }
.sheet .wrap { display: flex; flex-direction: column; padding-block: 8px 16px; }
.sheet a { font-size: 19px; color: var(--ink); padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--rule); }
.sheet a:last-child { border-bottom: 0; }
.sheet a:hover { color: var(--emerald); }

/* Collapsed state is decided by measuring (portfolio.js), plus phones always. */
.bar.is-collapsed .links, .bar.is-collapsed .bar-cv { display: none; }
.bar.is-collapsed .menu-btn { display: inline-flex; align-items: center; }

/* Language menu (markup from i18n/build.js) */
.lang-menu { position: relative; }
.lang-btn {
   display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 10px 0 12px;
   border: 1px solid var(--rule); border-radius: 999px; background: var(--card);
   font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.lang-btn:hover { border-color: #b9c6bf; }
.flag { width: 20px; height: 14px; border-radius: 2px; flex: none; }
.chev { width: 12px; height: 12px; color: var(--muted); }
.lang-list {
   position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; margin: 0; padding: 6px;
   list-style: none; background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
   box-shadow: 0 12px 32px -12px rgba(12, 26, 20, .25);
}
.lang-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 15px; }
.lang-list a:hover { background: var(--soft); }
.lang-list a[aria-current] { font-weight: 700; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow-x: clip; padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.hero::before {
   content: ""; position: absolute; inset: -10% -20% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
   background: radial-gradient(closest-side, rgba(11, 122, 85, .13), transparent);
   pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 88px); align-items: end; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.avail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #17a673; box-shadow: 0 0 0 4px rgba(23, 166, 115, .16); }
.name {
   font-size: clamp(56px, 11vw, 150px); font-weight: 800; font-stretch: 112%;
   line-height: .9; letter-spacing: -0.045em; margin-bottom: 28px;
}
.roles { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 22px; }
.roles span {
   font-size: 15px; font-weight: 600; color: var(--ink);
   padding: 6px 12px; border: 1px solid var(--rule); background: var(--card); border-radius: 999px;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; max-width: 34em; margin-bottom: 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.portrait { margin: 0; position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--rule); background: #24382e; aspect-ratio: 4 / 5; }
.portrait > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portrait figcaption {
   position: absolute; left: 14px; right: 14px; bottom: 14px;
   display: flex; align-items: center; gap: 12px;
   padding: 10px 14px 10px 10px; border-radius: 12px;
   background: rgba(12, 26, 20, .78); color: #fff; font-size: 14px; font-weight: 600;
   backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.portrait figcaption img { border-radius: 6px; flex: none; }

/* ---------- Sections ---------- */
.sec { padding: clamp(80px, 10vw, 136px) 0; border-top: 1px solid var(--rule); }
.sec-tight { padding-block: clamp(72px, 8vw, 112px); }
.sec-soft { background: var(--soft); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2, .about h2, .contact h2 { font-size: clamp(34px, 4.6vw, 58px); letter-spacing: -0.035em; }
.sec-head p { color: var(--muted); max-width: 30em; justify-self: end; }

/* ---------- Work (signature) ---------- */
.work { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.w-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.w-item { border-bottom: 1px solid var(--rule); }
.w-row {
   width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
   padding: 20px 4px; display: flex; flex-direction: column; gap: 4px; font: inherit;
}
.w-name { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.025em; color: #9aa79f; transition: color .15s; line-height: 1.15; }
.w-kind { font-size: 14.5px; color: var(--muted); }
.w-row:hover .w-name { color: var(--body); }
.w-item.is-active .w-name { color: var(--ink); }
.w-inline { display: none; }

.w-stage { position: sticky; top: calc(var(--bar-h) + 24px); display: grid; }
.w-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.w-panel.is-active { opacity: 1; visibility: visible; transition: opacity .25s ease; }
.win {
   border-radius: 14px; overflow: hidden; background: var(--card);
   border: 1px solid var(--rule);
   box-shadow: 0 1px 2px rgba(12, 26, 20, .04), 0 24px 60px -28px rgba(12, 26, 20, .28);
}
.win-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--rule); background: #fbfcfb; }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #dfe5e1; }
.win-bar span {
   margin-left: 12px; font-size: 12.5px; color: var(--muted); background: var(--soft);
   padding: 3px 12px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win img { width: 100%; aspect-ratio: 1425 / 690; object-fit: cover; object-position: top left; }
.w-note { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 20px; }
.w-note p { max-width: 36em; }
.w-note .link { white-space: nowrap; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.about-copy h2 { margin-bottom: 6px; }
.about-copy p { max-width: 36em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column-reverse; gap: 6px; }
.facts dd { margin: 0; font-size: clamp(36px, 4vw, 52px); font-weight: 700; color: var(--ink); letter-spacing: -0.04em; line-height: 1; font-stretch: 108%; }
.facts dt { color: var(--muted); font-size: 15px; }

/* ---------- Experience ---------- */
.exp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); }
.col-title { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 8px; }
.col-title-gap { margin-top: 48px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.tl-date { color: var(--muted); font-size: 14.5px; padding-top: 2px; }
.tl-now .tl-date { color: var(--emerald); font-weight: 600; }
.tl h4 { font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; }
.tl-org { color: var(--ink); font-size: 15px; margin: 2px 0 6px; }
.tl li p:last-child:not(.tl-org):not(.tl-date) { color: var(--muted); font-size: 15.5px; }
.certs { list-style: none; margin: 0; padding: 0; }
.certs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; color: var(--ink); }
.certs time { color: var(--muted); font-variant-numeric: tabular-nums; }
.js .certs:not(.is-open) .more { display: none; }
.more-btn { margin-top: 16px; }

/* ---------- Skills ---------- */
.skills { margin: 0; border-top: 1px solid var(--rule); }
.skills div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.skills dt { color: var(--muted); }
.skills dd { margin: 0; color: var(--ink); }

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.quotes figure { margin: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.quotes blockquote { margin: 0; color: var(--ink); font-size: 17px; line-height: 1.6; }
.quotes figcaption { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--muted); }
.quotes figcaption img { border-radius: 50%; flex: none; }
.quotes figcaption strong { display: block; color: var(--ink); }

/* ---------- Contact ---------- */
.contact .wrap { display: flex; flex-direction: column; align-items: flex-start; }
.contact-lede { max-width: 34em; margin: 18px 0 28px; font-size: 18px; }
.mail {
   font-size: clamp(24px, 6.4vw, 76px); font-weight: 700; letter-spacing: -0.04em; color: var(--ink);
   text-decoration: none; line-height: 1.05; margin-bottom: 32px; overflow-wrap: normal;
   background-image: linear-gradient(var(--rule), var(--rule)); background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 100%;
   padding-bottom: 6px; transition: color .15s;
}
.mail:hover { color: var(--emerald); }
.contact-foot { margin-top: 48px; display: grid; gap: 8px; color: var(--muted); font-size: 15.5px; }
.social { display: flex; gap: 20px; }
.social a { color: var(--ink); font-weight: 600; text-decoration: none; }
.social a:hover { color: var(--emerald); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 28px 0 36px; font-size: 14.5px; color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot a { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot img { display: block; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
   .hero-grid { grid-template-columns: minmax(0, 1fr); }
   .portrait { max-width: 420px; aspect-ratio: 1 / 1; }
   .sec-head { grid-template-columns: minmax(0, 1fr); }
   .sec-head p { justify-self: start; }
   .work { grid-template-columns: minmax(0, 1fr); }
   .w-stage { display: none; }
   .w-inline { display: grid; gap: 14px; padding: 4px 4px 24px; }
   .w-inline img { border-radius: 10px; border: 1px solid var(--rule); }
   .w-inline .link { justify-self: start; }
   .w-name { color: var(--ink); }
   .w-row { cursor: default; }
   .about, .exp { grid-template-columns: minmax(0, 1fr); }
   .quotes { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
   body { font-size: 16px; }
   :root { --bar-h: 60px; }
   .tl li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
   .skills div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
   .facts div { padding: 20px; }
   .quotes figure { padding: 22px; }
   .cta .btn { flex: 1 1 auto; }
}
@media (max-width: 380px) {
   .bar-in { gap: 10px; }
   .bar-end { gap: 6px; }
   .lang-btn { padding: 0 8px; }
   .menu-btn { padding: 0 12px; }
}

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