/* Home-only layout. Shared tokens, buttons, reveal animations and Contact stay in styles.css. */

/* Navigation */
.home-page .site-header {
  --home-header-glass: rgba(226, 232, 255, .72);
  --home-menu-glass: rgba(226, 232, 255, .96);
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0);
  transition: background-color 300ms ease, border-color 300ms ease,
    box-shadow 300ms ease, backdrop-filter 300ms ease;
}

:root[data-theme="dark"] .home-page .site-header {
  --home-header-glass: rgba(13, 19, 33, .72);
  --home-menu-glass: rgba(13, 19, 33, .96);
}

:root .home-page .site-header.is-scrolled {
  background: var(--home-header-glass);
  border-color: var(--line);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

/* Hero */
.home-page .hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  padding: 132px 48px 72px;
  overflow: clip;
}

.hero-copy {
  position: relative;
  width: 100%;
  z-index: 1;
  isolation: isolate;
}

.hero-composition {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}

.hero-content, .hero-support > *, .overview-grid > *, .experience-list > * {
  min-width: 0;
}

.hero-content > .eyebrow { margin-bottom: 22px; }

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px #2f69ff55;
}

.hero-row-name {
  font-size: clamp(76px, 8.8vw, 144px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 500;
}

.hero-row-name br { display: none; }

.hero-row-headline {
  max-width: 560px;
  margin-top: 24px;
  font-size: clamp(25px, 2.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 500;
}

.hero-support {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

.hero-text {
  max-width: 580px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: auto;
}

.hero-actions .button { flex: 0 1 auto; }

/* The canvas alone receives pointer input; all engineering accents are static. */
.hero-robot {
  position: relative;
  width: 100%;
  height: clamp(360px, 38vw, 540px);
  transform-origin: center;
  contain: layout paint;
  isolation: isolate;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 70%);
}

.hero-robot canvas {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-robot[data-state="unavailable"] canvas { visibility: hidden; }

.hero-robot::before, .hero-robot::after, .hero-ground-ring {
  position: absolute;
  border: 1px solid var(--accent-bright);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-robot::before, .hero-robot::after { content: ''; }
.hero-robot::before { inset: 26% 7%; transform: rotate(-28deg); opacity: .16; }
.hero-robot::after { inset: 12% 27%; transform: rotate(28deg); opacity: .12; }
.hero-ground-ring { inset: auto 27% 4%; height: 7%; opacity: .16; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 48px);
  margin: 36px 0 0;
  padding-top: 20px;
  border-top: 1px solid #0e2ac51a;
}

.hero-facts div { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.hero-facts dt {
  font: 10px/1.6 var(--mono);
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-facts dd { font-size: 12px; margin: 0; color: var(--muted); overflow-wrap: anywhere; }

.scroll-cue {
  position: absolute;
  right: 48px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  font: 10px/1.6 var(--mono);
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--subtle);
}

.scroll-cue span { animation: scroll-pulse 2s infinite; }
.hero-pop { transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.field-loading .hero-pop { opacity: 0; transform: translateY(22px); filter: blur(5px); }
.field-ready .hero-pop {
  opacity: 1;
  transform: none;
  filter: none;
  transition-delay: calc(var(--pop, 0) * .08s);
}

/* Open editorial sections. Contact intentionally uses only the shared stylesheet. */
.home-page :is(.overview-section, .experience-section, .skills-section) {
  min-height: auto;
  padding-block: clamp(72px, 7vw, 100px);
  gap: 32px;
}

.overview-grid > .section-heading, .experience-intro, .skills-section > .section-heading {
  position: relative;
  isolation: isolate;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.overview-grid h2 { max-width: 750px; }
.overview-copy {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 24px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.overview-copy p + p { margin-top: 20px; }
.overview-copy p a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.home-page .tech-grid { margin-top: 4px; }

/* Experience timeline: marker / dates / research / tags. */
.experience-intro h2 { max-width: 830px; }
.experience-list { position: relative; display: block; margin-top: 12px; }
.experience-list::before {
  content: '';
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 5px;
  width: 1px;
  background: var(--accent-bright);
  opacity: .25;
  pointer-events: none;
}

.experience-entry {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(150px, .65fr) minmax(0, 1.8fr) minmax(200px, .85fr);
  gap: clamp(20px, 2.5vw, 36px);
  align-items: start;
  padding-block: 30px;
}

.experience-entry + .experience-entry { border-top: 1px solid var(--line); }
.experience-rail { display: block; padding-top: 6px; }
.experience-marker {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent-bright);
  border-radius: 50%;
  background: var(--bg);
}

.experience-entry-current .experience-marker { background: var(--accent-bright); }
.experience-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 3px;
}

.experience-date {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font: 11px/1.6 var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.experience-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 10px/1.6 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}

.experience-status > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px #2f69ff88;
}

.experience-status-complete { color: var(--subtle); }
.experience-body { min-width: 0; }
.experience-heading { display: block; margin: 0; }
.experience-heading h3 { font-size: 38px; }
.experience-heading h3 span {
  display: inline-block;
  font-size: 22px;
  color: var(--accent);
  transition: transform .25s;
}

.experience-heading a:hover span { transform: translate(3px, -3px); }
.experience-role {
  margin: 8px 0 6px;
  font: 11px/1.7 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.experience-institution { font-size: 12px; color: var(--muted); text-align: left; }
.experience-description { margin: 16px 0 0; font-size: 15px; line-height: 1.75; color: var(--muted); }
.experience-entry > .tag-list { align-self: center; }

/* Responsive adjustments in one place, from wide desktop to compact mobile. */
@media (min-width: 1600px) {
  .home-page .hero { padding-inline: max(48px, calc((100vw - 1560px) / 2)); }
}

@media (max-width: 1100px) {
  .hero-actions { gap: 8px; }
  .hero-actions .button { padding: 10px 16px; }
  .hero-facts { gap: 26px; }
  .hero-facts div { display: block; }
  .hero-facts dd { margin-top: 5px; }
  .overview-grid { gap: 40px; }
}

@media (min-width: 981px) {
  .overview-grid, .home-page :is(.experience-section, .skills-section) .split-heading {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 3vw, 44px);
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .hero-row-name { font-size: clamp(72px, 9vw, 100px); }
  .hero-row-name br { display: block; }
  .hero-row-headline { font-size: 30px; }
  .experience-entry { grid-template-columns: 14px 150px minmax(0, 1fr); gap: 22px; }
  .experience-rail { grid-row: 1 / 3; }
  .experience-entry > .tag-list { grid-column: 3; }
}

@media (min-width: 768px) and (max-width: 900px) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  :root .home-page .nav-links { background: var(--home-menu-glass); border-color: var(--line); }
  .home-page .hero { padding: 110px 24px 64px; justify-content: flex-start; }
  .hero-composition { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hero-content > .eyebrow { margin-bottom: 18px; }
  .hero-row-name { font-size: clamp(56px, 15vw, 100px); }
  .hero-row-headline { max-width: 560px; font-size: 27px; margin-top: 18px; }
  .hero-support { gap: 20px; margin-top: 18px; }
  .hero-text { line-height: 1.7; }
  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1 1 120px; }
  .hero-robot { height: 280px; width: min(100%, 420px); justify-self: center; }
  .hero-robot::after { display: none; }
  .hero-facts { gap: 18px; justify-content: space-between; margin-top: 18px; padding-top: 18px; }
  .hero-facts dd { font-size: 11px; max-width: 130px; }
  .scroll-cue { right: 24px; bottom: 22px; font-size: 8px; }
  .overview-grid { grid-template-columns: 1fr; gap: 28px; }
  .overview-copy { font-size: 15px; }
  .experience-list { margin-top: 0; }
  .experience-list::before { top: 30px; bottom: 24px; }
  .experience-entry { grid-template-columns: 12px minmax(0, 1fr); gap: 18px; padding-block: 24px; }
  .experience-rail { grid-column: 1; grid-row: 1 / 4; }
  .experience-meta, .experience-body, .experience-entry > .tag-list { grid-column: 2; }
  .experience-meta { flex-direction: row; align-items: center; gap: 8px 16px; }
  .experience-heading h3 { font-size: 34px; }
}

@media (max-width: 380px) {
  .hero-facts { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .field-loading .hero-pop { opacity: 1; transform: none; filter: none; }
}


/* Selected Coursework */

.home-page .coursework {
  margin-top: 28px;
}

.home-page .coursework-label {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  color: var(--subtle);
}

.home-page .coursework-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.home-page .coursework-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);

  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
}

:root[data-theme="dark"] .home-page .coursework-tag {
  background: rgba(155, 180, 255, 0.08);
}

@media (max-width: 767px) {
  .home-page .coursework-tags {
    gap: 8px;
  }

  .home-page .coursework-tag {
    padding: 8px 12px;
    font-size: 11px;
  }
}


/* ===== Selected Coursework ===== */

.home-page .coursework {
  margin-top: 36px;
}

.home-page .coursework-label {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--subtle);
}

.home-page .coursework-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.home-page .coursework-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  appearance: none;

  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);

  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;

  cursor: help;
  overflow: visible;
  transition: background 180ms ease, border-color 180ms ease;
}

