* { box-sizing: border-box; }

:root {
  --text: #161616;
  --muted: #6a6a6a;
  --line: rgba(0, 0, 0, 0.08);
  --card: #f3f3f3;
  --accent: #3e0f10;
}

html, body { margin: 0; min-height: 100%; }

body {
  background: #ffffff;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand sup { font-size: 0.55em; font-weight: 500; }
.nav-links {
  display: inline-flex;
  gap: 1.6rem;
  justify-content: center;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}
.nav-links a:hover { color: var(--text); }
.nav-right { justify-self: end; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  cursor: pointer;
  font-family: inherit;
}
.pill-primary { background: var(--text); color: #ffffff; }
.pill-primary:hover { background: #000000; }
.pill-secondary { background: #ffffff; color: var(--text); border-color: var(--line); }
.pill-secondary:hover { border-color: var(--text); }

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }

.home-hero {
  text-align: center;
  padding: clamp(0.5rem, 2vw, 1.5rem) 0 clamp(2rem, 6vw, 5rem);
}
.hero-mark {
  display: block;
  width: min(760px, 85vw);
  height: auto;
  margin: 0 auto 1.4rem;
}
.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero-sub {
  margin: 0.6rem auto 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.hero-cta {
  margin-top: 1.8rem;
  display: inline-flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.features { display: grid; gap: 1.4rem; padding: 2rem 0 4rem; }
.card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--card);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 4rem);
  min-height: 340px;
}
.card:nth-child(even) .card-text { order: 2; }
.card-text h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.card-text p {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 1.02rem;
}
.card-visual {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 20px;
  padding: clamp(1.2rem, 3vw, 2.4rem);
}
.card-visual svg { width: min(260px, 80%); height: auto; }

.about {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1rem, 2vw, 2rem);
}
.about h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.about p {
  margin: 0 auto;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.bottom-cta {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 5vw, 4rem);
}
.bottom-cta h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.bottom-cta p { margin: 0 auto 1.6rem; color: var(--muted); max-width: 40ch; }

footer.site {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-tag { margin: 0.4rem 0 0; color: var(--muted); font-style: italic; font-size: 0.9rem; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.footer-cols h4 {
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.footer-cols a {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.2rem 0;
}
.footer-cols a:hover { color: var(--accent); }

.page {
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(3rem, 8vw, 6rem);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.page h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page p {
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 48ch;
}
.page p.lead {
  color: var(--text);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}
.page a.inline {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 150ms ease;
}
.page a.inline:hover { border-bottom-color: var(--text); }

.projects-grid {
  display: grid;
  gap: 1.4rem;
  padding: 1rem 0 2rem;
}
.project-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2rem);
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  background: var(--card);
  border-radius: 24px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}
.project-card:hover {
  transform: translateY(-2px);
}
.project-icon {
  display: grid;
  place-items: center;
  width: clamp(64px, 9vw, 88px);
  height: clamp(64px, 9vw, 88px);
  border-radius: 20px;
  flex-shrink: 0;
}
.project-icon svg { width: 60%; height: 60%; }
.project-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 0.4rem;
}
.project-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.project-host {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}
.project-body p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 58ch;
}

.project-neuroscry {
  background: linear-gradient(135deg, #12141d 0%, #1c1a2e 100%);
  color: #f4f6fb;
}
.project-neuroscry .project-icon {
  background: linear-gradient(145deg, #9263f7, #6f42c1);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(111, 66, 193, 0.35);
}
.project-neuroscry .project-host { color: #c2adff; }
.project-neuroscry .project-body p { color: #a9adbe; }
.project-neuroscry:hover {
  border-color: rgba(182, 148, 255, 0.4);
  background: linear-gradient(135deg, #151726 0%, #221f3a 100%);
}

.contact-line {
  margin: 0.4rem 0 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}
.contact-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 150ms ease;
}
.contact-link:hover,
.contact-link:focus-visible { border-bottom-color: var(--text); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.copy-btn:hover,
.copy-btn:focus-visible {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

@media (max-width: 720px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .card { grid-template-columns: 1fr; text-align: center; }
  .card:nth-child(even) .card-text { order: 0; }
  .card-text p { margin-left: auto; margin-right: auto; }
  .project-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .project-body p { margin-left: auto; margin-right: auto; }
  .project-head { justify-content: center; }
  footer.site { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
