@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f5f5f7;
  --bg-card:    #ffffff;
  --text:       #1d1d1f;
  --text-muted: #6e6e73;
  --accent:     #e3001b;
  --accent-h:   #c5001a;
  --border:     rgba(0,0,0,0.08);
  --shadow:     0 2px 16px rgba(0,0,0,0.06);
  --shadow-h:   0 8px 32px rgba(0,0,0,0.12);
  --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --r:          18px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
strong { font-weight: 600; color: var(--text); }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2rem;
  height: 52px;
  transition: background 0.3s, border-color 0.3s;
}
#nav.nav--scrolled {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav__logo {
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
}
.nav__links {
  list-style: none; display: flex;
  gap: 2rem;
  font-size: 0.78rem; font-weight: 400;
  color: var(--text-muted);
}
.nav__links a:hover { color: var(--accent); }
.nav__cta {
  color: var(--accent) !important;
  font-weight: 500;
}
.nav__hamburger {
  display: none; flex-direction: column;
  gap: 5px; background: none; border: none;
  cursor: pointer; padding: 4px;
}
.nav__hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__mobile {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
.nav__mobile.open { display: flex; }
.nav__mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer;
}
.nav__mobile ul {
  list-style: none; text-align: center;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.nav__mobile a {
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 700; letter-spacing: -0.03em; color: var(--text);
}
.nav__mobile a:hover { color: var(--accent); }
@media (max-width: 640px) {
  #nav { padding: 0 1.25rem; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
}

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 8rem 2rem 5rem;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; top: -10%; right: -5%;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, rgba(227,0,27,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero__bg-photo {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 52%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 88%),
                      linear-gradient(to right, transparent 0%, black 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, black 40%, transparent 88%),
              linear-gradient(to right, transparent 0%, black 22%);
  mask-composite: intersect;
}
.hero__bg-photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: bottom right;
}
.hero__inner {
  max-width: 980px; margin: 0 auto; width: 100%;
  position: relative; z-index: 1;
}
.hero__content { max-width: 560px; }
.hero__eyebrow {
  font-size: 0.88rem; font-weight: 500;
  color: var(--accent); margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.hero__name {
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 800; line-height: 0.95;
  letter-spacing: -0.04em; margin-bottom: 1.5rem;
  color: var(--text);
  display: flex; flex-direction: column;
}
.hero__name--last { color: var(--text-muted); font-weight: 700; }
.hero__title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 400; color: var(--text-muted);
  margin-bottom: 2.5rem; letter-spacing: -0.01em;
}
.hero__dot { color: var(--accent); margin: 0 0.3rem; }
.hero__links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 500;
  color: var(--accent);
  background: rgba(227,0,27,0.08);
  padding: 0.55rem 1.1rem;
  border-radius: 980px;
  transition: background 0.2s;
}
.hero__link:hover { background: rgba(227,0,27,0.14); }
.hero__link--resume {
  background: var(--accent);
  color: #ffffff;
}
.hero__link--resume:hover { background: var(--accent-h); }
.hero__scroll {
  position: absolute; bottom: 2.5rem; left: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.hero__scroll-label {
  font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted);
  writing-mode: vertical-lr;
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}
@media (max-width: 768px) {
  .hero__bg-photo { width: 65%; opacity: 0.5; }
}
@media (max-width: 640px) {
  #hero { padding: 7rem 1.5rem 4rem; }
  .hero__scroll { left: 1.5rem; }
  .hero__bg-photo { width: 80%; opacity: 0.35; }
}

/* ── STATS ── */
#stats {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.stats__inner {
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.stats__item { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 130px; }
.stats__num {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700; letter-spacing: -0.04em;
  color: var(--text); line-height: 1;
}
.stats__plus, .stats__of { color: var(--accent); font-size: 0.6em; font-weight: 600; }
.stats__label { font-size: 0.78rem; color: var(--text-muted); max-width: 20ch; line-height: 1.4; }
.stats__divider { color: var(--border); font-size: 1.5rem; flex-shrink: 0; }
@media (max-width: 768px) {
  #stats { padding: 2.5rem 1.5rem; }
  .stats__divider { display: none; }
}

/* ── SHARED SECTION ── */
.section__inner {
  max-width: 980px; margin: 0 auto;
  padding: 7rem 2rem;
}
.section__header { margin-bottom: 4rem; }
.section__label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.section__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.05;
  color: var(--text);
}

