:root {
  --bg: #07101a;
  --surface: #0d1824;
  --surface-soft: #111f2d;
  --line: rgba(226, 235, 245, 0.14);
  --line-strong: rgba(235, 180, 91, 0.48);
  --text: #f3f7fb;
  --muted: #a8b6c6;
  --teal: #20d7c5;
  --gold: #eeb95e;
  --green: #59d68f;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(32, 215, 197, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 215, 197, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 70% 0%, rgba(238, 185, 94, 0.12), transparent 28rem),
    linear-gradient(180deg, #06101a 0%, #091522 52%, #07101a 100%);
  background-size: 48px 48px, 48px 48px, auto, auto;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.market-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 44px;
  border-bottom: 1px solid rgba(226, 235, 245, 0.08);
  background: linear-gradient(180deg, rgba(5, 13, 23, 0.97), rgba(5, 13, 23, 0.72));
  pointer-events: none;
}

.market-progress svg {
  display: block;
  width: 100%;
  height: 100%;
}

.market-base {
  fill: none;
  stroke: rgba(226, 235, 245, 0.08);
  stroke-width: 2;
}

.market-axis {
  stroke: rgba(32, 215, 197, 0.16);
  stroke-width: 1;
}

.market-line-bg {
  fill: none;
  stroke: rgba(238, 185, 94, 0.22);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.market-line {
  fill: none;
  stroke: url("#marketGradient");
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(32, 215, 197, 0.3));
}

.market-dot {
  fill: var(--gold);
  stroke: #fff8e8;
  stroke-width: 1.2;
  filter: drop-shadow(0 0 8px rgba(238, 185, 94, 0.42));
}

.currency-marker {
  position: fixed;
  top: 8px;
  z-index: 51;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(238, 185, 94, 0.48);
  border-radius: 50%;
  background: rgba(7, 16, 26, 0.94);
  color: rgba(243, 247, 251, 0.58);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.currency-marker.dollar { left: 34%; }
.currency-marker.rupee { left: 68%; }

.currency-marker.active {
  border-color: var(--gold);
  background: linear-gradient(180deg, #ffd37b, #e5a944);
  color: #14100a;
  box-shadow: 0 0 24px rgba(238, 185, 94, 0.42);
}

.site-header {
  position: sticky;
  top: 44px;
  z-index: 20;
  width: min(var(--max), calc(100% - 32px));
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(7, 16, 26, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.92rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--gold);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #d9e2ee;
  font-size: 0.9rem;
}

.nav-links a:hover { color: var(--gold); }

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.88rem;
}

.header-action {
  border-color: var(--gold);
  color: var(--gold);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.section-shell {
  margin-top: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 24, 36, 0.92), rgba(8, 18, 29, 0.9));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 34px;
  min-height: 660px;
  overflow: hidden;
}

.kicker {
  margin: 0 0 12px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
}

h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1.08;
}

h3 { margin: 0; line-height: 1.25; }

.hero-status {
  margin: 18px 0 12px;
  color: var(--gold);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
}

.hero-text,
.prose p,
.stack-list p,
.contact-section p,
.page-hero p,
.info-card p,
.timeline p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 720px;
  font-size: 1.06rem;
}

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.center-actions { justify-content: center; }

.button.primary {
  background: linear-gradient(180deg, #ffd37b, #e5a944);
  color: #14100a;
  border-color: transparent;
}

.button.secondary {
  color: var(--teal);
  border-color: rgba(32, 215, 197, 0.38);
  background: rgba(32, 215, 197, 0.05);
}

.button.quiet {
  color: #e9eef5;
  background: rgba(255, 255, 255, 0.025);
}

.hero-media {
  margin: 0;
  align-self: stretch;
  display: flex;
  align-items: end;
  justify-content: center;
  position: relative;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 14% 0 0;
  border: 1px solid rgba(238, 185, 94, 0.24);
  border-radius: 8px;
  background: url("images/home/chart-bg.webp") center / cover;
  opacity: 0.34;
}

.hero-media img {
  position: relative;
  width: min(420px, 100%);
  max-height: 610px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-strip {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.result-strip div {
  min-height: 94px;
  padding: 20px;
  background: rgba(10, 21, 33, 0.94);
}

.result-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-strip strong {
  display: block;
  margin-top: 7px;
  font-size: 1.26rem;
}

.result-strip div:first-child strong { color: var(--green); }

.split-section,
.media-section,
.contact-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 34px;
  align-items: start;
}

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

.section-heading {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.focus-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cert-preview { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.info-card,
.stack-list article,
.timeline article,
.gallery-grid figure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 28, 43, 0.78);
}

.info-card {
  padding: 22px;
  min-height: 178px;
}

.info-card span,
.timeline time {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--gold);
  font-weight: 900;
  font-size: 0.82rem;
}

.info-card h3 { font-size: 1.08rem; }
.info-card p { margin-bottom: 0; font-size: 0.93rem; }

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.timeline article { padding: 20px; }
.timeline h3 { font-size: 1rem; }
.timeline p { margin-bottom: 0; font-size: 0.9rem; }

.media-section {
  grid-template-columns: 0.72fr 1fr;
  align-items: center;
}

.media-section figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.media-section img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  object-position: center top;
}

