/* vibewithhenry.cc portfolio */
:root {
  --ink: #1E1830;
  --text: #453E5C;
  --muted: #625B7A;
  --purple: #6D4CC9;
  --purple-dark: #5A3BB3;
  --purple-soft: #F7F4FF;
  --purple-tint: #F1ECFE;
  --purple-line: #E4DDF5;
  --purple-200: #DDD2FA;
  --red: #D7263D;
  --red-light: #FF6474;
  --white: #FFFFFF;
  --radius-lg: 32px;
  --radius-md: 24px;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", Inter, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 8px;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.03em; }
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 48px); }
.accent { color: var(--purple); }
.muted { color: var(--muted); font-weight: 400; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; color: var(--white); }

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--purple);
}
.eyebrow-light { color: #C4B1FA; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 16px/1 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 17px; }
.btn-note { font-weight: 400; opacity: .75; }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-dark); color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: #CFC3F2; }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--purple-tint); color: var(--ink); }
.btn-white { background: var(--white); color: var(--ink); overflow-wrap: anywhere; }
.btn-white:hover { color: var(--purple); }
.btn-outline-light { color: var(--white); border-color: rgba(255,255,255,.85); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: var(--white); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: #EEE8FD; box-shadow: 0 6px 24px rgba(30,24,48,.05); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.logo {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-top: 8px; }
.nav { display: flex; align-items: center; gap: 4px 22px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--text); font-weight: 500; font-size: 15px; text-decoration: none;
}
.nav-link:hover, .nav-link.is-active { color: var(--purple); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 8px; height: 2px;
  background: var(--red); border-radius: 2px;
}
.menu-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1.5px solid var(--purple-line); border-radius: 999px; background: var(--white);
  font: 600 15px var(--font-sans); color: var(--ink); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .2s, opacity .2s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(56px, 7vw, 96px); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 6vw, 88px); }
.hero-copy { flex: 999 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hello { margin: 0; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink); }
.hello strong { color: var(--purple); font-weight: 600; }
.hero h1 {
  margin: 0; font-weight: 700; font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04;
  letter-spacing: -0.035em; text-wrap: balance;
}
.lead { margin: 0; max-width: 560px; font-size: clamp(17px, 1.5vw, 19px); color: var(--text); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.portrait {
  flex: 1 1 300px; max-width: 400px; margin-inline: auto;
  position: relative; aspect-ratio: 4 / 5;
}
.portrait-bg {
  position: absolute; inset: 12% 0 0 0;
  border-radius: 200px 200px 32px 32px;
  background: radial-gradient(120% 90% at 50% 0%, #EDE6FF 0%, var(--purple-200) 100%);
}
.portrait-dot {
  position: absolute; z-index: 2; top: 16%; right: 6%;
  width: 18px; height: 18px; border-radius: 50%; background: var(--red);
}
.portrait picture, .portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.portrait img {
  object-fit: contain; object-position: 50% 100%;
  border-radius: 0 0 32px 32px;
}

/* Work */
.work { padding-bottom: clamp(64px, 9vw, 120px); }
.feature-row { display: flex; flex-wrap: wrap; gap: 24px; }
.flagship {
  flex: 999 1 520px; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--ink); color: var(--white);
  position: relative; overflow: hidden;
}
.flagship::after {
  content: ""; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(109,76,201,.55), transparent 70%);
  pointer-events: none;
}
.flagship > * { position: relative; z-index: 1; }
.flagship-title { margin: 0; font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; }
.flagship-text { margin: 0; max-width: 540px; color: #DCD5EE; text-wrap: pretty; }
.flagship-claim {
  margin: 12px 0 0; max-width: 620px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -0.03em;
  text-wrap: balance;
}
.claim-hl { color: var(--red-light); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(255,255,255,.08); color: #E6DDFB; border: 1px solid rgba(255,255,255,.14);
}
.flagship .btn { margin-top: 12px; }

.stat-stack { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.stat {
  flex: 1; display: flex; flex-direction: column; gap: 8px;
  padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg);
}
.stat-soft { background: var(--purple-soft); }
.stat-strong { background: var(--purple); color: var(--white); }
.stat-value {
  margin: auto 0 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 3.8vw, 52px); line-height: 1; letter-spacing: -0.04em;
  white-space: nowrap;
}
.stat-label { margin: 0; font-size: 16px; color: var(--text); }
.stat-strong .stat-label { color: #F4F0FE; }

.section-title { margin: clamp(48px, 7vw, 88px) 0 24px; font-weight: 700; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; }
.experience .section-title, .skills .section-title { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 28px; border: 1px solid var(--purple-line); border-radius: var(--radius-md);
  background: var(--white);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(80,52,170,.12); border-color: #C9B8F3; }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-tint); color: var(--purple);
}
.card h3 { margin: 0; font-weight: 600; font-size: 21px; line-height: 1.2; letter-spacing: -0.015em; }
.card p { margin: 0; font-size: 16px; color: var(--text); }
.card-link {
  all: unset; cursor: pointer; color: var(--ink);
}
/* Whole card is clickable through the title button */
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--purple); outline-offset: 3px; }
.card-more { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--purple); }
.card:hover .card-more { color: var(--red); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tags li {
  padding: 5px 12px; border-radius: 999px; background: var(--purple-tint);
  color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1.4;
}

/* Experience */
.experience { padding-bottom: clamp(64px, 9vw, 112px); }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 28px 0; }
.timeline li { display: flex; flex-direction: column; gap: 4px; padding-right: 20px; border-top: 2px solid var(--purple-200); }
.timeline .is-current { border-top-color: var(--red); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--purple); margin-top: -7px; }
.is-current .tl-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(215,38,61,.15); }
.tl-date { margin-top: 12px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.is-current .tl-date { color: var(--red); }
.tl-company { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.25; }
.tl-role { font-size: 15px; color: var(--muted); }
.education { margin: 36px 0 0; font-size: 16px; color: var(--text); }
.education .eyebrow { display: inline; margin-right: 12px; }

/* Skills */
.skills { padding-block: clamp(64px, 9vw, 112px); background: var(--purple-soft); }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px 40px; }
.skill { display: flex; flex-direction: column; gap: 10px; }
.skill .eyebrow { font-weight: 500; }
.skill .tags { margin-top: 0; padding-top: 0; }
.skill .tags li { background: var(--white); border: 1px solid var(--purple-line); }

