:root {
  --bg: #f8f3ee;
  --ink: #211f1f;
  --muted: #6f6762;
  --line: rgba(33, 31, 31, 0.14);
  --accent: #6f625b;
  --max: 1120px;
  --left: 420px;
  --gap: 80px;
  --shadow: 0 24px 70px rgba(57, 45, 38, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbf8f4 0%, var(--bg) 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 800;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  font-family: "Playfair Display", Georgia, serif;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--muted);
}

.nav-cta {
  background: var(--ink);
  color: #fff;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.052em;
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow,
.section-kicker,
.role-date,
.timeline span,
.contact-card span {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
  margin: 0 0 14px;
}

/* HERO */
.hero {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
  padding: 52px 0 78px;
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr);
  gap: var(--gap);
  align-items: center;
}

.hero-copy {
  max-width: var(--left);
}

.hero h1 {
  font-size: clamp(5.2rem, 8vw, 7.8rem);
  line-height: 0.86;
  margin-bottom: 24px;
}

.hero-subtitle {
  max-width: 390px;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.copy-email-btn,
.email-app-link {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button,
.copy-email-btn {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}

.secondary-button,
.email-app-link {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero-card {
  position: relative;
  width: 430px;
  height: 330px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 252, 248, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
  justify-self: start;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(111, 98, 91, 0.14);
  border-radius: 24px;
}

.profile-orb {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(111, 98, 91, 0.12);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  z-index: 2;
}

.heartbeat-frame {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 138%;
  transform: translate(-50%, -50%);
}

.heartbeat-clean-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

#ecg-line {
  opacity: 1;
  stroke: #d63b3b;
  stroke-width: 5;
}

#ecg-shadow {
  opacity: 0.22;
}

/* PROFILE */
.profile-section {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
  padding: 58px 0;
}

.profile-with-photo,
.profile-layout {
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.profile-portrait {
  width: var(--left);
  height: 500px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.profile-copy h2 {
  font-size: clamp(3rem, 4.8vw, 4.7rem);
  line-height: 0.98;
  margin: 0 0 22px;
  max-width: 680px;
}

.profile-copy p {
  max-width: 660px;
  font-size: 0.98rem;
  margin-bottom: 14px;
}

/* ALL SECTIONS AFTER PROFILE */
.aligned-section {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
  padding: 58px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.aligned-left,
.aligned-right {
  margin: 0;
  padding: 0;
  width: 100%;
}

.aligned-left h2 {
  font-size: clamp(2.75rem, 4vw, 4.1rem);
  line-height: 1.02;
  margin: 0;
  max-width: var(--left);
}

.aligned-left p:not(.section-kicker) {
  margin-top: 14px;
  max-width: 380px;
  font-size: 0.94rem;
}

/* EXPERIENCE */
#experience .aligned-right {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
}

#experience .role-date,
#experience h3,
#experience .institution {
  grid-column: 1;
}

#experience .experience-points {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  gap: 12px;
}

#experience h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.institution {
  color: var(--muted);
  font-weight: 750;
}

.experience-points p,
.aligned-right p {
  font-size: 0.94rem;
  line-height: 1.62;
  margin: 0;
}

/* EDUCATION */
.timeline {
  display: grid;
  gap: 0;
}

.timeline article {
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.timeline article:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.timeline h3 {
  font-size: 1.08rem;
  margin: 0 0 4px;
}

.timeline p {
  margin: 0;
  font-size: 0.94rem;
}

/* SKILLS */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-grid span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 650;
}

/* BEYOND */
.lifestyle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.lifestyle-grid article,
.life-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: auto;
}

.lifestyle-grid article > span {
  display: none;
}

.beyond-tile-image {
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 12px 34px rgba(57, 45, 38, 0.10);
}

.beyond-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Rainbow highlight, subtle */
.life-card,
.lifestyle-grid article {
  position: relative;
}

