:root {
  --ink: #14211f;
  --muted: #62706d;
  --surface: #f3f7f4;
  --surface-strong: #ffffff;
  --line: #d6dfda;
  --accent: #1f6b57;
  --accent-dark: #103f34;
  --gold: #f7f8f8;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(29, 37, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--surface);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  position: relative;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='760' height='520' viewBox='0 0 760 520' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%231f6b57' stroke-opacity='0.16' stroke-width='1.4'%3E%3Cpath d='M86 126 180 74 292 126 420 84 566 136 684 76'/%3E%3Cpath d='M132 296 246 242 360 304 490 250 624 318'/%3E%3Cpath d='M78 424 190 360 314 416 452 354 606 416 704 346'/%3E%3Cpath d='M180 74 246 242 190 360'/%3E%3Cpath d='M292 126 360 304 314 416'/%3E%3Cpath d='M420 84 490 250 452 354'/%3E%3Cpath d='M566 136 624 318 606 416'/%3E%3Cpath d='M246 242 292 126 490 250'/%3E%3Cpath d='M360 304 452 354 624 318'/%3E%3C/g%3E%3Cg fill='%231f6b57' fill-opacity='0.24'%3E%3Ccircle cx='86' cy='126' r='4'/%3E%3Ccircle cx='180' cy='74' r='5'/%3E%3Ccircle cx='292' cy='126' r='4'/%3E%3Ccircle cx='420' cy='84' r='5'/%3E%3Ccircle cx='566' cy='136' r='4'/%3E%3Ccircle cx='684' cy='76' r='5'/%3E%3Ccircle cx='132' cy='296' r='5'/%3E%3Ccircle cx='246' cy='242' r='4'/%3E%3Ccircle cx='360' cy='304' r='6'/%3E%3Ccircle cx='490' cy='250' r='4'/%3E%3Ccircle cx='624' cy='318' r='5'/%3E%3Ccircle cx='78' cy='424' r='4'/%3E%3Ccircle cx='190' cy='360' r='5'/%3E%3Ccircle cx='314' cy='416' r='4'/%3E%3Ccircle cx='452' cy='354' r='6'/%3E%3Ccircle cx='606' cy='416' r='4'/%3E%3Ccircle cx='704' cy='346' r='5'/%3E%3C/g%3E%3C/svg%3E");
  background-position: -80px 120px;
  background-repeat: repeat;
  background-size: 760px 520px;
  content: "";
  opacity: 0.55;
  pointer-events: none;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 52px);
  color: var(--white);
}

.site-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  background: transparent;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 38px;
  height: 38px;
  filter: invert(1);
}

body.is-past-hero .site-header:not(.detail-header) .brand img,
.detail-header .brand img {
  filter: none;
}

