/* Vighnesh Teaches: portfolio-aligned, namespaced styles. */
:root {
  --teaches-bg: var(--paper, #f7fbff);
  --teaches-bg-blue: var(--paper-blue, #eef8ff);
  --teaches-surface: var(--white, #ffffff);
  --teaches-text: var(--ink, #092a4a);
  --teaches-heading: var(--navy, #071f38);
  --teaches-muted: var(--muted, #526779);
  --teaches-accent: var(--cobalt, #0067d9);
  --teaches-accent-strong: var(--cobalt-deep, #004fae);
  --teaches-cyan: var(--cyan, #22d3ee);
  --teaches-teal: var(--teal, #0e9f8a);
  --teaches-border: var(--line, #cde7f4);
  --teaches-border-strong: var(--line-strong, #a9d4e9);
  --teaches-shadow: var(--shadow, 0 22px 60px rgba(9, 42, 74, .09));
  --teaches-radius-lg: 20px;
  --teaches-radius-md: 15px;
  --teaches-max: 1200px;
  --teaches-focus: 0 0 0 3px rgba(34, 211, 238, .42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.teaches-page {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--teaches-text);
  background:
    radial-gradient(circle at 82% 3%, rgba(34, 211, 238, .09), transparent 27rem),
    linear-gradient(180deg, #fbfdff 0%, var(--teaches-bg) 35%, #fff 100%);
  font-family: var(--font-geist-sans), Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
}

.teaches-page img { max-width: 100%; }
.teaches-page a { color: inherit; text-decoration: none; }
.teaches-page button,
.teaches-page a { -webkit-tap-highlight-color: transparent; }
.teaches-page :focus-visible { outline: none; box-shadow: var(--teaches-focus); border-radius: 8px; }
.teaches-shell { width: min(var(--teaches-max), calc(100% - 80px)); margin-inline: auto; }

.teaches-skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--teaches-heading);
  color: white;
}
.teaches-skip-link:focus { top: 14px; }

.teaches-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 100;
}
.teaches-header__inner {
  position: relative;
  width: min(1360px, calc(100% - 80px));
  min-height: 92px;
  border-bottom: 1px solid rgba(169, 212, 233, .72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.teaches-brand { display: inline-flex; align-items: center; text-decoration: none; }
.teaches-brand__mark {
  width: auto;
  height: auto;
  color: var(--teaches-accent);
  background: transparent;
  font-size: 2.35rem;
  font-weight: 850;
  letter-spacing: -.1em;
  line-height: 1;
}
.teaches-brand__text { display: none; }
.teaches-nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.teaches-nav a {
  position: relative;
  padding: 13px 0;
  color: var(--teaches-text);
  font-size: .88rem;
  font-weight: 650;
}
.teaches-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teaches-accent), var(--teaches-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.teaches-nav a:hover::after,
.teaches-nav a:focus-visible::after,
.teaches-nav a[aria-current="page"]::after { transform: scaleX(1); }
.teaches-nav a[aria-current="page"] { color: var(--teaches-accent-strong); }
.teaches-menu-button {
  display: none;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--teaches-border-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  color: var(--teaches-text);
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
}

.teaches-main { display: block; }
.teaches-hero {
  position: relative;
  padding: clamp(154px, 15vw, 188px) 0 clamp(76px, 9vw, 116px);
  overflow: hidden;
}
.teaches-hero::before {
  content: "";
  position: absolute;
  inset: 92px 0 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 103, 217, .038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 103, 217, .038) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 92%);
}
.teaches-hero::after {
  content: "";
  position: absolute;
  top: 75px;
  right: -180px;
  z-index: 0;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(34, 211, 238, .025), 0 0 0 92px rgba(0, 103, 217, .018);
}
.teaches-hero > .teaches-shell { position: relative; z-index: 1; }
.teaches-hero--resource { padding-bottom: clamp(64px, 8vw, 96px); }
.teaches-eyebrow,
.teaches-section__kicker {
  color: var(--teaches-accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.teaches-eyebrow { margin: 0 0 18px; }
.teaches-display {
  max-width: 1020px;
  margin: 0;
  color: var(--teaches-heading);
  font-size: clamp(3.2rem, 6.1vw, 5.9rem);
  font-weight: 820;
  line-height: .98;
  letter-spacing: -.062em;
}
.teaches-display--resource { max-width: 1050px; font-size: clamp(3rem, 5.6vw, 5.35rem); }
.teaches-lead {
  max-width: 840px;
  margin: 28px 0 0;
  color: var(--teaches-muted);
  font-size: 1.04rem;
  line-height: 1.75;
}
.teaches-lead + .teaches-lead { margin-top: 14px; font-size: .98rem; }
.teaches-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.teaches-button {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.teaches-button:hover { transform: translateY(-2px); }
.teaches-button--primary {
  background: linear-gradient(135deg, var(--teaches-accent), #168fff);
  color: white;
  box-shadow: 0 12px 28px rgba(0, 103, 217, .22);
}
.teaches-button--primary:hover {
  background: linear-gradient(135deg, var(--teaches-accent-strong), var(--teaches-accent));
  box-shadow: 0 17px 34px rgba(0, 103, 217, .28);
}
.teaches-button--secondary,
.teaches-button--soft {
  border-color: #7ebce2;
  background: rgba(255, 255, 255, .84);
  color: var(--teaches-accent-strong);
}
.teaches-button--secondary:hover,
.teaches-button--soft:hover { border-color: var(--teaches-accent); background: var(--teaches-bg-blue); }
.teaches-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.teaches-chip {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid var(--teaches-border);
  border-radius: 999px;
  background: var(--teaches-bg);
  color: var(--teaches-accent-strong);
  font-size: .7rem;
  font-weight: 680;
}

.teaches-section { padding: 108px 0; border-top: 1px solid var(--teaches-border); }
.teaches-section--compact { padding-block: 78px; }
.teaches-section__head {
  display: grid;
  grid-template-columns: .48fr 2.52fr;
  gap: 42px;
  align-items: start;
  margin-bottom: 54px;
}
.teaches-section h2 {
  max-width: 900px;
  margin: 0;
  color: var(--teaches-heading);
  font-size: clamp(2.5rem, 4.2vw, 4.55rem);
  font-weight: 790;
  line-height: 1.02;
  letter-spacing: -.06em;
}
.teaches-section h3 { margin: 0; color: var(--teaches-heading); font-size: 1.22rem; line-height: 1.35; letter-spacing: -.025em; }
.teaches-section p { color: var(--teaches-muted); }

.teaches-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.teaches-tab {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--teaches-border-strong);
  border-radius: 10px;
  background: white;
  color: var(--teaches-muted);
  font: inherit;
  font-size: .78rem;
  font-weight: 740;
  cursor: pointer;
}
.teaches-tab[aria-selected="true"] {
  border-color: var(--teaches-accent);
  background: var(--teaches-bg-blue);
  color: var(--teaches-accent-strong);
}
.teaches-tab-panel[hidden] { display: none; }
.teaches-tab-panel:not([hidden]) { display: grid; gap: 20px; }
.teaches-empty {
  max-width: 650px;
  padding: 28px;
  border: 1px dashed var(--teaches-border-strong);
  border-radius: var(--teaches-radius-md);
  background: rgba(255, 255, 255, .7);
}

.teaches-resource-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .84fr) minmax(360px, 1.16fr);
  overflow: hidden;
  border: 1px solid var(--teaches-border);
  border-radius: 22px;
  background: white;
  box-shadow: 0 18px 50px rgba(9, 42, 74, .07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.teaches-resource-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--teaches-accent), var(--teaches-cyan), var(--teaches-teal));
  opacity: .8;
}
.teaches-resource-card:hover { transform: translateY(-4px); border-color: var(--teaches-border-strong); box-shadow: 0 22px 50px rgba(9, 42, 74, .09); }
.teaches-resource-card__image { min-height: 470px; padding: 24px; background: var(--teaches-bg-blue); display: grid; place-items: center; }
.teaches-resource-card__image img { width: 100%; height: 100%; max-height: 590px; object-fit: contain; display: block; }
.teaches-resource-card__body { padding: clamp(30px, 5vw, 62px); display: flex; flex-direction: column; justify-content: center; }
.teaches-resource-type {
  margin-bottom: 15px;
  color: var(--teaches-teal);
  font-family: var(--font-geist-mono), monospace;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.teaches-resource-card h2,
.teaches-resource-card h3 {
  margin: 0;
  color: var(--teaches-heading);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: -.05em;
}
.teaches-resource-card p { margin: 18px 0 0; color: var(--teaches-muted); font-size: .94rem; line-height: 1.75; }
.teaches-resource-card .teaches-resource-card__subtitle { margin-top: 10px; color: var(--teaches-heading); font-weight: 720; }
.teaches-resource-card__footer { margin-top: 26px; }
.teaches-updated { margin-top: 15px; color: var(--teaches-muted); font-size: .78rem; }

.teaches-topic-list { counter-reset: topic; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.teaches-topic-list li {
  counter-increment: topic;
  min-height: 92px;
  padding: 20px;
  border: 1px solid var(--teaches-border);
  border-radius: var(--teaches-radius-md);
  background: rgba(255, 255, 255, .9);
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--teaches-muted);
}
.teaches-topic-list li::before {
  content: counter(topic, decimal-leading-zero);
  width: 42px;
  height: 42px;
  border: 1px solid var(--teaches-border-strong);
  border-radius: 10px;
  background: var(--teaches-bg-blue);
  color: var(--teaches-accent);
  display: grid;
  place-items: center;
  font-family: var(--font-geist-mono), monospace;
  font-size: .7rem;
  font-weight: 760;
}

.teaches-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.teaches-gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--teaches-border);
  border-radius: var(--teaches-radius-lg);
  background: white;
  box-shadow: 0 15px 42px rgba(9, 42, 74, .055);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.teaches-gallery-card:hover { transform: translateY(-3px); border-color: var(--teaches-border-strong); box-shadow: 0 21px 48px rgba(9, 42, 74, .08); }
.teaches-gallery-card:first-child { grid-column: 1 / -1; }
.teaches-gallery-card__preview { width: 100%; display: block; padding: 0; border: 0; background: var(--teaches-bg-blue); cursor: zoom-in; }
.teaches-gallery-card__preview img { display: block; width: 100%; height: auto; object-fit: contain; }
.teaches-gallery-card:first-child .teaches-gallery-card__preview img { max-height: 840px; object-fit: contain; }
.teaches-gallery-card__body { min-height: 82px; padding: 18px; border-top: 1px solid var(--teaches-border); display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.teaches-gallery-card__label { min-width: 0; }
.teaches-gallery-card__page { color: var(--teaches-teal); font-family: var(--font-geist-mono), monospace; font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.teaches-gallery-card__title { margin-top: 4px; color: var(--teaches-heading); font-size: .95rem; font-weight: 760; line-height: 1.35; }
.teaches-download-link { flex: 0 0 auto; color: var(--teaches-accent); font-size: .76rem; font-weight: 760; }
.teaches-download-link:hover { color: var(--teaches-accent-strong); text-decoration: underline; text-underline-offset: 3px; }

.teaches-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.teaches-info-card {
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--teaches-border);
  border-radius: var(--teaches-radius-lg);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 15px 42px rgba(9, 42, 74, .05);
}
.teaches-info-card p { margin-bottom: 0; line-height: 1.72; }
.teaches-disclaimer { padding: 26px; border-left: 4px solid var(--teaches-teal); border-radius: 0 var(--teaches-radius-md) var(--teaches-radius-md) 0; background: var(--teal-pale, #e4f8f4); }
.teaches-disclaimer p { margin-bottom: 0; }
.teaches-version { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.teaches-version dl { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 0; }
.teaches-version dl div { display: grid; gap: 3px; }
.teaches-version dt { color: var(--teaches-muted); font-size: .7rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.teaches-version dd { margin: 0; color: var(--teaches-heading); font-weight: 760; }

.teaches-dialog { width: min(96vw, 1320px); max-height: 94vh; padding: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; background: #071f38; color: white; box-shadow: 0 30px 100px rgba(0, 0, 0, .45); }
.teaches-dialog::backdrop { background: rgba(4, 18, 34, .86); backdrop-filter: blur(6px); }
.teaches-dialog__toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.teaches-dialog__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 760; }
.teaches-dialog__controls { display: flex; gap: 8px; }
.teaches-dialog button,
.teaches-dialog a { min-width: 42px; min-height: 42px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 10px; background: transparent; color: white; font: inherit; font-weight: 750; display: inline-grid; place-items: center; cursor: pointer; }
.teaches-dialog__canvas { overflow: auto; max-height: calc(94vh - 72px); padding: 18px; text-align: center; }
.teaches-dialog__canvas img { display: block; max-width: none; width: auto; height: auto; margin: 0 auto; background: white; }

.teaches-footer { min-height: 126px; padding: 28px 44px; background: #06192d; color: #a9c1d3; display: flex; align-items: center; }
.teaches-footer__inner { width: 100%; max-width: 1360px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.teaches-footer a { color: #68dbe9; font-size: .78rem; font-weight: 750; }
.teaches-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1120px) {
  .teaches-header__inner { width: min(100% - 56px, 940px); }
  .teaches-section__head { grid-template-columns: 1fr; gap: 17px; }
  .teaches-resource-card { grid-template-columns: 1fr; }
  .teaches-resource-card__image { min-height: 420px; }
}

@media (max-width: 900px) {
  .teaches-menu-button { display: inline-flex; }
  .teaches-nav {
    position: absolute;
    top: 70px;
    right: 0;
    width: 240px;
    padding: 10px;
    border: 1px solid var(--teaches-border);
    border-radius: 14px;
    background: white;
    box-shadow: var(--teaches-shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .teaches-nav[data-open="true"] { display: flex; }
  .teaches-nav a { padding: 11px; border-radius: 8px; font-size: .85rem; }
  .teaches-nav a::after { display: none; }
  .teaches-nav a:hover { background: var(--teaches-bg-blue); }
}

@media (max-width: 760px) {
  .teaches-shell { width: calc(100% - 36px); }
  .teaches-header__inner { width: calc(100% - 36px); min-height: 78px; }
  .teaches-brand__mark { font-size: 2rem; }
  .teaches-nav { top: 60px; }
  .teaches-hero { padding: 116px 0 68px; }
  .teaches-hero::before { inset: 78px 0 0; }
  .teaches-display,
  .teaches-display--resource { font-size: clamp(2.7rem, 13vw, 4.15rem); }
  .teaches-lead { font-size: .96rem; }
  .teaches-actions { display: grid; }
  .teaches-button { width: 100%; }
  .teaches-section,
  .teaches-section--compact { padding: 78px 0; }
  .teaches-section h2 { font-size: clamp(2.35rem, 11vw, 3.3rem); }
  .teaches-resource-card__image { min-height: auto; }
  .teaches-resource-card__image img { max-height: 560px; }
  .teaches-resource-card__body { padding: 30px 24px; }
  .teaches-gallery,
  .teaches-topic-list,
  .teaches-two-column { grid-template-columns: 1fr; }
  .teaches-gallery-card:first-child { grid-column: auto; }
  .teaches-gallery-card__body { align-items: flex-start; flex-direction: column; }
  .teaches-version { align-items: stretch; }
  .teaches-footer { padding: 32px 18px; text-align: center; }
  .teaches-footer__inner { align-items: center; flex-direction: column; }
  .teaches-dialog { width: 100vw; max-height: 100vh; border-radius: 0; }
  .teaches-dialog__canvas { max-height: calc(100vh - 72px); padding: 10px; }
  .teaches-dialog__title { display: none; }
}

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