.life-card::after,
.lifestyle-grid article::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 22px;
  background: linear-gradient(135deg, #e8c5d8, #efe2a3, #b9d7c0, #afd0ee, #d8c3ee);
  opacity: 0;
  z-index: -1;
  transition: opacity 220ms ease;
}

.life-card:hover::after,
.life-card.is-rainbow-active::after,
.lifestyle-grid article:hover::after,
.lifestyle-grid article.is-rainbow-active::after {
  opacity: 0.55;
}

.lifestyle-grid h3,
.life-copy span {
  font-size: 1rem;
  margin: 0 0 6px;
  font-weight: 800;
}

.lifestyle-grid p,
.life-copy p {
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

/* CONTACT */
.contact-card {
  display: grid;
  gap: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.contact-card strong {
  font-size: 1rem;
}

.copy-status {
  min-height: 1.2em;
  color: var(--muted);
}

/* REVEAL */
.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

/* MOBILE */
@media (max-width: 900px) {
  .site-header,
  .hero,
  .profile-section,
  .aligned-section {
    width: min(100% - 32px, var(--max));
  }

  .nav-links {
    display: none;
  }

  .hero,
  .profile-with-photo,
  .profile-layout,
  .aligned-section,
  #experience .aligned-right {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero h1 {
    font-size: clamp(3.8rem, 17vw, 5.8rem);
  }

  .hero-card {
    width: 100%;
    max-width: 430px;
    height: 330px;
  }

  .profile-portrait {
    width: 100%;
    max-width: 420px;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  #experience .experience-points {
    grid-column: auto;
    grid-row: auto;
    margin-top: 18px;
  }

  .aligned-left h2 {
    max-width: 100%;
  }

  .lifestyle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* HERO CARD WIDTH ONLY FIX */
.hero-card {
  width: 480px !important;
  max-width: 480px !important;
  height: 330px !important;
  min-height: 330px !important;
  max-height: 330px !important;
}

.hero-card::before {
  inset: 18px !important;
}

.heartbeat-frame {
  width: 155% !important;
  top: 53% !important;
}

@media (max-width: 900px) {
  .hero-card {
    width: 100% !important;
    max-width: 480px !important;
  }
}

/* HERO GUIDE WIDTH ONLY - match marked guide */
.hero {
  grid-template-columns: var(--left) 520px !important;
  gap: 80px !important;
}

.hero-card {
  width: 520px !important;
  max-width: 520px !important;
  height: 330px !important;
  min-height: 330px !important;
  max-height: 330px !important;
  justify-self: end !important;
}

.heartbeat-frame {
  width: 150% !important;
  top: 53% !important;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr !important;
  }

  .hero-card {
    width: 100% !important;
    max-width: 520px !important;
  }
}

/* FORCE HERO CARD WIDE - exact selector */
section.hero .hero-card {
  width: 560px !important;
  max-width: 560px !important;
  min-width: 560px !important;
  height: 330px !important;
  min-height: 330px !important;
  max-height: 330px !important;
  justify-self: end !important;
}

section.hero {
  grid-template-columns: 420px 560px !important;
  gap: 80px !important;
}

/* inner border must also stretch */
section.hero .hero-card::before {
  inset: 18px !important;
  border-radius: 24px !important;
}

/* ECG line spacing inside wider card */
section.hero .heartbeat-frame {
  width: 148% !important;
  top: 53% !important;
}

@media (max-width: 900px) {
  section.hero {
    grid-template-columns: 1fr !important;
  }

  section.hero .hero-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 560px !important;
  }
}

/* SKILLS ICON POLISH ONLY */
#skills .pill-grid {
  gap: 12px !important;
  align-content: start !important;
}

#skills .pill-grid span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.48) !important;
  border: 1px solid rgba(33, 31, 31, 0.14) !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  box-shadow: 0 8px 24px rgba(57, 45, 38, 0.045) !important;
}

#skills .pill-grid span::before {
  width: 22px !important;
  height: 22px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: rgba(111, 98, 91, 0.10) !important;
  color: #6f625b !important;
  font-size: 0.78rem !important;
  flex: 0 0 22px !important;
}

