/* ===== Design tokens ===== */
:root {
  --on-bg: #2B2420;
  --on-bg-variant: #65727A;
  --surface: #FFFFFF;
  --primary: #4F8FD1;
  --primary-light: #F2F7FB;
  --bg: #F6F8FA;
  --line: #CDDDE5;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-script: 'Caveat', cursive;

  --shell-max: 1200px;
  --shell-pad: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); }
img { max-width: 100%; display: block; }

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn--outline {
  background: transparent;
  border-color: var(--on-bg);
  color: var(--on-bg);
}
.btn--pill-sm {
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  font-size: 12px;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 250, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 22px var(--shell-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--on-bg);
  white-space: nowrap;
}
.nav__links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.nav__links a {
  font-size: 14px;
  color: var(--on-bg-variant);
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--primary); }

/* ===== Hero ===== */
.hero {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 40px var(--shell-pad) 80px;
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}
.hero__text {
  flex: 1 1 480px;
  min-width: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.badge span:last-child {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--on-bg-variant);
  white-space: nowrap;
}
.hero__title {
  font-weight: 700;
  font-size: clamp(32px, 4vw, 47px);
  line-height: 1.15;
  letter-spacing: -0.4px;
  max-width: 520px;
  color: var(--on-bg);
}
.hero__paragraph {
  margin-top: 20px;
  max-width: 480px;
  color: var(--on-bg-variant);
  font-size: 16px;
  line-height: 1.75;
}
.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero__art {
  flex: 1 1 320px;
  min-width: 260px;
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,150,193,0.18), rgba(63,160,193,0) 70%);
  filter: blur(6px);
}
.hero__photo {
  position: relative;
  width: 260px;
  height: 260px;
}
.hero__photo-mask {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
}
.hero__photo-mask img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero__sticky {
  position: absolute;
  bottom: -8px;
  right: -20px;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-script);
  font-size: 22px;
  padding: 10px 20px;
  border-radius: 999px;
  transform: rotate(-6deg);
  box-shadow: 0 5px 9px rgba(0,0,0,0.08);
  white-space: nowrap;
}

/* ===== Rows (shared section layout) ===== */
.row {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 64px var(--shell-pad);
  display: flex;
  gap: 60px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.row--contact { border-bottom: 1px solid var(--line); }

.row__label {
  flex: 0 0 280px;
  max-width: 280px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.row__heading {
  font-weight: 600;
  font-size: 26px;
  margin-bottom: 8px;
}
.row__sub {
  color: var(--on-bg-variant);
  font-size: 14px;
  line-height: 1.5;
}

.row__content {
  flex: 1 1 480px;
  min-width: 0;
}

/* ===== Accordion (Work) ===== */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.acc-item {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 3px 14px rgba(43,36,32,0.05);
  overflow: hidden;
}
.acc-item__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  padding: 20px 22px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.acc-item__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-item__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  color: var(--on-bg);
}
.acc-item__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-bg-variant);
}
.acc-item__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--on-bg-variant);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.acc-item.is-open .acc-item__icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #fff;
}

.acc-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  padding: 0 22px;
}
.acc-item.is-open .acc-item__body {
  padding: 0 22px 24px;
}
.acc-item__intro {
  color: var(--on-bg-variant);
  font-size: 16px;
  line-height: 1.43;
  padding-top: 4px;
}
.acc-decision {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin-top: 18px;
}
.acc-decision h4 {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--on-bg);
}
.acc-decision p {
  color: var(--on-bg-variant);
  font-size: 16px;
  line-height: 1.43;
}
.acc-placeholder {
  margin-top: 20px;
  height: 220px;
  border-radius: 16px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-bg-variant);
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px dashed var(--line);
}

.acc-gallery {
  position: relative;
  margin-top: 20px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 1440 / 1024;
}
.acc-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: opacity .5s ease;
}
.acc-gallery__img.is-fading {
  opacity: 0;
}
.acc-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.acc-gallery__dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.acc-gallery__dots button.is-active {
  background: #fff;
  transform: scale(1.25);
}
.acc-gallery__dots button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.acc-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(43,36,32,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}
.acc-gallery:hover .acc-gallery__nav,
.acc-gallery:focus-within .acc-gallery__nav {
  opacity: 1;
}
.acc-gallery__nav:hover {
  background: rgba(43,36,32,0.7);
}
.acc-gallery__nav:focus-visible {
  opacity: 1;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.acc-gallery__nav--prev { left: 12px; }
.acc-gallery__nav--next { right: 12px; }

.acc-gallery--single .acc-gallery__nav,
.acc-gallery--single .acc-gallery__dots {
  display: none;
}

@media (hover: none) {
  .acc-gallery__nav { opacity: 1; }
}

.other-work {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.other-work__label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--on-bg-variant);
}

/* ===== Notes ===== */
.notes {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.note-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-card h4 {
  font-weight: 600;
  font-size: 15.5px;
}
.note-card p {
  color: var(--on-bg-variant);
  font-size: 13.5px;
  line-height: 1.65;
}
.note-card__link {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--primary);
  margin-top: 8px;
}

/* ===== About ===== */
.about-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 32px 30px;
}
.about-card p {
  color: var(--on-bg-variant);
  font-size: 16px;
  line-height: 1.7;
}
.script {
  font-family: var(--font-script);
  color: var(--primary);
  font-size: 22px;
}

/* ===== Skills grid ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.skill-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 80px;
}
.skill-card__label {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--primary);
}
.skill-card__value {
  font-size: 16px;
  color: var(--on-bg);
}

/* ===== Education ===== */
.edu-list {
  display: flex;
  flex-direction: column;
}
.edu-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
}
.edu-item--last { border-bottom: none; }
.edu-item--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.edu-item--split span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  font-weight: 400;
}

/* ===== Resume ===== */
.resume-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.resume-card__title {
  font-weight: 600;
  font-size: 16px;
}
.resume-card__sub {
  color: var(--on-bg-variant);
  font-size: 14px;
  margin-top: 16px;
}

/* ===== Contact ===== */
.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pill-link {
  background: var(--surface);
  color: var(--on-bg);
  height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 14px;
  transition: background-color .2s ease, color .2s ease;
}
.pill-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px var(--shell-pad);
  text-align: center;
}
.footer p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-bg-variant);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  :root { --shell-pad: 24px; }
  .nav__links { display: none; }
  .row { flex-direction: column; gap: 24px; }
  .row__label { max-width: none; }
  .contact-links { justify-content: flex-start; }
  .hero { padding-top: 24px; padding-bottom: 48px; }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; }
  .resume-card { flex-direction: column; align-items: flex-start; }
  .resume-card .btn { width: 100%; }
}
