/* Portfolio 2.0 — index + about
   Built from Figma "Portfolio-2.0" › 2026 › Index / About (1440px frames) */

@font-face { font-family: 'LeMondeLivre'; src: url('resources/fonts/LeMondeLivre-Normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'LeMondeLivre'; src: url('resources/fonts/LeMondeLivre-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
/* "Medium" cut — its glyphs are italic */
@font-face { font-family: 'LeMondeLivre'; src: url('resources/fonts/LeMondeLivre-Medium.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'OpenSans'; src: url('resources/fonts/OpenSans-Variable.woff2') format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap; }   /* variable: any weight 300–800 */
@font-face { font-family: 'Geist'; src: url('resources/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Tokens -------------------------------------------------------------- */
:root {
  --bg: #f8f4f0;
  --text: #000000;
  --muted: #656565;
  --line: #000000;
  --text-strong: #000000;
  --rail: #656565;
  --highlight: #e8a913;      /* hover "wobbly line" + sparkle color */
  --sparkle: #ffcb14;        /* same yellow as the ✨ icon in the header */
  --blob: #f8ffda;           /* highlight behind company names */
  --blob-hover-solid: #ffe9b8;   /* hover: a light, warm orange-leaning yellow */
  /* liquid-glass tooltip on the company names */
  --tip-top: rgba(255, 255, 255, .62);
  --tip-bottom: rgba(255, 255, 255, .34);
  --tip-rim: rgba(255, 255, 255, .85);
  --tip-shine: rgba(255, 255, 255, .95);
  --tip-under: rgba(255, 255, 255, .45);
  --tip-edge: rgba(90, 70, 100, .14);
  --tip-shadow: rgba(60, 40, 70, .14);
  --serif: 'LeMondeLivre', Georgia, 'Times New Roman', serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;   /* small UI / label type */
  --gutter: 80px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #10131e;
  --text: #e1e1f2;           /* body copy */
  --text-strong: #f6f6fc;    /* headline, company names, section titles */
  --muted: #9799b4;          /* dates, timeline descriptions (≈6:1 contrast on bg) */
  --rail: #4a4e68;           /* timeline line */
  --line: #e1e1f2;
  --highlight: #f2c14e;
  --sparkle: #c2c0fb;        /* click / drag sparkles */
  --blob: #4b4e78;           /* dark-mode highlight: dusky periwinkle */
  --blob-hover-solid: #5e6292;   /* dark-mode hover: a step brighter than the highlight */
  --tip-top: rgba(200, 202, 255, .22);
  --tip-bottom: rgba(200, 202, 255, .10);
  --tip-rim: rgba(225, 226, 255, .3);
  --tip-shine: rgba(255, 255, 255, .4);
  --tip-under: rgba(200, 202, 255, .15);
  --tip-edge: rgba(0, 0, 0, .45);
  --tip-shadow: rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;      /* always leave room for the scrollbar, so short and long pages line up */
}
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }

/* Text and images can't be highlighted, and images can't be dragged off the page */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, video { -webkit-user-drag: none; user-drag: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img { display: block; max-width: 100%; }
p, ul, h1, h2 { margin: 0; }

.page {
  position: relative;
  max-width: calc(1000px + 2 * var(--gutter));  /* 1000px content column */
  margin: 0 auto;
  padding: 100px var(--gutter) 120px;
}

/* Links: thin underline → animated squiggle on hover (carried over from the old site) */
:root { --squiggle: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 4'%3E%3Cstyle type='text/css'%3E.squiggle{animation:shift .3s linear infinite;}@keyframes shift {from {transform:translateX(0);}to {transform:translateX(-20px);}}%3C/style%3E%3Cpath fill='none' stroke='%23000000' stroke-width='1' class='squiggle' d='M0,3.5 c 5,0,5,-3,10,-3 s 5,3,10,3 c 5,0,5,-3,10,-3 s 5,3,10,3'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --squiggle: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 4'%3E%3Cstyle type='text/css'%3E.squiggle{animation:shift .3s linear infinite;}@keyframes shift {from {transform:translateX(0);}to {transform:translateX(-20px);}}%3C/style%3E%3Cpath fill='none' stroke='%23e1e1f2' stroke-width='1' class='squiggle' d='M0,3.5 c 5,0,5,-3,10,-3 s 5,3,10,3 c 5,0,5,-3,10,-3 s 5,3,10,3'/%3E%3C/svg%3E"); }
a {
  color: inherit;
  text-decoration: none;
  padding: 0 0 3px;
  border-bottom: 1px solid var(--line);
}
a:hover, a:focus-visible {
  border-bottom: none;
  padding: 0 0 6px;
  margin: 0 0 -6px;
  background-image: var(--squiggle);
  background-position: 0 100%;
  background-size: auto 4px;
  background-repeat: repeat-x;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
a:focus-visible { outline: 2px solid var(--highlight); outline-offset: 4px; border-radius: 2px; }

/* Theme toggle (sun / moon) */
.theme-toggle {
  position: absolute;
  z-index: 10;                     /* stay above the headline, which spans the full width on phones */
  top: 97px;                       /* 3px above the top of the HELLO line */
  right: var(--gutter);
  width: 40px; height: 40px;
  padding: 0; border: 0; background: none;
  color: var(--text);
  cursor: pointer;
}
.theme-toggle { display: flex; align-items: center; justify-content: center; }   /* keeps a 40px tap area */
.theme-toggle svg { width: 32px; height: 32px; display: block; }
/* Sun / moon: going dark, the sun sets below the bottom of the button and the moon drops in from the top;
   going light, the moon lifts back up and the sun rises */
.theme-toggle { overflow: hidden; }
.theme-toggle svg {
  position: absolute; left: 4px; top: 4px;
  transition: transform .55s cubic-bezier(.5, 0, .3, 1), opacity .45s ease;
}
.theme-toggle .icon-sun  { transform: none; opacity: 1; transition-delay: .2s; }                 /* light: sun up (rises after the moon sets) */
.theme-toggle .icon-moon { transform: translateY(-115%) rotate(40deg); opacity: 0; transition-delay: 0s; }   /* light: moon waits above the top */
:root[data-theme="dark"] .theme-toggle .icon-sun  { transform: translateY(115%) rotate(60deg); opacity: 0; transition-delay: 0s; }   /* sun sets, spinning a little */
:root[data-theme="dark"] .theme-toggle .icon-moon { transform: none; opacity: 1; transition-delay: .2s; }                              /* then the moon comes down */
@media (prefers-reduced-motion: reduce) { .theme-toggle svg { transition: opacity .2s ease; transition-delay: 0s !important; } }

/* Header -------------------------------------------------------------- */
.hero { position: relative; max-width: 551px; }
.hero h1 {
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: .05em;          /* 2px at 40px; scales down with the headline */
  text-transform: uppercase;
}
.hero h1 span { display: block; }
.hero-rule {
  display: inline-block;
  width: 5.73em;                 /* 229px */
  height: 2px;
  margin-left: .2em;
  background: var(--line);
  vertical-align: .3em;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 20px;
  letter-spacing: 1px;
}

.sparkle { display: inline-block; width: .85em; height: auto; vertical-align: -.05em; margin-left: .15em; filter: brightness(0); }   /* black sparkle next to the headline */
:root[data-theme="dark"] .sparkle { filter: brightness(0) invert(.92); }   /* light in dark mode so it still shows */

/* Index body ---------------------------------------------------------- */
.intro {
  max-width: 400px;
  margin-top: 72px;
  font-size: 20px;
  line-height: 32px;
  letter-spacing: 1px;
}
.intro-work p + p { margin-top: 20px; }
.intro-work .company {             /* Meta / Blend / IXL learning: links with a blobby highlight */
  margin: 0 .12em 0 .2em;
}
.intro-work .company strong {
  font-weight: 700;
  position: relative;              /* no z-index on purpose: the blob (z-index -1) sits behind ALL text, incl. the comma */
  display: inline-block;           /* blob sizes to the full line, not just the glyphs */
  white-space: nowrap;
}
/* each company gets its own hand-drawn highlight shape */
.intro-work .company-meta strong {
  --blob-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 50' preserveAspectRatio='none'%3E%3Cpath d='M7 18C20 9 48 7 78 8C104 9 120 4 150 4C172 4 190 3 197 9C200 14 196 22 199 28C200 36 193 42 182 43C150 46 118 44 88 46C58 48 26 49 12 45C4 42 1 34 2 27C3 23 4 20 7 18Z'/%3E%3C/svg%3E");
}
.intro-work .company-blend strong {
  --blob-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 50' preserveAspectRatio='none'%3E%3Cpath d='M14 7C36 3 70 7 100 6C134 5 168 9 188 12C197 15 199 24 196 31C194 38 186 41 172 41C146 41 128 47 98 46C70 45 44 47 22 45C8 44 2 37 2 27C2 16 6 9 14 7Z'/%3E%3C/svg%3E");
}
.intro-work .company-ixl strong {
  --blob-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 50' preserveAspectRatio='none'%3E%3Cpath d='M4 10C24 8 60 11 98 9C130 8 160 12 184 13C194 14 198 19 196 25C199 31 196 38 190 42C170 45 140 43 110 45C80 46 50 44 24 46C12 47 5 43 6 36C3 30 7 25 3 19C2 14 2 11 4 10Z'/%3E%3C/svg%3E");
}

/* marker-style blob, drawn with an SVG mask so it takes any color/gradient */
.intro-work .company strong::before,
.intro-work .company strong::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.32em; right: -.32em;
  top: .04em; bottom: .1em;
  -webkit-mask: var(--blob-shape) no-repeat center / 100% 100%;
          mask: var(--blob-shape) no-repeat center / 100% 100%;
}
.intro-work .company strong::before { background: var(--blob); }
.intro-work .company strong::after {        /* hover layer: a deeper solid neon yellow, fades in */
  background: var(--blob-hover-solid);
  opacity: 0;
  transition: opacity .35s ease;
}
.intro-work .company:hover strong::after,
.intro-work .company:focus-visible strong::after {
  opacity: 1;
}

/* "Click to see work": a small liquid-glass tag. With a mouse it follows the cursor (site.js);
   with the keyboard it sits above the focused company name. */
.company-tip,
.intro-work .company::after {
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .2px;
  white-space: nowrap;
  color: var(--text-strong);
  background: linear-gradient(180deg, var(--tip-top), var(--tip-bottom));
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
          backdrop-filter: blur(14px) saturate(1.8);
  border: 1px solid var(--tip-rim);
  box-shadow:
    inset 0 1px 1px var(--tip-shine),       /* bright lip along the top edge */
    inset 0 -1px 1px var(--tip-under),      /* light bouncing off the bottom edge */
    0 0 0 .5px var(--tip-edge),
    0 6px 18px var(--tip-shadow);
  pointer-events: none;
}
.company-tip {
  position: fixed;
  left: 0; top: 0;
  z-index: 50;
  transform: translate(calc(var(--x, -999px) + 12px), calc(var(--y, -999px) - 6px)) translateY(-100%);   /* just above and right of the cursor's tip */
  opacity: 0;
  transition: opacity .18s ease;   /* only the fade animates, so it never lags behind the cursor */
}
.company-tip.is-on { opacity: 1; }

.intro-work .company { position: relative; }   /* no z-index, so the highlight still sits behind the text */
.intro-work .company::after {
  content: "Click to see work";
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .2s ease;
}
.intro-work .company:focus-visible::after { opacity: 1; }

/* About body ---------------------------------------------------------- */
/* Heading + bio on the left, photo on the right (tucked under the sun icon) */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 51%);
  grid-template-areas: "hero photo" "bio photo";
  grid-template-rows: auto 1fr;
  column-gap: 40px;
}
.about-layout > .hero { grid-area: hero; }
.about-layout > .about-photo-wrap { grid-area: photo; margin-top: 56px; }   /* starts just below the sun / moon button */
.about-layout > .about-top { grid-area: bio; margin-top: 72px; }
.about-photo { display: block; width: 100%; height: auto; }   /* photo + stickers in one image */

.about-bio {
  max-width: 450px;
  margin-top: -8px;
  font-size: 20px;
  line-height: 32px;
  letter-spacing: 1px;
}
.about-bio p + p { margin-top: 18px; }

.history { position: relative; margin-top: 87px; max-width: 565px; }
.history h2 { font-weight: 400; font-size: 24px; letter-spacing: 1.2px; }

.timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 22px; position: relative; }
.timeline::before {             /* dotted lead-in */
  content: ""; position: absolute; left: 5px; top: 5px; height: 24px;
  border-left: 1px dotted var(--rail);
}
.timeline::after {              /* solid rail */
  content: ""; position: absolute; left: 5px; top: 33px; bottom: 10px;
  border-left: 1px solid var(--rail);
}
.timeline li { position: relative; }
.timeline li + li { margin-top: 24px; }

/* Text hierarchy (matters most in dark mode) */
.hero h1, .history h2, .intro-work .company strong { color: var(--text-strong); }

/* Click / drag sparkles ---------------------------------------------- */

/* Responsive ---------------------------------------------------------- */
@media (max-width: 1000px) {     /* not enough room beside the heading: stack heading, photo, bio */
  .about-layout { grid-template-columns: 1fr; grid-template-areas: "hero" "photo" "bio"; grid-template-rows: auto; }
  .about-layout > .about-photo-wrap { max-width: 520px; margin-top: 48px; }
  .about-layout > .about-top { margin-top: 32px; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .page { padding-top: 72px; padding-bottom: 80px; }
  .theme-toggle { top: 69px; }      /* same as desktop: 3px above the top of the HELLO line */
  /* headline + circle photo scale together so the photo stays beside the headline, clear of the sun icon */
  .hero h1 { font-size: min(26px, calc(7.4vw - 7.5px)); }
  .hero-links { font-size: 18px; gap: 8px 24px; }
  .intro, .about-bio { font-size: 19px; line-height: 30px; letter-spacing: .8px; }
  .intro { margin-top: 56px; }
  .about-layout > .about-photo-wrap { margin-top: 40px; }
  .about-layout > .about-top { margin-top: 24px; }
  .history { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}

/* Homepage + About, light mode: flowing mesh gradient (mesh-gradient.js), strongest in the bottom-right corner.
   Default = the "sunset" palette below. Keep it as the default. */
canvas.mesh {
  --c1: #f6dfe6;   /* soft pink base (the mask fades it into the page) */
  --c2: #fdd9c4;   /* peach */
  --c3: #c6dcfb;   /* light blue */
  --c4: #ead2f3;   /* lilac */
  position: fixed; z-index: -3; pointer-events: none;   /* sits behind the page content */
  inset: 0; width: 100vw; height: 100vh;
  /* strongest in the bottom-right corner, fading out softly towards the top left */
  -webkit-mask-image: radial-gradient(ellipse 120% 120% at 100% 100%, #000 0%, #000 22%, rgba(0,0,0,.55) 50%, transparent 85%);
          mask-image: radial-gradient(ellipse 120% 120% at 100% 100%, #000 0%, #000 22%, rgba(0,0,0,.55) 50%, transparent 85%);
}
/* Dark mode: the same flowing mesh, recoloured as dusk and held to a thin band along the bottom of the screen.
   It fades up into the night with a long, eased mask so there's no visible edge. */
:root[data-theme="dark"] canvas.mesh {
  --c1: #10131e;   /* the page colour, so the colours rise out of the dark */
  --c2: #3a2f6b;   /* indigo */
  --c3: #8a4f7d;   /* dusky rose-violet */
  --c4: #3d5fa8;   /* twilight blue */
  --c5: #5a80c4;   /* lighter blue, the glow on the horizon */
  opacity: .5;     /* the dusk at half strength */
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.82) 4%, rgba(0,0,0,.55) 9%, rgba(0,0,0,.3) 14%, rgba(0,0,0,.12) 18%, rgba(0,0,0,.03) 22%, transparent 26%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.82) 4%, rgba(0,0,0,.55) 9%, rgba(0,0,0,.3) 14%, rgba(0,0,0,.12) 18%, rgba(0,0,0,.03) 22%, transparent 26%);
}
@media (max-width: 760px) {
  :root[data-theme="dark"] canvas.mesh {
    -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.8) 3%, rgba(0,0,0,.5) 7%, rgba(0,0,0,.25) 11%, rgba(0,0,0,.08) 15%, transparent 19%);
            mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.8) 3%, rgba(0,0,0,.5) 7%, rgba(0,0,0,.25) 11%, rgba(0,0,0,.08) 15%, transparent 19%);
  }
}
/* light mode only: while a company name is hovered on the homepage, the gradient fades to that company's highlight colours */
html:not([data-theme="dark"]) canvas.mesh[data-palette="meta"]  { --c1: #d9e2fb; --c2: #fde6d6; --c3: #efd8f4; --c4: #cff4de; }
html:not([data-theme="dark"]) canvas.mesh[data-palette="blend"] { --c1: #d5e5f2; --c2: #c3d6fa; --c3: #e1eded; --c4: #d6edc6; }
html:not([data-theme="dark"]) canvas.mesh[data-palette="ixl"]   { --c1: #fbeec3; --c2: #c4e2f8; --c3: #fdf4d6; --c4: #cce7b9; }
html:not([data-theme="dark"]) canvas.mesh[data-palette="about"] { --c1: #e2e7e0; --c2: #dce4d9; --c3: #e8ece5; --c4: #d7e0d4; }   /* about page eases into this sage */
/* …and the page behind the gradient eases to the same sage, so it covers the whole page, not just the bottom right */
html.about-sage:not([data-theme="dark"]) body { background-color: #e2e7e0; transition: background-color 2.4s ease, color .25s ease; }
@media (prefers-reduced-motion: reduce) { html.about-sage body { transition: none !important; } }

/* two columns under the intro: where I've been + currently */
.now { margin-top: 48px; }   /* sits under the bio, in the same column */
.now h2 { font-family: 'OpenSans', var(--sans); font-weight: 600; font-size: 15px; line-height: 1.4; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-strong); }   /* same as the case study h2s */
.now-list { list-style: none; margin: 12px 0 0; padding: 0; }   /* same gap as under a case study h2 */
.now-list li { position: relative; padding-left: 26px; font: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; }   /* same type as the bio above */
.now-list li + li { margin-top: 4px; }
.now-list li::before {            /* same little star as the timeline */
  content: ""; position: absolute; left: 0; top: 10px; width: 12px; height: 12px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0l1.2 3.1L9.3 2 7.6 5l1.7 3-3.1-1.1L5 10 3.8 6.9.7 8l1.7-3L.7 2l3.1 1.1z' fill='%23111'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .now-list li::before { filter: invert(1); }
@media (max-width: 760px) {
  .now { margin-top: 40px; }
}