/* ── EXPERIENCE ── */
#experience { background: var(--bg); }

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0.6rem; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline__item { position: relative; padding-bottom: 2.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -2.35rem; top: 0.55rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, transform 0.25s;
}
.timeline__card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.timeline__meta {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 1rem;
  margin-bottom: 0.75rem; flex-wrap: wrap;
}
.timeline__date { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); }
.timeline__tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tag {
  font-size: 0.65rem; font-weight: 500;
  padding: 0.2rem 0.6rem;
  background: rgba(227,0,27,0.08);
  color: var(--accent);
  border-radius: 980px;
}
.timeline__company {
  font-size: 1.35rem; font-weight: 700;
  letter-spacing: -0.025em; margin-bottom: 0.2rem;
}
.timeline__role { font-size: 0.82rem; font-weight: 500; color: var(--accent); margin-bottom: 1rem; }
.timeline__bullets { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.timeline__bullets li {
  font-size: 0.85rem; color: var(--text-muted);
  padding-left: 1rem; position: relative; line-height: 1.65;
}
.timeline__bullets li::before {
  content: ''; position: absolute; left: 0; top: 0.65em;
  width: 3px; height: 3px; border-radius: 50%; background: var(--accent);
}
@media (max-width: 640px) {
  .section__inner { padding: 5rem 1.5rem; }
  .timeline { padding-left: 1.25rem; }
  .timeline__dot { left: -1.6rem; }
  .timeline__card { padding: 1.25rem 1rem; }
}

/* ── PROJECTS ── */
#projects { background: var(--bg-card); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.project-card:hover { box-shadow: var(--shadow-h); transform: translateY(-3px); }
.project-card__top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 0.5rem;
}
.project-card__tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.project-card__link { color: var(--accent); flex-shrink: 0; transition: opacity 0.2s; }
.project-card__link:hover { opacity: 0.6; }
.project-card__name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.project-card__sub { font-size: 0.72rem; font-weight: 500; color: var(--accent); }
.project-card__desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.65; flex: 1; }
.project-card__metric {
  font-size: 0.75rem; color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem; margin-top: auto;
}
.project-card__metric span { color: var(--accent); font-weight: 600; font-size: 0.88rem; }
@media (max-width: 900px) { .projects__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .projects__grid { grid-template-columns: 1fr; } }

/* ── SKILLS ── */
#skills { background: var(--bg); }

.skills__groups { display: flex; flex-direction: column; gap: 2.5rem; }
.skills__group { display: flex; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.skills__group-label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted);
  width: 160px; flex-shrink: 0; padding-top: 0.35rem;
}
.skills__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 1; }
.pill {
  font-size: 0.75rem; font-weight: 500;
  padding: 0.35rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 980px;
  color: var(--text-muted);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, color 0.2s;
}
.pill:hover { color: var(--text); box-shadow: var(--shadow-h); }
.pill--accent {
  background: rgba(227,0,27,0.08);
  border-color: transparent;
  color: var(--accent);
  box-shadow: none;
}
@media (max-width: 640px) {
  .skills__group { flex-direction: column; gap: 0.75rem; }
  .skills__group-label { width: auto; }
}

/* ── LEADERSHIP ── */
#leadership { background: var(--bg-card); }

.leadership__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.leader-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.leader-card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.leader-card__date { font-size: 0.65rem; font-weight: 500; color: var(--text-muted); }
.leader-card__org { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.leader-card__role { font-size: 0.75rem; font-weight: 500; color: var(--accent); }
.leader-card__desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; margin-top: 0.25rem; }
@media (max-width: 900px) { .leadership__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .leadership__grid { grid-template-columns: 1fr; } }

/* ── PHOTOS ── */
#photos { background: var(--bg); }

.photos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: start;
}
.photo-item {
  overflow: hidden;
  border-radius: 14px;
  background: var(--border);
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.photo-item:hover img { transform: scale(1.04); }
.photo-item--wide { grid-column: span 2; }

/* Natural aspect ratios per photo */
.photos__grid .photo-item:nth-child(1)  { aspect-ratio: 2/3; }
.photos__grid .photo-item:nth-child(2)  { aspect-ratio: 16/9; }
.photos__grid .photo-item:nth-child(3)  { aspect-ratio: 3/2; }
.photos__grid .photo-item:nth-child(4)  { aspect-ratio: 2/3; }
.photos__grid .photo-item:nth-child(5)  { aspect-ratio: 3/2; }
.photos__grid .photo-item:nth-child(6)  { aspect-ratio: 3/4; }
.photos__grid .photo-item:nth-child(7)  { aspect-ratio: 5/3; }
.photos__grid .photo-item:nth-child(8)  { aspect-ratio: 2/3; }
.photos__grid .photo-item:nth-child(9)  { aspect-ratio: 3/2; }
.photos__grid .photo-item:nth-child(10) { aspect-ratio: 1/1; }
.photos__grid .photo-item:nth-child(11) { aspect-ratio: 3/2; }
.photos__grid .photo-item:nth-child(12) { aspect-ratio: 4/3; }

@media (max-width: 768px) {
  .photos__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .photos__grid { grid-template-columns: 1fr; }
  .photo-item--wide { grid-column: span 1; }
  .photos__grid .photo-item:nth-child(n) { aspect-ratio: 4/3; }
}

/* ── CONTACT ── */
#contact { background: var(--bg-card); }

.contact__inner {
  max-width: 700px; margin: 0 auto;
  padding: 7rem 2rem; text-align: center;
}
.contact__label {
  font-size: 0.8rem; font-weight: 600;
  color: var(--accent); margin-bottom: 1.25rem;
}
.contact__heading {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  margin-bottom: 1.25rem; color: var(--text);
}
.contact__sub {
  font-size: 0.9rem; color: var(--text-muted);
  max-width: 42ch; margin: 0 auto 3rem; line-height: 1.7;
}
.contact__links { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.contact__btn {
  font-size: 0.9rem; font-weight: 500;
  background: var(--accent); color: #ffffff;
  padding: 0.85rem 2rem; border-radius: 980px;
  transition: opacity 0.2s;
}
.contact__btn:hover { opacity: 0.85; }
.contact__socials { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.contact__socials a {
  font-size: 0.82rem; font-weight: 500;
  color: var(--accent);
  transition: opacity 0.2s;
}
.contact__socials a:hover { opacity: 0.65; }

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
}
.footer__inner {
  max-width: 980px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer__name { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.footer__copy { font-size: 0.72rem; color: var(--text-muted); }
@media (max-width: 640px) {
  footer { padding: 1.25rem 1.5rem; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
