/* Apple-inspired: SF Pro stack, #f5f5f7 canvas, one blue accent (#0071e3),
   tight display tracking, pill controls, 18px card radius, near-zero shadow. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hero: near-black Apple product band ---------- */
.hero {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 80px 20px 64px;
}

.hero h1 {
  margin: 0;
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.022em;
}

.hero .role {
  margin: 12px 0 0;
  font-size: 21px;
  line-height: 1.38;
  letter-spacing: 0.011em;
  color: #f5f5f7;
}

.hero .tagline {
  max-width: 560px;
  margin: 12px auto 0;
  font-size: 17px;
  color: #a1a1a6;
}

.cta-row {
  margin: 28px 0 40px;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.cta {
  display: inline-block;
  background: #0071e3;
  color: #fff;
  font-size: 17px;
  line-height: 1.18;
  padding: 11px 21px;
  border-radius: 980px;
  text-decoration: none;
}

.cta:hover { background: #0077ed; }

.more-link {
  color: #2997ff;
  font-size: 17px;
  text-decoration: none;
}

.more-link::after {
  content: " ›";
}

.more-link:hover { text-decoration: underline; }

.hero .photo {
  display: block;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.hero .links {
  margin-top: 32px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .links a {
  color: #2997ff;
  font-size: 17px;
  text-decoration: none;
}

.hero .links a::after { content: " ›"; }
.hero .links a:hover { text-decoration: underline; }

.hero .location {
  margin: 24px 0 0;
  font-size: 14px;
  color: #6e6e73;
}

/* ---------- Tabs: Liquid Glass floating segmented control ---------- */
.tabs {
  position: sticky;
  top: 12px;
  z-index: 10;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 16px auto 0;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tabs button {
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #1d1d1f;
  cursor: pointer;
}

.tabs button.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.js-tabs .panel { display: none; }
.js-tabs .panel.active { display: block; }

/* ---------- Content: white tiles on the #f5f5f7 canvas ---------- */
main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 22px 64px;
}

.panel section {
  background: #fff;
  border-radius: 18px;
  padding: 40px;
  margin-bottom: 12px;
}

h2 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.01em;
}

h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.profile-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-links a::after { content: " ›"; }

/* Review contribution: one big animated number, expert-showcase style */
.big-count {
  text-align: center;
  padding: 16px 0 8px;
}

.big-num {
  font-size: 96px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.big-label {
  margin-top: 8px;
  font-size: 21px;
  color: #6e6e73;
}

.review-desc {
  max-width: 560px;
  margin: 24px auto 0;
  text-align: center;
}

.mini-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.mini-stat { text-align: center; }

.mini-num {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.01em;
}

.mini-label {
  font-size: 15px;
  color: #6e6e73;
}

/* Languages: large typographic row so it reads at a glance */
.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 8px;
}

.lang {
  display: flex;
  flex-direction: column;
}

.lang-name {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lang-level {
  font-size: 15px;
  color: #6e6e73;
  margin-top: 2px;
}

/* Contact cards: one per audience, repeated on the matching tab */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.contact-card {
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  padding: 20px;
  margin-top: 24px;
}

.contact-cards .contact-card { margin-top: 0; }

.contact-card h3 { margin-bottom: 8px; }

.contact-card p {
  color: #6e6e73;
  margin-bottom: 12px;
}

.contact-card a { font-weight: 600; }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

.hint {
  color: #6e6e73;
  font-size: 14px;
  margin: -6px 0 20px;
}

/* ---------- Experience accordion cards ---------- */
details.job {
  background: #f5f5f7;
  border-radius: 18px;
  margin-bottom: 12px;
  overflow: hidden;
}

details.job summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}

details.job summary::-webkit-details-marker { display: none; }

details.job summary .logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.job-summary-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.job-summary-text .job-meta {
  color: #6e6e73;
  font-size: 14px;
}

.chevron {
  color: #6e6e73;
  font-size: 14px;
  transition: transform 0.2s ease;
}

details.job[open] .chevron { transform: rotate(180deg); }

details.job ul {
  margin: 0;
  padding: 0 24px 20px 72px;
}

details.job li { margin-bottom: 6px; }

/* ---------- Skills chips ---------- */
.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  background: #f5f5f7;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.3;
}

/* ---------- Research projects ---------- */
.project { margin-bottom: 24px; }
.project:last-child { margin-bottom: 0; }
.project p { margin: 4px 0 0; }
.project ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.project li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: #6e6e73;
  font-size: 12px;
  padding: 0 20px 32px;
}
footer p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .hero { padding: 56px 20px 48px; }
  .hero h1 { font-size: 40px; }
  .hero .role { font-size: 19px; }
  .hero .photo { width: 220px; height: 220px; }
  .panel section { padding: 24px; }
  h2 { font-size: 28px; }
  .big-num { font-size: 72px; }
  .mini-stats { gap: 32px; }
  .contact-cards { grid-template-columns: 1fr; }
  details.job ul { padding-left: 60px; }
  .stats { gap: 32px 16px; }
  .stat { flex-basis: 40%; }
  .stat-num { font-size: 36px; }
}

/* ---------- Motion: Adam Braun-inspired, Apple-restrained ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero entrance: staggered rise, like an animated headline */
.hero h1, .hero .role, .hero .tagline, .hero .cta-row,
.hero .photo-wrap, .hero .links, .hero .location {
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero .role { animation-delay: 0.08s; }
.hero .tagline { animation-delay: 0.16s; }
.hero .cta-row { animation-delay: 0.24s; }
.hero .photo-wrap { animation-delay: 0.34s; }
.hero .links { animation-delay: 0.44s; }
.hero .location { animation-delay: 0.52s; }

/* Stats band: bold animated numbers on the black canvas */
.stats {
  background: #000;
  color: #fff;
  border-top: 1px solid #1d1d1f;
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
  padding: 48px 20px;
  text-align: center;
}

.stat-num {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.022em;
}

.stat-label {
  margin-top: 6px;
  font-size: 15px;
  color: #a1a1a6;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Tab switch fade */
.js-tabs .panel.active { animation: panelIn 0.4s ease both; }

/* Hover micro-interactions */
details.job, .tabs button, .tags li {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
details.job:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.tags li:hover { background: #e8e8ed; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
