/* ============================================================
   Rishabh Shah - portfolio site
   Design concept: "The Notebook & The Circuit"
   Blueprint-paper grid meets schematic line-work; ink navy +
   a single signal-amber accent borrowed from his own device's
   alert LED. Flat, hairline-bordered cards - no soft shadows.
   ============================================================ */

:root {
  /* color */
  --ink: #101b2d;
  --ink-2: #17253c;
  --ink-3: #1f3050;
  --paper: #eef1f5;
  --paper-2: #e4e9f0;
  --white: #ffffff;
  --line: #c7d0e0;
  --line-dark: rgba(255, 255, 255, 0.14);
  --text: #101b2d;
  --text-soft: #55627a;
  --text-on-ink: #eef1f5;
  --text-on-ink-soft: #9aa7bf;
  --accent: #dd8b12;
  --accent-ink: #7a4c06;
  --teal: #2e6b5e;

  /* type */
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* layout */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0;
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

/* blur lives on a pseudo-element, not the header itself, so the header
   never becomes a containing block for the fixed mobile nav (a plain
   backdrop-filter on .site-header would break .nav's fixed positioning) */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(238, 241, 245, 0.92);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.nav a:not(.btn) {
  font-size: 0.95rem;
  color: var(--text-soft);
  position: relative;
  padding: 6px 0;
}

.nav a:not(.btn):hover,
.nav a.is-active {
  color: var(--text);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary:hover {
  background: #c67c0f;
}

.btn-ghost-light {
  border-color: var(--line-dark);
  color: var(--text-on-ink);
}

.btn-ghost-light:hover {
  border-color: var(--text-on-ink);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost-dark {
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost-dark:hover {
  border-color: var(--text);
  background: rgba(16, 27, 45, 0.04);
}

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

.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-ink);
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  background-image: url("../img/hero-banner.jpg");
  background-size: cover;
  background-position: 25% 32%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 22%);
  mask-image: linear-gradient(90deg, transparent 0%, black 22%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(10, 17, 30, 0.5) 0%,
    rgba(10, 17, 30, 0) 20%
  );
  pointer-events: none;
}

.hero .container {
  position: relative;
  padding-top: clamp(48px, 6vw, 76px);
  padding-bottom: clamp(48px, 6vw, 76px);
}

.hero-copy {
  max-width: 580px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  color: var(--white);
  max-width: 17ch;
  font-weight: 650;
}

.hero-copy .lede {
  margin-top: 20px;
  font-size: 1.08rem;
  color: var(--text-on-ink-soft);
  max-width: 46ch;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 34px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-on-ink-soft);
  padding: 0;
}

.hero-meta li {
  list-style: none;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

/* ---------------- stat strip ---------------- */

.stat-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.stat-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 30px;
  padding-bottom: 30px;
}

.stat {
  padding: 0 20px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  padding-left: 0;
  border-left: none;
}

.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--ink);
}

.stat .label {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

/* ---------------- section basics ---------------- */

section {
  padding: clamp(64px, 9vw, 108px) 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.section-head .index {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.section-link {
  font-size: 0.92rem;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}

.section-link:hover {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

/* ---------------- about ---------------- */

.about-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
}

.about-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-soft);
}

.about-quote {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink);
}

.about-body p {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 60ch;
}

.about-body p + p {
  margin-top: 16px;
}

.about-body .section-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--text);
}

/* ---------------- pillars ---------------- */

.pillars {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid var(--line);
}

.pillar {
  padding: 30px 26px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.pillar .tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--teal);
}

.pillar h3 {
  margin-top: 14px;
  font-size: 1.12rem;
}

.pillar p {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* ---------------- featured work ---------------- */

.work-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 40px);
}

.work-feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.work-feature-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.work-feature-imgs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.work-feature-body {
  padding: 26px 28px 30px;
}

.work-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
}

.work-feature-body h3 {
  margin-top: 10px;
  font-size: 1.35rem;
}

.work-feature-body p {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.98rem;
  max-width: 56ch;
}

.work-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-tags span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 9px;
}

.work-side {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 24px 26px;
  flex: 1;
}

.work-card .work-kicker {
  margin-bottom: 10px;
  display: block;
}

.work-card h3 {
  font-size: 1.12rem;
}

.work-card p {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* ---------------- recognition ---------------- */

.recognition {
  background: var(--ink);
  color: var(--text-on-ink);
}

.recognition .section-head {
  border-bottom-color: var(--line-dark);
}

.recognition .section-head .index {
  color: var(--text-on-ink-soft);
}

.badge-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.badge {
  background: var(--ink);
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.badge:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.badge:last-child:nth-child(odd) p {
  max-width: 60ch;
}

.badge .mark {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  padding-top: 2px;
}

.badge h4 {
  font-size: 1rem;
  color: var(--text-on-ink);
}

.badge p {
  margin-top: 5px;
  font-size: 0.86rem;
  color: var(--text-on-ink-soft);
}

/* ---------------- podcast ---------------- */

.podcast .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
  background: var(--white);
}

.podcast-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--teal);
}

