/* ============================
   DESIGN TOKENS
   ============================ */
:root {
  --bg:           #F9F6F1;
  --text:         #1A1A1A;
  --accent:       #2D6A4F;
  --accent-light: rgba(45,106,79,0.10);
  --muted:        #6B7280;
  --border:       #E8E3DA;
  --white:        #ffffff;
  --dark:         #1A1A1A;

  --radius-card: 12px;
  --radius-chip: 999px;
  --radius-btn:  8px;

  --shadow-card:  0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.10);

  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --nav-h:        64px;
  --container:    1080px;
  --section-pad:  96px;
}

/* ============================
   RESET
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
ul,ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================
   LAYOUT
   ============================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-pad) 0; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 48px;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 10px;
  border-radius: 2px;
}

/* ============================
   SCROLL REVEAL
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover {
  background: #235a40;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45,106,79,0.3);
}
.btn-secondary {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(45,106,79,0.2);
}
.btn-secondary:hover { background: rgba(45,106,79,0.16); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-light { background: var(--bg); color: var(--dark); font-weight: 600; }
.btn-light:hover { background: #fff; transform: translateY(-1px); }

/* ============================
   CHIPS
   ============================ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-chip);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
  transition: transform 0.15s;
}
.chip:hover { transform: scale(1.04); }

/* ============================
   NAV
   ============================ */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s, box-shadow 0.3s;
}
#nav.scrolled {
  background: rgba(249,246,241,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; width: 24px; }
.nav-hamburger span {
  display: block; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.nav-drawer.open { max-height: 300px; }
.nav-drawer ul { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.nav-drawer a { font-size: 1rem; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-drawer a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .nav-links    { display: none; }
  .nav-hamburger{ display: flex; }
  .nav-drawer   { display: block; }
}

/* ============================
   HERO
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-shape {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  animation: float 18s ease-in-out infinite;
}
.hero-shape-1 { width: 480px; height: 480px; top: -120px; right: -80px; opacity: 0.04; animation-delay: 0s; }
.hero-shape-2 { width: 280px; height: 280px; bottom: 60px; left: -60px; opacity: 0.03; animation-delay: -6s; }
.hero-shape-3 { width: 180px; height: 180px; top: 40%; right: 20%; opacity: 0.025; animation-delay: -12s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(12px,-18px) scale(1.02); }
  66%      { transform: translate(-8px,10px) scale(0.98); }
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 60px;
  padding-top: 48px; padding-bottom: 80px;
}
.hero-img-wrap { flex-shrink: 0; }
.hero-img {
  width: 120px; height: 120px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent);
}
.hero-text { max-width: 560px; }
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem,6vw,4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 1rem; font-weight: 500;
  color: var(--accent); letter-spacing: 0.01em; margin-bottom: 16px;
}
.hero-bio {
  font-size: 1.05rem; color: var(--muted);
  line-height: 1.7; margin-bottom: 28px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

.hero-socials {
  display: flex; flex-direction: column; gap: 12px;
}
.hero-socials-row {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
}
.hero-social-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.875rem; color: var(--muted);
  transition: color 0.2s;
}
.hero-social-link:hover { color: var(--accent); }
.hero-social-link svg { flex-shrink: 0; }
.hero-copy-email { margin-top: 12px; }

@media (max-width: 768px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 40px; }
}

/* ============================
   EXPERIENCE TIMELINE
   ============================ */
#experience { background: var(--white); }
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.timeline-entry { position: relative; margin-bottom: 56px; }
.timeline-entry:last-child { margin-bottom: 0; }
.timeline-entry::before {
  content: ''; position: absolute;
  left: -28px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--accent-light);
}
.timeline-header {
  display: flex; align-items: baseline;
  justify-content: space-between; flex-wrap: wrap;
  gap: 8px; margin-bottom: 4px;
}
.timeline-company { font-size: 1.1rem; font-weight: 600; }
.timeline-company a { transition: color 0.2s; }
.timeline-company a:hover { color: var(--accent); }
.timeline-date { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.timeline-role { margin-bottom: 20px; margin-top: 8px; }
.timeline-role-header {
  display: flex; justify-content: space-between;
  align-items: baseline; flex-wrap: wrap;
  gap: 6px; margin-bottom: 10px;
}
.timeline-role-title { font-size: 0.9rem; font-style: italic; color: var(--muted); }
.timeline-role-date  { font-size: 0.75rem; color: var(--muted); }
.timeline-bullets    { margin-bottom: 12px; padding-left: 16px; }
.timeline-bullets li { font-size: 0.9rem; line-height: 1.6; margin-bottom: 6px; list-style: disc; }

/* ============================
   PROJECTS
   ============================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 20px;
}
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.project-card-compact { padding: 24px; }
.project-title       { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.project-summary     { font-size: 0.875rem; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.project-stack-preview { margin-bottom: 16px; }
.project-toggle {
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  display: flex; align-items: center; gap: 4px;
  transition: color 0.2s; padding: 0;
}
.project-toggle:hover { color: #235a40; }
.project-toggle-icon { display: inline-block; transition: transform 0.3s; }
.project-card.expanded .project-toggle-icon { transform: rotate(180deg); }

.project-expanded    { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.project-card.expanded .project-expanded { max-height: 1200px; }
.project-expanded-inner {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
}
.project-description { font-size: 0.875rem; line-height: 1.7; margin-bottom: 16px; }
.project-features    { margin-bottom: 16px; padding-left: 16px; }
.project-features li { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 4px; list-style: disc; }
.project-expanded-label {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 8px; margin-top: 14px;
}
.project-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(45,106,79,0.25);
  padding: 6px 14px; border-radius: var(--radius-btn);
  transition: background 0.2s, color 0.2s;
}
.project-link:hover { background: var(--accent); color: var(--white); }

@media (max-width: 768px) { .projects-grid { grid-template-columns: 1fr; } }

/* ============================
   PRODUCTS
   ============================ */
#products { background: var(--bg); }

.product-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-chip);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(45,106,79,0.12);
  color: var(--accent);
  margin-bottom: 10px;
}

