/* ===== Variables ===== */
:root {
  --bg:           #FAF5EC;
  --surface:      #F0E6D3;
  --surface-alt:  #E6D6BF;
  --border:       #D9C9B0;

  --brown-900: #2C1A0E;
  --brown-700: #6B3D1E;
  --brown-500: #9C6035;
  --brown-300: #C4916A;
  --brown-100: #EDD5BE;
  --brown-50:  #F8EFE4;

  --green-800: #2D4A28;
  --green-600: #4A7A40;
  --green-400: #75A868;
  --green-200: #B5D4AE;
  --green-100: #DDF0D8;
  --green-50:  #EEF7EB;

  --text:       #2C1A0E;
  --text-muted: #7A6050;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 40px;

  --shadow-sm: 0 2px 10px rgba(44,26,14,0.07);
  --shadow-md: 0 6px 24px rgba(44,26,14,0.12);
  --shadow-lg: 0 12px 48px rgba(44,26,14,0.18);

  --transition: 0.22s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: 'Lora', serif;
  line-height: 1.2;
  color: var(--brown-900);
}

p { color: var(--text); }

/* ===== Utilities ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.text-muted { color: var(--text-muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius-xl);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--brown-700);
  color: #FFF9F3;
}
.btn-primary:hover { background: var(--brown-900); }

.btn-secondary {
  background: var(--green-600);
  color: #FFF9F3;
}
.btn-secondary:hover { background: var(--green-800); }

/* ===== Skill Tags ===== */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.skill-tags span {
  background: var(--brown-100);
  color: var(--brown-700);
  border-radius: var(--radius-xl);
  padding: 3px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 245, 236, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brown-900);
  letter-spacing: -0.01em;
  transition: color var(--transition);
}
.nav-logo:hover { color: var(--brown-500); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--brown-700); }

.nav-cta {
  background: var(--brown-700) !important;
  color: #FFF9F3 !important;
  padding: 8px 22px;
  border-radius: var(--radius-xl);
  transition: background var(--transition) !important, transform var(--transition) !important;
}
.nav-cta:hover {
  background: var(--brown-900) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brown-700);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg);
  padding: 12px 28px 24px;
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--brown-700); }

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

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 120px 28px 80px;
  max-width: 1080px;
  margin: 0 auto;
}

.hero-content { flex: 1; max-width: 580px; }

.hero-eyebrow {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--brown-300);
  margin-bottom: 14px;
  display: block;
}

.hero-name {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--brown-900);
  margin-bottom: 16px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-600);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 460px;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Avatar */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brown-300) 0%, var(--green-400) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
  /* Decorative ring */
  outline: 6px solid var(--brown-100);
  outline-offset: 6px;
}

/* Avatar photo */
.avatar-img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
  outline: 6px solid var(--brown-100);
  outline-offset: 6px;
}

/* Banner strip */
.banner-strip {
  width: 100%;
  overflow: hidden;
  height: 52vh;
  min-height: 240px;
  max-height: 500px;
}
.banner-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

@media (max-width: 760px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 36px;
    padding-top: 100px;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .avatar-placeholder {
    width: 150px; height: 150px;
    font-size: 2.2rem;
    outline-width: 4px;
    outline-offset: 4px;
  }
  .avatar-img {
    width: 150px;
    height: 150px;
    outline-width: 4px;
    outline-offset: 4px;
  }
  .banner-strip { height: 38vh; min-height: 180px; }
}

/* ===== Sections ===== */
.section { padding: 100px 0; }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 52px;
  max-width: 520px;
}

/* ===== About ===== */
.about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.about-text p {
  margin-bottom: 18px;
  font-size: 1.05rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--brown-700); font-weight: 700; }
.about-lead { font-size: 1.15rem !important; }

.about-aside { display: flex; flex-direction: column; gap: 14px; }

.about-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.about-card.visible { opacity: 1; transform: none; }
.about-card:nth-child(2) { transition-delay: 0.08s; }
.about-card:nth-child(3) { transition-delay: 0.16s; }

