:root {
  --bg: #f4f1ea;
  --ink: #111;
  --muted: #55524b;
  --line: #d9d4c7;
  --accent: #ff4d1c;
  --sans: "Archivo", system-ui, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --pad: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.accent { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1; letter-spacing: -0.03em; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
}
.logo { font-weight: 900; font-size: 22px; text-decoration: none; }
.nav ul { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 500; position: relative; }
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .3s;
}
.nav ul a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: 72px; }
.hero-inner {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 40px var(--pad);
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 16px; }
.hero-title { font-size: clamp(72px, 16vw, 220px); font-weight: 900; line-height: .9; }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .04em; }
.word > span { display: inline-block; }
.rule { height: 4px; background: var(--ink); margin: 28px 0; transform-origin: left; max-width: 640px; }
.hero-tagline { font-size: clamp(18px, 2.2vw, 24px); max-width: 34ch; margin: 0 0 28px; }
.hero-tagline em { font-size: 1.15em; color: var(--accent); }
.btn {
  display: inline-flex; gap: 10px; align-items: center;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; transition: background .25s, translate .25s;
}
.btn:hover { background: var(--accent); translate: 0 -2px; }

.avatar {
  flex: none; width: clamp(160px, 24vw, 320px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--bg); display: grid; place-items: center; overflow: hidden;
  font-weight: 900; font-size: clamp(48px, 7vw, 96px);
  box-shadow: 14px 14px 0 var(--accent);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.marquee { background: var(--ink); color: var(--bg); overflow: hidden; padding: 14px 0; font-weight: 700; font-size: clamp(16px, 2vw, 22px); letter-spacing: .04em; text-transform: uppercase; }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(80px, 12vw, 160px) var(--pad); border-top: 1px solid var(--line); }
.section-label { font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--accent); margin: 0 0 28px; }
.section h2 { font-size: clamp(40px, 7vw, 96px); font-weight: 900; margin-bottom: 40px; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-text p { max-width: 60ch; color: #2a2824; }
.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }

/* Projects */
.projects { display: grid; gap: 32px; }
.project-card {
  background: #fff; border: 2px solid var(--ink); border-radius: 20px;
  padding: clamp(24px, 4vw, 48px); box-shadow: 8px 8px 0 var(--ink);
  transition: box-shadow .3s;
}
.project-card:hover { box-shadow: 14px 14px 0 var(--accent); }
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.project-head h3 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; }
.project-period { color: var(--muted); font-weight: 500; }
.project-summary { font-size: clamp(18px, 2vw, 22px); margin: 12px 0 20px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.project-stack li { border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 14px; font-size: 14px; font-weight: 500; }
.project-points { margin: 0 0 28px; padding-left: 20px; max-width: 80ch; }
.project-points li { margin-bottom: 8px; }
.project-points li::marker { color: var(--accent); }
.project-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.project-link:hover { color: var(--accent); }
.more { color: var(--muted); margin-top: 40px; font-style: italic; }

/* Contact */
.contact { background: var(--ink); color: var(--bg); border-top: none; }
.contact .section-label { color: var(--accent); }
.contact-title { font-size: clamp(64px, 14vw, 200px) !important; }
.contact-email {
  display: inline-block; font-size: clamp(20px, 4vw, 48px); font-weight: 700; text-decoration: none;
  border-bottom: 3px solid var(--accent); word-break: break-all; transition: color .25s;
}
.contact-email:hover { color: var(--accent); }
.contact-links { display: flex; gap: 32px; list-style: none; padding: 0; margin: 40px 0 0; font-weight: 700; font-size: 20px; }
.contact-links a { text-decoration: none; }
.contact-links a:hover { color: var(--accent); }

.footer { display: flex; justify-content: space-between; padding: 24px var(--pad); background: var(--ink); color: #9a968c; border-top: 1px solid #2a2a2a; font-size: 14px; }
.footer a { text-decoration: none; }

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; justify-content: center; }
  .avatar { width: 120px; box-shadow: 8px 8px 0 var(--accent); }
  .about-grid { grid-template-columns: 1fr; }
  .nav ul { gap: 14px; font-size: 15px; }
  .project-card { box-shadow: 5px 5px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}
