/*
Theme Name: Infinity 999
Theme URI: https://example.com/infinity-999
Author: Infinity 999 Demo
Description: A minimalist architecture portfolio theme built for a Kinsta + WordPress interview demo. Includes fictional starter projects, project categories, a full-screen hero, hamburger navigation, project metadata, and previous/next project navigation.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: infinity-999
*/

:root {
  --i999-bg: #707070;
  --i999-text: #171717;
  --i999-muted: #6f6f6f;
  --i999-line: #dedede;
  --i999-white: #fff;
  --i999-accent: #ffffff;
  --i999-max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--i999-text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.screen-reader-text {
  position: absolute !important; height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* Header */
.site-header {
  background: var(--i999-bg);
  color: #fff;
  width: 100%;
  position: relative;
  z-index: 50;
}
.site-header__inner {
  min-height: 86px;
  max-width: var(--i999-max);
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-branding {
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: uppercase;
}
.menu-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle span { margin: 5px 0; }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 20, .97);
  color: #fff;
  padding: 34px 48px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.menu-overlay.is-open { visibility: visible; opacity: 1; }
.menu-overlay__top {
  max-width: var(--i999-max);
  margin: 0 auto 7vh;
  display: flex;
  justify-content: flex-end;
}
.menu-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}
.menu-overlay nav {
  max-width: var(--i999-max);
  margin: 0 auto;
}
.menu-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-overlay li { margin: 0 0 1rem; }
.menu-overlay a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(2rem, 5vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
}
.menu-overlay a:hover { opacity: .65; }

/* Homepage */
.hero {
  position: relative;
  min-height: 80vh;
  width: 100%;
  overflow: hidden;
  background: #2b2b2b;
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.69);
}
.hero__content {
  position: relative;
  z-index: 2;
  min-height: 80vh;
  max-width: var(--i999-max);
  margin: 0 auto;
  padding: 64px 6vw;
  color: #fff;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.hero__eyebrow {
  margin: 0 0 1.4rem;
  font-size: clamp(1.3rem, 3vw, 3.3rem);
  font-weight: 300;
  text-decoration: none;
}
.hero__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.8rem);
  font-weight: 300;
}
.hero__more {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  text-underline-offset: .25em;
}
.home-projects {
  max-width: var(--i999-max);
  margin: 0 auto;
  padding: 88px 48px 110px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 300;
  margin: 0 0 48px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 42px 32px;
}
.project-card a { text-decoration: none; }
.project-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #eee;
}
.project-card__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.project-card:hover .project-card__image img { transform: scale(1.02); }
.project-card__title {
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
  margin: 15px 0 4px;
}
.project-card__cat {
  color: var(--i999-muted);
  margin: 0;
}

/* Archive */
.archive-wrap,
.page-wrap,
.single-project-wrap {
  max-width: var(--i999-max);
  margin: 0 auto;
  padding: 72px 48px 110px;
}
.archive-heading,
.page-title,
.single-project-title {
  font-size: clamp(2.6rem, 5vw, 5.7rem);
  line-height: 1;
  font-weight: 300;
  margin: 0 0 54px;
}
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: -25px 0 50px;
}
.category-nav a {
  color: var(--i999-muted);
  text-decoration: none;
}
.category-nav a:hover { color: #000; }

/* Single project */
.single-project-hero {
  max-width: var(--i999-max);
  margin: 0 auto;
  padding: 56px 48px 0;
}
.single-project-hero img {
  width: 100%;
  max-height: 76vh;
  object-fit: cover;
}
.project-intro {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 64px;
  margin-top: 50px;
}
.project-meta {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 9px 18px;
  align-content: start;
}
.project-meta dt { font-weight: 600; }
.project-meta dd { margin: 0; color: #444; }
.project-content {
  font-size: 1.08rem;
}
.project-content > *:first-child { margin-top: 0; }
.project-content img { margin: 2rem 0; }
.project-navigation {
  max-width: var(--i999-max);
  margin: 0 auto;
  padding: 42px 48px 90px;
  border-top: 1px solid var(--i999-line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.project-navigation a {
  text-decoration: none;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
}
.project-navigation__next { text-align: right; }
.project-navigation small {
  display: block;
  color: var(--i999-muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}

/* Pages */
.page-content {
  max-width: 900px;
  font-size: 1.08rem;
}
.page-content h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 300;
  margin-top: 2.2em;
}
.page-content img { margin: 2rem 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--i999-line);
  padding: 44px 48px;
}
.site-footer__inner {
  max-width: var(--i999-max);
  margin: 0 auto;
  color: var(--i999-muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* WordPress helpers */
.alignwide { width: min(1200px, 100%); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-image img { height: auto; }

@media (max-width: 800px) {
  .site-header__inner { min-height: 72px; padding: 0 20px; }
  .menu-overlay { padding: 24px 20px; }
  .hero, .hero__content { min-height: 72vh; }
  .home-projects, .archive-wrap, .page-wrap, .single-project-wrap, .single-project-hero, .project-navigation {
    padding-left: 20px;
    padding-right: 20px;
  }
  .project-grid { grid-template-columns: 1fr; }
  .project-intro { grid-template-columns: 1fr; gap: 30px; }
  .project-navigation { grid-template-columns: 1fr; }
  .project-navigation__next { text-align: left; }
}
