:root {
  color-scheme: light;
  --ink: #0b0f19;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f6f7f9;
  --accent: #2563eb;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
img { max-width: 100%; }
.skip { position: absolute; left: 1rem; top: 1rem; transform: translateY(-200%); background: #fff; padding: .6rem .9rem; z-index: 20; }
.skip:focus { transform: none; }
.wrap { width: min(100% - 4rem, 76rem); margin-inline: auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-size: .92rem; font-weight: 500; color: var(--text); }
nav a:hover { color: var(--ink); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.4rem; border-radius: 100vw; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: .93rem; font-weight: 600; transition: background .2s, border-color .2s; }
.button:hover { background: #262b36; }
.button.small { min-height: 2.5rem; padding: .5rem 1.1rem; font-size: .87rem; }
.button.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: start; gap: 2rem; width: min(100% - 4rem, 86rem); padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero-copy { position: relative; z-index: 1; padding-top: clamp(2rem, 4.5vw, 4.5rem); padding-bottom: 3rem; }
.hero .eyebrow { font-size: clamp(.8rem, .85vw, 1rem); }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin-top: 1.1rem; font-size: clamp(2.5rem, 4.4vw, 5.2rem); white-space: nowrap; line-height: 1.02; letter-spacing: -.045em; font-weight: 800; }
.lead { margin-top: 1.6rem; max-width: 44rem; color: var(--text); font-size: clamp(1.05rem, 1.3vw, 1.5rem); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.4rem; }
.hero .actions .button { min-height: clamp(3rem, 3.3vw, 3.9rem); padding-inline: clamp(1.4rem, 1.7vw, 2.1rem); font-size: clamp(.93rem, 1vw, 1.15rem); }
.portrait { display: block; justify-self: start; width: 140%; max-width: none; }
.portrait img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 99%); mask-image: linear-gradient(to bottom, #000 70%, transparent 99%); }

/* Sections */
.section { padding-block: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line); }
.section-head h2 { margin-top: .7rem; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -.04em; font-weight: 800; }
h3 { font-size: 1.15rem; letter-spacing: -.015em; font-weight: 700; }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.75rem; margin-top: 3rem; }
.project img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: .9rem; border: 1px solid var(--line); transition: transform .35s ease, box-shadow .35s ease; }
.project:hover img { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(15, 23, 42, .35); }
.project-copy { padding-top: 1.2rem; }
.meta { color: var(--muted); font-size: .8rem; font-weight: 500; }
.project-copy h3 { margin-top: .35rem; }
.project-copy p:not(.meta) { margin-top: .5rem; color: var(--text); line-height: 1.6; font-size: .95rem; }

/* Expertise */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 3rem; }
.skills article { padding: 2rem; border-radius: 1rem; background: var(--soft); }
.num { display: block; margin-bottom: 2.5rem; color: var(--muted); font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.skills p { margin-top: .6rem; color: var(--text); line-height: 1.6; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 6vw, 6rem); }
.about-copy p { color: var(--text); font-size: clamp(1.05rem, 1.4vw, 1.18rem); line-height: 1.75; }
.about-copy p + p { margin-top: 1.1rem; }

/* Contact */
.contact { text-align: center; max-width: 44rem; margin-inline: auto; }
.contact h2 { margin-top: .7rem; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 800; }
.contact p:not(.eyebrow) { margin-top: 1rem; color: var(--text); font-size: 1.1rem; line-height: 1.6; }
.email { display: inline-flex; gap: .6rem; margin-top: 2rem; padding-bottom: .3rem; border-bottom: 2px solid var(--ink); font-size: clamp(1.1rem, 2.6vw, 1.6rem); font-weight: 700; letter-spacing: -.02em; word-break: break-all; }
.email:hover { color: var(--accent); border-color: var(--accent); }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; width: calc(100% - 4rem); }
  .hero-copy { padding-bottom: 0; }
  h1 { white-space: normal; }
  .br-lg { display: none; }
  .portrait { justify-self: center; width: 100%; max-width: 34rem; }
  .project-grid, .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap, .hero { width: calc(100% - 2.5rem); }
  nav { display: none; }
  .project-grid, .skills { grid-template-columns: 1fr; }
  .actions .button { width: 100%; }
}

/* Social links */
.socials { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.socials a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; color: var(--ink); transition: border-color .2s, color .2s, transform .2s; }
.socials a:hover { border-color: var(--ink); transform: translateY(-2px); }
.socials svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.socials.center { justify-content: center; margin-top: 2.5rem; }
.socials.small { gap: .35rem; }
.socials.small a { width: 2.25rem; height: 2.25rem; border: 0; color: var(--muted); }
.socials.small a:hover { color: var(--ink); transform: none; }
.socials.small svg { width: 1.05rem; height: 1.05rem; }
.footer { align-items: center; }

/* Mobile menu */
.menu-btn, .close-btn { display: none; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); border-radius: .75rem; background: #fff; color: var(--ink); cursor: pointer; }
.menu-btn svg, .close-btn svg { width: 1.35rem; height: 1.35rem; }
.close-btn { display: grid; border: 0; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(11, 15, 25, .45); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s; }
.scrim.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-direction: column; width: min(78vw, 20rem); padding: 1.1rem 1.25rem 1.75rem; background: #fff; box-shadow: -20px 0 50px -20px rgba(11, 15, 25, .35); transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; }
.drawer-head .brand { font-size: 1.15rem; }
.drawer-nav { display: flex; flex-direction: column; gap: .25rem; margin-top: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1.02rem; font-weight: 500; }
.drawer-nav a { display: flex; align-items: center; gap: .9rem; padding: .8rem .9rem; border-radius: .8rem; }
.drawer-nav a:hover { background: var(--soft); }
.drawer-nav a.active { background: #eaf1fe; color: var(--accent); font-weight: 600; }
.drawer-nav svg { width: 1.3rem; height: 1.3rem; flex: none; }
.button.accent { width: 100%; margin-top: 1.25rem; background: var(--accent); border-color: var(--accent); }
.button.accent:hover { background: #1d4ed8; }
.drawer-foot { margin-top: auto; }
.drawer-foot p { margin-bottom: .8rem; font-size: .9rem; font-weight: 600; }
.drawer-foot .socials { gap: .5rem; }
body.menu-open { overflow: hidden; }
@media (max-width: 760px) {
  .top nav:not(.drawer-nav), .nav-cta { display: none; }
  .menu-btn { display: grid; }
}
@media (min-width: 761px) { .drawer, .scrim { display: none; } }
.socials [data-social="fiverr"] svg { width: 2rem; height: 2rem; }
.socials [data-social="instructables"] svg { width: 1.7rem; height: 1.7rem; }
.socials.small [data-social="fiverr"] svg { width: 1.7rem; height: 1.7rem; }
.socials.small [data-social="instructables"] svg { width: 1.4rem; height: 1.4rem; }
