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

:root {
  --bg: #f5f0eb;
  --bg-cream: #faf6f1;
  --bg-card: #ffffff;
  --text: #2d2a26;
  --text-muted: #8a8580;
  --sage: #7a8f72;
  --sage-light: rgba(122,143,114,0.12);
  --terracotta: #c4704b;
  --terracotta-light: rgba(196,112,75,0.1);
  --clay: #b08968;
  --navy: #3d405b;
  --border: #e4ddd5;
  --shadow: 0 4px 20px rgba(45,42,38,0.06);
  --shadow-hover: 0 12px 40px rgba(45,42,38,0.1);
  --radius: 16px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; }
img { max-width: 100%; display: block; }


/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 4rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(245,240,235,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}
nav.scrolled { padding: 0.8rem 4rem; box-shadow: var(--shadow); }
.logo {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem; font-weight: 700; color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--sage); }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.3s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--sage); }
.nav-links a.active::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--sage); border-radius: 2px;
}
.nav-pill {
  padding: 0.55rem 1.4rem !important;
  background: var(--sage) !important; color: white !important;
  border-radius: 50px; font-weight: 500 !important;
}
.nav-pill:hover { background: #6b7f63 !important; }
.nav-pill.active::after { display: none; }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 0.5rem; color: var(--text);
}
.menu-toggle svg { width: 24px; height: 24px; }


/* ===== SHARED COMPONENTS ===== */

/* Buttons */
.pill-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; font-size: 0.9rem; font-weight: 600;
  border-radius: 50px; text-decoration: none; transition: all 0.3s;
  cursor: pointer; border: none; font-family: inherit;
}
.pill-primary {
  background: var(--sage); color: white;
  box-shadow: 0 6px 20px rgba(122,143,114,0.3);
}
.pill-primary:hover { background: #6b7f63; transform: translateY(-2px); }
.pill-ghost {
  background: white; color: var(--text);
  border: 1.5px solid var(--border);
}
.pill-ghost:hover { border-color: var(--sage); color: var(--sage); }

.text-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600; color: var(--sage);
  text-decoration: none; transition: gap 0.3s;
}
.text-link:hover { gap: 0.7rem; }

/* Section headers */
.section-header {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: 3rem; flex-wrap: wrap;
}
.section-num {
  font-family: 'Fraunces', serif;
  font-size: 0.9rem; color: var(--sage); font-weight: 400;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700;
}
.section-line { flex: 1; height: 1px; background: var(--border); min-width: 60px; }

/* Page wrapper */
.page { padding-top: 5rem; }
.page-section { padding: 5rem 4rem; max-width: 1100px; margin: 0 auto; }

/* Page hero (for inner pages) */
.page-hero {
  padding: 7rem 4rem 3rem;
  max-width: 1100px; margin: 0 auto;
}
.page-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700; margin-bottom: 1rem;
}
.page-hero p {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 600px;
}

/* Tags */
.tech-tag {
  font-size: 0.7rem; font-weight: 500; padding: 0.25rem 0.65rem;
  background: var(--sage-light); color: var(--sage); border-radius: 50px;
}


/* ===== HOME HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 8rem 2rem 4rem;
  position: relative;
}
.hero-content { max-width: 740px; }
.hero-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sage), var(--clay));
  margin: 0 auto 2rem; border: 4px solid var(--bg-cream);
  box-shadow: var(--shadow);
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic; color: var(--sage);
  position: relative;
}
.hero h1 em::after {
  content: '';
  position: absolute; bottom: 2px; left: 0; right: 0;
  height: 8px; background: var(--sage-light);
  z-index: -1; border-radius: 4px;
}
.hero p {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 560px; margin: 0 auto 2.5rem;
}
.hero-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px; background: var(--border);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%; background: var(--sage);
  animation: scrollDown 2s infinite;
}
@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 100%; }
}


/* ===== PROJECT CARDS ===== */
.project-list { display: flex; flex-direction: column; gap: 2rem; }
.project-card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all 0.4s; cursor: pointer;
  border: 1px solid var(--border); text-decoration: none;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.project-card:nth-child(even) { direction: rtl; }
