/* ============================================================
   Aaron Chan — Internship Journal
   Editorial, black & white, masthead + hairline-rule system
   ============================================================ */

@font-face {
  font-family: 'Advercase';
  src: url('/fonts/Advercase-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Advercase';
  src: url('/fonts/Advercase-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #111111;
  --paper: #ffffff;
  --rule: #1a1a1a;
  --hairline: #d8d8d8;
  --grey: #6b6b6b;
  --orange: #ef6925;
  --orange-dim: #d65913;
  --navy: #2b276e;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --display: 'Advercase', 'Helvetica Neue', Arial, sans-serif;
  --max: 780px;
  --wide: 1080px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 28px; }
.col  { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Top rule (Economist-style red band) ---------- */
.top-rule {
  height: 5px;
  background: var(--orange);
}

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 3px solid var(--rule);
  padding: 18px 0 16px;
  background: var(--paper);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.brand-group { display: flex; align-items: center; gap: 12px; }
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
}
.head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.dateline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--grey);
  font-size: 14px;
}

nav.primary {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
nav.primary .wrap {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}
nav.primary a {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
nav.primary a:hover { border-bottom-color: var(--ink); color: var(--ink); }
nav.primary a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* ---------- Liquid-glass social bar ---------- */
.social-glass {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 2px rgba(17,17,17,0.06), 0 8px 24px rgba(17,17,17,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.social-glass a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--ink);
  transition: transform .25s cubic-bezier(.16,.84,.44,1), background .25s ease, color .25s ease;
}
.social-glass a:hover {
  background: rgba(239, 105, 37, 0.12);
  color: var(--orange-dim);
  transform: translateY(-2px);
}
.social-glass a svg { width: 16px; height: 16px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .social-glass a { transition: none; }
  .social-glass a:hover { transform: none; }
}

/* ---------- Hero / landing ---------- */
.hero {
  border-bottom: 1px solid var(--hairline);
  padding: 44px 0 40px;
  position: relative;
}
.eyebrow {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 700;
  margin: 0 0 10px;
}
.hero .class-of {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(52px, 10vw, 108px);
  line-height: 0.92;
  letter-spacing: -1px;
  margin: 0 0 6px;
  text-transform: uppercase;
  color: var(--ink);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: 0px;
  margin: 0 0 18px;
  text-transform: uppercase;
  color: #333;
}
.hero .dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: #333;
  max-width: 640px;
  margin: 0 0 30px;
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 22px 28px;
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
  margin-top: 6px;
}
.meta-table .item .label {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}
.meta-table .item .value {
  font-family: var(--serif);
  font-size: 17px;
}
.meta-table .item .value.with-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta-table .item .value.with-logo img {
  height: 18px;
  width: auto;
}

/* ---------- Section labels ---------- */
.section-label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 3px solid var(--rule);
  padding-top: 10px;
  margin: 56px 0 26px;
}
.col .section-label,
.wrap .section-label { margin-top: 0; }

/* ---------- Photo grid (home) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 0 60px;
}
.photo-grid figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: #f2f2f2;
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.photo-grid figure img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.16,.84,.44,1);
}
.photo-grid figure:hover img { transform: scale(1.035); }
.photo-grid figure.placeholder {
  border-style: dashed;
  border-color: #bdbdbd;
}
.photo-grid figure figcaption {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.6px;
  color: #8a8a8a;
  text-align: center;
  padding: 8px;
  text-transform: uppercase;
}

/* ---------- Article (blog) ---------- */
article.piece h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.3px;
  margin: 8px 0 6px;
  text-transform: uppercase;
}
article.piece .byline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--grey);
  font-size: 15px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 24px;
}
article.piece h2 {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin: 42px 0 14px;
}
article.piece p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  text-align: justify;
  margin: 0 0 20px;
  hyphens: auto;
}
article.piece p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 64px;
  float: left;
  line-height: 0.8;
  padding: 8px 10px 0 0;
  font-weight: 700;
  color: var(--orange);
}

/* ---------- Weekly journal (reflection) ---------- */
.journal-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 50px;
  align-items: start;
}
.week-index {
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--hairline);
  padding-right: 20px;
}
.week-index a {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--grey);
  transition: color .2s ease;
}
.week-index a:hover { color: var(--orange); }
.week-index a.active { color: var(--orange); font-weight: 700; }

.week {
  border-top: 1px solid var(--hairline);
  padding: 30px 0;
  scroll-margin-top: 150px;
}
.week:first-of-type { border-top: 3px solid var(--rule); }
.week-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.week-num {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--orange);
  color: #fff;
  padding: 3px 9px;
}
.week-dates {
  font-family: var(--serif);
  font-style: italic;
  color: var(--grey);
  font-size: 15px;
}
.week p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  text-align: justify;
}