/* ============================
   SKILLS
   ============================ */
#skills { background: var(--white); }
.skills-list { display: flex; flex-direction: column; gap: 20px; }
.skill-row   { display: flex; align-items: flex-start; gap: 20px; }
.skill-label {
  flex-shrink: 0; width: 160px;
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding-top: 4px;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-row:nth-child(1) .chip { background: rgba(45,106,79,0.08);  color: #1a4d33; }
.skill-row:nth-child(2) .chip { background: rgba(59,130,246,0.08); color: #1d4ed8; }
.skill-row:nth-child(3) .chip { background: rgba(168,85,247,0.08); color: #7e22ce; }
.skill-row:nth-child(4) .chip { background: rgba(239,68,68,0.08);  color: #b91c1c; }
.skill-row:nth-child(5) .chip { background: rgba(245,158,11,0.08); color: #92400e; }
.skill-row:nth-child(6) .chip { background: rgba(20,184,166,0.08); color: #0f766e; }

@media (max-width: 600px) {
  .skill-row { flex-direction: column; gap: 10px; }
  .skill-label { width: auto; }
}

/* ============================
   BLOG CTA
   ============================ */
.blog-cta { background: var(--dark); color: var(--bg); padding: var(--section-pad) 0; }
.blog-cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.blog-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem,3.5vw,2rem);
  font-weight: 700; line-height: 1.3;
  margin-bottom: 16px; color: var(--bg);
}
.blog-cta-sub { font-size: 1rem; color: rgba(249,246,241,0.65); margin-bottom: 32px; line-height: 1.7; }

/* ============================
   CONTACT
   ============================ */
.contact-inner { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-sub   { font-size: 1rem; color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
.contact-btns  { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.copy-email-btn { display: inline-flex; align-items: center; gap: 7px; }
.copy-email-btn.copied { background: rgba(45,106,79,0.12); color: var(--accent); border-color: rgba(45,106,79,0.3); }
.social-links  { display: flex; justify-content: center; gap: 20px; margin-top: 24px; }
.social-links a {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--border);
  color: var(--muted); transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.social-links a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }

/* ============================
   ARTICLES PAGE
   ============================ */
.articles-hero {
  padding: calc(var(--nav-h) + 64px) 0 48px;
  background: var(--bg);
}
.articles-hero-inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.articles-hero-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px;
}
.articles-hero-title {
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 12px;
}
.articles-hero-sub { font-size: 1.05rem; color: var(--muted); }

.articles-list {
  max-width: var(--container); margin: 0 auto;
  padding: 48px 24px 96px;
  display: flex; flex-direction: column; gap: 2px;
}
.article-card {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.2s;
}
.article-card:first-child { border-top: 1px solid var(--border); }
.article-card:hover .article-title { color: var(--accent); }
.article-card:hover .article-cta { color: var(--accent); }
.article-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--muted); margin-bottom: 10px;
}
.article-sep { opacity: 0.4; }
.article-title {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  line-height: 1.3; margin-bottom: 10px;
  transition: color 0.2s;
}
.article-brief {
  font-size: 0.9rem; color: var(--muted); line-height: 1.7;
  max-width: 680px; margin-bottom: 14px;
}
.article-cta {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  transition: color 0.2s;
}

/* ============================
   FOOTER
   ============================ */
.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-name    { font-size: 0.85rem; color: var(--muted); }
.footer-links   { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-tagline { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}
