:root {
  --bg: #fbf8f4;
  --bg-card: #ffffff;
  --bg-alt: #f3ede6;
  --text: #3f3a36;
  --text-dim: #8a8078;
  --accent: #c9a9c4;
  --accent-deep: #a884a3;
  --mint: #b7d4c8;
  --peach: #f0c9ae;
  --border: #ece4db;
  --shadow: 0 4px 20px rgba(60, 50, 40, 0.06);
  --max-width: 100%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  background: rgba(251, 248, 244, 0.9);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px clamp(24px, 6vw, 96px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
  color: var(--text);
}
.nav nav { display: flex; align-items: center; }
.nav a {
  color: var(--text-dim);
  margin-left: 28px;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav a:hover { color: var(--accent-deep); text-decoration: none; }
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 28px;
}
.nav-icon:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* About hero (landing split layout) */
.about-hero {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(40px, 6vw, 90px) clamp(24px, 6vw, 96px);
  min-height: 80vh;
  flex-wrap: wrap;
}
.about-text {
  flex: 1 1 420px;
  min-width: 300px;
}
.about-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--text);
}
.about-text p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 20px;
}
.about-text p.signature {
  font-style: italic;
  color: var(--text);
  margin-bottom: 0;
}
.about-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}
.action-pill:hover { text-decoration: none; color: var(--accent-deep); }
.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.action-icon.mint { background: var(--mint); color: #2f4d40; }
.action-icon.peach { background: var(--peach); color: #5a3f2c; }

.about-photo-wrap {
  flex: 1 1 340px;
  min-width: 260px;
  max-width: 480px;
}
.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: block;
}

@media (max-width: 700px) {
  .about-hero { flex-direction: column-reverse; text-align: center; min-height: auto; padding-top: 40px; }
  .about-text p { margin-left: auto; margin-right: auto; }
  .about-actions { justify-content: center; }
}

/* Sections (Work page) */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px clamp(24px, 6vw, 96px);
}
.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 28px;
  color: var(--text);
}

/* Project card */
.project-card {
  border-radius: 16px;
  padding: 36px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.project-card + .project-card {
  margin-top: 28px;
}
.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.project-header h3 { margin: 0; font-size: 1.3rem; font-weight: 600; }
.project-link {
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--accent-deep);
  font-weight: 500;
}
.project-summary { color: var(--text-dim); margin-bottom: 22px; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}
.project-tags span {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: #3d4d45;
  font-weight: 500;
}
.project-tags span:nth-child(2n) { background: var(--peach); color: #5a3f2c; }
.project-tags span:nth-child(3n) { background: var(--accent); color: #fff; }

.project-details { display: grid; gap: 22px; }
.detail-block h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.detail-block p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Work page header */
.page-header { padding-bottom: 8px; }
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.back-link:hover { color: var(--accent-deep); text-decoration: none; }
.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.page-intro {
  color: var(--text-dim);
  font-size: 1.02rem;
  margin: 0;
}

.project-logo {
  display: block;
  height: 44px;
  width: auto;
  background: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.diagram-img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: 28px;
}

footer {
  text-align: center;
  padding: 36px 24px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Project preview grid (Work page) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.project-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
  padding: 32px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  color: var(--text);
  transition: transform 0.15s ease;
}
.project-preview:hover {
  text-decoration: none;
  transform: translateY(-3px);
}
.project-preview h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 600;
}
.project-preview-logo {
  display: block;
  height: 28px;
  width: auto;
  background: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.project-preview-body p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0 0 20px;
}
.project-preview-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-deep);
  margin-top: 16px;
}

/* Case-study pages */
.btn-primary {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 26px;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }

.alt-bg { background: var(--bg-alt); }

.body-text {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 760px;
  margin: 0 0 20px;
}
.body-text:last-child { margin-bottom: 0; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 0;
  padding-bottom: 40px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-deep);
}
.meta-value {
  font-size: 0.95rem;
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-number {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent-deep);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .nav a { margin-left: 16px; font-size: 0.82rem; }
  .nav-icon { margin-left: 16px; }
  .project-card { padding: 26px; }
}
