/* ============================================================
   SHAUNAK KARYEKAR — Portfolio 2026
   Aesthetic: Editorial / Refined Typographic
   Palette: Parchment & Ink — warm off-white, deep ink, serif-led
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --mid: #4a4a4a;
  --quiet: #767676;
  --hairline: #d8d8d8;
  --paper: #fafaf7;
  --paper-pure: #ffffff;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-weight: 400;
  font-size: 16px;
  overflow-x: hidden;
  cursor: none;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s var(--ease-out), opacity 0.2s ease;
  will-change: transform;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid rgba(10,10,10,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out), width 0.25s var(--ease-out), height 0.25s var(--ease-out), opacity 0.2s ease;
  will-change: transform;
}

.cursor-ring.hovering {
  width: 52px;
  height: 52px;
  border-color: rgba(10,10,10,0.18);
}

/* ============================================================
   PAPER GRAIN TEXTURE
   ============================================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.032) 1px, transparent 0);
  background-size: 22px 22px;
  z-index: 0;
  opacity: 0.65;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 80px 56px 96px;
}

/* ============================================================
   TOP NAV
   ============================================================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 56px;
  animation: fadeDown 0.6s var(--ease-out) both;
}

.mark {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
}

.topnav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topnav a {
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.topnav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { transform: scaleX(1); }

/* ============================================================
   HERO
   ============================================================ */
.hero { margin-bottom: 88px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: rise 0.7s var(--ease-out) 0.05s both;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--ink);
  display: inline-block;
  flex-shrink: 0;
}

.display-name {
  font-family: var(--serif);
  font-size: clamp(56px, 8.5vw, 104px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  font-variation-settings: "opsz" 144;
  animation: rise 0.7s var(--ease-out) 0.15s both;
}

.display-name .italic {
  font-style: italic;
  font-weight: 300;
}

.tagline {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 300;
  font-style: italic;
  color: var(--mid);
  max-width: 620px;
  line-height: 1.35;
  margin-bottom: 40px;
  font-variation-settings: "opsz" 36;
  animation: rise 0.7s var(--ease-out) 0.3s both;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  animation: rise 0.7s var(--ease-out) 0.45s both;
}

.meta-row a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.meta-row a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ============================================================
   SECTION STRUCTURE
   ============================================================ */
section { margin-bottom: 88px; }

.section-head {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 32px;
  margin-bottom: 36px;
  align-items: baseline;
}

.section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--quiet);
  padding-top: 10px;
  border-top: 1px solid var(--ink);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}

.section-title .italic {
  font-style: italic;
  font-weight: 300;
}

/* ============================================================
   SUMMARY
   ============================================================ */
.summary {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 760px;
  margin-left: 122px;
  font-variation-settings: "opsz" 36;
}

.summary strong {
  font-weight: 500;
  color: var(--ink);
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.roles {
  margin-left: 122px;
  max-width: 760px;
}

.role {
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  transition: background 0.2s ease;
}

.role:last-child { border-bottom: 1px solid var(--hairline); }

.role-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.role-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}

.role-dates {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--quiet);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.role-org {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.role-org .place {
  color: var(--quiet);
  font-weight: 400;
}

.role-bullets {
  list-style: none;
  padding: 0;
}

.role-bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.role-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 1px;
  background: var(--ink);
}

.role-bullets li:last-child { margin-bottom: 0; }

/* ============================================================
   PROJECT
   ============================================================ */
.project {
  margin-left: 122px;
  max-width: 760px;
  border: 1px solid var(--ink);
  background: var(--paper-pure);
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.project:hover {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-3px, -3px);
}

.project::before {
  content: "FEATURED";
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--paper);
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--quiet);
  z-index: 2;
}

.project-inner {
  padding: 36px 40px;
}

.project-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}

.project-stack {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--quiet);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.project-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.project-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-links a span {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}

.project-links a:hover span { transform: translateX(4px); }
.project-links a:hover { opacity: 0.6; }

/* Decorative dot grid */
.project-deco {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--hairline);
  background: var(--paper);
  flex-shrink: 0;
}

.deco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px;
}

.deco-grid span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hairline);
  display: block;
  transition: background 0.3s ease;
}

.project:hover .deco-grid span {
  background: var(--ink);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
  margin-left: 122px;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 56px;
}

.skill-group h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}

.skill-group p {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 36;
}

/* ============================================================
   EDUCATION
   ============================================================ */
.edu {
  margin-left: 122px;
  max-width: 760px;
}

.edu-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.edu-degree {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  font-variation-settings: "opsz" 36;
}

.edu-school {
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 12px;
}

.edu-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--quiet);
  letter-spacing: 0.05em;
}

.edu-bullets {
  list-style: none;
  margin-top: 4px;
}

.edu-bullets li {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 4px;
  padding-left: 16px;
  position: relative;
  line-height: 1.55;
}

.edu-bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 18px;
  color: var(--ink);
}

.year-large {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--mid);
  font-style: italic;
  line-height: 1;
  font-variation-settings: "opsz" 72;
  white-space: nowrap;
}

/* ============================================================
   LEADERSHIP
   ============================================================ */
.lead {
  margin-left: 122px;
  max-width: 760px;
}

.lead-block {
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.lead-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36;
}

.lead-org {
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 16px;
}

.lead-text {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 640px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: 96px;
  padding-top: 48px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

.footer-left {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}

.footer-left .italic {
  font-style: italic;
  font-weight: 300;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: right;
}

.footer-right .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--quiet);
}

.footer-right a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
  display: inline-block;
}

.footer-right a:hover { opacity: 0.5; }

.legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--quiet);
  text-transform: uppercase;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-child.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-child:nth-child(1) { transition-delay: 0.05s; }
.reveal-child:nth-child(2) { transition-delay: 0.15s; }
.reveal-child:nth-child(3) { transition-delay: 0.25s; }
.reveal-child:nth-child(4) { transition-delay: 0.35s; }

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--ink);
  z-index: 9997;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================================
   SECTION HOVER ACCENT LINE
   ============================================================ */
.section-num {
  position: relative;
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }

  .container { padding: 48px 24px 64px; }

  .topbar {
    padding-bottom: 32px;
    margin-bottom: 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .topnav { gap: 18px; flex-wrap: wrap; }

  .hero { margin-bottom: 64px; }

  .section-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-num {
    border-top: none;
    padding-top: 0;
  }

  .summary,
  .roles,
  .project,
  .skills,
  .edu,
  .lead {
    margin-left: 0;
  }

  .skills { grid-template-columns: 1fr; gap: 28px; }

  .project {
    grid-template-columns: 1fr;
  }

  .project-inner { padding: 28px 24px; }

  .project-deco { display: none; }

  footer {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-right { text-align: left; }

  .legal {
    flex-direction: column;
    gap: 8px;
  }

  .role-top {
    flex-direction: column;
    gap: 4px;
  }

  .edu-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .year-large {
    font-size: 28px;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body::before { display: none; }
  .cursor-dot, .cursor-ring, .progress-bar { display: none; }
  .topbar, footer, .legal { display: none; }
  .container { padding: 0; max-width: 100%; }
  .hero { margin-bottom: 24px; page-break-after: avoid; }
  section { margin-bottom: 24px; page-break-inside: avoid; }
  body { font-size: 11pt; background: white; color: black; cursor: auto; }
  .display-name { font-size: 36pt; }
  .reveal, .reveal-child { opacity: 1; transform: none; }
}