/* Design reference: change these tokens to tune the site.
   Type scale stays identical on desktop/mobile; layout alone responds.
   Colors are semantic; dark mode overrides only the palette below. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}
:root {
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-body: .875rem;
  --weight-regular: 400;
  --leading-body: 1.6;
  --space: 1rem;
  --section-space: 2rem;
  --page-width: 40rem;
  --page-gutter: 2.25rem;
  color-scheme: light dark;
  --bg: #fdfdfc;
  --ink: #252925;
  --muted: #50564e;
  --accent: #38644d;
  --soft: #e9eee6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--weight-regular) var(--text-body)/var(--leading-body) var(--font-body); -webkit-font-smoothing: antialiased; }
a { font: inherit; color: inherit; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 4px; border-radius: 3px; transition: background-color 180ms ease, color 180ms ease; }
a:not(.app-icon):hover, a:not(.app-icon):focus-visible { background-color: var(--soft); }
.scramble-letter { display: inline-block; white-space: pre; text-align: center; pointer-events: none; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font: inherit; letter-spacing: normal; }
.page { max-width: var(--page-width); padding: 0 var(--page-gutter); margin: 0 auto; }
.socials, .project-links { display: flex; gap: var(--space); }
.intro { padding: 96px 0 var(--section-space); }
.identity { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space); margin-bottom: var(--space); }
.tech { color: var(--muted); }
.portrait { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.portrait img { width: 100%; height: 100%; transform: scale(1.8); transform-origin: 45% 10%; }
.description { font-size: var(--text-body); color: var(--muted); }
.intro-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space); margin-top: var(--space); }
section[id] { padding-top: var(--section-space); }
.section-heading { margin-bottom: var(--space); }
.project { display: flex; gap: var(--space); align-items: flex-start; padding: var(--space) 0; }
.app-icon { display: block; flex-shrink: 0; width: 52px; height: 52px; }
/* macOS icons include transparent padding around the app tile. */
.app-icon-mac img { transform: scale(1.23); }
.project-details { min-width: 0; flex: 1; }
.project-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
h3 a { text-decoration: none; }
.project p, .experience-list p { color: var(--muted); }
.project-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space); margin-top: var(--space); }
.experience-list { padding: 0; margin: 0; list-style: none; }
.experience-list li { display: flex; gap: var(--space); align-items: center; padding: var(--space) 0; }
.experience-list img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.experience-list .tech { margin-left: auto; text-align: right; }
.current { color: var(--accent); background: var(--soft); padding: 3px 6px; border-radius: 4px; margin-left: 5px; }
.contact { padding: var(--section-space) 0; }
.contact p { color: var(--muted); margin: var(--space) 0; }
.email { font-size: var(--text-body); text-decoration-color: var(--accent); }
footer { display: flex; justify-content: space-between; padding: var(--section-space) 0; color: var(--muted); }
.skip { position: absolute; top: -100px; left: 16px; padding: 8px 16px; background: var(--bg); z-index: 1; }
.skip:focus { top: 16px; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --ink: #e6e8e1; --muted: #c0c5bc; --accent: #a3c7a5; --soft: #283529; }
}
@media (max-width: 600px) {
  :root { --page-gutter: 1.5rem; }
  .intro { padding-top: 64px; }
  .intro-footer { align-items: flex-start; flex-direction: column; gap: var(--space); }
  .experience-list .tech { display: none; }
}
@keyframes enter {
  from { opacity: 0; transform: translateY(14px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .identity, .description p, .intro-footer, .section-heading, .project,
  .experience-list li, .contact, footer {
    animation: enter 650ms cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: var(--enter-delay, 0ms);
  }
  .description p:first-child { --enter-delay: 80ms; }
  .intro-footer { --enter-delay: 240ms; }
  #projects .section-heading { --enter-delay: 320ms; }
  .project:nth-of-type(1) { --enter-delay: 400ms; }
  .project:nth-of-type(2) { --enter-delay: 480ms; }
  #experience .section-heading { --enter-delay: 560ms; }
  .experience-list li { --enter-delay: 640ms; }
  .experience-list li:nth-child(2) { --enter-delay: 680ms; }
  .experience-list li:nth-child(3) { --enter-delay: 720ms; }
  .experience-list li:nth-child(4) { --enter-delay: 760ms; }
  .experience-list li:nth-child(5) { --enter-delay: 800ms; }
  .experience-list li:nth-child(6) { --enter-delay: 840ms; }
  .contact { --enter-delay: 920ms; }
  footer { --enter-delay: 1000ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a { transition: none; }
}
.link-icon { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.badge { color: #d92d20; background: #fde8e6; padding: 3px 6px; border-radius: 4px; margin-left: 8px; }
@media (prefers-color-scheme: dark) { .badge { color: #ff7b72; background: #3d1714; } }
