:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6b66;
  --line: #e4ded3;
  --accent: #c8553d;
  --radius: 18px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #141414;
  --surface: #1e1e1e;
  --text: #f2efe9;
  --muted: #a19d96;
  --line: #2e2e2e;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; transition: background .3s, color .3s; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 18px 6vw; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { font-family: var(--serif); font-size: 26px; font-weight: 700; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 17px; }
.menu-btn { display: none; }

.hero { padding: 110px 6vw 80px; max-width: 1100px; }
.eyebrow { color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(38px, 6vw, 76px); line-height: 1.06; letter-spacing: -.02em; font-weight: 400; }
.hero h1 em { color: var(--accent); }
.hero-sub { margin-top: 22px; font-size: 20px; color: var(--muted); }
.typed { color: var(--text); font-weight: 600; }
.caret { animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; padding: 14px 26px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid var(--text); cursor: pointer; font-size: 15px; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); }
.hero-meta { display: flex; gap: 48px; margin-top: 64px; flex-wrap: wrap; }
.hero-meta strong { display: block; font-family: var(--serif); font-size: 44px; font-weight: 400; }
.hero-meta span { color: var(--muted); font-size: 14px; }

.section { padding: 80px 6vw; }
.section h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 400; margin-bottom: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 14px; transition: all .2s; }
.chip.active, .chip:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work { transition: opacity .35s, transform .35s; }
.work.hide { display: none; }
.work-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--surface); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.work:hover .work-img img { transform: scale(1.05); }
.work-info { padding: 14px 4px; }
.work-info h3 { font-size: 18px; }
.work-info p { color: var(--muted); font-size: 14px; }

.about { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; background: var(--surface); border-radius: 32px; margin: 0 6vw; }
.avatar { border-radius: 24px; aspect-ratio: 1; object-fit: cover; }
.about p { font-size: 18px; color: var(--muted); max-width: 620px; }
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.skills li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }

.timeline { list-style: none; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline span { color: var(--muted); font-size: 15px; }
.timeline h3 { font-size: 20px; font-weight: 600; }
.timeline p { color: var(--muted); }

.contact { max-width: 820px; }
.contact > p { color: var(--muted); margin: -14px 0 28px; }
form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
form input, form textarea { width: 100%; margin-top: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; transition: border .2s; }
form input:focus, form textarea:focus { outline: none; border-color: var(--accent); }
form .invalid { border-color: #d64545; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: #2f8f4e; }
.form-status.err { color: #d64545; }

.footer { display: flex; justify-content: space-between; padding: 32px 6vw; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; flex-wrap: wrap; gap: 12px; }
.socials { display: flex; gap: 20px; }
.socials a { text-decoration: none; }
.socials a:hover { color: var(--accent); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .avatar { max-width: 240px; }
}
@media (max-width: 640px) {
  .menu-btn { display: inline-block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height .3s; }
  .nav-links.open { max-height: 300px; }
  .nav-links a { padding: 14px 6vw; }
  .hero { padding-top: 70px; }
  .hero-meta { gap: 28px; }
  .work-grid, .row { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .about { margin: 0 4vw; padding: 40px 6vw; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
