:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f2eee7;
  --ink: #17140f;
  --muted: #6a635a;
  --line: #e6e0d6;
  --accent: #e4502a;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(23, 20, 15, .05), 0 12px 32px -12px rgba(23, 20, 15, .16);
  --radius: 22px;
  --wrap: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100f0d;
    --surface: #1a1816;
    --surface-2: #22201d;
    --ink: #f5f2ec;
    --muted: #a69f95;
    --line: #2d2a26;
    --accent: #ff6d45;
    --accent-ink: #1a0d07;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 800; letter-spacing: 0;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; padding: 8px 12px; border-radius: 10px; transition: color .15s, background .15s; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
.nav .btn { margin-left: 8px; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 8px 16px; font-size: 14.5px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  margin-bottom: 24px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2fb463; box-shadow: 0 0 0 4px color-mix(in srgb, #2fb463 22%, transparent); }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); font-weight: 750; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34em; margin: 24px 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.portrait { position: relative; justify-self: end; width: min(100%, 400px); }
.portrait-img {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: 50% 18%;
  border-radius: 32px; box-shadow: var(--shadow); background: var(--surface-2);
}
.float-icon {
  position: absolute; width: 76px; height: 76px; border-radius: 19px; object-fit: cover;
  box-shadow: var(--shadow); border: 3px solid var(--bg);
}
.float-icon.a { left: -30px; top: 12%; transform: rotate(-8deg); }
.float-icon.b { right: -22px; top: 46%; transform: rotate(7deg); }
.float-icon.c { left: 10%; bottom: -26px; transform: rotate(4deg); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 64px; border-top: 1px solid var(--line); }
.stat { padding: 24px 24px 8px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; line-height: 1.1; font-weight: 700; }
.stat span { color: var(--muted); font-size: 15px; }

@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .portrait { justify-self: center; width: min(78%, 340px); }
  .stats { grid-template-columns: 1fr; margin-top: 56px; }
  .stat, .stat + .stat { padding: 18px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
}

/* Sections */
section { padding: 88px 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 720px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 720; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.about-text p { font-size: 19px; }
.about-text p:first-child { font-size: 23px; line-height: 1.45; letter-spacing: -.01em; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.skill-card h3 { font-size: 17px; letter-spacing: -.01em; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.skill-card h3 svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.skill-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; color: var(--muted); font-size: 15.5px; line-height: 1.4; }
@media (max-width: 960px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .skills { grid-template-columns: 1fr; } }

/* Apps */
.band { background: var(--surface-2); }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.project-head { display: flex; align-items: center; gap: 18px; }
.project-head img { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line); }
.project h3 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 4px; }
.platforms { color: var(--muted); font-size: 14px; }
.project-tagline { font-size: 18px; margin: 0; line-height: 1.45; }
.project ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.project li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--muted); font-size: 15.5px; line-height: 1.45; }
.project li svg { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } .project { padding: 22px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact-intro h2 { margin: 14px 0 18px; }
.contact-intro > p { color: var(--muted); font-size: 19px; max-width: 24em; margin: 0 0 28px; }
.contact-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; color: var(--muted); font-size: 16px; }
.contact-meta li { display: flex; align-items: center; gap: 12px; }
.contact-meta svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact-meta a { color: inherit; text-decoration: none; }
.contact-meta a:hover { color: var(--ink); }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.contact-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.contact-icon svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: 22px; letter-spacing: -.02em; }
.contact-card p { color: var(--muted); margin: 0; }
.btn-light { background: var(--accent); color: var(--accent-ink); justify-content: center; width: 100%; padding: 15px 20px; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 18px; color: var(--muted); font-size: 15.5px; min-width: 0; }
.copy-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; cursor: pointer; flex: none; }
.copy-btn:hover { border-color: var(--muted); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }

/* Footer */
.site-footer { padding: 36px 0 48px; color: var(--muted); font-size: 14.5px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; gap: 20px; }

/* Reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .project:hover { transform: none; }
}

/* Inline text links */
.lede a, .about-text p a, .section-head p a, .stat a, .site-footer span a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lede a:hover, .about-text p a:hover, .section-head p a:hover, .stat a:hover { color: var(--accent); }
