:root {
  /* Warm, cozy palette */
  --bg:        #fdf6ec;  /* warm cream */
  --bg-soft:   #f8ebd9;  /* soft sand */
  --surface:   #fff9f1;  /* card */
  --ink:       #4a3729;  /* deep cocoa (body text) */
  --ink-soft:  #7a6353;  /* muted brown */
  --accent:    #c1542b;  /* terracotta */
  --accent-2:  #e08a3c;  /* amber */
  --accent-3:  #a8763e;  /* caramel */
  --gold:      #d9a05b;
  --line:      #ead9c4;  /* hairline */
  --shadow:    0 14px 40px rgba(120, 72, 40, 0.12);

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Account for fixed navbar when jumping to sections */
section { scroll-margin-top: 72px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(224, 138, 60, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(193, 84, 43, 0.10), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.1; margin: 0; }

a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.navbar.scrolled {
  background: rgba(253, 246, 236, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .96rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px; height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

section { padding: 110px 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }
.reveal.d3 { transition-delay: .36s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(-1px) scale(.97); }

.btn-primary { background: var(--accent); color: #fff7ef; box-shadow: 0 8px 20px rgba(193,84,43,.28); }
.btn-primary:hover { background: #ab471f; }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--accent); }

.btn svg { width: 20px; height: 20px; display: block; transition: transform .25s ease; }
.btn:hover svg { transform: scale(1.12); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero-greeting {
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-greeting .name {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  margin-top: 18px;
  font-size: clamp(1.05rem, 2.5vw, 1.5rem);
  color: var(--ink-soft);
  font-weight: 500;
  max-width: 640px;

  /* animate in */
  opacity: 0;
  transform: translateY(16px);
  animation: subIn 1s ease forwards;
  animation-delay: .55s;
}
.hero-sub .hl { color: var(--accent-3); font-weight: 600; }

@keyframes subIn {
  to { opacity: 1; transform: none; }
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(16px);
  animation: subIn 1s ease forwards;
  animation-delay: .9s;
}

.scroll-cue {
  margin-top: 70px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  animation: subIn 1s ease forwards;
  animation-delay: 1.3s;
}
.scroll-cue .dot {
  width: 22px; height: 36px; border: 2px solid var(--gold); border-radius: 12px;
  position: relative;
}
.scroll-cue .dot::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px;
  background: var(--accent); border-radius: 4px; transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0%{opacity:0;transform:translate(-50%,0)} 30%{opacity:1} 100%{opacity:0;transform:translate(-50%,12px)} }

/* Inline "scroll for more" indicator inside a section */
.scroll-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 56px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color .25s ease;
}
.scroll-next:hover { color: var(--accent); }
.scroll-next .chev {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--accent);
  transition: transform .25s ease, border-color .25s ease;
  animation: bob 1.6s ease-in-out infinite;
}
.scroll-next .chev svg { width: 16px; height: 16px; }
.scroll-next:hover .chev { border-color: var(--accent); transform: translateY(2px); }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)} }

/* ---------- Section headings ---------- */
.eyebrow {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }

/* ---------- About / Experience ---------- */
#about { background: linear-gradient(180deg, transparent, rgba(248,235,217,.5)); }
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.about-left .lead {
  font-size: 1.18rem;
  color: var(--ink);
  margin: 22px 0 26px;
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.edu-card .school { font-weight: 600; color: var(--accent-3); font-size: 1.02rem; }
.edu-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-soft); }
.edu-card li { margin: 6px 0; }
.edu-card .grad { display: inline-block; margin-top: 14px; padding: 5px 14px; border-radius: 999px;
  background: var(--bg-soft); color: var(--accent-3); font-weight: 600; font-size: .9rem; }

.exp-list { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.exp-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: 0 8px 24px rgba(120,72,40,.07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.exp-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.exp-item .role { font-family: "Fraunces", serif; font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.exp-item .meta { color: var(--accent); font-weight: 600; font-size: .92rem; margin: 4px 0 8px; }
.exp-item p { margin: 0; color: var(--ink-soft); }
.placeholder { font-style: italic; color: var(--ink-soft); opacity: .8; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.skill-tags .chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--accent-3);
  font-size: .82rem;
  font-weight: 600;
}

/* ---------- Projects ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.proj-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(120,72,40,.07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.proj-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--gold); }
.proj-card .num { font-family: "Fraunces", serif; font-size: 1.1rem; color: var(--gold); font-weight: 600; }
.proj-card h3 { font-size: 1.35rem; margin: 10px 0 8px; color: var(--ink); }
.proj-card p { margin: 0; color: var(--ink-soft); }
.proj-card .tag { margin-top: auto; padding-top: 16px; color: var(--accent); font-weight: 600; font-size: .85rem;
  letter-spacing: .04em; }

/* Card footer: tag on top, link beneath */
.proj-foot { margin-top: auto; padding-top: 16px; }
.proj-foot .tag { margin-top: 0; padding-top: 0; display: block; }

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--accent-3);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .2s ease;
}
.proj-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff7ef;
  transform: translateY(-2px);
}
.proj-link svg { width: 15px; height: 15px; transition: transform .25s ease; }
.proj-link:hover svg { transform: translate(2px, -2px); }

/* ---------- Contact ---------- */
#contact { background: linear-gradient(180deg, rgba(248,235,217,.5), rgba(224,138,60,.10)); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 30px; }
.contact-lead { font-size: 1.15rem; color: var(--ink); max-width: 420px; }
.info-list { list-style: none; padding: 0; margin: 26px 0 0; }
.info-list li { display: flex; align-items: center; gap: 14px; margin: 16px 0; color: var(--ink); }
.info-list .ic {
  width: 42px; height: 42px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex: none;
}
.info-list .ic svg { width: 20px; height: 20px; }
.info-list .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.info-list .val { font-weight: 600; }
.info-list a.val { text-decoration: none; }
.info-list a.val:hover { color: var(--accent); }

.contact-actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px; box-shadow: var(--shadow); width: 100%;
}
.contact-card h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--ink); }
.contact-card p { color: var(--ink-soft); margin-top: 0; }

/* ---------- Footer ---------- */
footer { padding: 40px 0 60px; text-align: center; color: var(--ink-soft); font-size: .9rem; }
footer .heart { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  section { padding: 80px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(253, 246, 236, 0.96);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 16px; }
  .nav-links a::after { display: none; }
}
