@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --ink: #17211f;
  --muted: #68736e;
  --paper: #f3f0e8;
  --accent: #e75a3c;
  --line: #d6d3c8;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.6;
  transition:
    background 0.3s,
    color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* =========================
   HEADER
========================= */

.site-header {
  min-height: 620px;
  padding: 28px 7vw 0;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: "OA";
  position: absolute;
  right: 3vw;
  bottom: -90px;
  color: rgba(243, 240, 232, 0.06);
  font-size: 28vw;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.header-inner,
nav,
.hero {
  position: relative;
  z-index: 1;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand span {
  color: var(--paper);
}

.theme-toggle {
  border: 1px solid rgba(243, 240, 232, 0.4);
  background: transparent;
  color: var(--paper);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-toggle:hover,
.filter-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =========================
   HERO
========================= */

.hero {
  max-width: 1100px;
  min-height: 470px;
  margin: 0 auto;
  padding: 75px 0 70px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(45px, 8vw, 120px);
}

.hero-image-wrap {
  grid-column: 1;
  grid-row: 1;
  width: min(100%, 355px);
  justify-self: center;
  aspect-ratio: 0.78;
  border: 1px solid rgba(243, 240, 232, 0.35);
  padding: 10px;
  transform: rotate(3deg);
  z-index: 1;
}

.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--accent);
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.85) contrast(1.05);
}

.hero-content {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-label,
.project-type {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

h1 span {
  color: var(--accent);
}

.hero-copy {
  color: #b3bcb5;
  max-width: 400px;
  margin: 28px 0;
  font-size: 1.05rem;
}

.primary-link {
  color: var(--paper);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 5px;
  font-size: 0.9rem;
}

.primary-link span {
  color: var(--accent);
  margin-left: 10px;
}

/* =========================
   NAVIGATION
========================= */

nav {
  display: flex;
  gap: 30px;
  border-top: 1px solid rgba(243, 240, 232, 0.2);
  padding: 18px 0;
  font-size: 0.82rem;
}

nav a:hover {
  color: var(--accent);
}

/* =========================
   MAIN
========================= */

main {
  max-width: 1180px;
  margin: auto;
  padding: 0 7vw;
}

.content-row,
.section-heading {
  display: grid;
  grid-template-columns: 25% 1fr;
  gap: 30px;
  padding: 115px 0;
  border-bottom: 1px solid var(--line);
}

.section-label {
  color: var(--accent);
  padding-top: 9px;
}

h2 {
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

h2 em {
  color: var(--accent);
  font-style: normal;
}

.section-content p {
  color: var(--muted);
  max-width: 540px;
  margin-top: 30px;
  font-size: 1.08rem;
}

/* =========================
   SKILLS
========================= */

.button-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 11px 16px;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* =========================
   PROJECTS
========================= */

.projects-section {
  padding: 115px 0;
}

.section-heading {
  padding: 0 0 45px;
  border: 0;
}

.project-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 7px 15px;
  cursor: pointer;
  font-size: 0.78rem;
}

.filter-button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.project-card {
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s,
    background 0.25s;
}

.project-card:hover {
  transform: translateY(-6px);
  background: #eae6dc;
}

.project-card.featured {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.project-number {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  margin-bottom: auto;
  opacity: 0.7;
}

.project-card h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.featured p {
  color: #ffe1d9;
}

.project-type {
  margin-top: 25px;
  color: var(--accent);
}

.featured .project-type {
  color: white;
}

.empty-state {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

/* =========================
   FOOTER
========================= */

footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 100px 7vw;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(243, 240, 232, 0.12);
}

.footer-list,
.contact-section {
  max-width: 500px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-list .eyebrow {
  margin-bottom: 20px;
}

footer h3 {
  max-width: 450px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 22px;
}

footer p:not(.eyebrow) {
  color: #aeb9b0;
  font-size: 0.95rem;
  max-width: 380px;
}

/* =========================
   CONTACT
========================= */

.contact-section {
  padding-left: 30px;
  border-left: 1px solid rgba(243, 240, 232, 0.2);
}

.contact-section h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  letter-spacing: -0.04em;
}

/* =========================
   CONTACT FORM
========================= */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 35px;
}

.contact-form label {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  margin-top: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(243, 240, 232, 0.25);
  background: rgba(243, 240, 232, 0.03);
  color: var(--paper);
  padding: 13px 15px;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  border-radius: 0;
  transition:
    border-color 0.25s,
    background 0.25s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #7f8b85;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(243, 240, 232, 0.06);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* =========================
   SEND BUTTON
========================= */

.email-button {
  align-self: flex-start;
  margin-top: 15px;
  padding: 11px 0;
  color: var(--accent);
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  transition:
    color 0.25s,
    padding-left 0.25s;
}

.email-button span {
  margin-left: 8px;
}

.email-button:hover {
  color: var(--paper);
  padding-left: 6px;
}

/* =========================
   SOCIAL LINKS
========================= */

.social-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin-top: 12px;
  padding: 13px 0;
  color: var(--paper);
  border-bottom: 1px solid rgba(243, 240, 232, 0.2);
  font-size: 0.9rem;
  transition:
    color 0.25s,
    padding-left 0.25s,
    border-color 0.25s;
}

.social-link:hover {
  color: var(--accent);
  padding-left: 6px;
  border-color: var(--accent);
}

/* =========================
   DARK MODE
========================= */

.dark-mode {
  --paper: #182320;
  --ink: #f3f0e8;
  --muted: #aeb9b0;
  --line: #3b4943;
}

.dark-mode .site-header,
.dark-mode footer {
  background: #0d1513;
}

.dark-mode footer {
  color: #f8f6ed;
}

.dark-mode footer p:not(.eyebrow) {
  color: #c2cbc5;
}

.dark-mode .contact-section {
  border-color: rgba(243, 240, 232, 0.18);
}

.dark-mode .social-link {
  color: var(--accent);
}

.dark-mode .project-card:hover {
  background: #27342f;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {
  .site-header {
    min-height: 570px;
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .hero {
    min-height: 0;
    padding-top: 75px;
    padding-bottom: 65px;
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .hero-image-wrap {
    grid-column: 1;
    grid-row: 2;
    width: min(72vw, 300px);
  }

  .hero-content {
    grid-column: 1;
    grid-row: 1;
  }

  main {
    padding: 0 6vw;
  }

  .content-row,
  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 75px 0;
  }

  .section-label {
    padding: 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 250px;
  }

  /* MOBILE FOOTER */

  footer {
    grid-template-columns: 1fr;
    gap: 55px;
    padding: 70px 6vw;
  }

  .footer-list,
  .contact-section {
    max-width: 100%;
  }

  .contact-section {
    padding-left: 0;
    padding-top: 40px;
    border-left: 0;
    border-top: 1px solid rgba(243, 240, 232, 0.2);
  }

  footer h3 {
    font-size: 2.4rem;
  }

  .contact-section h2 {
    font-size: 1.8rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 1rem;
  }

  .social-link {
    max-width: 100%;
  }

  .dark-mode .social-link {
    display: flex;
    color: var(--accent);
  }
}

/* =========================
   INTERSECTION OBSERVER
========================= */

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Slight delay between project cards */

.project-card:nth-child(2) {
  transition-delay: 0.1s;
}

.project-card:nth-child(3) {
  transition-delay: 0.2s;
}

/* Respect users who prefer reduced motion */

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .project-card:nth-child(2),
  .project-card:nth-child(3) {
    transition-delay: 0s;
  }
}