.header-socials {
  display: flex;
  gap: 7px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

body.is-past-hero .header-socials {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.header-socials a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(20, 33, 31, 0.46);
  color: var(--white);
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.header-socials .email-link {
  color: #f1c86b;
}

.header-socials .linkedin-link {
  color: #0a66c2;
}

.header-socials .github-link {
  color: #ffffff;
}

.header-socials svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.detail-header .header-socials {
  display: none;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(20, 33, 31, 0.46);
  backdrop-filter: blur(12px);
}

.tab-button {
  min-width: 92px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.tab-button.is-active {
  background: var(--white);
  color: var(--accent-dark);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 61% 50%, rgba(92, 102, 142, 0.28), transparent 31%),
    radial-gradient(circle at 70% 28%, rgba(185, 79, 149, 0.12), transparent 22%),
    #252c37;
  padding: 132px clamp(20px, 5vw, 78px) 96px;
}

.hero-network,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-network {
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 1;
  cursor: crosshair;
  pointer-events: auto;
}

.hero-overlay {
  z-index: 1;
  background:
    radial-gradient(circle at 60% 48%, rgba(37, 44, 55, 0) 0%, rgba(37, 44, 55, 0.1) 34%, rgba(18, 22, 30, 0.7) 86%),
    linear-gradient(90deg, rgba(12, 16, 22, 0.86) 0%, rgba(22, 28, 37, 0.42) 52%, rgba(16, 20, 28, 0.58) 100%);
  pointer-events: none;
}

body[data-active-tab="projects"] .hero {
  background: #070808;
}

body[data-active-tab="projects"] .hero-overlay {
  background:
    radial-gradient(circle at 72% 46%, rgba(255, 255, 255, 0.02) 0%, rgba(7, 8, 8, 0.04) 40%, rgba(7, 8, 8, 0.32) 100%),
    linear-gradient(90deg, rgba(7, 8, 8, 0.66) 0%, rgba(7, 8, 8, 0.48) 36%, rgba(7, 8, 8, 0.12) 72%, rgba(7, 8, 8, 0.24) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(720px, 100%);
  color: var(--white);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.58);
}

body[data-active-tab="projects"] .hero-content {
  color: #f7f5ef;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.64);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(20, 33, 31, 0.34);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  animation: scroll-cue-pulse 1.8s ease-in-out infinite;
}

.scroll-cue span {
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
  transform: translateY(-3px) rotate(45deg);
}

@keyframes scroll-cue-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translate(-50%, 0);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, 8px);
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 600px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

body[data-active-tab="projects"] .hero-copy {
  color: rgba(247, 245, 239, 0.82);
}

.hero-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

body[data-active-tab="projects"] .hero-socials {
  display: none;
}

.hero-socials a {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(11, 17, 27, 0.62);
  color: var(--white);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.hero-socials a:hover,
.hero-socials a:focus-visible {
  transform: translateY(-2px);
}

.hero-socials .email-link {
  color: #f1c86b;
}

.hero-socials .linkedin-link {
  color: #0a66c2;
}

.hero-socials .github-link {
  color: #f5f5f5;
}

.hero-socials svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: #eef2f6;
  color: #101720;
  box-shadow: 0 14px 36px rgba(9, 13, 20, 0.24);
}

.button.secondary {
  border: 1px solid rgba(211, 218, 232, 0.42);
  background: rgba(20, 26, 36, 0.36);
  color: var(--white);
  backdrop-filter: blur(10px);
}

body[data-active-tab="projects"] .button.primary {
  background: #f7f5ef;
  color: #070808;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

body[data-active-tab="projects"] .button.secondary {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  color: #f7f5ef;
}

.content-shell {
  width: min(1120px, calc(100% - 36px));
  margin: -30px auto 0;
  padding: 56px 0 28px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.about-card-grid,
.project-grid {
  display: grid;
  gap: 18px;
}

.about-card-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.intro-block,
.about-card-grid > article,
.current-panel,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.intro-block,
.about-card-grid > article,
.current-panel,
.project-card {
  padding: clamp(20px, 3vw, 30px);
}

.intro-block {
  grid-column: span 8;
}

.current-panel {
  grid-column: span 4;
  margin: 0;
  padding-block: 18px;
}

.current-panel p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.skills-panel {
  grid-column: 1 / -1;
}

.skill-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.skill-chip {
  display: inline-flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(20, 33, 31, 0.12);
  border-radius: 999px;
  padding: 5px 10px 5px 6px;
  background: #f8faf9;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}

.coursework-card {
  grid-column: 1 / -1;
}

.skill-chip b {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(20, 33, 31, 0.12);
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.skill-chip b img {
  display: block;
  width: 17px;
  height: 17px;
}

.skill-chip.excel b {
  border-color: transparent;
  background: #217346;
}

.skill-chip.tableau b {
  border-color: transparent;
  background: #4e79a7;
}

.skill-chip.xgb b {
  border-color: transparent;
  background: #00856f;
}

.skill-chip.stats b {
  border-color: transparent;
  background: #7c3aed;
}

.skill-chip.wrangle b {
  border-color: transparent;
  background: #0f766e;
}

.skill-chip.forecast b {
  border-color: transparent;
  background: #2563eb;
}

.skill-chip.cluster b {
  border-color: transparent;
  background: #be185d;
}

.skill-chip.ocr b {
  border-color: transparent;
  background: #475569;
}

.skill-chip.git b {
  background: #fff;
  color: #24292f;
}

.skill-chip.gis b {
  border-color: transparent;
  background: #16a34a;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.2;
}

h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.coursework-group h4 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.coursework-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 31, 0.1);
}

.coursework-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cs-data-icon {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.econ-icon {
  background: rgba(217, 119, 6, 0.13);
  color: #b45309;
}

.intro-block p,
.coursework-card p,
.project-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.intro-block p:last-child,
.coursework-card p:last-child,
.project-card p:last-child {
  margin-bottom: 0;
}

.coursework-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.coursework-group {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

dl {
  margin: 0;
}

dl div + div {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.tag-list,
.clean-list,
.link-list,
.project-tags {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li,
.project-tags span {
  border: 1px solid rgba(31, 107, 87, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(31, 107, 87, 0.08);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.clean-list li + li,
.link-list li + li {
  margin-top: 10px;
}

.link-list a,
.project-card a {
  color: var(--accent);
  font-weight: 800;
}

.project-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.project-card.is-clickable {
  cursor: pointer;
}

.project-card.is-clickable:hover {
  box-shadow: 0 24px 62px rgba(29, 37, 34, 0.18);
  transform: translateY(-3px);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 4px 0 16px;
  background: var(--surface);
}

.project-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(31, 107, 87, 0.34);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(31, 107, 87, 0.1);
  color: var(--accent-dark);
}

.project-tags {
  margin: auto 0 18px;
}

.detail-header {
  color: var(--ink);
}

.detail-header .brand,
.detail-nav a {
  border-color: rgba(20, 33, 31, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-dark);
}

.detail-header .brand {
  border: 0;
  background: transparent;
}

.detail-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(20, 33, 31, 0.14);
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.detail-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 132px 0 36px;
}

.wide-detail {
  width: min(1560px, calc(100% - 28px));
}

.detail-hero {
  max-width: 860px;
  margin-bottom: 30px;
}

.wide-detail .detail-hero {
  margin-bottom: 18px;
}

.detail-hero h1 {
  color: var(--ink);
  font-size: clamp(2.8rem, 7vw, 6.2rem);
}

.detail-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-tags {
  margin-top: 24px;
}

.project-scroll-indicator {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  border: 1px solid rgba(31, 107, 87, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.project-scroll-indicator span {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  animation: project-scroll-nudge 1.4s ease-in-out infinite;
}

@keyframes project-scroll-nudge {
  0%,
  100% {
    transform: translateY(-3px) rotate(45deg);
  }

  50% {
    transform: translateY(2px) rotate(45deg);
  }
}

.detail-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 30px);
}

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

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

.project-metric {
  min-width: 0;
  border-top: 4px solid var(--accent);
  padding-top: 14px;
}

.project-metric:nth-child(2) {
  border-color: #a86f2a;
}

.project-metric:nth-child(3) {
  border-color: #3f6f9f;
}

.project-metric:nth-child(4) {
  border-color: #8a5d8f;
}

.project-metric:nth-child(5) {
  border-color: #7a8050;
}

.project-metric strong {
  display: block;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
}

.project-metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.full-screen-panel {
  padding: clamp(14px, 2vw, 22px);
}

.seamless-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
}

.contained-embed-panel {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.detail-section p {
  margin: 0;
  color: var(--muted);
}

.detail-section p + p {
  margin-top: 14px;
}

.compact-heading {
  margin-bottom: 18px;
}

.compact-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

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

.detail-image-grid figure {
  margin: 0;
}

.detail-image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.jamix-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jamix-preview-grid img {
  aspect-ratio: 4 / 3;
  max-height: 260px;
  object-fit: contain;
  padding: 12px;
  background: var(--white);
}

.detail-image-grid figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.detail-wide-image {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.detail-image-figure {
  margin: 0;
}

.image-credit {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
}

.image-credit a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-icon-section {
  display: grid;
  min-height: 280px;
  place-items: center;
}

.app-icon-section img {
  width: min(220px, 56vw);
  border-radius: 24px;
}

.interactive-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.interaction-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid rgba(31, 107, 87, 0.24);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(31, 107, 87, 0.08);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.rotate-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem;
  line-height: 1;
}

.interactive-frame iframe {
  display: block;
  width: 100%;
  height: min(850px, 86vh);
  border: 0;
}

.tall-frame iframe {
  height: min(980px, 92vh);
}

.wide-detail .tall-frame iframe {
  height: min(1120px, calc(100vh - 180px));
  min-height: 760px;
}

.embedded-page iframe {
  height: min(900px, 86vh);
}

.wide-detail .embedded-page iframe {
  height: min(1120px, calc(100vh - 180px));
  min-height: 760px;
}

.full-page-embed iframe {
  display: block;
  width: 100%;
  min-height: 3200px;
  border: 0;
}

.document-frame iframe {
  height: min(900px, 86vh);
  background: var(--white);
}

.wide-detail .document-frame iframe {
  height: min(1100px, calc(100vh - 180px));
  min-height: 760px;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.document-actions a {
  color: var(--accent);
  font-weight: 800;
}

.server-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.onlyup-demo {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.7fr);
  overflow: hidden;
  border: 1px solid #777;
  border-radius: 0;
  background: #dcdcdc;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  box-shadow: none;
}

.onlyup-sidebar {
  display: flex;
  min-height: 620px;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #777;
  background: #e9e9e9;
  color: #111;
  padding: 14px;
}

.onlyup-label {
  margin: 0 0 5px;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.onlyup-sidebar h3,
.onlyup-panel h3 {
  margin: 0;
  font-size: 18px;
}

.onlyup-goal-list {
  display: grid;
  min-height: 330px;
  align-content: start;
  gap: 0;
  overflow: auto;
  border: 1px solid #555;
  background: #fff;
}

.onlyup-goal-list button,
.onlyup-toolbar button,
.onlyup-session-actions button,
.onlyup-reset {
  border: 2px solid #767676;
  border-color: #fefefe #767676 #767676 #fefefe;
  border-radius: 0;
  background: #ededed;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.onlyup-goal-list button {
  display: grid;
  gap: 2px;
  border: 0;
  border-bottom: 1px solid #efefef;
  background: #fff;
  padding: 5px 7px;
  text-align: left;
}

.onlyup-goal-list button.is-active {
  background: #0a64d6;
  color: #fff;
}

.onlyup-goal-list span,
.onlyup-muted {
  color: #555;
}

.onlyup-goal-list span {
  color: inherit;
  font-size: 12px;
}

.onlyup-reset {
  margin-top: auto;
  min-height: 28px;
  font-weight: 400;
}

.onlyup-workspace {
  min-width: 0;
  padding: 14px 18px 18px;
}

.onlyup-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: flex-end;
  margin-bottom: 0;
}

.onlyup-toolbar button,
.onlyup-session-actions button {
  min-height: 28px;
  background: #dedede;
  color: #111;
  padding: 4px 10px;
  font-weight: 400;
}

.onlyup-toolbar button.is-active {
  border-bottom-color: #f4f4f4;
  background: #f4f4f4;
  color: #111;
}

.onlyup-panel {
  display: none;
}

.onlyup-panel.is-active {
  display: block;
  min-height: 450px;
  border: 1px solid #777;
  background: #eeeeee;
  padding: 12px;
}

.onlyup-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.onlyup-workspace .onlyup-label {
  color: var(--muted);
}

.onlyup-status {
  border: 1px solid #777;
  border-radius: 0;
  padding: 3px 7px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 400;
}

.onlyup-dashboard-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.onlyup-progress-ring {
  display: grid;
  width: 132px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f4f4f4 58%, transparent 60%),
    conic-gradient(#0a64d6 var(--progress), #d7d7d7 0);
  color: #111;
  font-size: 21px;
  font-weight: 700;
}

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

.onlyup-metrics div {
  border: 1px solid #777;
  border-radius: 0;
  background: #fff;
  padding: 8px;
}

.onlyup-metrics strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.onlyup-metrics span,
.onlyup-details dt,
.onlyup-notes span {
  color: #555;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}

.onlyup-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.onlyup-details div,
.onlyup-notes article {
  border: 1px solid #777;
  border-radius: 0;
  background: #fff;
  padding: 8px;
}

.onlyup-details dd {
  margin: 4px 0 0;
}

.onlyup-form,
.onlyup-note-label {
  display: grid;
  gap: 10px;
}

.onlyup-form {
  max-width: 520px;
}

.onlyup-form label,
.onlyup-note-label {
  color: #111;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
}

.onlyup-form input,
.onlyup-form select,
.onlyup-note-label textarea {
  min-height: 28px;
  border: 1px solid #8b8b8b;
  border-radius: 0;
  padding: 3px 6px;
  color: #111;
  font: inherit;
  text-transform: none;
}

.onlyup-timer {
  margin: 18px 0 14px;
  color: #111;
  font-size: clamp(3rem, 8vw, 4.2rem);
  font-weight: 400;
  text-align: center;
  line-height: 1;
}

.onlyup-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.onlyup-notes {
  display: grid;
  gap: 12px;
}

.onlyup-notes p {
  margin: 8px 0 0;
  color: var(--muted);
}

.writeup {
  max-width: 880px;
}

.writeup h2 {
  margin-top: 30px;
}

.writeup h2:first-child {
  margin-top: 0;
}

.writeup h3 {
  margin-top: 24px;
}

.writeup ul {
  margin: 10px 0 18px;
  padding-left: 1.2rem;
  color: var(--muted);
}

.writeup li + li {
  margin-top: 6px;
}

.callout-note {
  margin-top: 18px;
  border-left: 5px solid var(--accent);
  background: rgba(31, 107, 87, 0.08);
  padding: 16px 18px;
  color: var(--accent-dark);
  font-weight: 700;
}

.app-demo {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 18px;
  align-items: stretch;
}

.app-demo-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.app-demo-panel h2,
.app-demo-panel h3 {
  margin-bottom: 10px;
}

.demo-form {
  display: grid;
  gap: 12px;
}

.demo-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-form input,
.demo-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
}

.goal-list {
  display: grid;
  gap: 12px;
}

.goal-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
}

.goal-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 800;
}

.goal-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 107, 87, 0.12);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.demo-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.demo-actions button.secondary-action {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--accent-dark);
}

.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 32px 0 42px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* About page sizing layer. */
#about-panel {
  font-size: 1rem;
}

#about-panel .section-heading h2 {
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
}

#about-panel h3 {
  font-size: 1.28rem;
}

