/* ------------------------------------------------------------------ */
/* Brett Richardson — Product Design Portfolio                         */
/* ------------------------------------------------------------------ */

:root {
  --accent: #7c3aed;
  --accent-dark: #6d28d9;
  --ink: #111318;
  --ink-soft: #4b5563;
  --paper: #ffffff;
  --paper-muted: #f6f5f8;
  --border: #e5e7eb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 8px 24px rgba(17, 19, 24, 0.06);
  --font: "Inter", -apple-system, "system-ui", "Segoe UI", sans-serif;
}

html.dark {
  --ink: #f4f4f6;
  --ink-soft: #b7b9c2;
  --paper: #121218;
  --paper-muted: #191a21;
  --border: #2a2b34;
  --card: #191a21;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--ink); }

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover { background: var(--paper-muted); color: var(--ink); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.14); }

.btn-full { width: 100%; }

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

.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.78) 0%, rgba(10, 10, 14, 0.72) 55%, rgba(10, 10, 14, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 96px 24px;
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 36px;
  line-height: 1.6;
}

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

/* -------------------- Sections -------------------- */

.section { padding: 96px 0; }

.section-muted { background: var(--paper-muted); }

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 48px;
  max-width: 640px;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-title.center + .section-sub.center { margin-left: auto; margin-right: auto; }

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

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.work-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.work-card-img {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--paper-muted);
}

.work-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border);
}

.work-card--placeholder {
  border-style: dashed;
}

.work-card-body { padding: 22px 24px 26px; }

.work-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.work-card-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* -------------------- Process -------------------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.process-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.process-num {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.process-step h3 { margin: 0 0 8px; font-size: 1.1rem; }
.process-step p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* -------------------- About -------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.about-text p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.about-text h3 { margin: 0 0 16px; font-size: 1.15rem; }

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

.skill-pill {
  background: var(--paper-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
}

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

/* -------------------- Side projects -------------------- */

.logo-marquee {
  overflow: hidden;
  width: 100%;
  margin-top: 48px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.logo-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: logo-scroll 32s linear infinite;
}

.logo-marquee:hover .logo-track {
  animation-play-state: paused;
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
  .logo-marquee { overflow-x: auto; }
}

.logo-card {
  flex: 0 0 220px;
  height: 150px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.logo-card img { max-height: 100%; width: auto; object-fit: contain; }

.logo-card--dark { background: #111318; }

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}

.contact-info h3 { margin: 0 0 22px; font-size: 1.2rem; }

.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.contact-line svg { color: var(--accent); flex-shrink: 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-form label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 14px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .btn { margin-top: 20px; }

.form-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

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

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

.site-footer p {
  margin: 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* -------------------- Case study overlay -------------------- */

.case-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 100;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.case-overlay.open { opacity: 1; visibility: visible; }

.case-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 100px;
  position: relative;
}

.case-close {
  position: sticky;
  top: 20px;
  float: right;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.case-content { clear: both; padding-top: 16px; }

.case-eyebrow {
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.case-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  max-width: 720px;
}

.case-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--paper-muted);
}

.case-hero-img--placeholder {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border: 1px dashed var(--border);
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.case-meta h4 {
  margin: 0 0 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.case-meta p { margin: 0; font-size: 1rem; line-height: 1.5; }

.case-section { margin-bottom: 36px; }

.case-section h3 { font-size: 1.25rem; margin: 0 0 12px; }

.case-section p {
  margin: 0;
  line-height: 1.7;
  color: var(--ink-soft);
  font-size: 1rem;
}

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

@media (max-width: 860px) {
  .main-nav { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .case-meta { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { min-height: 560px; }
}
