/* ============================================================
   Ava Reyes — Portfolio
   Minimal / elegant / neutral. Vanilla CSS, no framework.
   ============================================================ */

:root {
  --bg: #F4F7FF;
  --surface: #FFFFFF;
  --ink: #0A0A0F;
  --ink-soft: #1B2A4A;
  --muted: #5B6B8C;
  --line: #D6E0F5;
  --ink-dark: #0A0F1E;
  --ink-dark-2: #10203F;
  --on-dark: #EAF0FF;
  --on-dark-muted: #8FA3C8;
  --blue: #1D5BFF;
  --blue-hover: #0B44E0;

  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 48px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 18px 40px -24px rgba(13, 39, 100, 0.35);
}

/* Reset ---------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

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

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }

::selection { background: var(--ink); color: var(--bg); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}
.btn--solid { background: var(--blue); color: #FFFFFF; }
.btn--solid:hover { transform: translateY(-2px); background: var(--blue-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn--light { background: var(--blue); color: #FFFFFF; }
.btn--light:hover { background: var(--blue-hover); }

/* Header / Nav --------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__brand img { height: 28px; width: auto; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  padding: 0;
}
.nav__menu a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--blue);
  transition: width 0.28s var(--ease);
}
.nav__menu a:hover { color: var(--blue); }
.nav__menu a:hover::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  padding: 0 10px;
}
.nav__toggle span {
  display: block;
  height: 1.7px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.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(-6.7px) rotate(-45deg); }

/* Hero ----------------------------------------------------- */
.hero {
  padding-top: clamp(72px, 14vh, 150px);
  padding-bottom: clamp(64px, 12vh, 130px);
  max-width: 900px;
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 26px;
}
.hero__title {
  font-size: clamp(2.9rem, 10vw, 6.2rem);
  letter-spacing: -0.04em;
}
.hero__tagline {
  margin-top: 28px;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.55;
}
.hero__actions {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Section shared ------------------------------------------- */
.section-head { margin-bottom: clamp(32px, 6vw, 60px); }
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}
.section-title--light { color: var(--on-dark); }
.section-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.05rem;
}

.work { padding-block: clamp(48px, 9vw, 96px); }
.about { padding-block: clamp(48px, 9vw, 96px); }

/* Work grid ------------------------------------------------ */
.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3.5vw, 40px);
}
.card {
  display: flex;
  flex-direction: column;
}
.card__media {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.045); }
.card:hover .card__media { box-shadow: var(--shadow); }

.card__body { padding-top: 22px; }
.card__tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 10px;
}
.card__title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.card__text {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* About ---------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}
.about__lead {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 24px;
}
.about__body p { color: var(--muted); margin-bottom: 18px; max-width: 62ch; }
.about__list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.about__list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Contact -------------------------------------------------- */
.contact {
  background: var(--ink-dark);
  color: var(--on-dark);
  padding-block: clamp(64px, 11vw, 120px);
  background-image: radial-gradient(
    120% 120% at 100% 0%,
    var(--ink-dark-2) 0%,
    var(--ink-dark) 55%
  );
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.contact__sub {
  margin-top: 18px;
  color: var(--on-dark-muted);
  max-width: 42ch;
  font-size: 1.05rem;
}
.contact__email {
  display: inline-block;
  margin-top: 28px;
  font-size: 1.15rem;
  color: var(--on-dark);
  border-bottom: 1px solid rgba(234, 240, 255, 0.35);
  padding-bottom: 3px;
  transition: border-color 0.25s var(--ease);
}
.contact__email:hover { border-color: var(--on-dark); }

.contact__form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--on-dark-muted);
}
.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  resize: vertical;
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.07);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #C9736B;
}
.form__status {
  font-size: 0.92rem;
  color: var(--on-dark-muted);
  min-height: 1.2em;
}
.form__status.is-success { color: #8FD1A6; }
.form__status.is-error { color: #E39B93; }

/* Footer --------------------------------------------------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: 40px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer__brand img { height: 26px; width: auto; }
.footer__links {
  display: flex;
  gap: 26px;
  list-style: none;
  padding: 0;
}
.footer__links a {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer__links a:hover { color: var(--blue); }
.footer__copy { color: var(--muted); font-size: 0.88rem; }

/* Reveal on scroll ----------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive ----------------------------------------------- */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 26px;
    transform: translateY(-140%);
    transition: transform 0.38s var(--ease);
    box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.35);
  }
  .nav__menu.is-open { transform: translateY(0); }
  .nav__menu li { width: 100%; }
  .nav__menu a {
    display: block;
    width: 100%;
    padding: 14px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__menu li:last-child a { border-bottom: none; }
  .nav__menu a::after { display: none; }
}

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