/* ==========================================================
   shreyjain203.github.io
   warm editorial, modern execution
   ========================================================== */

:root {
  --paper: #faf7f2;
  --paper-deep: #f1ebe1;
  --ink: #1b1713;
  --ink-soft: #59503f;
  --ink-faint: #968b78;
  --accent: #d35f0e;
  --accent-deep: #a84a09;
  --accent-soft: rgba(211, 95, 14, 0.09);
  --rule: rgba(27, 23, 19, 0.1);
  --card: #fffdf9;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 85% -5%, rgba(211, 95, 14, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(211, 95, 14, 0.05), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--paper); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

a { color: var(--accent); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--accent-deep); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; }

/* ---------- nav ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: rgba(250, 247, 242, 0.72);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
}
.site-name:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 6px;
  background: rgba(27, 23, 19, 0.05);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 5px;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 5px 16px;
  border-radius: 100px;
  transition: all 0.25s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 253, 249, 0.9); }
.nav-links a.active {
  color: #fff;
  background: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 88px 0 64px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 22px;
  background: var(--accent-soft);
  border: 1px solid rgba(211, 95, 14, 0.18);
  border-radius: 100px;
  padding: 6px 16px;
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.subline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.subline em { color: var(--accent); font-style: italic; }

.intro p { color: var(--ink-soft); margin-bottom: 1.1em; max-width: 54ch; }
.intro p:last-child { margin-bottom: 0; }
.intro strong { color: var(--ink); font-weight: 600; }

.hero-photo { position: relative; }

.hero-photo::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: radial-gradient(closest-side, rgba(211, 95, 14, 0.16), transparent);
  filter: blur(10px);
  z-index: 0;
}

.hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(27, 23, 19, 0.22);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.hero-photo img:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 40px 90px rgba(27, 23, 19, 0.28);
}

.photo-caption {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-faint);
}

/* ---------- stats ---------- */

.stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats > div {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 26px 24px 22px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.stats > div:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 95, 14, 0.35);
  box-shadow: 0 18px 40px rgba(27, 23, 19, 0.1);
}

.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 4px;
  line-height: 1.45;
}

/* ---------- sections ---------- */

section { padding: 84px 0 0; }

.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 28px;
}

/* currently */

.currently-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.current-item {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 30px 28px 28px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.current-item:hover {
  transform: translateY(-5px);
  border-color: rgba(211, 95, 14, 0.35);
  box-shadow: 0 22px 48px rgba(27, 23, 19, 0.1);
}

.current-item h3 { font-size: 1.3rem; margin-bottom: 10px; }
.current-item p { font-size: 0.94rem; color: var(--ink-soft); }
.current-item .where {
  display: inline-block;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent-soft);
  border-radius: 100px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

/* life */

.life {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
}

.life img {
  width: 100%;
  display: block;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(27, 23, 19, 0.18);
  transition: transform 0.6s var(--ease);
}
.life img:hover { transform: translateY(-6px) scale(1.012); }

.life-text h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: 20px; letter-spacing: -0.01em; }
.life-text p { color: var(--ink-soft); margin-bottom: 1.1em; }

/* photo strip */

.photo-strip {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.photo-strip::-webkit-scrollbar { display: none; }

.photo-strip figure {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.photo-strip img {
  height: 240px;
  width: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(27, 23, 19, 0.14);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.photo-strip img:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 22px 48px rgba(27, 23, 19, 0.2);
}

.photo-strip figcaption {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-faint);
  text-align: center;
}

@media (max-width: 560px) {
  .photo-strip img { height: 190px; }
}

/* contact */

.contact {
  margin-top: 96px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 360px at 90% -20%, rgba(211, 95, 14, 0.28), transparent 60%),
    #211c16;
  color: var(--paper);
  border-radius: 26px;
  padding: 64px 60px;
}

