/* ===========================================================
   Ankur — personal site
   Design tokens
   =========================================================== */
:root{
  --ink:        #1d1d1f;
  --ink-soft:   #6e6e73;
  --hairline:   #d2d2d7;
  --surface:    #f5f5f7;
  --white:      #ffffff;
  --blue:       #0071e3;
  --blue-dark:  #0058b0;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;

  --max: 1100px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.47;
}

a{ color: inherit; text-decoration: none; }

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

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav .wrap{
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo{
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo-mark{
  height: 22px;
  width: auto;
  display: block;
}
.nav-links{
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a{
  font-size: 12px;
  color: var(--ink);
  opacity: 0.8;
  transition: opacity .2s ease;
}
.nav-links a:hover{ opacity: 1; }
.nav-links a.active{ opacity: 1; font-weight: 600; }

/* ---------- Hero ---------- */
.hero{
  padding: 96px 24px 72px;
  text-align: center;
  background: var(--white);
}
.eyebrow{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}
.hero h1{
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 820px;
}
.hero p.lede{
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 36px;
  font-weight: 400;
}
.cta-row{
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  transition: background .2s ease, opacity .2s ease, transform .15s ease;
  border: 1px solid transparent;
}
.btn-primary{
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover{ background: var(--blue-dark); }
.btn-secondary{
  color: var(--blue);
}
.btn-secondary:hover{ text-decoration: underline; }
.btn-secondary .chev{ transition: transform .2s ease; }
.btn-secondary:hover .chev{ transform: translateX(3px); }

/* ---------- Portrait / intro section ---------- */
.intro{
  background: var(--surface);
  padding: 88px 24px;
}
.intro .wrap{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: center;
}
.portrait{
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.portrait img{ width: 100%; height: 100%; object-fit: cover; }
.intro h2{
  font-size: clamp(26px, 3.6vw, 34px);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 600;
}
.intro p{
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}
@media (max-width: 720px){
  .intro .wrap{ grid-template-columns: 1fr; text-align: center; }
  .portrait{ margin: 0 auto; }
  .intro p{ margin: 0 auto; }
}

/* ---------- Section heading ---------- */
.section{
  padding: 88px 24px;
}
.section-head{
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2{
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 12px;
}
.section-head p{
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Spec sheet ---------- */
.spec-sheet{
  border-top: 1px solid var(--hairline);
}
.spec-row{
  display: grid;
  grid-template-columns: 240px 1fr;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  gap: 24px;
}
.spec-row dt{
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0;
}
.spec-row dd{
  margin: 0;
  font-size: 18px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
@media (max-width: 620px){
  .spec-row{ grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Feature grid ---------- */
.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.card{
  background: var(--white);
  padding: 40px 32px;
}
.card .tag{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  margin: 0 0 18px;
}
.card h3{
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.card p{
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}
@media (max-width: 820px){
  .grid-3{ grid-template-columns: 1fr; }
}

/* ---------- Timeline ---------- */
.timeline{
  max-width: 760px;
  margin: 0 auto;
  border-left: 1px solid var(--hairline);
}
.tl-item{
  position: relative;
  padding: 0 0 48px 32px;
}
.tl-item:last-child{ padding-bottom: 0; }
.tl-item::before{
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}
.tl-period{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.tl-item h3{
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 8px;
}
.tl-item p{
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 58ch;
}

/* ---------- Closing banner ---------- */
.banner{
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: 96px 24px;
}
.banner h2{
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  font-weight: 600;
}
.banner .btn-primary{ background: var(--blue); }
.banner .btn-secondary{ color: var(--white); }

/* ---------- Footer ---------- */
footer{
  padding: 32px 24px 48px;
  border-top: 1px solid var(--hairline);
}
footer .wrap{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer p{
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
}
footer .foot-links{
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
footer .foot-links a{
  font-size: 12px;
  color: var(--ink-soft);
}
footer .foot-links a:hover{ color: var(--ink); text-decoration: underline; }

/* ---------- Reveal on scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in{
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
   Journal (blog) page
   =========================================================== */
.journal-list{
  display: flex;
  flex-direction: column;
  max-width: 760px;
  margin: 0 auto;
}
.post-card{
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
}
.post-card:first-child{ padding-top: 0; }
.post-date{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.post-card h3{
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.post-card p{
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  max-width: 62ch;
}
.post-card .read-more{
  font-size: 14px;
  color: var(--blue);
  font-weight: 500;
}
.post-card.disabled{
  opacity: 0.55;
}
.post-card.disabled .read-more{ color: var(--ink-soft); }

/* single post */
.post-hero{
  padding: 72px 24px 32px;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.post-hero .post-date{ margin-bottom: 18px; }
.post-hero h1{
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
}
.post-body{
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
  font-size: 19px;
  color: #1d1d1f;
}
.post-body p{ margin: 0 0 26px; color: var(--ink); }
.post-body p.lead{
  font-size: 22px;
  color: var(--ink-soft);
}
.post-body h2{
  font-size: 26px;
  font-weight: 600;
  margin: 44px 0 18px;
  letter-spacing: -0.01em;
}
.back-link{
  font-size: 14px;
  color: var(--blue);
  display: inline-block;
  margin-bottom: 8px;
}

/* ===========================================================
   Contact page
   =========================================================== */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 760px){
  .contact-grid{ grid-template-columns: 1fr; }
}
.contact-info h2{
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 14px;
}
.contact-info p{
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.contact-info .info-row{
  border-top: 1px solid var(--hairline);
  padding: 16px 0;
}
.contact-info .info-row:last-child{ border-bottom: 1px solid var(--hairline); }
.contact-info .info-row dt{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.contact-info .info-row dd{
  margin: 0;
  font-size: 16px;
}
.contact-info .info-row dd a{ color: var(--blue); }

.field{
  margin-bottom: 20px;
}
.field label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.field input,
.field textarea{
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
  background: var(--white);
}
.field textarea{ resize: vertical; min-height: 140px; }

.form-note{
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 14px;
}
.submit-btn{
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* ===========================================================
   2x2 quadrant diagram (used in post-body)
   =========================================================== */
.quad-diagram{
  max-width: 640px;
  margin: 44px auto;
}
.quad-axis-label{
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.quad-axis-label.x{ margin: 12px 0 0; }
.quad-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}
.quad-cell{
  background: var(--white);
  padding: 28px 24px;
}
.quad-cell .quad-tag{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.quad-cell h3{
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.quad-cell .quad-desc{
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.quad-highlight{
  background: rgba(0,113,227,0.05);
  position: relative;
}
.quad-highlight::before{
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--blue);
  border-radius: inherit;
  pointer-events: none;
}
.quad-highlight h3{ color: var(--blue); }
@media (max-width: 600px){
  .quad-grid{ grid-template-columns: 1fr; }
}