.project-card:nth-child(even) > * { direction: ltr; }
.project-img {
  aspect-ratio: 4/3; position: relative; overflow: hidden;
}
.project-card:nth-child(1) .project-img { background: linear-gradient(135deg, #7a8f72, #b8c9a3); }
.project-card:nth-child(2) .project-img { background: linear-gradient(135deg, #c4704b, #e8a87c); }
.project-card:nth-child(3) .project-img { background: linear-gradient(135deg, #3d405b, #6b6e8a); }
.project-card:nth-child(4) .project-img { background: linear-gradient(135deg, #b08968, #d4b99a); }
.project-card:nth-child(5) .project-img { background: linear-gradient(135deg, #7a8f72, #3d405b); }
.project-card:nth-child(6) .project-img { background: linear-gradient(135deg, #c4704b, #b08968); }
.img-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.img-mock {
  width: 75%; height: 65%; background: rgba(255,255,255,0.15);
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(5px);
}
.project-info { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.project-category {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sage); margin-bottom: 0.75rem;
}
.project-info h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem; font-weight: 700; margin-bottom: 0.8rem;
}
.project-info p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.project-tech { display: flex; gap: 0.4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }

/* Compact project grid (for homepage preview) */
.projects-preview {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.project-card-compact {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: all 0.4s; cursor: pointer;
  border: 1px solid var(--border); text-decoration: none;
  color: inherit;
}
.project-card-compact:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover); border-color: transparent;
}
.project-card-compact .project-img { aspect-ratio: 16/10; }
.project-card-compact:nth-child(1) .project-img { background: linear-gradient(135deg, #7a8f72, #b8c9a3); }
.project-card-compact:nth-child(2) .project-img { background: linear-gradient(135deg, #c4704b, #e8a87c); }
.project-card-compact:nth-child(3) .project-img { background: linear-gradient(135deg, #3d405b, #6b6e8a); }
.project-card-compact:nth-child(4) .project-img { background: linear-gradient(135deg, #b08968, #d4b99a); }
.project-card-compact .project-info { padding: 1.5rem; }
.project-card-compact .project-info h3 { font-size: 1.15rem; }


/* ===== EXPERIENCE ===== */
.exp-grid { display: flex; flex-direction: column; }
.exp-row {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 3rem; padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.exp-row:first-child { border-top: 1px solid var(--border); }
.exp-row:hover { padding-left: 1rem; }
.exp-year {
  font-family: 'Fraunces', serif;
  font-size: 1rem; color: var(--clay); font-weight: 400;
  padding-top: 0.2rem;
}
.exp-details h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.15rem; }
.exp-company-name { font-size: 0.9rem; color: var(--sage); margin-bottom: 0.7rem; font-weight: 500; }
.exp-details p { font-size: 0.9rem; color: var(--text-muted); }
.exp-skills { display: flex; gap: 0.4rem; margin-top: 0.8rem; flex-wrap: wrap; }
.exp-skill {
  font-size: 0.7rem; font-weight: 500; padding: 0.25rem 0.65rem;
  background: var(--sage-light); color: var(--sage); border-radius: 50px;
}


/* ===== ABOUT ===== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
}
.about-text p {
  font-size: 1rem; color: var(--text-muted); margin-bottom: 1rem;
}
.values-list { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; }
.value-item {
  display: flex; gap: 1.2rem; align-items: flex-start;
  padding: 1.5rem; background: var(--bg-card);
  border-radius: var(--radius); border: 1px solid var(--border);
  transition: all 0.3s;
}
.value-item:hover { border-color: var(--sage); }
.value-icon {
  width: 44px; min-width: 44px; height: 44px;
  border-radius: 12px; display: flex;
  align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 1.1rem;
}
.value-item:nth-child(1) .value-icon { background: var(--sage-light); color: var(--sage); }
.value-item:nth-child(2) .value-icon { background: var(--terracotta-light); color: var(--terracotta); }
.value-item:nth-child(3) .value-icon { background: rgba(61,64,91,0.1); color: var(--navy); }
.value-item:nth-child(4) .value-icon { background: rgba(176,137,104,0.15); color: var(--clay); }
.value-text h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.value-text p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* About photo area */
.about-photo {
  width: 100%; aspect-ratio: 3/4; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sage), var(--clay));
  box-shadow: var(--shadow);
}

/* Skills / coursework grid */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.skill-card {
  padding: 1.5rem; background: var(--bg-card);
  border-radius: var(--radius); border: 1px solid var(--border);
  transition: all 0.3s;
}
.skill-card:hover { border-color: var(--sage); }
.skill-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
.skill-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.skill-card-icon {
  font-size: 1.3rem; margin-bottom: 0.8rem;
}


/* ===== CONTACT ===== */
.contact-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4rem;
  text-align: center; margin: 0 4rem 4rem;
  max-width: 1100px; margin-left: auto; margin-right: auto;
}
.contact-section .section-num { display: block; margin-bottom: 0.5rem; }
.contact-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem; font-weight: 700; margin-bottom: 1rem;
}
.contact-section p {
  font-size: 1rem; color: var(--text-muted);
  max-width: 480px; margin: 0 auto 2.5rem;
}
.contact-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 50px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 500; color: var(--text);
  text-decoration: none; transition: all 0.3s;
}
.contact-chip:hover { border-color: var(--sage); color: var(--sage); background: var(--sage-light); }


/* ===== FOOTER ===== */
footer {
  text-align: center; padding: 2rem; font-size: 0.82rem; color: var(--text-muted);
}

/* ===== "VIEW ALL" LINK ===== */
.view-all {
  text-align: center; margin-top: 2.5rem;
}


/* ===== CONTACT PAGE FORM ===== */
.contact-page-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
}
.contact-info-card {
  display: flex; gap: 1rem; align-items: center;
  padding: 1.2rem 1.5rem; background: var(--bg-card);
  border-radius: var(--radius); border: 1px solid var(--border);
  margin-bottom: 1rem; transition: all 0.3s;
}
.contact-info-card:hover { border-color: var(--sage); }
.contact-info-icon {
  width: 44px; min-width: 44px; height: 44px;
  border-radius: 12px; display: flex;
  align-items: center; justify-content: center;
  background: var(--sage-light); font-size: 1.1rem;
}
.contact-info-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.15rem; }
.contact-info-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.contact-info-card a { color: var(--sage); text-decoration: none; font-weight: 500; }
.contact-info-card a:hover { text-decoration: underline; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.82rem; font-weight: 600; color: var(--text);
}
.form-group input, .form-group textarea {
  padding: 0.85rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: inherit;
  font-size: 0.9rem; background: var(--bg-card);
  transition: border-color 0.3s; outline: none;
  color: var(--text);
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--sage);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }


/* ===== PAGE TRANSITIONS ===== */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1; transform: translateY(0);
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  nav.scrolled { padding: 0.7rem 1.5rem; }
  .nav-links {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg); flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2rem; z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.2rem; }
  .menu-toggle { display: block; z-index: 101; }

  .hero { padding: 7rem 1.5rem 4rem; }
  .page-hero { padding: 7rem 1.5rem 2rem; }
  .page-section { padding: 3rem 1.5rem; }

  .projects-preview { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-card:nth-child(even) { direction: ltr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-page-grid { grid-template-columns: 1fr; }
  .exp-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .contact-section { margin: 0 1.5rem 2rem; padding: 2.5rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
}
