/* =========================================================
   Anthony Maala — Portfolio
   Shared stylesheet
   ========================================================= */

:root {
  --c-paper: #f3f0e8;
  --c-paper-2: #ebe6d9;
  --c-ink: #14120f;
  --c-ink-soft: #4a463d;
  --c-muted: #837d6e;
  --c-line: #d8d2c1;
  --c-red: #e1401f;
  --c-red-dark: #b52f14;
  --c-white: #ffffff;

  --radius: 4px;
  --maxw: 1220px;
  --shadow: 0 18px 40px rgba(20, 18, 15, 0.14);
  --shadow-sm: 0 6px 18px rgba(20, 18, 15, 0.1);

  --font-display: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--c-red);
  font-weight: 700;
}

p { line-height: 1.65; color: var(--c-ink-soft); margin: 0 0 1em; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 240, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--c-ink);
  white-space: nowrap;
}

.brand strong { color: var(--c-red); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-ink-soft);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--c-ink);
  border-color: var(--c-red);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--c-ink);
  display: block;
}

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

.hero {
  padding: 100px 0 90px;
  border-bottom: 1px solid var(--c-line);
}

.hero .eyebrow { display: block; margin-bottom: 22px; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--c-red);
}

.hero .lede {
  margin-top: 26px;
  max-width: 56ch;
  font-size: 1.15rem;
  color: var(--c-ink-soft);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--c-ink);
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--c-ink);
  color: var(--c-paper);
}

.btn-primary:hover { background: var(--c-red); border-color: var(--c-red); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--c-ink);
}

.btn-outline:hover { transform: translateY(-2px); border-color: var(--c-red); color: var(--c-red); }

/* ---------- Section scaffolding ---------- */

section { padding: 90px 0; }
section.tight { padding: 60px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }

.section-head .eyebrow { margin-bottom: 12px; display: block; }

/* ---------- Work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}

.work-card {
  position: relative;
  background: var(--c-ink);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.work-card:hover img { transform: scale(1.06); opacity: 1; }

.work-card-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 28px;
  background: linear-gradient(0deg, rgba(10, 9, 7, 0.88) 0%, rgba(10, 9, 7, 0.0) 100%);
  color: var(--c-white);
}

.work-card-info .eyebrow { color: #ffb199; margin-bottom: 8px; display: block; }

.work-card-info h3 {
  font-size: 1.5rem;
  color: var(--c-white);
}

.work-card-info .tags {
  margin-top: 10px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono);
}

/* ---------- About teaser / footer CTA / general blocks ---------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.skills-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.skills-list li {
  font-size: 0.92rem;
  color: var(--c-ink-soft);
  padding-left: 18px;
  position: relative;
}

.skills-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--c-red);
}

.panel {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 40px;
}

.cta-band {
  background: var(--c-ink);
  color: var(--c-paper);
  text-align: center;
}

.cta-band h2 { color: var(--c-white); font-size: clamp(2rem, 4vw, 3.2rem); max-width: 20ch; margin: 0 auto; }
.cta-band p { color: rgba(243,240,232,0.7); max-width: 46ch; margin: 20px auto 0; }
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-primary { background: var(--c-red); border-color: var(--c-red); }
.cta-band .btn-outline { color: var(--c-paper); border-color: rgba(243,240,232,0.4); }
.cta-band .btn-outline:hover { border-color: var(--c-red); color: var(--c-red); }

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

.site-footer {
  border-top: 1px solid var(--c-line);
  padding: 48px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.footer-links a { text-decoration: none; color: var(--c-ink-soft); }
.footer-links a:hover { color: var(--c-red); }

.footer-note { font-size: 0.8rem; color: var(--c-muted); }

/* ---------- Project / case-study page ---------- */

.project-hero {
  padding: 56px 0 0;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 40px 0 0;
  padding: 32px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}

.project-meta dt {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--c-muted);
  margin-bottom: 6px;
}

.project-meta dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.project-cover {
  margin-top: 44px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.project-cover img { width: 100%; height: auto; object-fit: cover; max-height: 640px; }

.prose {
  max-width: 68ch;
}

.prose h2 { font-size: 1.7rem; margin-bottom: 20px; }
.prose h2:not(:first-child) { margin-top: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gallery img {
  border-radius: var(--radius);
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.gallery.wide { grid-template-columns: 1fr; }
.gallery .span-2 { grid-column: 1 / -1; }

.pull-quote {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.4;
  color: var(--c-ink);
  border-left: 4px solid var(--c-red);
  padding-left: 28px;
  margin: 0;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--c-line);
  padding-top: 32px;
}

.project-nav a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.project-nav .eyebrow { display: block; margin-bottom: 6px; }

/* ---------- Utility ---------- */

.bg-alt { background: var(--c-paper-2); }
.text-center { text-align: center; }

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

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .nav-links {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--c-paper);
    flex-direction: column;
    padding: 24px 32px 32px;
    border-bottom: 1px solid var(--c-line);
    gap: 20px;
  }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .work-grid { grid-template-columns: 1fr; }
  .project-meta { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; }
  .skills-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  section { padding: 60px 0; }
  .hero { padding: 70px 0 60px; }
  .project-meta { grid-template-columns: 1fr 1fr; }
}