/* Contact */
.contact { padding-block: clamp(64px, 9vw, 120px); background: var(--purple); color: var(--white); }
.contact-title { margin: 0; font-weight: 700; font-size: clamp(44px, 7vw, 96px); line-height: 1; letter-spacing: -0.04em; }
.contact-text { margin: 16px 0 32px; max-width: 520px; font-size: 18px; color: #F4F0FE; }

/* Footer */
.site-footer { padding-block: 24px; background: var(--ink); color: #C9C1E0; font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); }

/* Project dialogs */
.project-dialog {
  width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--radius-md);
  color: var(--ink); background: var(--white);
  box-shadow: 0 30px 80px rgba(30,24,48,.3);
  overscroll-behavior: contain;
}
.project-dialog::backdrop { background: rgba(30,24,48,.55); backdrop-filter: blur(4px); }
.project-dialog[open] { animation: dialog-in .22s ease-out; }
.project-dialog[open]::backdrop { animation: fade-in .22s ease-out; }
.dialog-inner { position: relative; padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.dialog-inner h2 { margin: 0; padding-right: 48px; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.dialog-inner h3 { margin: 12px 0 0; font-size: 18px; letter-spacing: -0.01em; }
.dialog-lead { margin: 0; color: var(--text); }
.dialog-inner > .eyebrow { padding-right: 48px; }
.project-dialog:focus, .project-dialog:focus-visible { outline: none; }
.dialog-close {
  position: sticky; top: 16px; z-index: 2; align-self: flex-end; flex: none;
  margin: -12px -12px -40px 0;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-tint); color: var(--ink); cursor: pointer;
}
.dialog-close:hover { background: var(--purple-200); }
.detail-list { display: flex; flex-direction: column; gap: 10px; }
.detail-list li { position: relative; padding-left: 20px; color: var(--text); font-size: 16px; }
.detail-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--purple);
}
.result-box { padding: 20px 22px; border-radius: 18px; background: var(--purple-soft); }
.result-box p { margin: 0 0 14px; font-size: 15.5px; color: var(--text); }
.result-box .result-title { margin-bottom: 6px; font-weight: 600; color: var(--ink); font-size: 16px; }
.result-grid { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.result-grid div { padding: 12px 14px; border-radius: 12px; background: var(--white); }
.result-grid dt { font-size: 13px; color: var(--muted); }
.result-grid dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 20px; color: var(--muted); }
.result-grid strong { color: var(--purple); }
body.dialog-open { overflow: hidden; }

@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Mobile */
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 8px clamp(20px, 5vw, 48px) 20px;
    background: var(--white); border-bottom: 1px solid #EEE8FD;
    box-shadow: 0 16px 32px rgba(30,24,48,.08);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-link { font-size: 17px; min-height: 48px; }
  .nav-link.is-active::after { display: none; }
  .nav .btn { margin-top: 8px; }
  .no-js-nav .nav { display: flex; position: static; box-shadow: none; }
  .portrait { max-width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
