/* Arthur Peng — personal site.
   Structure and overall feel after jamun.org — the restrained, institutional look admissions readers
   know: a white page, a book serif for display, black numbers, full-bleed photos cut on a diagonal and
   alternating sides, cascading disclosure. One accent comes from Arthur's own images: the teal-to-green
   wave of "Mathematics / Data Science & AI". */

:root {
  --bg: #ffffff;
  --soft: #f6f5f2;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #404040;
  --ink-3: #737373;
  --rule: #e7e5e4;
  --orange: #1aa89a;              /* primary accent: the teal of the wave (kept under the old name) */
  --orange-soft: #e3f5f1;
  --wave: linear-gradient(100deg, #2bb8d6 0%, #3cc7a8 45%, #8fd14f 100%);
  --orchid: #c2407e;
  --orchid-soft: #fbe8f0;
  --amethyst: #7a5aa6;
  --blue: #2b7fc0;
  --navy: #0e2340;
  --green: #76b900;               /* NVIDIA */
  --serif: "Newsreader", "Times New Roman", serif;   /* stands in for jamun.org's Freight Text */
  --sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --label: Outfit, Inter, sans-serif;
  --cut: 14%;                      /* how far the diagonal leans, as on jamun.org */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-2); font: 18px/1.65 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; background: var(--navy); color: #fff;
  text-decoration: none; font: 500 15px var(--sans); border: 2px solid var(--ink); transition: transform .2s, background .2s; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-small { padding: 8px 18px; font-size: 14px; }

/* ---------- nav */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; height: 68px; padding: 0 max(24px, calc((100vw - 1200px) / 2));
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--rule); }
.logo { font: 500 24px var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--ink-3); }
.nav-links a:hover, .nav-links a.is-here { color: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--rule); border-radius: 999px; width: 44px; height: 44px; place-items: center; cursor: pointer; }

/* ---------- hero */
.hero { max-width: 1200px; margin: 0 auto; padding: 72px 24px 56px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(46px, 6.2vw, 80px); line-height: 1.04; letter-spacing: -.02em; }
.rotator { color: var(--orange); font-style: italic; display: inline-block; padding-bottom: .08em; transition: opacity .35s, transform .35s; }
.rotator.is-out { opacity: 0; transform: translateY(12px); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 32rem; margin: 26px 0 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-art { position: relative; height: 460px; }
.hero-art img { position: absolute; object-fit: cover; border-radius: 20px; box-shadow: 0 24px 60px -28px rgba(0,0,0,.45); }
.hero-art .h1 { width: 62%; height: 72%; right: 0; top: 0; }
.hero-art .h2 { width: 50%; height: 46%; left: 0; top: 30%; border: 6px solid #fff; }
.hero-art .h3 { width: 44%; height: 38%; right: 8%; bottom: 0; border: 6px solid #fff; }

/* ---------- numbers */
.stats { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; border-top: 1px solid var(--rule); }
.stats strong { display: block; font: 600 44px/1.1 var(--label); letter-spacing: -.02em; color: var(--ink); }
.stats span { font-size: 14px; color: var(--ink-3); }

/* ---------- the four rows: text on one half, a full-bleed diagonal photo on the other */
/* photo rows run edge to edge up to --page wide, then stop and centre: on a very wide
   screen (or zoomed far out) the photos would otherwise dwarf the 1200px text column */
:root { --page: min(100vw, 1760px); }
.row { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; border-top: 1px solid var(--rule); max-width: 1760px; margin: 0 auto; }
.row-text { padding: 88px max(40px, calc((var(--page) - 1200px) / 2 + 24px)) 88px max(24px, calc((var(--page) - 1200px) / 2)); max-width: none; align-self: center; }
.row.flip .row-text { padding: 88px max(24px, calc((var(--page) - 1200px) / 2)) 88px 56px; }
.row:not(.flip) .row-text { padding-right: 56px; }
.row-img { margin: 0; position: relative; overflow: hidden; }
.row-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.row-img.right { clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%); }
.row-img.left { clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.row-img img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }

.eyebrow { font: 600 13px var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin: 0 0 14px; }
#nvidia .eyebrow { color: #4f8a00; }
#classes .eyebrow { color: var(--blue); }
.row h2 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -.02em; }
.summary { margin: 18px 0 26px; font-size: 18px; }

.mini-stats { display: flex; gap: 36px; margin: -6px 0 26px; }
.mini-stats strong { font: 600 40px/1 var(--label); color: var(--ink); display: block; }
.mini-stats span { font-size: 13px; color: var(--ink-3); line-height: 1.4; display: block; margin-top: 6px; }

/* ---------- cascading disclosure: a heading opens a summary, whose parts open in turn */
.disclose { border-top: 1px solid var(--rule); margin-bottom: 28px; }
.disclose > details { border-bottom: 1px solid var(--rule); }
details > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 16px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary span { font: 500 21px var(--serif); color: var(--ink); }
details > summary small { font-size: 13px; color: var(--ink-3); }
details > summary::after { content: ""; margin-left: auto; align-self: center; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1px solid var(--rule);
  background: no-repeat center/10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 1v8M1 5h8' stroke='%230a0a0a' stroke-width='1.4'/%3E%3C/svg%3E");
  transition: transform .25s, background-color .25s; }
details[open] > summary::after { transform: rotate(45deg); background-color: var(--orange-soft); border-color: var(--orange); }
.panel { padding: 0 0 20px; font-size: 16px; }
.panel p { margin: 0 0 12px; }
.panel ul { margin: 0 0 12px; padding-left: 20px; }
.panel li { margin-bottom: 6px; }
/* the second level sits indented on a hairline */
.panel details { border-left: 2px solid var(--rule); padding-left: 16px; margin: 4px 0 8px; }
.panel details[open] { border-left-color: var(--orange); }
.panel details > summary { padding: 8px 0; }
.panel details > summary span { font: 600 15px var(--sans); }
.panel details > summary::after { width: 18px; height: 18px; background-size: 8px; }
.quote { font: italic 20px/1.5 var(--serif); color: var(--ink); border-left: 3px solid var(--orange); padding-left: 16px; margin: 16px 0 4px !important; }
.links { display: flex; gap: 20px; flex-wrap: wrap; }
.links a, .timeline a { color: var(--orange); font-weight: 500; text-decoration: none; }
.links a:hover, .timeline a:hover { text-decoration: underline; }
.timeline { list-style: none; padding: 0 !important; }
.timeline li { padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.timeline b { color: var(--ink); }

.gallery { display: grid; gap: 10px; margin: 8px 0 14px; }
.gallery.g2 { grid-template-columns: 1fr 1fr; }
.gallery.g3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; cursor: zoom-in; background: var(--soft); box-shadow: 0 8px 20px -14px rgba(21,34,56,.5); }
.gallery figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }

