:root {
  --bg: #f8f8f6;
  --bg-alt: #f8f8f6;
  --surface: #f8f8f6;
  --text: #141414;
  --muted: #5e5e5e;
  --line: #e7e7e3;
  --accent: #1d1d1d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: color-mix(in oklab, var(--bg) 85%, white 15%);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
nav a { color: var(--muted); text-decoration: none; margin-left: 1rem; }
nav a:hover { color: var(--text); }

.hero { padding: 6rem 0 4rem; }
.hero-firstscreen { min-height: 100svh; display: grid; align-items: center; scroll-snap-align: start; scroll-snap-stop: always; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1.25fr 1fr; align-items: start; }
.hero-grid-single { grid-template-columns: 1fr; max-width: 760px; }
.hero-intro { text-align: center; }
.profile-avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto 1rem;
  border: 1px solid var(--line);
}
.hero-name { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; margin: .4rem 0 .35rem; letter-spacing: -0.02em; }
.hero-subtitle { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-weight: 500; letter-spacing: .3px; margin: 0 0 1rem; }
.lead { color: var(--muted); max-width: 62ch; margin-inline: auto; }
.hero-intro > * { animation: riseIn .7s ease both; }
.hero-intro > *:nth-child(2) { animation-delay: .08s; }
.hero-intro > *:nth-child(3) { animation-delay: .16s; }
.hero-intro > *:nth-child(4) { animation-delay: .24s; }
.hero-actions { display: flex; gap: .8rem; margin-top: 1.2rem; justify-content: center; }
.btn { padding: .72rem 1rem; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid var(--line); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-ghost { color: var(--text); background: transparent; }
.text-link { color: var(--muted); text-decoration: none; align-self: center; font-weight: 600; }
.text-link:hover { color: var(--text); }

.hero-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.04);
  transform: translateY(var(--hero-shift, 0px));
  transition: transform 300ms ease;
}
.hero-card h3 { margin-top: 0; }
.hero-card ul { margin: 0; padding-left: 1rem; color: var(--muted); }

.section { padding: 3.4rem 0; scroll-snap-align: start; scroll-snap-stop: always; }
.section h2 { font-size: 1.7rem; margin: 0 0 .6rem; letter-spacing: -0.01em; }
.section p { color: var(--muted); max-width: 75ch; }
#about { min-height: 100svh; display: grid; align-items: center; }
#contact { min-height: 100svh; display: grid; align-items: center; scroll-snap-align: start; scroll-snap-stop: always; }
.about-wrap { text-align: center; }
.about-wrap p { margin-inline: auto; }
.about-avatar { width: 180px; height: 180px; margin: 0 auto 1rem; }
.contact-wrap { text-align: center; }
.contact-wrap p { margin-inline: auto; }
.alt { background: var(--bg); border-top: 0; border-bottom: 0; }

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.2rem;
}
.tile {
  --tile-img-h: min(74svh, 760px);
  position: relative;
  display: grid;
  align-items: center;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: var(--surface);
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: 0;
}
.tile-image {
  width: min(100%, 1200px);
  height: var(--tile-img-h);
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 0;
  border-radius: 14px;
  transform: translateY(var(--img-parallax, 0px)) scale(1.015);
  will-change: transform;
  transition: transform 140ms linear;
}
.tile-title {
  position: absolute;
  left: calc(50% - min(100%, 1200px)/2 + 1rem);
  bottom: calc(50% - (var(--tile-img-h) / 2) + 1rem);
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  letter-spacing: .2px;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  z-index: 2;
}
.tile:hover { transform: translateY(-2px); }
.tile-image { animation: zoomSoft 1.1s ease both; }

a { color: #1f1f1f; }
.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); }
.site-footer p { color: var(--muted); margin: 0; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes zoomSoft {
  from { opacity: .78; transform: translateY(var(--img-parallax, 0px)) scale(1.035); }
  to { opacity: 1; transform: translateY(var(--img-parallax, 0px)) scale(1.015); }
}
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 900ms ease, transform 900ms ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.scroll-fade { transition: opacity 260ms ease-out, transform 260ms ease-out; }

@media (max-width: 860px) {
  body { scroll-snap-type: y mandatory; }
  .hero-grid, .tiles { grid-template-columns: 1fr; }
  .tile { --tile-img-h: 56svh; }
  .tile-image { width: 100%; height: var(--tile-img-h); }
  .tile-title { left: 1rem; bottom: calc(50% - (var(--tile-img-h) / 2) + .8rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