#about-panel h4 {
  font-size: 1rem;
}

#about-panel .intro-block,
#about-panel .about-card-grid > article,
#about-panel .current-panel {
  padding: clamp(22px, 2.7vw, 32px);
}

#about-panel .intro-block p,
#about-panel .coursework-card p,
#about-panel .current-panel p:last-child,
#about-panel .clean-list li {
  font-size: 1rem;
}

#about-panel .tag-list li,
#about-panel .skill-chip {
  font-size: 0.9rem;
}

#about-panel .skill-chip {
  min-height: 34px;
}

#about-panel .skill-chip b {
  min-width: 25px;
  height: 25px;
}

#about-panel .skill-chip b img {
  width: 18px;
  height: 18px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
  }

  .tab-button {
    min-width: 84px;
    padding-inline: 13px;
  }

  .hero-overlay {
    background:
      radial-gradient(circle at 62% 48%, rgba(37, 44, 55, 0.06), rgba(18, 22, 30, 0.82) 78%),
      linear-gradient(90deg, rgba(12, 16, 22, 0.9) 0%, rgba(12, 16, 22, 0.64) 100%);
  }

  .about-card-grid,
  .current-panel,
  .detail-grid,
  .detail-image-grid,
  .coursework-groups,
  .app-demo,
  .project-metrics,
  .four-metrics,
  .jamix-preview-grid,
  .onlyup-demo,
  .onlyup-dashboard-grid,
  .onlyup-metrics,
  .onlyup-details,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .onlyup-sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .goal-row dl {
    grid-template-columns: 1fr;
  }

  .intro-block,
  .current-panel,
  .skills-panel,
  .coursework-card {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 14px;
  }

  .brand {
    width: 42px;
    height: 42px;
  }

  .tabs {
    max-width: calc(100vw - 88px);
  }

  .tab-button {
    min-width: 0;
  }

  .hero {
    padding: 112px 18px 84px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .content-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 40px;
  }
}
