:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --bg: #ffffff;
  --bg-dark: #f5f5f7;
  --accent: #0071e3;
  --line: rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Nav */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(255,255,255,0.8);
  border-bottom-color: var(--line);
}

.nav__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  opacity: 1;
}

@media (max-width: 600px) {
  .nav__links { gap: 16px; }
  .nav__links a { font-size: 0.72rem; }
}

/* Hero */

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
}

.hero__eyebrow {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.hero__title {
  font-size: clamp(3.2rem, 11vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  line-height: 1;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 34ch;
  margin: 0;
}

/* Reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__eyebrow.is-visible { transition-delay: 0s; }
.hero__title.is-visible { transition-delay: 0.08s; }
.hero__subtitle.is-visible { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* Sections */

.section {
  padding: 140px 24px;
}

.section--dark {
  background: var(--bg-dark);
}

.section--cta {
  text-align: center;
  background: var(--ink);
  color: #fff;
}

.section--cta .section__title,
.section--cta .lead {
  color: #fff;
}

.section__inner {
  max-width: 980px;
  margin: 0 auto;
}

.section__inner--split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 720px) {
  .section__inner--split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.section__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.section--cta .section__title {
  margin-bottom: 20px;
}

.lead {
  font-size: 1.3rem;
  font-weight: 500;
  max-width: 42ch;
  margin: 0 0 16px;
}

.body {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

.body.muted {
  font-style: italic;
}

/* Skills */

.skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}

@media (max-width: 600px) {
  .skills { grid-template-columns: 1fr; }
}

.skills__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.skills__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skills__list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 1rem;
}

.skills__list li:first-child {
  border-top: none;
}

/* Projects */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

@media (max-width: 720px) {
  .projects { grid-template-columns: 1fr; }
}

.project {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,0.18);
}

.project__name {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.project__tag {
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: 500;
}

.project__desc {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}

/* Contact */

.contact-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: #fff;
}

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Focus visibility */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
