/* Bricolage Grotesque, self-hosted (SIL OFL, see fonts/OFL.txt). Variable: weight 400–800, optical size. */
/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Warm paper instead of Apple grey, with a coral accent. The theme is data-theme on <html>,
   set before first paint from a stored choice or the OS (see the head script); without JS
   the page stays light. Accent values are picked for contrast: white text on --accent
   passes 4.5:1 in light mode, dark text on it does in dark mode. */
:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1d1b17;
  --ink-2: #6b665d;
  --line: rgba(29, 27, 23, 0.1);
  --nav: rgba(246, 244, 239, 0.75);
  --shadow: 0 1px 2px rgba(29, 27, 23, 0.04), 0 10px 30px rgba(29, 27, 23, 0.06);
  --accent: #d63d1d;
  --accent-ink: #b9341a;
  --on-accent: #ffffff;
  --accent-tint: rgba(214, 61, 29, 0.14);
  --green: #2f9e6a;
  --amber: #f2a93b;
  --coral: #e8472b;
  --violet: #7a5af5;
  --rose: #e85d8c;
  --teal: #1f9e9e;
  --blue: #3d6fe0;
  --display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #12110f;
  --card: #1d1b18;
  --ink: #f3f0e9;
  --ink-2: #a39e94;
  --line: rgba(243, 240, 233, 0.12);
  --nav: rgba(18, 17, 15, 0.72);
  --shadow: none;
  --accent: #ff6a4d;
  --accent-ink: #ff8a70;
  --on-accent: #16130f;
  --accent-tint: rgba(255, 106, 77, 0.18);
  --green: #3fbf83;
  --amber: #f5b54f;
  --coral: #ff6a4d;
  --violet: #9277ff;
  --rose: #f27aa3;
  --teal: #2fbdbd;
  --blue: #5b88f0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
img { display: block; max-width: 100%; }

.i {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.brand.is-hidden { opacity: 0; transform: translateY(4px); pointer-events: none; }

/* Nav: translucent bar that blurs the page underneath. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { padding: 7px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.nav-links .nav-cta:hover { color: var(--bg); opacity: 0.85; }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 -6px 0 -8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--line); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .i { grid-area: 1 / 1; width: 20px; height: 20px; }
.i-sun, [data-theme='dark'] .i-moon { display: none; }
[data-theme='dark'] .i-sun { display: block; }
@media (max-width: 680px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding-top: 72px;
  padding-bottom: 72px;
}
.eyebrow { color: var(--ink-2); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.hero h1 {
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(48px, 7.2vw, 92px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.lead {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(24px, 2.9vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
/* Highlighter stroke under the words, wrapping cleanly across lines. */
.mark {
  background: linear-gradient(transparent 58%, var(--accent-tint) 58%, var(--accent-tint) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 2px;
}
.intro { margin-top: 18px; max-width: 58ch; color: var(--ink-2); font-size: 18px; }
.btns { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:hover { opacity: 0.9; }
.btn-fill { background: var(--accent); color: var(--on-accent); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); opacity: 1; }

/* Portrait in a slowly breathing blob, with a tinted blob behind and two stickers. */
.portrait { position: relative; width: min(100%, 400px); aspect-ratio: 1; justify-self: center; }
.portrait::before {
  content: '';
  position: absolute;
  inset: -3% -7% -4% 5%;
  border-radius: 46% 54% 38% 62% / 55% 38% 62% 45%;
  background: var(--accent-tint);
  transform: rotate(-8deg);
}
.portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
  animation: blob 14s ease-in-out infinite alternate;
}
@keyframes blob {
  to { border-radius: 44% 56% 58% 42% / 48% 58% 42% 52%; }
}
.sticker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 6px 20px rgba(29, 27, 23, 0.12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.sticker .i { color: var(--accent); }
.s1 { left: -6%; bottom: 12%; transform: rotate(-4deg); }
.s2 { right: -4%; top: 8%; transform: rotate(3deg); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; padding-bottom: 48px; }
  .portrait { order: -1; width: min(72%, 300px); }
}

/* Sections */
.section { padding-top: 40px; padding-bottom: 40px; }
.section > h2 {
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* Projects: each card leads with a photo of the work. */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.project:hover { transform: translateY(-3px); }
.cover { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: color-mix(in srgb, var(--t) 13%, var(--card)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.project-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.project-meta { color: var(--ink-2); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.project h3 { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.project-desc { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.project-links { display: flex; gap: 18px; margin-top: auto; padding-top: 8px; }
.project-links a, .contact-links a { display: inline-flex; align-items: center; gap: 3px; font-size: 15px; font-weight: 600; }
.project-links .i, .contact-links .i { width: 15px; height: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.chips li {
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
}


/* Experience timeline */
.timeline { padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 28px; }
.tl-when { padding-top: 3px; color: var(--ink-2); font-family: var(--display); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-body { position: relative; padding: 0 0 36px 30px; border-left: 2px solid var(--line); }
.timeline li:last-child .tl-body { padding-bottom: 4px; }
.tl-body::before {
  content: '';
  position: absolute;
  top: 7px;
  left: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 3px var(--accent);
}
.timeline h3, .panel h3 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.tl-where { color: var(--ink-2); font-size: 15px; }
.tl-desc { margin-top: 8px; max-width: 62ch; color: var(--ink-2); font-size: 16px; }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 1fr; }
  .tl-when { padding: 0 0 6px 30px; border-left: 2px solid var(--line); font-size: 15px; }
}

/* Skills and education sit in plain panels. */
.panel { overflow: hidden; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.skill-row, .edu-row { display: grid; align-items: baseline; gap: 10px 24px; padding: 18px 24px; }
.skill-row { grid-template-columns: 170px minmax(0, 1fr); }
.edu-row { grid-template-columns: minmax(0, 1fr) auto; }
.skill-row + .skill-row, .edu-row + .edu-row { border-top: 1px solid var(--line); }
.skills h3 { font-size: 16px; }
.skills .chips li { color: var(--ink); font-size: 13.5px; padding: 4px 12px; }
.edu-when { color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .skill-row { grid-template-columns: 1fr; }
  .edu-row { grid-template-columns: 1fr; }
}

/* Outside work */
.hobbies { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px; }
.hobby {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 150px;
  padding: 22px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--t) 14%, var(--card));
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hobby .i { width: 36px; height: 36px; color: color-mix(in srgb, var(--t) 82%, var(--ink)); stroke-width: 1.8; }
.hobby:nth-child(odd) { transform: rotate(-1deg); }
.hobby:nth-child(even) { transform: rotate(1deg); }
@media (max-width: 640px) {
  .hobby { gap: 20px; min-height: 124px; padding: 18px; font-size: 18px; }
}

/* Contact */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 64px 24px;
  border-radius: 32px;
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
}
.contact h2 {
  max-width: 13ch;
  font-family: var(--display);
  font-size: clamp(34px, 5.6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.btn-light { background: var(--on-accent); color: var(--accent-ink); }
.contact-links { display: flex; gap: 22px; }
.contact-links a { color: var(--on-accent); opacity: 0.85; }
.contact-links a:hover { opacity: 1; }

.foot { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 44px; color: var(--ink-2); font-size: 14px; }
.foot .brand { font-size: 16px; }

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