:root {
  --bg: #f4f0ea;
  --bg-alt: #e8e1d9;
  --text: #2b1f1a;
  --muted: #6f5c52;
  --accent: #8d654f;
  --accent-2: #4b3329;
  --card: #fffaf5;
  --shadow: 0 10px 30px rgba(75, 51, 41, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), var(--bg-alt));
  line-height: 1.55;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { opacity: 0.8; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.7rem; }
p { margin: 0 0 0.8rem; }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 20% 10%, #e3d5c8 0%, transparent 35%),
    radial-gradient(circle at 80% 25%, #ccb09a 0%, transparent 28%),
    linear-gradient(145deg, #f5efe8 0%, #dfd3c8 100%);
}
.hero__inner { max-width: 900px; margin: 0 auto; width: 100%; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.hero__title { font-size: 1.2rem; }
.hero__location { color: var(--muted); }
.hero__cta { margin: 1.2rem 0; }
.hero__photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(75, 51, 41, 0.35);
  box-shadow: var(--shadow);
  margin: 0.5rem 0 0.8rem;
}

.btn, .sticky-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover, .sticky-cta:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: var(--shadow); }

.sticky-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
}

.lang { display: flex; gap: .5rem; margin-bottom: 1.2rem; }
.lang a {
  font-size: .8rem;
  padding: .3rem .6rem;
  border-radius: 20px;
  background: #fff8f2;
  border: 1px solid #d8c5b5;
}
.lang a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.counter {
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-2);
}
#yearsCounter { font-size: 1.6rem; }

.section { max-width: 1000px; margin: 0 auto; padding: 2rem 1rem; }
.skills-grid, .projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.skills-grid article, .project, .timeline__item {
  background: var(--card);
  border: 1px solid #dfd1c5;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(75, 51, 41, 0.07);
}

.skill-item {
  position: relative;
  cursor: help;
}
.skill-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: .4rem;
  background: #2f221b;
  color: #fff;
  padding: .35rem .5rem;
  border-radius: 6px;
  font-size: .78rem;
  white-space: nowrap;
}

.timeline-section { position: relative; }
.timeline-progress {
  position: sticky;
  bottom: 1rem;
  width: 100%;
  height: 6px;
  background: #d8c9bc;
  border-radius: 4px;
  margin-top: 1rem;
  overflow: hidden;
}
#timelineBar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.filter-label { display: inline-block; margin-bottom: .5rem; }
#stackFilter {
  margin-bottom: 1rem;
  padding: .5rem .7rem;
  border-radius: 10px;
  border: 1px solid #ceb8a7;
  background: #fff;
}

.muted { color: var(--muted); }
.edu-logo {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  margin: 0.4rem 0 0.8rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .skills-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 2rem; }
  h1 { font-size: 2.3rem; }
  .hero__photo {
    width: 220px;
    height: 220px;
  }
}
