/* ==========================================================
   tapanbhanot.com — warm, story-first personal site
   Palette: cream / terracotta / saffron / espresso
   ========================================================== */
:root {
  --cream: #fbf4ea;
  --sand: #f3e4cf;
  --paper: #fffaf3;
  --terracotta: #c8553d;
  --terracotta-dark: #a8432e;
  --saffron: #e8a33d;
  --apricot: #f4c98e;
  --espresso: #2b1d14;
  --cocoa: #5c4434;
  --muted: #8a7262;
  --line: #e6d3bb;
  --whatsapp: #1f9d55;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(92, 52, 28, 0.25);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-dark); }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 48px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 14px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 244, 234, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--espresso); text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--saffron), var(--terracotta));
  color: var(--paper); display: grid; place-items: center; font-size: .85rem; letter-spacing: .02em;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--cocoa); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--terracotta); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--espresso); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: .98rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: var(--paper); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--terracotta-dark); color: var(--paper); }
.btn-ghost { border-color: var(--espresso); color: var(--espresso); }
.btn-ghost:hover { background: var(--espresso); color: var(--cream); }
.btn-wa { background: var(--whatsapp); color: #fff; box-shadow: var(--shadow); }
.btn-wa:hover { background: #17834a; color: #fff; }
.btn-small { padding: 9px 18px; font-size: .88rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 90px 0 110px; }
.hero::before {
  content: ""; position: absolute; width: 620px; height: 620px; right: -160px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,163,61,.42), rgba(232,163,61,0) 65%);
  z-index: -1;
}
.hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; left: -220px; bottom: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,85,61,.22), rgba(200,85,61,0) 65%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 60px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--terracotta); }
.hero .lead { font-size: 1.2rem; color: var(--cocoa); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.availability {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px 7px 12px; font-size: .88rem; font-weight: 600; color: var(--cocoa); margin-bottom: 26px;
}
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--whatsapp); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--whatsapp); opacity: 0; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.portrait-card {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px;
  background: linear-gradient(160deg, var(--apricot), var(--saffron) 45%, var(--terracotta));
  box-shadow: var(--shadow); overflow: hidden;
  display: grid; place-items: center;
}
.portrait-card .initials { font-family: var(--serif); font-size: clamp(5rem, 11vw, 8.5rem); color: rgba(255, 250, 243, .92); font-weight: 600; font-style: italic; }
.portrait-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-sun { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(255,250,243,.55); }
.stat-chip {
  position: absolute; background: var(--paper); border-radius: 16px; padding: 12px 18px; box-shadow: var(--shadow);
  font-size: .85rem; color: var(--cocoa); line-height: 1.3;
}
.stat-chip strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--espresso); }
.chip-a { left: -26px; bottom: 40px; }
.chip-b { right: -18px; top: 36px; }