.home-page .coursework-tag:hover,
.home-page .coursework-tag:focus {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--accent-bright);
}

/* Tooltip */

.home-page .coursework-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 100;

  width: max-content;
  max-width: min(250px, 80vw);
  padding: 10px 14px;

  background: #191c2b;
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);

  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  white-space: normal;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translate(-50%, 6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.home-page .coursework-tag:hover .coursework-tooltip,
.home-page .coursework-tag:focus .coursework-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Dark mode */

:root[data-theme="dark"] .home-page .coursework-tag {
  background: rgba(155, 180, 255, 0.08);
}

:root[data-theme="dark"] .home-page .coursework-tag:hover,
:root[data-theme="dark"] .home-page .coursework-tag:focus {
  background: rgba(155, 180, 255, 0.16);
}

/* Mobile */

@media (max-width: 767px) {
  .home-page .coursework {
    margin-top: 30px;
  }

  .home-page .coursework-tags {
    gap: 8px;
  }

  .home-page .coursework-tag {
    padding: 8px 12px;
    font-size: 11px;
  }

  .home-page .coursework-tooltip {
    left: 0;
    max-width: min(230px, 75vw);
    transform: translateY(6px);
  }

  .home-page .coursework-tag:hover .coursework-tooltip,
  .home-page .coursework-tag:focus .coursework-tooltip {
    transform: translateY(0);
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .home-page .coursework-tag,
  .home-page .coursework-tooltip {
    transition: none;
  }
}

