/* ───────────────────────────────────────────
   Tokens
   ─────────────────────────────────────────── */

:root {
  --bg: #fafaf8;
  --bg-card: #fff;
  --text: #1a1a1a;
  --text-muted: #444;
  --text-subtle: #666;
  --text-faint: #888;
  --text-xfaint: #aaa;
  --border: #eee;
  --border-input: #ddd;
  --tag-bg: #f5f5f3;
  --focus-ring: rgba(26, 26, 26, 0.06);
  --shadow-card: rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] {
  --bg: #111110;
  --bg-card: #1c1c1a;
  --text: #f0efec;
  --text-muted: #b0afa9;
  --text-subtle: #888;
  --text-faint: #666;
  --text-xfaint: #444;
  --border: #2a2a28;
  --border-input: #333;
  --tag-bg: #252523;
  --focus-ring: rgba(240, 239, 236, 0.06);
  --shadow-card: rgba(0, 0, 0, 0.3);
}

/* ───────────────────────────────────────────
   Reset & Base
   ─────────────────────────────────────────── */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

/* ───────────────────────────────────────────
   Layout
   ─────────────────────────────────────────── */

.section {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 24px;
}

/* ───────────────────────────────────────────
   Navigation
   ─────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-subtle);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--tag-bg);
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }

html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }

/* ───────────────────────────────────────────
   Hero
   ─────────────────────────────────────────── */

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 96px;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-role {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-bio {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-faint);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ───────────────────────────────────────────
   Section Labels
   ─────────────────────────────────────────── */

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 48px;
}

/* ───────────────────────────────────────────
   Case Study Cards
   ─────────────────────────────────────────── */

.case-studies {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.case-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-card);
}

.case-image {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.case-image-label {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.1);
  user-select: none;
}

html[data-theme="dark"] .case-image-label {
  color: rgba(255, 255, 255, 0.08);
}

.case-info {
  padding: 28px 28px 24px;
}

.case-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 8px;
}

.case-info p {
  font-size: 15px;
  color: var(--text-subtle);
  line-height: 1.6;
  margin-bottom: 16px;
}

.case-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  background: var(--tag-bg);
  padding: 4px 12px;
  border-radius: 100px;
  margin-right: 8px;
}

/* ───────────────────────────────────────────
   About
   ─────────────────────────────────────────── */

.about-content {
  max-width: 600px;
}

.about-text p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  font-weight: 600;
  color: var(--text);
}

/* ───────────────────────────────────────────
   Contact
   ─────────────────────────────────────────── */

.contact-wrapper {
  max-width: 480px;
}

.contact-intro {
  font-size: 16px;
  color: var(--text-subtle);
  margin-bottom: 40px;
  line-height: 1.7;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-faint);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-group input.input-error,
.form-group textarea.input-error {
  border-color: #d44;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  display: block;
  font-size: 13px;
  color: #d44;
  margin-top: 6px;
  min-height: 20px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn-submit:hover {
  opacity: 0.8;
}

.btn-submit:active {
  transform: scale(0.98);
}

.form-success {
  display: none;
  margin-top: 20px;
  font-size: 15px;
  color: #2a7d4f;
  font-weight: 500;
}

.form-success.visible {
  display: block;
}

/* ───────────────────────────────────────────
   Footer
   ─────────────────────────────────────────── */

.footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 13px;
  color: var(--text-xfaint);
}

/* ───────────────────────────────────────────
   Responsive
   ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero-bio {
    font-size: 16px;
  }

  .section {
    padding: 64px 20px;
  }

  .hero {
    padding: 56px 20px 64px;
  }

  .case-image {
    height: 180px;
  }

  .case-info {
    padding: 20px 20px 18px;
  }

  .case-info h2 {
    font-size: 19px;
  }

  .nav-right {
    gap: 16px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 13px;
  }
}