/* ---------- Sections ---------- */
section { padding: 100px 0; }
.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head p { color: var(--cocoa); font-size: 1.08rem; }
.band { background: var(--sand); }
.dark { background: var(--espresso); color: var(--cream); }
.dark .eyebrow { color: var(--saffron); }
.dark p { color: #e9d9c6; }

/* ---------- Story ---------- */
.story-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.pull-quote {
  font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.25; font-style: italic;
  color: var(--terracotta); border-left: 4px solid var(--saffron); padding-left: 24px; position: sticky; top: 110px;
}
.story-body p:first-child::first-letter {
  font-family: var(--serif); float: left; font-size: 4.2rem; line-height: .9; padding: 6px 10px 0 0; color: var(--terracotta);
}

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-left: 12px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--saffron), var(--terracotta)); }
.chapter { position: relative; padding: 0 0 46px 44px; }
.chapter:last-child { padding-bottom: 0; }
.chapter::before {
  content: ""; position: absolute; left: -8px; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream); border: 3px solid var(--terracotta);
}
.chapter.now::before { background: var(--terracotta); box-shadow: 0 0 0 6px rgba(200,85,61,.18); }
.chapter .when { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chapter h3 { margin: 6px 0 4px; }
.chapter .role { font-weight: 700; color: var(--terracotta); margin-bottom: 10px; }
.chapter p { color: var(--cocoa); max-width: 62ch; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(140deg, var(--apricot), var(--saffron)); font-size: 1.4rem;
}
.card p { color: var(--cocoa); margin: 0; font-size: .98rem; }
.card .tag { display: inline-block; margin-top: 16px; font-size: .78rem; font-weight: 700; color: var(--terracotta); letter-spacing: .06em; text-transform: uppercase; }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
  background: var(--paper); border-radius: 28px; padding: 50px; border: 1px solid var(--line); box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.feature-visual {
  border-radius: 20px; min-height: 280px; padding: 30px;
  background: linear-gradient(150deg, var(--espresso), #4a2f20);
  color: var(--cream); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  position: relative; overflow: hidden;
}
.feature-visual::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -70px; top: -70px; background: radial-gradient(circle, rgba(232,163,61,.55), transparent 65%); }
.flow-step { position: relative; display: flex; align-items: center; gap: 12px; font-size: .92rem; font-weight: 600; }
.flow-step span { width: 28px; height: 28px; border-radius: 50%; background: var(--saffron); color: var(--espresso); display: grid; place-items: center; font-size: .8rem; flex: none; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 8px; color: var(--cocoa); }
.ticks li::before { content: "✦"; position: absolute; left: 4px; color: var(--saffron); }

/* ---------- Skills ---------- */
.skills { display: flex; flex-wrap: wrap; gap: 10px; }
.skill { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .9rem; font-weight: 600; color: var(--cocoa); }

/* ---------- Life ---------- */
.life-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.life-item { padding: 28px; border-radius: var(--radius); background: rgba(255,250,243,.06); border: 1px solid rgba(255,250,243,.14); }
.life-item .emoji { font-size: 2rem; margin-bottom: 12px; }
.life-item h3 { color: var(--cream); }

/* ---------- Blog list ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.post-card time { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-card h3 { margin: 10px 0; }
.post-card p { color: var(--cocoa); font-size: .96rem; margin: 0; }
.post-card .more { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--terracotta); }

/* ---------- Hire ---------- */
.hire {
  background: linear-gradient(140deg, var(--terracotta), #d9743f 55%, var(--saffron));
  color: var(--paper); border-radius: 32px; padding: 70px 60px; position: relative; overflow: hidden;
}
.hire::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; bottom: -200px; border: 1px solid rgba(255,250,243,.35); }
.hire h2 { color: var(--paper); max-width: 18ch; }
.hire p { color: rgba(255,250,243,.92); max-width: 56ch; font-size: 1.1rem; }
.hire-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start; position: relative; z-index: 1; }
.hire .btn-primary { background: var(--espresso); }
.hire .btn-primary:hover { background: #000; }
.contact-lines { margin-top: 26px; display: grid; gap: 8px; font-weight: 600; }
.contact-lines a { color: var(--paper); }

.form { background: var(--paper); border-radius: 22px; padding: 30px; color: var(--espresso); box-shadow: var(--shadow); }
.form label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--cocoa); }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; font-size: .98rem; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--cream); color: var(--espresso); margin-bottom: 16px;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--saffron); border-color: transparent; }
.form textarea { min-height: 120px; resize: vertical; }
.form .btn { width: 100%; justify-content: center; }
.hidden { display: none; }

/* ---------- Footer ---------- */
footer { padding: 50px 0; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--line); padding-top: 30px; }
footer a { color: var(--cocoa); text-decoration: none; margin-left: 18px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: var(--whatsapp); color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 26px -8px rgba(31,157,85,.6);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Article (blog post) ---------- */
.article-head { padding: 80px 0 30px; }
.article-head time { color: var(--muted); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 12px; }
.article-head .dek { font-size: 1.2rem; color: var(--cocoa); }
.article { padding: 10px 0 90px; font-size: 1.1rem; }
.article h2 { font-size: 1.8rem; margin-top: 1.6em; }
.article blockquote { margin: 1.6em 0; padding-left: 22px; border-left: 4px solid var(--saffron); font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--terracotta); }
.article .back { display: inline-block; margin-bottom: 30px; font-weight: 700; text-decoration: none; }
.article-cta { margin-top: 50px; padding: 30px; border-radius: var(--radius); background: var(--sand); }
.article-cta p { margin-bottom: 16px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .pulse::after { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .story-grid, .feature, .hire-grid { grid-template-columns: 1fr; }
  .cards, .posts, .life-grid { grid-template-columns: 1fr 1fr; }
  .pull-quote { position: static; }
  .portrait-card { max-width: 420px; }
  .feature { padding: 30px; }
  .hire { padding: 50px 30px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  section { padding: 70px 0; }
  .hero { padding: 50px 0 80px; }
  .cards, .posts, .life-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 24px; width: 100%; }
  .nav-links .btn { margin: 10px 24px 18px; width: auto; justify-content: center; }
  .chip-a { left: 10px; } .chip-b { right: 10px; }
  footer a { margin: 0 18px 0 0; }
}
