:root {
  --bg: #0e0e0e;
  --bg-soft: #171717;
  --panel: #1f1f1f;
  --text: #efe9df;
  --muted: #baa98f;
  --camel: #c8a06f;
  --camel-strong: #e2bf93;
  --line: #2e2e2e;
}
:root.light {
  --bg: #f3efe8;
  --bg-soft: #ece5db;
  --panel: #ffffff;
  --text: #1e1b17;
  --muted: #6f5f4d;
  --camel: #9b6b3d;
  --camel-strong: #7f5429;
  --line: #dbcfc0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: radial-gradient(circle at 85% 0%, #2b241d 0%, var(--bg) 34%), var(--bg); color: var(--text); line-height: 1.6; }
.container { width: min(1080px, 92%); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.nav { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: .85rem 0; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; }
nav a { color: var(--muted); text-decoration: none; margin-left: .9rem; }
nav a:hover, nav a.active { color: var(--camel-strong); }
.theme-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 10px; padding: .45rem .65rem; cursor: pointer; }
.scroll-progress { position: sticky; top: 58px; z-index: 29; height: 2px; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0%; background: var(--camel); transition: width .08s linear; }

.hero { display: grid; grid-template-columns: 1.45fr .85fr; gap: 1rem; padding: 3.7rem 0 1.8rem; align-items: start; }
.kicker { text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; color: var(--camel-strong); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.14; margin: .3rem 0 .8rem; }
.lead { color: var(--muted); max-width: 66ch; }
.hero-card, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.hero-card { padding: 1rem; text-align: center; }
.avatar { width: 172px; height: 172px; border-radius: 14px; object-fit: cover; object-position: 50% 50%; display: block; margin: 0 auto .8rem; border: 1px solid var(--line); }
.cta-row { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.btn { text-decoration: none; font-weight: 700; padding: .72rem 1rem; border-radius: 12px; background: var(--camel); color: #1d1309; display: inline-block; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }

.section { padding: 2.1rem 0; }
section[id] { scroll-margin-top: 92px; }
h2 { margin: 0 0 1rem; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 1rem; }
.row-between { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.row-between a, .card a { color: var(--camel-strong); text-decoration: none; }
.row-between a:hover, .card a:hover { text-decoration: underline; }
ul { padding-left: 1.2rem; }
li { margin: .35rem 0; }

.project-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f0f0f;
}
figure.card { overflow: hidden; }

#projectGrid .card { padding: 1rem 1rem .9rem; }
#projectGrid .card h3 { margin: .1rem 0 .45rem; font-size: 1.02rem; }
#projectGrid .card p { color: var(--muted); margin: 0 0 .75rem; font-size: .95rem; }

.cta-card { display: block; }
.footer { padding: 2.2rem 0 2.8rem; color: var(--muted); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.show { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero, .grid.three { grid-template-columns: 1fr; }
  .grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  nav { display: none; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
}