/* Chris Chevrier — personal site
   Warm, polished, dependency-free styles. */

:root {
  --bg: #faf7f2;
  --bg-alt: #ffffff;
  --text: #201c16;
  --text-muted: #6b6258;
  --border: #ece5da;
  --accent: #c4841b;
  --accent-dark: #96650f;
  --accent-light: #f6dfae;
  --accent-soft: #fbf1de;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 1px 2px rgba(32, 28, 22, 0.06);
  --shadow-md: 0 6px 20px rgba(32, 28, 22, 0.08);
  --shadow-lg: 0 16px 40px rgba(32, 28, 22, 0.12);
  --max-width: 860px;
  font-size: 16px;
}

html[data-theme="dark"] {
  --bg: #16130f;
  --bg-alt: #201b15;
  --text: #f2ede4;
  --text-muted: #a89d8d;
  --border: #362f26;
  --accent: #e2a655;
  --accent-dark: #f2c583;
  --accent-light: #4a3a22;
  --accent-soft: #2b2318;
  --nav-bg: rgba(22, 19, 15, 0.85);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, .brand {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-dark); text-decoration: underline; }

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

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

/* Nav */
.site-nav {
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav .wrap {
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-nav .brand {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.site-nav .brand:hover { text-decoration: none; color: var(--accent); }

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

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--accent-dark);
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
}

/* Hero */
.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent-light) 0%, rgba(246, 223, 174, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero .avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 26px;
  border: 4px solid var(--bg-alt);
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin: 0 0 18px;
}

.hero p.lede {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.hero .current-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.hero .current-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf6e;
  box-shadow: 0 0 0 3px rgba(76, 175, 110, 0.25);
  flex-shrink: 0;
}

.hero .links {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  transition: all 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #d6923a, var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

/* Sections */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--border); }

h2.section-title {
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}
h2.section-title::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* Project cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--accent-soft);
}

.card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body .tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin: 0 0 16px;
  flex: 1;
}

.card-body .btn { align-self: flex-start; padding: 8px 16px; font-size: 0.88rem; }

/* Timeline (About page) */
.timeline-item {
  position: relative;
  padding: 20px 0 20px 26px;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-item h3 {
  margin: 0 0 2px;
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-item .meta {
  color: var(--accent-dark);
  font-weight: 500;
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.timeline-item p, .timeline-item ul {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 8px;
}

.timeline-item ul { padding-left: 20px; }

/* Skills */
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-list span {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.skill-list span:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

/* Contact */
.contact-block {
  max-width: 480px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.contact-block p { margin: 0 0 18px; }
.contact-block .btn { margin-top: 8px; }

/* Contact form */
.form-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Honeypot — visually hidden, still reachable by bots that ignore CSS */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contact-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}
#contact-status.status-ok { color: #2f7a3d; }
#contact-status.status-error { color: #b3341c; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-alt);
}
footer.site-footer .wrap {
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
footer.site-footer a { color: var(--text-muted); }

/* Responsive */
@media (max-width: 600px) {
  .hero { padding: 56px 0 44px; }
  .hero h1 { font-size: 2rem; }
  .site-nav ul { gap: 18px; }
  .site-nav .wrap { padding: 0 16px; }
  .nav-right { gap: 14px; }
  .contact-block { padding: 24px; }
}
