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

:root {
  --cream: #FAF7F2;
  --warm-white: #FFFDF9;
  --sand: #E8E0D0;
  --tan: #C8B99A;
  --clay: #A07850;
  --bark: #6B4F30;
  --ink: #2A1F14;
  --muted: #7A6858;
  --accent: #C06030;
  --accent-light: #F0E8DE;
  --radius: 16px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  color: var(--bark);
  text-decoration: none;
  font-weight: 600;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* PAGE WRAPPER */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}
.page-content-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* SECTION HEADERS */
.section-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.section-divider {
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 2.5rem;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn-primary { background: var(--bark); color: var(--cream); }
.btn-primary:hover { background: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--bark); border: 1.5px solid var(--tan); }
.btn-ghost:hover { background: var(--sand); }

/* FOOTER */
footer {
  text-align: center;
  padding: 2.5rem;
  color: var(--tan);
  font-size: 0.82rem;
  border-top: 1px solid var(--sand);
  margin-top: 4rem;
}
footer span { color: var(--clay); }

/* TOAST */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--bark); color: var(--cream);
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500;
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none; z-index: 999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* SKILL CHIPS */
.skill-chip {
  font-size: 0.8rem; padding: 5px 12px;
  background: var(--accent-light); color: var(--bark);
  border-radius: 100px; font-weight: 500;
}

/* HERO (index only) */
.hero-tag {
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light); display: inline-block;
  padding: 4px 14px; border-radius: 100px; margin-bottom: 1.5rem;
}
.hero-title {
  font-family: 'Lora', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.15; color: var(--ink);
  margin-bottom: 1.2rem; font-weight: 600;
}
.hero-title em { font-style: italic; color: var(--clay); }
.hero-sub { font-size: 1.05rem; color: var(--muted); max-width: 440px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* AVATAR */
.avatar-frame {
  width: 100%; aspect-ratio: 3/4;
  border-radius: 180px 180px 120px 120px;
  background: #D4B896; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.avatar-initials {
  font-family: 'Lora', serif; font-size: 4rem;
  font-weight: 600; color: var(--bark); opacity: 0.6;
}
.avatar-badge {
  position: absolute; bottom: 1.5rem; left: -1rem;
  background: var(--warm-white); border: 1px solid var(--sand);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  box-shadow: 0 8px 24px rgba(107,79,48,0.12);
  display: flex; align-items: center; gap: 10px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #4A9B60; flex-shrink: 0; }
.badge-text { font-size: 0.82rem; font-weight: 500; color: var(--bark); }

/* STAT CARDS */
.stat-card {
  background: var(--warm-white); border: 1px solid var(--sand);
  border-radius: var(--radius); padding: 1.5rem;
}
.stat-num { font-family: 'Lora', serif; font-size: 2.2rem; color: var(--bark); font-weight: 600; }
.stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* TIMELINE */
.timeline-item { display: flex; gap: 1.5rem; margin-bottom: 2rem; }
.timeline-dot { flex-shrink: 0; margin-top: 5px; display: flex; flex-direction: column; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--clay); flex-shrink: 0; }
.dot-line { width: 1px; flex: 1; background: var(--sand); margin-top: 6px; min-height: 40px; }
.timeline-role { font-family: 'Lora', serif; font-size: 1rem; color: var(--ink); font-weight: 600; }
.timeline-company { font-size: 0.85rem; color: var(--clay); font-weight: 500; }
.timeline-year { font-size: 0.78rem; color: var(--tan); margin-top: 2px; }

/* CERT ITEMS */
.cert-item {
  background: var(--warm-white); border: 1px solid var(--sand);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
}
.cert-name { font-family: 'Lora', serif; font-size: 0.98rem; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.cert-issuer { font-size: 0.85rem; color: var(--clay); font-weight: 500; }
.cert-meta { font-size: 0.78rem; color: var(--tan); margin-top: 2px; }

/* SOCIAL LINKS */
.social-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; background: var(--warm-white);
  border: 1px solid var(--sand); border-radius: 100px;
  text-decoration: none; font-size: 0.88rem; font-weight: 500;
  color: var(--bark); transition: all 0.2s;
}
.social-link:hover { background: var(--sand); transform: translateY(-1px); }
.social-icon { width: 18px; height: 18px; fill: var(--clay); }

/* CONTACT FORM */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.82rem; font-weight: 500; color: var(--bark); }
.form-input, .form-textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--sand); border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
  background: var(--warm-white); color: var(--ink);
  transition: border-color 0.2s; resize: none; appearance: none;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--clay); }
.form-textarea { height: 120px; }

/* BLOG LIST (blog.html) */
.blog-card {
  background: var(--warm-white); border: 1px solid var(--sand);
  border-radius: var(--radius); padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(107,79,48,0.1); }
.blog-card-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.75rem; }
.blog-card-date { font-size: 0.78rem; color: var(--tan); font-weight: 500; }
.blog-card-tag {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light); padding: 3px 10px; border-radius: 100px;
}
.blog-card-title {
  font-family: 'Lora', serif; font-size: 1.4rem;
  color: var(--ink); margin-bottom: 0.6rem; line-height: 1.3;
}
.blog-card-excerpt { font-size: 0.95rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.25rem; }
.blog-card-link { font-size: 0.88rem; color: var(--clay); font-weight: 500; text-decoration: none; }
.blog-card-link:hover { color: var(--bark); }

/* BLOG POST (blog-post-*.html) */
.post-header { margin-bottom: 3rem; }
.post-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.post-date { font-size: 0.82rem; color: var(--tan); font-weight: 500; }
.post-tag {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light); padding: 3px 10px; border-radius: 100px;
}
.post-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2; color: var(--ink); margin-bottom: 1rem;
}
.post-subtitle { font-size: 1.1rem; color: var(--muted); line-height: 1.6; }
.post-divider { width: 40px; height: 3px; background: var(--accent); border-radius: 2px; margin: 2rem 0; }
.post-body h2 {
  font-family: 'Lora', serif; font-size: 1.4rem;
  color: var(--ink); margin: 2.5rem 0 0.75rem;
}
.post-body h3 {
  font-family: 'Lora', serif; font-size: 1.15rem;
  color: var(--bark); margin: 2rem 0 0.5rem;
}
.post-body p { color: var(--muted); margin-bottom: 1.2rem; }
.post-body ul, .post-body ol { color: var(--muted); padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body code {
  font-family: monospace; font-size: 0.88em;
  background: var(--sand); padding: 2px 6px; border-radius: 4px; color: var(--bark);
}
.post-body blockquote {
  border-left: 3px solid var(--accent); padding-left: 1.25rem;
  margin: 1.5rem 0; color: var(--muted); font-style: italic;
}
.post-back { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--sand); }

/* PROJECTS (projects.html) */
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.project-card {
  background: var(--warm-white); border: 1px solid var(--sand);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(107,79,48,0.12); }
.project-thumb {
  width: 100%; height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand);
}
.project-thumb-text { font-family: 'Lora', serif; font-size: 0.85rem; color: var(--muted); font-style: italic; }
.project-body { padding: 1.25rem; }
.project-tag {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem;
}
.project-title { font-family: 'Lora', serif; font-size: 1.1rem; color: var(--ink); margin-bottom: 0.4rem; }
.project-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .blog-card { padding: 1.25rem; }
  .blog-card-title { font-size: 1.2rem; }
  .page-content { padding: 5rem 1.25rem 3rem; }
  .page-content-narrow { padding: 5rem 1.25rem 3rem; }
  .post-title { font-size: 1.6rem; }
  .section-title { font-size: 1.6rem; }
}
