:root {
  --bg: #f6f2ea;
  --bg-strong: #efe6d5;
  --text: #1c1b19;
  --muted: #5b5853;
  --panel: rgba(255, 255, 255, 0.74);
  --line: rgba(28, 27, 25, 0.14);
  --accent: #0c7c6c;
  --accent-2: #db5a42;
  --accent-3: #f1be48;
  --shadow: 0 18px 45px rgba(32, 28, 20, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.2)),
    radial-gradient(circle at 10% -5%, rgba(219, 90, 66, 0.2), transparent 36%),
    radial-gradient(circle at 90% 5%, rgba(12, 124, 108, 0.16), transparent 35%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(28, 27, 25, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 27, 25, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  z-index: -3;
}

.bg-glow {
  position: fixed;
  width: 30rem;
  height: 30rem;
  border-radius: 999px;
  filter: blur(76px);
  opacity: 0.32;
  pointer-events: none;
  z-index: -2;
}

.bg-glow-a {
  left: -8rem;
  top: -7rem;
  background: color-mix(in srgb, var(--accent-2) 68%, white);
}

.bg-glow-b {
  right: -10rem;
  top: 22rem;
  background: color-mix(in srgb, var(--accent) 68%, white);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 24px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(12, 124, 108, 0.2), rgba(219, 90, 66, 0.24));
  box-shadow: var(--shadow);
  border: 1px solid rgba(28, 27, 25, 0.15);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand:hover .brand-mark {
  transform: translateY(-1px) rotate(-2deg);
  transition: transform 0.18s ease;
}

.brand-copy strong {
  display: block;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.top-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
}

.top-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}

.top-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform 0.2s ease;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--text);
}

.top-nav a:hover::after,
.top-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  margin-top: 8px;
  padding: 36px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  font-size: 0.87rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Sora", "Segoe UI", sans-serif;
  line-height: 1.15;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 5.8vw, 3.8rem);
  letter-spacing: -0.03em;
}

.lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: var(--muted);
}

.projects {
  padding: 46px 0 14px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3.3vw, 2.1rem);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-shot {
  position: relative;
  margin: -2px -2px 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(28, 27, 25, 0.16);
  background: linear-gradient(180deg, rgba(251, 249, 245, 0.9), rgba(241, 233, 217, 0.9));
}

.project-shot img {
  display: block;
  width: 100%;
  height: 176px;
  object-fit: contain;
  padding: 8px;
}

.project-corner-badge-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-corner-badge-wrap:focus-visible {
  outline: 2px solid rgba(12, 124, 108, 0.8);
  outline-offset: 2px;
  border-radius: 10px;
}

.project-shot .project-corner-badge {
  width: 82px;
  height: auto;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(28, 27, 25, 0.22);
  background: rgba(255, 255, 255, 0.85);
}

.project-corner-badge-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 220px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(26, 24, 21, 0.94);
  color: #fff8ef;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 3;
}

.project-corner-badge-wrap:hover::after,
.project-corner-badge-wrap:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(12, 124, 108, 0.08), rgba(219, 90, 66, 0.08));
}

.project-card h3,
.project-card p,
.project-card .project-link,
.project-card .project-meta {
  position: relative;
  z-index: 1;
}

.project-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.project-card p {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.project-subtext {
  margin: -4px 0 10px;
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--muted) 85%, #000);
  font-weight: 500;
}

.project-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.project-highlights span {
  border-radius: 999px;
  border: 1px solid rgba(28, 27, 25, 0.14);
  background: rgba(255, 255, 255, 0.72);
  padding: 5px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: #2f2b26;
}

.project-meta {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  margin-top: auto;
}

.project-link::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.project-link:hover::after {
  transform: translateX(4px);
}

.legal-shortcuts {
  margin: 28px auto 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.67);
}

.legal-shortcuts h2 {
  margin: 0;
  font-size: 1.25rem;
}

.legal-links {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 500;
}

.legal-links a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, #000);
}

.contact {
  margin: 8px auto 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.88));
  box-shadow: var(--shadow);
}

.contact h2 {
  margin: 0;
  font-size: 1.25rem;
}

.contact p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 64ch;
}

.contact-links {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-links a {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.75);
}

.contact-links a:hover {
  border-color: color-mix(in srgb, var(--accent-2) 45%, #000);
}

.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  padding: 20px 0 30px;
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
}

.legal-page {
  padding: 8px 0 24px;
}

.legal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.legal-card h1 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4.6vw, 2.8rem);
}

.legal-card h2,
.legal-card h3,
.legal-card h4 {
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.65;
}

.legal-card ul {
  margin: 0;
  padding-left: 18px;
}

.source-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.74);
}

.back-button::before {
  content: "\2190";
}

.back-button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, #000);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal-up 0.6s ease forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 0.12s;
}

.reveal:nth-of-type(3) {
  animation-delay: 0.2s;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 840px) {
  .shell {
    width: min(1120px, calc(100% - 28px));
  }

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

  .project-shot img {
    height: 160px;
  }

  .project-shot .project-corner-badge {
    width: 68px;
  }

  .project-corner-badge-wrap::after {
    right: -10px;
    min-width: 190px;
    max-width: 220px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 26px 20px;
  }

  .legal-card {
    padding: 22px;
  }
}