@media (max-width: 780px) {
  .journal-layout { grid-template-columns: 1fr; }
  .week-index {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    padding: 0 0 20px;
  }
}

/* ---------- Video (vlog) ---------- */
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  margin-bottom: 14px;
}
.video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-caption {
  font-family: var(--serif);
  font-style: italic;
  color: var(--grey);
  font-size: 15px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 40px;
  margin-bottom: 10px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 10px 0 60px;
}
.contact-glass {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 2px rgba(17,17,17,0.05), 0 12px 30px rgba(17,17,17,0.08), inset 0 1px 0 rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  text-decoration: none;
  color: var(--ink);
  transition: transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s ease;
}
.contact-glass:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(17,17,17,0.08), 0 18px 40px rgba(17,17,17,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}
.contact-glass .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(239, 105, 37, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-glass .icon svg { width: 19px; height: 19px; color: var(--orange-dim); }
.contact-glass .text-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-glass .label {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 4px;
}
.contact-glass .value {
  font-family: var(--serif);
  font-size: 17px;
}
@media (prefers-reduced-motion: reduce) {
  .contact-glass { transition: none; }
  .contact-glass:hover { transform: none; }
}

/* Email card with copy button */
.email-card {
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
  width: fit-content;
  max-width: 100%;
}
.email-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex: 1;
}
.email-link .value {
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
}
.copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--orange-dim);
  background: rgba(242, 103, 34, 0.1);
  border: 1px solid rgba(242, 103, 34, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.copy-btn:hover { background: rgba(242, 103, 34, 0.18); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied { background: rgba(42, 38, 114, 0.12); color: var(--navy); border-color: rgba(42,38,114,.25); }

/* ---------- Map ---------- */
.map-frame {
  width: 100%;
  aspect-ratio: 16 / 8;
  border: 1px solid var(--ink);
  margin-bottom: 60px;
  overflow: hidden;
}
@media (max-width: 640px) {
  .map-frame { aspect-ratio: 4 / 5; }
}

/* ---------- Photo lightbox ---------- */
.photo-grid figure {
  cursor: zoom-in;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  padding: 40px;
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform .3s cubic-bezier(.16,.84,.44,1);
}
.lightbox-overlay.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-overlay { padding: 16px; }
}

/* ---------- Section label link (Official Photos -> Drive) ---------- */
.section-label a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--orange);
}
.section-label a:hover { color: var(--orange-dim); }

/* ---------- Hero watermark logo (warped) ---------- */
.hero { position: relative; overflow: hidden; }
.hero-logo-mark {
  position: absolute;
  right: -60px;
  top: 10%;
  width: 46%;
  max-width: 560px;
  opacity: 0.85;
  pointer-events: none;
  transform: perspective(700px) rotateY(-14deg) rotateX(4deg) skewY(-3deg) scale(1.15);
  transform-origin: right center;
  z-index: 0;
}
.hero-logo-mark img { width: 100%; height: auto; display: block; }
.hero .eyebrow, .hero h1, .hero .class-of, .hero .name-line, .hero .dek, .hero .meta-table {
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .hero-logo-mark { display: none; }
}

/* ---------- Home video embed ---------- */
.home-video {
  margin: 10px 0 50px;
}
.home-video .video-frame {
  margin-bottom: 10px;
}

/* ---------- Footer ---------- */
footer.site {
  border-top: 3px solid var(--rule);
  margin-top: 60px;
  padding: 30px 0 60px;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer.site p {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0;
}

section.page { padding-bottom: 20px; }

/* ---------- Letter to Future Interns ---------- */
.pullquote {
  border-left: 4px solid var(--orange);
  padding: 4px 0 4px 22px;
  margin: 34px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: #1a1a1a;
}
.tips-list {
  list-style: none;
  margin: 30px 0 40px;
  padding: 0;
  display: grid;
  gap: 0;
}
.tips-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
}
.tips-list li:last-child { border-bottom: 1px solid var(--hairline); }
.tips-list .tip-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--orange);
}

/* ---------- Motion: scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.16,.84,.44,1), transform .7s cubic-bezier(.16,.84,.44,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* hero title word-in animation on load */
.hero .class-of span,
.hero h1 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: riseIn .7s cubic-bezier(.16,.84,.44,1) forwards;
}
@keyframes riseIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero .class-of span,
  .hero h1 span { opacity: 1; transform: none; animation: none; }
}

@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  article.piece p { text-align: left; hyphens: none; }
  .week p { text-align: left; }
}
