/* ---------- Tokens ---------- */
:root {
  --purple: #9b2cf5;
  --purple-dark: #7d1fd0;
  --purple-tint: #f4eaff;
  --text: #16161a;
  --muted: #5d5d6b;
  --bg: #ffffff;
  --mint: #d9f8ee;
  --pink: #f6d5fb;
  --radius: 4px;
  --radius-lg: 22px;
  --header-h: 72px;
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--purple);
  color: #fff;
  font: 600 15px/1.2 var(--font);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(155, 44, 245, .28);
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--purple-dark); transform: translateY(-1px); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  transition: box-shadow .25s;
}
.header.is-scrolled { box-shadow: 0 2px 16px rgba(20, 10, 40, .08); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo__mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-weight: 600; font-size: 20px;
}
.logo__text { font-size: 24px; font-weight: 600; }

.nav__list { display: flex; align-items: center; gap: 10px; }
.nav__link {
  display: block;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--purple); }
.nav__link.is-active,
.nav__link--cta {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 3px 8px rgba(155, 44, 245, .25);
}
.nav__link.is-active:hover,
.nav__link--cta:hover { color: #fff; background: var(--purple-dark); }
.nav__link--cta { font-weight: 600; margin-left: 4px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 48px 0;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 38%;
  background:
    radial-gradient(60% 55% at 85% 8%, var(--pink), transparent 70%),
    radial-gradient(55% 55% at 95% 100%, var(--mint), transparent 70%);
  z-index: -1;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
}
.hero__title { font-size: clamp(40px, 5.2vw, 58px); line-height: 1.08; font-weight: 600; letter-spacing: -.01em; }
.hero__text { margin-top: 24px; max-width: 470px; color: #2b2b33; }
.hero__actions { margin-top: 28px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.stats { margin-top: 110px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 500px; }
.stat { background: var(--purple-tint); padding: 22px 12px; text-align: center; }
.stat__num { display: block; font-size: 24px; font-weight: 600; color: #2f2f45; }
.stat__label { font-size: 13px; color: var(--muted); }

.hero__media { display: flex; justify-content: center; }
.photo {
  width: min(100%, 410px);
  aspect-ratio: 410 / 476;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px rgba(60, 20, 100, .14);
  overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }

/* ---------- Social ---------- */
.social { display: flex; gap: 10px; }
.social__link {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--purple);
  color: var(--purple);
  transition: background .2s, color .2s, transform .2s;
}
.social__link svg { width: 20px; height: 20px; fill: currentColor; }
.social__link:hover { background: var(--purple); color: #fff; transform: translateY(-2px); }
.social--lg .social__link { width: 48px; height: 48px; }
.social--sm .social__link { width: 36px; height: 36px; }
.social--sm .social__link svg { width: 17px; height: 17px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--tint { background: #faf6ff; }
.section__head { margin-bottom: 40px; }
.section__head h2, .contact h2 { font-size: clamp(30px, 3.6vw, 40px); font-weight: 600; line-height: 1.15; }
.section__head p { margin-top: 10px; color: var(--muted); }

.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.about .section__head { margin: 0 0 24px; }
.about__side { max-width: 360px; }
.about__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 18px 40px rgba(60, 20, 100, .14); }
.about__body { display: grid; gap: 16px; color: #2b2b33; max-width: 62ch; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 20px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  padding: 28px 24px;
  border-radius: 8px;
  border: 1px solid #eadcfb;
}
.section--tint .card { border-color: #eadcfb; }
.card h3 { font-size: 19px; font-weight: 600; line-height: 1.3; }
.card p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.card__meta { margin-top: 4px; color: var(--purple); font-weight: 600; font-size: 14px; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.skills li { padding: 8px 16px; border-radius: 999px; background: var(--purple-tint); color: var(--purple-dark); font-size: 14px; font-weight: 500; }
.card__num {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 16px;
  border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 600;
}
.card__link { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--purple); }
.card__link:hover { text-decoration: underline; }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  padding: 9px 18px;
  border: 1.5px solid var(--purple);
  border-radius: var(--radius);
  background: transparent;
  color: var(--purple);
  font: 500 14px var(--font);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.filter:hover, .filter.is-active { background: var(--purple); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.project[hidden] { display: none; }
.project__thumb {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pink), var(--mint));
  color: var(--purple);
  font-size: 30px; font-weight: 700;
  margin-bottom: 14px;
}
.project h3 { font-size: 18px; font-weight: 600; }
.project p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact__info p { margin: 12px 0 24px; color: var(--muted); max-width: 40ch; }
.contact__details { display: grid; gap: 10px; margin-bottom: 24px; }
.contact__details li { display: flex; align-items: center; gap: 10px; }
.contact__details small { display: inline; margin-right: 6px; font-size: 16px; color: var(--muted); }
.contact__details small::after { content: ":"; }
.contact__details a { font-weight: 500; font-size: 16px; }
.contact__details a:hover { color: var(--purple); }
.contact__icon { width: auto; height: auto; flex: none; display: inline-flex; background: none; color: var(--purple); }
.contact__icon svg { width: 16px; height: 16px; fill: currentColor; }
.form { display: grid; gap: 8px; }
.form label { font-size: 14px; font-weight: 500; margin-top: 8px; }
.form input, .form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #dccdf0;
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(155, 44, 245, .18); }
.form .is-invalid { border-color: #d13b3b; }
.form .btn { justify-self: start; margin-top: 8px; }
.form__status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.form__status.is-error { color: #d13b3b; }

/* ---------- Footer ---------- */
.footer { padding: 28px 0; border-top: 1px solid #eee6f8; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    box-shadow: 0 12px 24px rgba(20, 10, 40, .1);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav.is-open { max-height: 420px; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 24px 22px; }
  .nav__link { padding: 12px 16px; }
  .nav__link--cta { margin-left: 0; text-align: center; }

  .hero { min-height: 0; }
  .hero::before { inset: 40% 0 0 0; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .photo { width: min(100%, 340px); }
  .stats { margin-top: 48px; max-width: none; }

  .about, .contact { grid-template-columns: 1fr; gap: 28px; }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
}

@media (max-width: 600px) {
  .container { width: min(1120px, 100% - 32px); }
  .cards--2, .cards--3, .cards--4, .grid { grid-template-columns: 1fr; }
  .stat__num { font-size: 20px; }
  .stat__label { font-size: 12px; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