.about-card h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brown-500);
  margin-bottom: 10px;
}
.about-card p { font-size: 0.95rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li {
  background: var(--green-100);
  color: var(--green-800);
  border-radius: var(--radius-xl);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ===== Experience / Timeline ===== */
.experience { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 52px;
  margin-top: 8px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(to bottom, var(--brown-300), var(--green-400));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item.visible { opacity: 1; transform: none; }

.timeline-dot {
  position: absolute;
  left: -44px;
  top: 20px;
  width: 14px;
  height: 14px;
  background: var(--brown-500);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--brown-300);
  transition: background var(--transition);
}
.timeline-item:hover .timeline-dot { background: var(--green-600); box-shadow: 0 0 0 2px var(--green-400); }

.timeline-year {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brown-500);
  margin-bottom: 6px;
}

.timeline-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.timeline-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--brown-900);
}
.timeline-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.timeline-card a {
  color: var(--green-600);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--transition);
}
.timeline-card a:hover { text-decoration-color: var(--green-600); }

@media (max-width: 560px) {
  .timeline { padding-left: 38px; }
  .timeline::before { left: 10px; }
  .timeline-dot { left: -30px; }
  .timeline-card { padding: 18px 18px; }
}

/* ===== Projects ===== */
.projects { background: var(--surface); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.project-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition), opacity 0.42s ease;
  opacity: 0;
  transform: translateY(14px);
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.project-icon { font-size: 2.2rem; line-height: 1; }

.project-card h3 { font-size: 1.15rem; color: var(--brown-900); }

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

.project-link {
  color: var(--green-600);
  font-weight: 700;
  font-size: 0.88rem;
  transition: color var(--transition);
  align-self: flex-start;
  margin-top: 4px;
}
.project-link:hover { color: var(--green-800); }

/* ===== Contact ===== */
.contact { background: var(--bg); text-align: center; }
.contact .section-intro { margin: 0 auto 52px; }

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

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  box-shadow: var(--shadow-sm);
  color: var(--brown-900);
  text-align: left;
  min-width: 260px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}
.contact-icon--email   { background: var(--brown-700); }
.contact-icon--linkedin { background: var(--green-700, #3d6b35); }

.contact-card-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-card-value {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brown-900);
}

@media (max-width: 560px) {
  .contact-card { min-width: 0; width: 100%; }
}

/* ===== Footer ===== */
.footer {
  background: var(--brown-900);
  color: var(--brown-100);
  text-align: center;
  padding: 30px 28px;
  font-size: 0.88rem;
  font-family: 'Nunito', sans-serif;
  letter-spacing: 0.01em;
}

/* ===== Inner Pages ===== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 28px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--brown-700); }

.inner-hero {
  padding: 110px 0 56px;
  background: var(--surface);
}
.inner-hero-row {
  display: flex;
  align-items: center;
  gap: 22px;
}
.inner-hero-icon { font-size: 3rem; line-height: 1; flex-shrink: 0; }
.inner-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 8px; }
.inner-hero-subtitle { color: var(--text-muted); font-size: 1.05rem; }

@media (max-width: 560px) {
  .inner-hero { padding: 100px 0 44px; }
}

/* Project body */
.project-body {
  padding: 64px 0 100px;
  background: var(--bg);
}
.project-body-inner { max-width: 740px; }
.project-body p {
  font-size: 1.05rem;
  margin-bottom: 18px;
  line-height: 1.8;
}
.project-body p:last-child { margin-bottom: 0; }
.project-body h2 {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  color: var(--brown-900);
  margin: 36px 0 12px;
}
.project-body h2:first-child { margin-top: 0; }

/* Embed section */
.embed-section {
  padding: 0 0 80px;
  background: var(--bg);
}
.embed-section h2 {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  color: var(--brown-900);
  margin-bottom: 20px;
}
.embed-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 72vh;
  min-height: 520px;
  background: var(--surface-alt);
}
.embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.embed-fallback {
  padding: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.embed-fallback a { color: var(--green-600); font-weight: 600; text-decoration: underline; }

/* Experiences page */
.experiences-hero {
  padding: 110px 0 56px;
  background: var(--surface);
}
.experiences-hero h1 { margin-bottom: 12px; }
.experiences-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 540px; }
.experiences-body { padding: 60px 0 100px; background: var(--bg); }

/* Timeline highlights CTA on main page */
.timeline-cta { margin-top: 44px; }

/* Project cards as links */
a.project-card { text-decoration: none; color: inherit; }
.project-card-arrow {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-600);
  margin-top: 4px;
  align-self: flex-start;
  transition: color var(--transition);
}
a.project-card:hover .project-card-arrow { color: var(--green-800); }

/* Nav active state */
.nav-links a.active { color: var(--brown-700); font-weight: 700; }
