/* ------------------------------------------------------------------
   shivamsharma.co — stylesheet
   Type: Instrument Serif (display) / Archivo (text)
   ------------------------------------------------------------------ */

:root {
  --paper: #f0efec;
  --ink: #1a1918;
  --ink-soft: #55524b;
  --line: #d8d6d0;
  --accent: #B8E0D2;
  --grey-card: #dddbd5;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

section:focus,
section:focus-visible,
article:focus,
article:focus-visible {
  outline: none;
}

/* Accessibility helpers ------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 3px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Masthead ---------------------------------------------------------- */

.masthead {
  padding: clamp(1rem, 3vw, 2.5rem) var(--gutter) 0;
  text-align: center;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.4rem, 13.5vw, 13.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.site-nav {
  margin-top: clamp(0.75rem, 2vw, 1.75rem);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.1rem;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.site-nav .nav-cta {
  background: var(--accent);
  padding: 0.45rem 0.9rem;
  border-radius: 3px;
}

.site-nav .nav-cta:hover {
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
}

/* Buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
}

.btn-dark:hover {
  background: #000;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

.btn-accent:hover {
  background: #9dccb9;
}

/* Hero -------------------------------------------------------------- */

.hero {
  padding: clamp(5rem, 12vw, 11rem) var(--gutter) clamp(4rem, 9vw, 8rem);
  text-align: center;
  max-width: 68rem;
  margin: 0 auto;
}

.kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.hero-statement {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-statement em,
.vision-statement em,
.about-statement em,
.contact h2 em {
  font-style: italic;
}

.hero-sub {
  max-width: 34rem;
  margin: 1.75rem auto 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero-actions,
.contact-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Vision ------------------------------------------------------------ */

.vision {
  border-top: 1px solid var(--line);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  text-align: center;
}

.vision-statement {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 56rem;
  margin: 0 auto;
}

.vision-note {
  max-width: 36rem;
  margin: 2rem auto 0;
  color: var(--ink-soft);
}

/* Section headers ---------------------------------------------------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-head h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e0492e;
  display: inline-block;
  flex: none;
}

/* Work index --------------------------------------------------------- */

.work {
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
  max-width: 80rem;
  margin: 0 auto;
}

.work-index {
  list-style: none;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.work-index li {
  border-bottom: 1px solid var(--line);
}

.work-index a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 4.6rem);
  line-height: 1.25;
  padding: 0.35em 0.1em;
  color: #6d6a62;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.work-index a:hover,
.work-index a:focus-visible {
  color: var(--ink);
  padding-left: 0.35em;
}

.index-tag {
  font-family: var(--font-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  flex: none;
}

/* Case studies -------------------------------------------------------- */

.case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.case + .case {
  border-top: 1px solid var(--line);
}

.case-flip .case-text {
  order: 2;
}

.case-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.case h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

.case-text p:last-child {
  color: var(--ink-soft);
  max-width: 32rem;
}

.stats-label {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.6rem;
}

.stat-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0.75rem;
}

.stat {
  border-radius: 4px;
  padding: 1.1rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 9.5rem;
}

.stat-accent {
  background: var(--accent);
}

.stat-grey {
  background: var(--grey-card);
}

.stat-caption {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.stat-figure {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-figure-small {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

/* Skills --------------------------------------------------------------- */

.skills {
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
  max-width: 80rem;
  margin: 0 auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
  background: #fbfaf8;
}

.skill-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  min-height: 3.7rem;
}

.skill-card ul {
  list-style: none;
}

.skill-card li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* About ----------------------------------------------------------------- */

.about {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  text-align: center;
}

.about-statement {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 3.1rem);
  line-height: 1.2;
  max-width: 52rem;
  margin: 0 auto;
}

/* Contact ---------------------------------------------------------------- */

.contact {
  padding: clamp(5rem, 11vw, 10rem) var(--gutter);
  text-align: center;
}

.contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 50rem;
  margin: 0 auto;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Reveal animation (JS adds .is-visible; static without JS) ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 800px) {
  .case,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .case-flip .case-text {
    order: 0;
  }

  .skill-card h3 {
    min-height: 0;
  }

  .work-index a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Side nav (dots, hover-reveal labels) ------------------------------------ */

#side-nav {
  position: fixed;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#side-nav.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

#side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.3rem;
  text-decoration: none;
}

#side-nav .dot-mark {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

#side-nav a:hover .dot-mark {
  background: var(--ink-soft);
  transform: scale(1.4);
}

#side-nav a.is-active .dot-mark {
  background: var(--ink);
  transform: scale(1.6);
}

#side-nav .side-label {
  position: absolute;
  left: 100%;
  margin-left: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

#side-nav a:hover .side-label {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 900px) {
  #side-nav {
    display: none;
  }
}