.stack-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.stack-list article { padding: 18px; }
.stack-list p { margin-bottom: 0; }

.experience-accordion {
  gap: 14px;
}

.experience-item {
  overflow: hidden;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.experience-item.is-open {
  border-color: rgba(32, 215, 197, 0.52);
  background: linear-gradient(180deg, rgba(18, 38, 51, 0.92), rgba(13, 28, 43, 0.78));
  box-shadow: inset 0 1px 0 rgba(32, 215, 197, 0.22);
}

.experience-trigger {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.experience-trigger span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.experience-trigger time {
  flex: 0 0 auto;
  color: var(--gold);
  font-weight: 900;
  white-space: nowrap;
}

.experience-item p {
  display: none;
  padding: 2px 0 8px;
}

.experience-item:not(.is-open) p {
  display: none !important;
}

.experience-item.is-open p {
  display: block !important;
}

.skills-section {
  position: relative;
  overflow: hidden;
}

.skills-section::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 50%;
  width: min(560px, 72vw);
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 215, 197, 0.12), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.skills-section > * {
  position: relative;
}

.skills-section .section-heading {
  max-width: 960px;
}

.skill-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 24px;
}

.skill-tab {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.skill-tab:hover {
  border-color: rgba(32, 215, 197, 0.38);
  color: var(--text);
}

.skill-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #20d7c5, #eeb95e);
  color: #07101a;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #edf3fa;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.skill-pill.is-hidden {
  display: none !important;
}

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.contact-list a:hover { color: var(--gold); }

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 40px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.page-hero {
  text-align: center;
  max-width: var(--max);
}

.page-hero h1 {
  max-width: 840px;
  margin: 0 auto 16px;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
}

.page-hero p {
  max-width: 700px;
  margin: 0 auto;
}

.cert-page-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
}

.gallery-grid img {
  width: 100%;
  height: 310px;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 1040px) {
  .site-header { grid-template-columns: auto auto auto; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(7, 16, 26, 0.98);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 13px 12px; border-radius: 6px; }
  .nav-links a:hover { background: rgba(255, 255, 255, 0.04); }
  .menu-toggle { display: block; justify-self: end; }
  .header-action { display: none; }
  .hero,
  .split-section,
  .media-section,
  .contact-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-media { min-height: 460px; order: -1; }
  .result-strip { grid-template-columns: repeat(2, 1fr); }
  .focus-grid,
  .cert-preview,
  .timeline,
  .cert-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-preview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .market-progress { height: 36px; }
  .currency-marker {
    top: 6px;
    width: 24px;
    height: 24px;
    font-size: 0.82rem;
  }
  .currency-marker.dollar { left: 33%; }
  .currency-marker.rupee { left: 68%; }
  .site-header,
  main,
  .site-footer { width: min(100% - 22px, var(--max)); }
  .site-header { top: 36px; margin-top: 10px; }
  .brand span:last-child { display: none; }
  .section-shell { margin-top: 16px; padding: 20px; }
  .hero-media { min-height: 380px; }
  .hero-media img { max-height: 390px; }
  .hero-actions,
  .center-actions { flex-direction: column; }
  .button { width: 100%; }
  .result-strip,
  .focus-grid,
  .cert-preview,
  .timeline,
  .cert-page-grid,
  .gallery-grid { grid-template-columns: 1fr; }
  .result-strip div { min-height: auto; }
  .media-section img { height: 420px; }
  .media-section {
    gap: 22px;
  }
  .experience-trigger {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    color: var(--text) !important;
    background: transparent !important;
  }
  .experience-trigger time { white-space: normal; }
  .experience-item {
    padding: 16px;
  }
  .experience-item p {
    font-size: 0.98rem;
    line-height: 1.6;
    padding-top: 12px;
  }
  .skills-section .section-heading h2 {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }
  .skill-tabs {
    justify-content: center;
    gap: 8px;
  }
  .skill-tab {
    flex: 0 1 auto;
    min-height: 38px;
    padding: 0 12px;
    border-color: var(--line) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: var(--muted) !important;
    font-size: 0.88rem;
  }
  .skill-tab.is-active {
    border-color: transparent !important;
    background: linear-gradient(135deg, #20d7c5, #eeb95e) !important;
    color: #07101a !important;
  }
  .skills-grid {
    justify-content: center;
    gap: 8px;
  }
  .skill-pill {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: #edf3fa !important;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: center;
  }
  .gallery-preview {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }
  .gallery-preview img {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  .gallery-grid img { height: auto; max-height: 430px; }
}
