/* ==========================================================================
   Zara Arakelian — portfolio site
   Shared design system: reset, tokens, layout, header, footer, components
   ========================================================================== */

:root {
  --color-ink: #090012;
  --color-bg: #ffffff;
  --color-menu-bg: #fffef9;
  --color-footer-bg: #090012;
  --color-white: #ffffff;
  --color-muted: rgba(9, 0, 18, 0.6);
  --color-overlay: rgba(9, 0, 18, 0.4);
  --color-border: rgba(9, 0, 18, 0.12);

  --font-sans: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-copyright: "Futura Md BT", "Century Gothic", var(--font-sans);

  --container-width: 1512px;
  --container-pad: clamp(20px, 5vw, 48px);

  --radius-lg: 24px;
  --radius-pill: 999px;

  --fs-h1: clamp(32px, 4.6vw, 50px);
  --fs-h2: clamp(26px, 3.4vw, 32px);
  --fs-body: clamp(16px, 1.6vw, 20px);
  --fs-nav: 16px;
  --fs-card-title: clamp(18px, 2.2vw, 28px);

  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

em {
  font-style: italic;
  font-weight: 600;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-ink);
}

.btn:active {
  transform: scale(0.97);
}

.btn--light {
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--dark {
  color: var(--color-ink);
  border-color: var(--color-ink);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding-inline: var(--container-pad);
  background: var(--color-menu-bg);
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-ink);
}

.site-header__logo-icon {
  height: 28px;
  width: 28px;
  flex-shrink: 0;
}

.site-header__logo-word {
  height: 20px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav__link {
  font-weight: 700;
  font-size: var(--fs-nav);
  text-decoration: none;
  color: var(--color-ink);
  position: relative;
  transition: color 0.2s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.2s ease;
}

.site-nav__link:hover {
  color: #5700af;
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}

/* Closed state: three rounded bars of stepped length (short / full / short),
   echoing the hand-drawn asymmetry of the wordmark rather than a plain,
   evenly-lined hamburger. */
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease, left 0.2s ease, right 0.2s ease, width 0.2s ease, background-color 0.2s ease;
}

.nav-toggle span {
  top: 19px;
  left: 8px;
  right: 8px;
}

.nav-toggle span::before {
  top: -11px;
  left: 0;
  width: 14px;
}

.nav-toggle span::after {
  top: 11px;
  right: 0;
  left: auto;
  width: 14px;
}

/* Open state: the three bars regroup into a bold, clean X. */
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

/* Centered on the button itself (same slot the hamburger occupies), sized
   larger than the closed bars, and kept at their exact 3px thickness so the
   X reads as the same icon toggling, not a different, thinner one.
   NOTE: top is relative to `span`'s own box, and span sits at top:19px
   inside the button — so to land the X's crossing point on the button's
   true center (20px) the offset here has to be -0.5px, not 18.5px (that
   earlier value ignored span's own 19px offset and pushed the X ~19px too
   far down, i.e. it visibly "jumped" lower than the closed hamburger). */
.nav-toggle[aria-expanded="true"] span::before,
.nav-toggle[aria-expanded="true"] span::after {
  top: -0.5px;
  left: 2px;
  right: 2px;
  width: auto;
  height: 3px;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding-block: clamp(56px, 10vw, 120px) clamp(32px, 6vw, 56px);
}

.site-footer__glow {
  position: absolute;
  top: 15%;
  right: -8%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 210, 0.55), rgba(255, 138, 210, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
}

.site-footer__title {
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: 1.17;
  margin-bottom: 24px;
}

.site-footer__text {
  max-width: 812px;
  font-size: var(--fs-body);
  margin-bottom: 16px;
}

.site-footer__text a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__email {
  display: inline-block;
  font-size: var(--fs-body);
  text-decoration: none;
  margin-bottom: 32px;
}

.site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: clamp(48px, 12vw, 96px);
}

.site-footer__copy {
  position: relative;
  z-index: 1;
  font-family: var(--font-copyright);
  font-size: 12px;
  opacity: 0.8;
  max-width: none;
  margin-inline: 0;
}

/* ---------- Page hero band shared by inner pages ---------- */

.page-hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(32px, 6vw, 64px);
  background: var(--color-menu-bg);
}

.page-hero__eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.page-hero__title {
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: 1.17;
  max-width: 900px;
}

.page-hero__lede {
  margin-top: 20px;
  max-width: 640px;
  color: var(--color-muted);
  font-size: var(--fs-body);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  text-decoration: none;
  font-weight: 700;
  color: var(--color-ink);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ---------- Shared responsive rules ---------- */

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  /* While the menu is open the header sheds its light tint and merges
     visually into the dark overlay below it, so logo and close icon need
     to flip to a light color for contrast. */
  body.nav-open .site-header {
    background: var(--color-footer-bg);
  }

  body.nav-open .nav-toggle span::before,
  body.nav-open .nav-toggle span::after {
    background: var(--color-white);
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--color-footer-bg);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 64px;
    padding: 80px var(--container-pad) 32px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 40;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__link {
    font-size: 28px;
    color: var(--color-white);
  }

  .site-nav__link:hover {
    color: var(--color-white);
    opacity: 0.7;
  }

  .site-footer__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
  }
}
