/* ===================================================================
   Kimberly Alexander-Moore — Design Portfolio
   Palette:  ink #241d38 (deep plum-ink)  ·  gold #f6c453 (from monogram)
             berry #7a3155 (creative accent)  ·  paper #f6f3f8 (cool ivory)
   Type:     Playfair Display (display)  ·  Inter (body/UI)
   Signature motif: rotated "pinboard" corner tabs on imagery, echoing
   the mockup/frame presentation style seen across the real work.
   =================================================================== */

:root {
  --ink: #241d38;
  --ink-soft: #443a5c;
  --paper: #f6f3f8;
  --card: #ffffff;
  --line: #e3dbea;
  --gold: #f6c453;
  --gold-deep: #d9a02f;
  --berry: #7a3155;
  --text: #241d38;
  --text-muted: #6b6178;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 12px 30px -12px rgba(36, 29, 56, 0.25);
  --shadow-lift: 0 20px 40px -16px rgba(36, 29, 56, 0.35);

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */

.section-block {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 88px 32px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--berry);
  margin: 0 0 14px;
}

.section-heading {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
}

/* signature underline swipe beneath every H2 */
.section-heading h2::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 72px;
  height: 8px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--berry) 100%);
  border-radius: 6px;
}

.section-heading p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button.primary {
  background: var(--ink);
  color: var(--gold);
  box-shadow: var(--shadow-card);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.button.secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  background: rgba(246, 243, 248, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.brand strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.brand small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

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

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.nav-toggle span::before {
  top: -8px;
}

.nav-toggle span::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

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

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

#primary-nav {
  display: flex;
  gap: 28px;
}

#primary-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

#primary-nav a:hover {
  color: var(--ink);
  border-color: var(--gold);
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 32px 96px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  margin: 4px 0 22px;
}

.hero-copy .intro {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-showcase {
  position: relative;
  min-height: 380px;
}

.showcase-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  transform: rotate(-2deg);
  border: 6px solid var(--card);
}

.showcase-stack {
  position: absolute;
  bottom: -36px;
  right: -18px;
  display: flex;
  gap: 14px;
}

.showcase-stack img {
  width: 150px;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 5px solid var(--card);
}

.showcase-stack img:first-child {
  transform: rotate(4deg);
}

.showcase-stack img:last-child {
  transform: rotate(-3deg);
}

/* ---------- Metrics band ---------- */

.metrics {
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 100%;
  padding: 44px 32px;
}

.metrics > div {
  text-align: center;
  border-right: 1px solid rgba(246, 243, 248, 0.15);
  padding: 0 20px;
}

.metrics > div:last-child {
  border-right: none;
}

.metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold);
}

.metrics span {
  font-size: 0.85rem;
  color: rgba(246, 243, 248, 0.75);
  letter-spacing: 0.03em;
}

/* ---------- Filters ---------- */

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter:hover {
  border-color: var(--gold-deep);
}

.filter.active {
  background: var(--ink);
  color: var(--gold);
  border-color: var(--ink);
}

.filter-empty {
  color: var(--text-muted);
  padding: 24px 0;
}

/* ---------- Portfolio grid ---------- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.project {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.project.feature {
  grid-column: span 3;
}

.project.compact {
  grid-column: span 2;
}

.project img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-copy {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.project-copy span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--berry);
}

.project-copy h3 {
  font-size: 1.18rem;
}

.project-copy p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-top: 4px;
}

.project.compact .project-copy {
  padding: 16px 18px 18px;
}

.project.compact .project-copy h3 {
  font-size: 1.02rem;
}

/* hidden by filter script */
.project[hidden] {
  display: none;
}

/* ---------- Services / skills ---------- */

.services {
  background: var(--card);
  border-radius: var(--radius-lg);
  margin: 0 auto;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-list h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.service-list p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Contact / profile ---------- */

.contact {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 32px;
  text-align: center;
}

.contact .eyebrow {
  color: var(--gold);
}

.contact h2 {
  color: var(--paper);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin-bottom: 20px;
}

.contact p {
  max-width: 620px;
  margin: 0 auto 32px;
  color: rgba(246, 243, 248, 0.82);
  font-size: 1.03rem;
}

.contact .button.primary {
  background: var(--gold);
  color: var(--ink);
}

.contact .button.primary:hover {
  background: var(--gold-deep);
}

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

footer {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer p {
  margin: 4px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .hero-showcase {
    min-height: 320px;
    margin-top: 24px;
  }

  .metrics {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .metrics > div {
    border-right: none;
    border-bottom: 1px solid rgba(246, 243, 248, 0.15);
    padding-bottom: 20px;
  }

  .metrics > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project.feature,
  .project.compact,
  .project {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 20px;
  }

  .nav-toggle {
    display: block;
  }

  #primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px 20px;
    display: none;
  }

  #primary-nav.open {
    display: flex;
  }

  .section-block {
    padding: 56px 20px;
  }

  .hero {
    padding: 40px 20px 72px;
  }

  .showcase-stack {
    position: static;
    margin-top: 14px;
  }

  .showcase-main {
    transform: none;
  }

  .showcase-stack img {
    width: 45%;
    transform: none !important;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .project,
  .project.feature,
  .project.compact {
    grid-column: span 1;
  }

  .contact {
    padding: 64px 20px;
  }
}

/* ---------- Lightbox (click a project image to view it full size) ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 29, 56, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 200;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--card);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--gold);
}

.project img {
  cursor: pointer;
}
