/* ==========================================================
   swayamchouksey.com
   Pure static site — vanilla CSS only.
   Theme: dark by default, light toggle (persisted via JS).
   ========================================================== */

/* ---- Theme tokens ---- */
:root {
  /* Dark theme (default) */
  --bg: #0A0A0A;
  --bg-alt: #111111;
  --bg-elev: #161616;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #E8E8E8;
  --text-muted: #A0A0A0;
  --text-soft: #767676;

  --accent: #4A90A4;
  --accent-soft: rgba(74, 144, 164, 0.14);
  --accent-strong: #6BB0C4;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-w: 1100px;
  --gutter: clamp(20px, 4vw, 40px);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #FAFAF8;
  --bg-alt: #F2F2EE;
  --bg-elev: #FFFFFF;
  --surface: rgba(0, 0, 0, 0.02);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.18);

  --text: #1A1A1A;
  --text-muted: #555555;
  --text-soft: #888888;

  --accent: #2F6F85;
  --accent-soft: rgba(47, 111, 133, 0.10);
  --accent-strong: #265B6E;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* ---- Reset / base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-strong);
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  z-index: 9999;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

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

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.nav--scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav__brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 4px;
  transition: border-color var(--transition), color var(--transition);
}

.nav__brand:hover .nav__brand-mark {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav__links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  position: relative;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.icon-sun,
.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun,
:root:not([data-theme="light"]) .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: block;
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }
}

/* ---- Hero ---- */
.hero {
  padding: clamp(60px, 12vh, 130px) 0 clamp(60px, 10vh, 100px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 0%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, var(--accent-soft) 0%, transparent 35%);
  opacity: 0.7;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

@media (max-width: 720px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 28px;
  }
}

.hero__media {
  display: flex;
  justify-content: center;
}

.hero__photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  position: relative;
  box-shadow: var(--shadow-md);
}

.hero__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-soft);
  pointer-events: none;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-alt), var(--bg-elev));
}

@media (max-width: 720px) {
  .hero__photo {
    width: 130px;
    height: 130px;
  }
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--text);
}

.hero__title {
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

.hero__title .dot {
  color: var(--accent);
  margin: 0 6px;
}

.hero__lede {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--text);
  max-width: 620px;
  margin: 0 0 28px;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--transition);
}

.hero__links a:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.hero__links svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* ---- Sections ---- */
.section {
  padding: clamp(70px, 11vh, 120px) 0;
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__header {
  margin-bottom: 48px;
  max-width: 760px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  color: var(--text);
}

.section__sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0;
  max-width: 60ch;
}

/* ---- Prose ---- */
.prose {
  max-width: 70ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.prose p {
  margin: 0 0 18px;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---- Grids ---- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--projects {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--certs {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.section--alt .card {
  background: var(--bg);
}

.card--soft {
  background: var(--bg-elev);
}

.card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--text);
}

.card__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* ---- Tags ---- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags li {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  background: var(--surface);
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

.card:hover .tags li,
.project:hover .tags li {
  border-color: var(--border-strong);
}

/* ---- Projects ---- */
.project {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.project:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.project:hover::before {
  height: 100%;
}

.project__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.project__num {
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.project__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}

.project__desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* ---- Subsection (within a section) ---- */
.subsection-divider {
  margin: 56px 0 28px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  max-width: 760px;
}

.subsection__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 8px 0 12px;
  color: var(--text);
}

/* Reference-architecture project variant */
.project--ref {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-alt));
  border-style: dashed;
  border-color: var(--border-strong);
}

.project__num--ref {
  color: var(--text-soft);
  letter-spacing: 0.08em;
}

.project--ref:hover::before {
  background: var(--accent);
}

/* ---- Cert meta (beyond the platform) ---- */
.cert-meta {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  max-width: 720px;
}

.cert-meta__label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}

.cert-meta__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-meta__list li {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---- Certifications ---- */
.cert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.cert:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.cert__badge {
  display: inline-block;
  width: 24px;
  height: 28px;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-strong));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  position: relative;
}

.cert__badge::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.cert__name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

/* ---- Meta list (community) ---- */
.meta-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.meta-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.meta-list strong {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

.meta-list span {
  font-size: 13.5px;
  color: var(--text-soft);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--accent-strong);
  margin-top: 6px;
  transition: gap var(--transition);
}

.link-arrow:hover {
  gap: 10px;
  color: var(--accent-strong);
}

/* ---- Contact ---- */
.section--contact {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.contact {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--text);
}

.contact__sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.btn-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.contact__links {
  justify-content: center;
  margin-top: 28px;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-soft);
}

.footer__loc {
  font-family: 'SF Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .footer__inner {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 720ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 720ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---- Print ---- */
@media print {
  :root {
    --bg: #ffffff;
    --bg-alt: #ffffff;
    --bg-elev: #ffffff;
    --text: #000000;
    --text-muted: #333333;
    --text-soft: #555555;
    --border: #cccccc;
    --border-strong: #888888;
    --accent: #2F6F85;
  }

  body {
    background: #fff;
    color: #000;
  }

  .nav,
  .theme-toggle,
  .skip-link,
  .hero::before {
    display: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .section,
  .hero {
    padding: 24px 0;
    page-break-inside: avoid;
  }

  .card,
  .project,
  .cert {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .hero__photo {
    width: 120px;
    height: 120px;
  }
}