.contact h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 16px; letter-spacing: -0.01em; }
.contact p { color: #cfc4b0; max-width: 58ch; }
.contact a {
  color: #f5a86a;
  border-bottom: 1px solid rgba(245, 168, 106, 0.35);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.contact a:hover { color: #ffc794; border-bottom-color: #ffc794; }

/* ---------- inner pages ---------- */

.page-head { padding: 72px 0 16px; max-width: 740px; }
.page-head h1 { font-size: clamp(2.8rem, 6vw, 4rem); margin-bottom: 18px; letter-spacing: -0.03em; }
.page-head p { color: var(--ink-soft); font-size: 1.12rem; }

/* work */

.role {
  max-width: 740px;
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 38px 40px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.role:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 95, 14, 0.3);
  box-shadow: 0 22px 48px rgba(27, 23, 19, 0.09);
}

.role h2 { font-size: 1.8rem; letter-spacing: -0.01em; }
.role .title { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.05rem; margin: 4px 0 2px; }
.role .meta { font-size: 0.84rem; color: var(--ink-faint); margin-bottom: 16px; }
.role p { color: var(--ink-soft); }
.role p + p { margin-top: 1em; }

.education { max-width: 740px; margin-top: 72px; }
.edu-item { margin-bottom: 30px; }
.edu-item h3 { font-size: 1.25rem; }
.edu-item .meta { font-size: 0.84rem; color: var(--ink-faint); margin-bottom: 8px; }
.edu-item p { color: var(--ink-soft); font-size: 0.96rem; }

/* projects */

.project {
  max-width: 740px;
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 40px 42px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.project:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 95, 14, 0.3);
  box-shadow: 0 22px 48px rgba(27, 23, 19, 0.09);
}

.project h2 { font-size: 2rem; letter-spacing: -0.01em; }
.project .one-liner { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--accent); margin: 6px 0 18px; }
.project h3 {
  font-size: 0.76rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 24px 0 8px;
}
.project p { color: var(--ink-soft); }

.tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 5px 14px;
}

.project-link { display: inline-block; margin-top: 20px; font-weight: 600; font-size: 0.95rem; }
.project-link:hover { transform: translateX(2px); }

/* repo grid */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.repo-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 28px 26px 24px;
  color: inherit;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.repo-card:hover {
  transform: translateY(-5px);
  border-color: rgba(211, 95, 14, 0.35);
  box-shadow: 0 22px 48px rgba(27, 23, 19, 0.1);
  color: inherit;
}

.repo-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.repo-card p { font-size: 0.92rem; color: var(--ink-soft); }

.repo-lang {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

@media (max-width: 880px) {
  .repo-grid { grid-template-columns: 1fr; }
}

/* now */

.now-body { max-width: 680px; padding: 16px 0 0; }
.now-body p {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 1.2em;
}
.last-updated {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 32px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 5px 16px;
  background: var(--card);
}

/* uses */

.uses-section { max-width: 740px; padding: 44px 0 0; }
.uses-section h2 {
  font-size: 0.78rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 14px;
}

.uses-list {
  list-style: none;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 6px 24px;
}
.uses-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.uses-list li:last-child { border-bottom: none; }
.uses-list .tool { font-weight: 600; color: var(--ink); }
.uses-list .why { color: var(--ink-soft); }

/* ---------- footer ---------- */

footer {
  margin-top: 110px;
  border-top: 1px solid var(--rule);
  padding: 40px 0 52px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--ink-soft); font-weight: 500; }
.footer-links a:hover { color: var(--accent); }

/* ---------- motion ---------- */

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.fade-in.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 52px; padding-top: 48px; }
  .hero-photo { max-width: 420px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .currently-grid { grid-template-columns: 1fr; }
  .life { grid-template-columns: 1fr; gap: 44px; }
  .life img { max-width: 460px; }
  .contact { padding: 44px 30px; }
  .role, .project { padding: 30px 26px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-inner { padding: 14px 16px; }
  .nav-links a { padding: 5px 11px; font-size: 0.82rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .uses-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- blog ---------- */

.post-list { display: grid; gap: 18px; margin-bottom: 80px; }

.post-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 30px 32px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(27, 23, 19, 0.08);
}
.post-card h2 {
  font-size: 1.45rem;
  color: var(--ink);
  margin-top: 6px;
}
.post-card:hover h2 { color: var(--accent-deep); }

.post-date {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.back-link {
  display: inline-block;
  margin: 48px 0 36px;
  font-weight: 500;
  color: var(--ink-soft);
}
.back-link:hover { color: var(--accent); }

.post-body { max-width: 680px; margin: 0 auto 100px; }
.post-head { margin-bottom: 40px; }
.post-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}
.post-body h2 { font-size: 1.5rem; margin: 1.8em 0 0.6em; }
.post-body h3 { font-size: 1.2rem; margin: 1.5em 0 0.5em; }
.post-body p { color: var(--ink-soft); margin-bottom: 1.1em; }
.post-body ul, .post-body ol { color: var(--ink-soft); margin: 0 0 1.1em 1.3em; }
.post-body li { margin-bottom: 0.4em; }
.post-body img { max-width: 100%; border-radius: 14px; margin: 1.2em 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin: 1.4em 0;
  color: var(--ink-soft);
  font-style: italic;
}
.post-body pre {
  background: #1f1b16;
  color: #f0ebe2;
  border-radius: 14px;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 1.3em 0;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}
.post-body p code, .post-body li code {
  background: rgba(27, 23, 19, 0.06);
  border-radius: 5px;
  padding: 2px 6px;
}