.podcast h2 {
  margin-top: 10px;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.podcast p {
  margin-top: 12px;
  color: var(--text-soft);
  max-width: 56ch;
}

/* ---------------- contact cta ---------------- */

.contact-cta {
  background: var(--ink);
  color: var(--text-on-ink);
  border-top: 1px solid var(--line-dark);
}

.contact-cta .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: end;
}

.contact-cta h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--white);
  max-width: 14ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 1rem;
}

.contact-links a {
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 12px;
}

.contact-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

.site-footer {
  background: var(--ink);
  color: var(--text-on-ink-soft);
  border-top: 1px solid var(--line-dark);
  padding: 26px 0 34px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a:hover {
  color: var(--text-on-ink);
}

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

@media (max-width: 980px) {
  .hero-photo {
    width: 78%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 40%);
    mask-image: linear-gradient(90deg, transparent 0%, black 40%);
    background-position: 30% 30%;
  }

  .hero .container {
    position: relative;
  }

  .hero .container::before {
    content: "";
    position: absolute;
    inset: -48px -20px;
    background: linear-gradient(
      180deg,
      rgba(10, 17, 30, 0.2) 0%,
      rgba(10, 17, 30, 0.72) 22%,
      rgba(10, 17, 30, 0.88) 55%,
      rgba(10, 17, 30, 0.72) 88%,
      rgba(10, 17, 30, 0.2) 100%
    );
    z-index: 0;
  }

  .hero-copy {
    position: relative;
    z-index: 1;
  }

  .about-layout,
  .work-grid,
  .contact-cta .container {
    grid-template-columns: 1fr;
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-strip .container {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }

  .stat:nth-child(3) {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px var(--gutter);
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav a.btn {
    width: 100%;
    justify-content: center;
  }

  .badge-list {
    grid-template-columns: 1fr;
  }

  .work-feature-imgs {
    grid-template-columns: 1fr;
  }

  .podcast .container {
    grid-template-columns: 1fr;
  }
}

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

  .stat-strip .container {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------- page hero (sub-pages) ---------------- */

.page-hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-ink);
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}

.page-hero .hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  padding-top: clamp(56px, 8vw, 92px);
  padding-bottom: clamp(48px, 7vw, 80px);
}

.page-hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 18px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  color: var(--white);
  max-width: 18ch;
  font-weight: 650;
}

.page-hero .lede {
  margin-top: 20px;
  font-size: 1.06rem;
  color: var(--text-on-ink-soft);
  max-width: 60ch;
  line-height: 1.65;
}

.page-hero-meta {
  margin-top: 34px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-on-ink-soft);
  padding: 0;
}

.page-hero-meta li {
  list-style: none;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

/* ---------------- narrative / story ---------------- */

.narrative p {
  font-size: 1.06rem;
  color: var(--text-soft);
  line-height: 1.75;
  max-width: 720px;
}

.narrative p + p {
  margin-top: 18px;
}

.story {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal);
}

.story blockquote {
  margin: 18px 0 0;
  padding-left: 24px;
  max-width: 720px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 600;
}

.story p.story-body {
  margin-top: 22px;
  font-size: 1.02rem;
  color: var(--text-soft);
  line-height: 1.75;
  max-width: 720px;
}

/* ---------------- gallery ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(140px, 20vw, 240px);
  gap: 6px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 2px;
  background: var(--ink-2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item.feature {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(120px, 34vw, 200px);
  }

  .gallery-item.feature {
    grid-column: span 2;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }
}

/* ---------------- report cards ---------------- */

.report-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: clamp(24px, 4vw, 36px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.report-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
}

.report-card h3 {
  margin-top: 10px;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  max-width: 42ch;
}

.report-card p {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.98rem;
  max-width: 62ch;
  line-height: 1.65;
}

.report-facts {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-facts span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 9px;
}

.report-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .report-card {
    grid-template-columns: 1fr;
  }

  .report-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ---------------- certificates ---------------- */

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

.cert-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  display: block;
}

.cert-thumb {
  height: 210px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.cert-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.cert-body {
  padding: 16px 18px 20px;
}

.cert-body h4 {
  font-size: 0.96rem;
  line-height: 1.35;
}

.cert-body p {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
}

@media (max-width: 980px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .cert-thumb {
    height: 160px;
  }
}

