*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #F5F0E8;
  --warm-white: #FAF7F2;
  --sand: #E8DFD0;
  --clay: #C4A882;
  --terracotta: #C17A4A;
  --rust: #9B5E34;
  --bark: #5C3D2E;
  --deep: #2E1F14;
  --text: #2E1F14;
  --text-muted: #7A6354;
  --text-light: #A8917E;
  --accent: #C17A4A;
  --accent-soft: #F0E4D4;
  --green-soft: #D4E6C3;
  --green-text: #3A6B2A;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 5vw;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 24px rgba(46,31,20,0.07); }
.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--bark);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--terracotta); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--terracotta); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--bark); border-radius: 2px; transition: all 0.3s; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 5vw 5rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(193,122,74,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(196,168,130,0.15) 0%, transparent 60%),
    var(--warm-white);
  z-index: 0;
}
.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: var(--accent-soft);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--deep);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.35s forwards;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}
.hero-sub {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.65s forwards;
}
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  letter-spacing: 0.01em;
}
.btn-primary:hover { background: var(--rust); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(155,94,52,0.25); }
.btn-outline {
  background: transparent;
  color: var(--bark);
  border: 1.5px solid var(--clay);
}
.btn-outline:hover { background: var(--sand); transform: translateY(-2px); }
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 5vw;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
}
.scroll-line {
  width: 40px; height: 1px;
  background: var(--clay);
  animation: scrollLine 1.5s 1.5s ease infinite alternate;
}

/* SECTION LAYOUT */
section { padding: 6rem 5vw; }
.section-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--deep);
  margin-bottom: 3.5rem;
}

/* ABOUT STRIP */
.about-strip {
  background: var(--cream);
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}
.about-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.stat-card {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 1.5rem;
}
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* SKILLS */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.skill-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--warm-white);
  border: 1.5px solid var(--sand);
  border-radius: 100px;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--bark);
  transition: all 0.2s;
}
.skill-pill:hover { border-color: var(--clay); background: var(--accent-soft); color: var(--rust); }
.skill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta); }

/* PROJECTS */
#projects { background: var(--cream); border-top: 1px solid var(--sand); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--warm-white);
  border: 1px solid var(--sand);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(46,31,20,0.1); border-color: var(--clay); }
.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--sand);
}
.project-body { padding: 1.75rem; }
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust);
  background: var(--accent-soft);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}
.project-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--deep);
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}
.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.project-problem {
  background: var(--cream);
  border-left: 3px solid var(--terracotta);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.project-problem strong { color: var(--bark); display: block; margin-bottom: 0.25rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* RESUME */
.resume-layout {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}
.resume-section { margin-bottom: 2.5rem; }
.resume-section h3 {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  border-bottom: 1px solid var(--sand);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.resume-skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.resume-skills-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.resume-skills-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clay);
  flex-shrink: 0;
}
.resume-entry {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--sand);
}
.resume-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.4rem;
  gap: 1rem;
}
.resume-entry h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--deep);
}
.resume-date {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  background: var(--cream);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--sand);
}
.resume-org {
  font-size: 0.88rem;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.resume-entry p, .resume-entry ul {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.resume-entry ul { padding-left: 1.2rem; }
.resume-entry ul li { margin-bottom: 0.3rem; }
.resume-download {
  text-align: center;
  margin-top: 3rem;
}

/* CONTACT */
#contact { background: var(--deep); }
#contact .section-label { color: var(--clay); }
#contact .section-title { color: var(--cream); }
.contact-sub {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 480px;
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
  max-width: 900px;
}
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item-text p:first-child {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clay);
  margin-bottom: 0.2rem;
}
.contact-item-text p:last-child {
  font-size: 0.95rem;
  color: var(--cream);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clay);
}
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(196,168,130,0.25);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  resize: vertical;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(196,168,130,0.4); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--clay); }
.form-status {
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: none;
}
.form-status.success { display: block; background: rgba(212,230,195,0.15); color: #9FC97E; border: 1px solid rgba(159,201,126,0.3); }
.form-status.error { display: block; background: rgba(225,80,80,0.1); color: #F09595; border: 1px solid rgba(240,149,149,0.3); }

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 5vw;
  background: #1A0F0A;
  font-size: 0.82rem;
  color: rgba(196,168,130,0.4);
}
footer a { color: var(--clay); text-decoration: none; }
footer a:hover { color: var(--terracotta); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollLine {
  from { width: 24px; opacity: 0.4; }
  to { width: 48px; opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--warm-white);
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 99;
  }
  .nav-links.open a { font-size: 1.5rem; }
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .resume-layout { grid-template-columns: 1fr; gap: 2rem; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 6rem; }
}
@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* --- UPDATE EXISTING .hero-content --- */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px; /* Increased width to accommodate image */
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* Text takes slightly more space */
  gap: 4rem;
  align-items: center;
}

/* --- NEW HERO IMAGE STYLES --- */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards; /* Slight delay */
}

.hero-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 200px 200px 20px 20px; /* Arch shape */
  box-shadow: 20px 20px 0px var(--sand); /* Offset shadow effect */
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.hero-img:hover {
  transform: translateY(-5px);
}

/* Decorative blob behind the image */
.hero-img-decoration {
  position: absolute;
  width: 90%;
  height: 90%;
  background: var(--clay);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  z-index: 1;
  opacity: 0.3;
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
  34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
  67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
}

/* --- RESPONSIVE UPDATES FOR HERO --- */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr; /* Stack vertically on tablet/mobile */
    gap: 3rem;
    text-align: center;
  }
  
  .hero-text-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-image-wrapper {
    order: -1; /* Move image to top on mobile if desired, or remove to keep bottom */
    margin-bottom: 1rem;
  }

  .hero-img {
    max-width: 300px;
    box-shadow: 10px 10px 0px var(--sand);
  }
}

@media (max-width: 768px) {
  /* Existing media queries remain, but ensure hero padding is okay */
  .hero {
    padding-top: 7rem;
    padding-bottom: 3rem;
  }
}