/* =============================================
   ROOT & RESET
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f6f8f4;
  --bg-alt: #edf2e9;
  --bg-card: #f9fbf7;
  --bg-card-hover: #f2f7ee;
  --accent: #6b8f6e;
  --accent-light: #89ab8c;
  --accent-glow: rgba(107, 143, 110, 0.12);
  --accent2: #5a7a5c;
  --text: #1e2b1f;
  --text-muted: #5c7060;
  --border: rgba(100, 140, 105, 0.18);
  --border-accent: rgba(107, 143, 110, 0.35);
  --radius: 14px;
  --font: 'Lora', 'Georgia', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--accent-light); border-radius: 3px; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3 {
  line-height: 1.2;
  font-family: var(--font);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--text); }

ul { list-style: none; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 100px 0;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  font-family: var(--font);
  font-style: italic;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--text);
}

.section-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 8px;
  border-radius: 2px;
  opacity: 0.6;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #f4f9f4;
  border: 2px solid var(--accent);
  border-radius: 30px;
  font-family: var(--font-sans);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #f4f9f4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 143, 110, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--border-accent);
  border-radius: 30px;
  font-family: var(--font-sans);
}
.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   TAGS
   ============================================= */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-size: 0.72rem;
  font-family: var(--font-sans);
  padding: 3px 10px;
  background: rgba(107, 143, 110, 0.1);
  color: var(--accent2);
  border: 1px solid rgba(107, 143, 110, 0.25);
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 0;
  background: rgba(220, 232, 218, 0.96);
  backdrop-filter: blur(12px);
  overflow: visible;
}

#navbar::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  height: 18px;
  background: rgba(220, 232, 218, 0.96);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 18' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L0,9 C180,18 360,0 540,12 C720,24 900,2 1080,12 C1260,22 1380,4 1440,9 L1440,0 Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 18' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L0,9 C180,18 360,0 540,12 C720,24 900,2 1080,12 C1260,22 1380,4 1440,9 L1440,0 Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(107, 143, 110, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(90, 122, 92, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 80px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
  width: 100%;
}

.hero-content {
  min-width: 0;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 60px;
}

.hero-greeting {
  font-family: var(--font);
  font-style: italic;
  color: var(--accent2);
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  font-family: var(--font);
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.1;
}

.hero-tagline {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hero-sub {
  margin-bottom: 36px;
}

.hero-sub p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.hero-sub p:last-child {
  margin-bottom: 0;
}

.hero-sub strong {
  color: var(--text);
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-socials {
  display: flex;
  gap: 20px;
}

.hero-socials a {
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}
.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}
.hero-socials svg { width: 22px; height: 22px; }

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* =============================================
   WAVE DIVIDERS
   ============================================= */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
}

/* =============================================
   ABOUT
   ============================================= */
#about {
  background: transparent;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.badge {
  font-size: 0.78rem;
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.2s;
}
.detail-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.detail-icon {
  font-size: 1.4rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.detail-card strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.detail-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* =============================================
   EXPERIENCE / TIMELINE
   ============================================= */
#experience {
  background: transparent;
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(107,143,110,0.1));
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  transition: background 0.2s;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
}

.featured-dot {
  width: 18px;
  height: 18px;
  left: -31px;
  top: 18px;
  background: var(--accent) !important;
  box-shadow: 0 0 14px rgba(107, 143, 110, 0.45);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(107, 143, 110, 0.08);
}

.featured-card {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(107,143,110,0.04) 100%);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-company {
  color: var(--accent);
  font-size: 0.88rem;
  margin-top: 2px;
  font-family: var(--font-sans);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 3px;
}

.timeline-card ul {
  padding-left: 0;
}

.timeline-card li {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 3px 0 3px 18px;
  position: relative;
}

.timeline-card li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-size: 0.6rem;
  top: 7px;
}

.timeline-card > p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* =============================================
   PROJECTS
   ============================================= */
#projects {
  background: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(107, 143, 110, 0.1), 0 0 0 1px var(--border-accent);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 2rem;
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-links a {
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}
.project-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.project-links svg { width: 20px; height: 20px; }

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex-grow: 1;
}

/* =============================================
   SKILLS
   ============================================= */
#skills {
  background: var(--bg-alt);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.skill-group:hover { border-color: var(--border-accent); }

.skill-group h3 {
  font-size: 0.78rem;
  font-family: var(--font-sans);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 14px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: rgba(107, 143, 110, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s;
}

.skill-group:hover .skill-pill {
  border-color: rgba(107, 143, 110, 0.25);
  color: var(--text);
}

/* =============================================
   NOTES
   ============================================= */

.notes-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.notes-back:hover { color: var(--accent); }

.notes-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.notes-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
}

.notes-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, transform 0.2s;
}

.notes-cat-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.notes-cat-icon {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.notes-cat-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.notes-cat-card p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

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

/* =============================================
   CONTACT
   ============================================= */
#contact {
  background: transparent;
  text-align: center;
}

.contact-content {
  max-width: 540px;
  margin: 0 auto;
}

.contact-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-btn {
  font-size: 1rem;
  padding: 14px 36px;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  text-align: center;
  padding: 24px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-style: italic;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  section { padding: 70px 0; }

  .nav-links {
    display: none;
  }

  #hero { padding: 0 1.5rem; }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .timeline-header {
    flex-direction: column;
  }

  .timeline-date {
    align-self: flex-start;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .container { padding: 0 1.5rem; }
}

@media (max-width: 500px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
}

/* =============================================
   BACK TO TOP
   ============================================= */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 200;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, box-shadow 0.25s;
  font-size: 0.85rem;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(107, 143, 110, 0.2);
}

/* =============================================
   ANIMATIONS
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