#skills .pill-grid span:nth-child(1)::before { content: "✚"; }
#skills .pill-grid span:nth-child(2)::before { content: "◉"; }
#skills .pill-grid span:nth-child(3)::before { content: "↗"; }
#skills .pill-grid span:nth-child(4)::before { content: "◌"; }
#skills .pill-grid span:nth-child(5)::before { content: "＋"; }
#skills .pill-grid span:nth-child(6)::before { content: "□"; }
#skills .pill-grid span:nth-child(7)::before { content: "◇"; }
#skills .pill-grid span:nth-child(8)::before { content: "◍"; }
#skills .pill-grid span:nth-child(9)::before { content: "♡"; }
#skills .pill-grid span:nth-child(10)::before { content: "✚"; }
#skills .pill-grid span:nth-child(11)::before { content: "•"; }
#skills .pill-grid span:nth-child(12)::before { content: "↗"; }
#skills .pill-grid span:nth-child(13)::before { content: "✓"; }

#skills .pill-grid span:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 32px rgba(57, 45, 38, 0.08) !important;
}

/* LIVE FALLBACK - show page even if JS reveal fails */
.section-reveal {
  opacity: 1 !important;
  transform: none !important;
}


/* NO ANIMATION SAFETY FIX */
.section-reveal,
.section-reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}


/* MOBILE VIEW FIX */
@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    margin: 0;
  }

  main,
  .page,
  .site-main,
  .portfolio-page {
    width: 100%;
    max-width: none;
  }

  section,
  .section,
  .hero,
  .about,
  .experience,
  .beyond,
  .contact {
    width: 100%;
    max-width: none;
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-inner,
  .container,
  .content-wrap,
  .beyond-inner {
    width: 100%;
    max-width: none;
  }

  .beyond-grid,
  .lifestyle-grid,
  .image-grid,
  .beyond-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .beyond-card,
  .lifestyle-card,
  .image-card {
    width: 100%;
    max-width: none;
    overflow: hidden;
  }

  .beyond-card img,
  .lifestyle-card img,
  .image-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 3rem);
    line-height: 0.95;
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
    line-height: 1;
  }
}


/* MOBILE IMAGE CROP FIX */
@media (max-width: 640px) {
  .beyond-card img,
  .lifestyle-card img,
  .image-card img {
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}


/* BEYOND MOBILE TRUE IMAGE FIX */
@media (max-width: 640px) {
  .beyond-card,
  .lifestyle-card,
  .image-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .beyond-card picture,
  .beyond-card figure,
  .beyond-card .card-image,
  .beyond-card .card-media,
  .beyond-card .image-wrap,
  .lifestyle-card picture,
  .lifestyle-card figure,
  .lifestyle-card .card-image,
  .lifestyle-card .card-media,
  .lifestyle-card .image-wrap,
  .image-card picture,
  .image-card figure,
  .image-card .card-image,
  .image-card .card-media,
  .image-card .image-wrap {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
  }

  .beyond-card img,
  .lifestyle-card img,
  .image-card img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
  }
}


/* FINAL MOBILE PHOTO FIX - show full photos */
@media (max-width: 640px) {
  .beyond img,
  .beyond-section img,
  [class*="beyond"] img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
  }

  .beyond picture,
  .beyond figure,
  .beyond .media,
  .beyond .photo,
  .beyond .image,
  .beyond .image-wrap,
  .beyond .card-image,
  .beyond .card-media,
  [class*="beyond"] picture,
  [class*="beyond"] figure,
  [class*="beyond"] [class*="media"],
  [class*="beyond"] [class*="photo"],
  [class*="beyond"] [class*="image"] {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
  }
}




/* FINAL BEYOND PHOTO FIX - show all photos, no cut-off */
@media (max-width: 640px) {
  #beyond article {
    padding-top: 0 !important;
    min-height: 0 !important;
  }

  #beyond article .beyond-tile-image {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    border-radius: 16px 16px 0 0 !important;
  }

  #beyond article .beyond-tile-image img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
  }
}