.videos { display: grid; grid-template-columns: 1fr; gap: 20px; }   /* one per row: at half width the player's fullscreen button falls off its control bar */
.video video, .video iframe { width: 100%; border: 0; aspect-ratio: 16/9; border-radius: 12px; background: #000; display: block; }
.video p { margin: 6px 0 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.video p small { display: block; color: var(--ink-3); font-weight: 400; }

/* section 4: a preview of Intellura Learn, not a copy of it */
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 24px; }
.course { display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; border: 1px solid var(--rule); background: #fff; border-radius: 16px; text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s; }
.course b { font: 500 20px/1.2 var(--serif); color: var(--ink); }
.course span { font-size: 13px; color: var(--ink-3); }
.course em { font-style: normal; font-size: 13px; color: var(--orange); font-weight: 500; margin-top: auto; padding-top: 8px; }

/* ---------- footer */
.foot { border-top: 1px solid var(--rule); padding: 40px max(24px, calc((100vw - 1200px) / 2)); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; font-size: 14px; color: var(--ink-3); }
.foot nav { display: flex; gap: 20px; margin-left: auto; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot .copy { width: 100%; }

/* ---------- photo viewer */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(10,10,10,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: min(1200px, 100%); max-height: 86vh; border-radius: 12px; }
.lightbox p { color: #e7e5e4; font-size: 14px; margin: 12px 0 0; text-align: center; }

/* ---------- scroll reveal, as on jamun.org */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- narrow screens: the photo sits above its text, whole and with flat edges */
@media (max-width: 900px) {
  .nav { gap: 12px; height: 60px; }
  .nav-links { display: none; }
  .nav-links[data-open] { display: flex; flex-direction: column; gap: 0; position: absolute; top: 60px; left: 12px; right: 12px; background: #fff;
    border: 1px solid var(--rule); border-radius: 16px; padding: 8px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.3); }
  .nav-links[data-open] a { padding: 12px 14px; font-size: 16px; color: var(--ink); }
  .nav .btn-small { margin-left: auto; }
  .menu-btn { display: grid; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 32px; }
  .hero-art { height: 320px; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .row, .row.flip { grid-template-columns: 1fr; min-height: 0; }
  .row-img, .row-img.left, .row-img.right { order: -1; height: auto; aspect-ratio: 1774 / 887; clip-path: none; }   /* whole photo, flat edges */
  .row-text, .row.flip .row-text, .row:not(.flip) .row-text { padding: 32px 20px 48px; }
  .courses { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:last-child { grid-column: 1 / -1; }
  .stats strong { font-size: 36px; }
  .gallery.g3 { grid-template-columns: 1fr 1fr; }
  .foot nav { margin-left: 0; }
}

/* each photo keeps its subject in frame when cropped to half the page */
#classes .row-img img { object-position: 38% 50%; }
#nvidia .row-img img { object-position: 42% 50%; }

/* phones: the small label under a disclosure title goes on its own line, never squeezed beside it */
@media (max-width: 560px) {
  details > summary { flex-wrap: wrap; row-gap: 2px; }
  details > summary span { flex: 1 1 auto; min-width: 0; }
  details > summary::after { order: 2; }
  details > summary small { order: 3; flex-basis: 100%; }
  .hero-art { height: 280px; }
}

/* hover effects only where there is a real pointer: on a phone a tap leaves :hover stuck on */
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); background: #173459; }
  .btn-ghost:hover { background: var(--soft); border-color: var(--ink-3); }
  .row-img:hover img { transform: scale(1.03); }
  details > summary:hover span { color: var(--orange); }
  .course:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(26,168,154,.45); }
}
