
/* ==========================================================
   U OF T STATISTICAL SCIENCES
   ACTUARIAL SCIENCE UNDERGRADUATE PROGRAMS
   MAIN STYLESHEET
   ========================================================== */


/* ==========================================================
   1. VARIABLES AND GLOBAL RESET
   ========================================================== */

:root {
  --blue: #0180a5;
  --undergrad-blue: #71C988;
  --actuarial-green: #71C988;
  --navy: #08264b;
  --globe-bg: #071b33;
  --globe-land: #d9e8ed;
  --black: #050505;
  --white: #ffffff;
  --paper: #f3f2ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
}


/* ==========================================================
   2. ACCESSIBILITY
   ========================================================== */

.skip {
  position: fixed;
  top: 0;
  left: -999px;
  z-index: 99;
  padding: 1rem;
  background: var(--white);
  color: var(--black);
}

.skip:focus {
  left: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================
   3. NAVIGATION
   Desktop: Horizontal links
   Mobile: Hamburger dropdown
   Breakpoint: 800px
   ========================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  width: 100%;
  padding: 20px 3vw;

  mix-blend-mode: difference;
}

.nav a {
  color: var(--white);
  text-decoration: none;
}

/* Desktop navigation */

.nav nav.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;

  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hamburger: hidden on desktop */

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}


/* ==========================================================
   4. FULL-PAGE SCROLLING
   ========================================================== */

.snap {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

.panel {
  position: relative;
  min-height: 100vh;
  padding: 12vh 7vw 8vh;
  overflow: hidden;
  scroll-snap-align: start;
}


/* ==========================================================
   5. COMMON TYPOGRAPHY
   ========================================================== */

.dark {
  background: var(--black);
}

.eyebrow {
  margin-bottom: 2rem;

  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;

  opacity: 0.72;
}

.panel h2 {
  margin: 0;

  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 650px;

  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  line-height: 1.55;
}


/* ==========================================================
   6. COVER / HOMEPAGE
   ========================================================== */

.cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 5vh 5vw;

  background: var(--actuarial-green);
}

/* Collision animation canvas */

.cover canvas {
  position: absolute;
  inset: 0;
  z-index: 0;

  display: block;
  width: 100%;
  height: 100%;

  touch-action: none;
}

/* Maintain foreground positioning */

.cover-top,
.cover-bottom,
.down {
  position: relative;
  z-index: 2;
}

/* ----------------------------------------------------------
   Statistical Sciences department logo
   ---------------------------------------------------------- */

.cover-top {
  width: fit-content;
  max-width: 100%;
}

.cover-logo {
  display: block;

  width: clamp(220px, 30vw, 430px);
  max-width: 100%;
  max-height: 115px;
  height: auto;

  object-fit: contain;
  object-position: left center;

  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ----------------------------------------------------------
   Actuarial Science heading
   ---------------------------------------------------------- */

.cover-bottom {
  width: min(560px, 80vw);
  padding-top: 18px;

  border-top: 1px solid rgba(255, 255, 255, 0.75);
}

.cover-title {
  width: fit-content;
  max-width: 100%;

  margin: 0 0 1.5rem;

  color: var(--white);

  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.055em;
  font-weight: 700;
}

/* Undergraduate program label */

.cover-bottom p {
  width: fit-content;
  max-width: 100%;

  margin: 0 0 6px;

  font-size: clamp(1.5rem, 3vw, 3rem);
  font-weight: 700;
}

/* Specialist / Major subtitle */

.cover-subtitle {
  width: fit-content;
  max-width: 100%;

  font-size: 1.15rem;
  line-height: 1.5;
}

.cover-bottom span {
  opacity: 0.6;
}

/* Scroll arrow */

.down {
  position: absolute;
  right: 5vw;
  bottom: 5vh;

  color: var(--white);
  font-size: 2rem;
  text-decoration: none;
}


/* ==========================================================
   7. PROGRAM OVERVIEW
   ========================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;

  margin-top: 8vh;

  background: #444444;
}

.cards article {
  min-height: 300px;
  padding: 2.2rem;

  background: #0b0b0b;
}

.cards b {
  color: var(--actuarial-green);
  font-size: 3rem;
}

.cards h3 {
  font-size: 1.25rem;
}

.cards p {
  color: #cfcfcf;
  line-height: 1.55;
}

.cards a {
  color: var(--white);
}


/* ==========================================================
   8. INDIVIDUAL PROGRAMS
   ========================================================== */

.program {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 8vw;

  background: var(--paper);
  color: #111111;
}

.program.alt {
  background: var(--actuarial-green);
  color: var(--white);
}

.program dl {
  margin: 0;
}

.program dl div {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;

  padding: 1.2rem 0;

  border-top: 1px solid currentColor;
}

.program dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.program dd {
  margin: 0;
  line-height: 1.45;
}

.program .lede {
  max-width: 680px;
}


/* ==========================================================
   9. ACADEMIC DISTINCTION / METRICS
   ========================================================== */

.metrics {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 8vw;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.metric-grid div {
  padding: 1.5rem 1rem 2.5rem 0;

  border-top: 1px solid #555555;
}

.metric-grid strong {
  display: block;

  color: var(--actuarial-green);

  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: -0.05em;
}

.metric-grid span {
  line-height: 1.4;
}

.metrics small {
  position: absolute;
  right: 7vw;
  bottom: 4vh;

  color: #aaaaaa;
}


/* ==========================================================
   10. ALUMNI — INTERACTIVE GLOBE
   ========================================================== */

.globe-panel {
  display: grid;

  grid-template-columns:
    minmax(320px, 0.75fr)
    minmax(0, 1.25fr);

  align-items: center;
  gap: 4vw;

  width: 100%;

  background: var(--globe-bg);
}

/* Globe copy */

.globe-copy {
  position: relative;
  z-index: 2;

  grid-column: 1;

  width: 100%;
  min-width: 0;
  max-width: 520px;
}

.globe-copy p {
  max-width: 480px;

  color: rgba(255, 255, 255, 0.78);

  line-height: 1.55;
}

/* Alumni statistics */

.globe-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;

  width: 100%;
  max-width: 390px;
  margin-top: 3rem;
}

.globe-stats div {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

.globe-stats strong {
  color: var(--white);

  font-size: clamp(2rem, 3vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.globe-stats span {
  margin-top: 0.5rem;

  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  opacity: 0.6;
}

/* Globe canvas */

.globe-container {
  position: relative;
  grid-column: 2;

  width: 100%;
  height: 80vh;
  min-width: 0;
  min-height: 520px;

  align-self: center;
  justify-self: stretch;

  cursor: grab;
}

.globe-container:active {
  cursor: grabbing;
}

#globe-canvas {
  display: block;

  width: 100%;
  height: 100%;

  touch-action: none;
}


/* ==========================================================
   11. PROFESSIONAL EXPERIENCE
   ========================================================== */

.research {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8vw;

  background: var(--white);
  color: #111111;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
}

.columns h3 {
  color: var(--actuarial-green);
}

.columns p {
  line-height: 1.9;
}

.career-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;

  margin: 1.2rem 0 0;
  padding-left: 1.2rem;

  line-height: 1.7;
}

.text-link {
  display: inline-block;
  margin-top: 0.75rem;

  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}


/* ==========================================================
   12. PROFESSIONAL RECOGNITION / CREDENTIALS
   ========================================================== */

.city {
  display: flex;
  align-items: center;

  background:
    linear-gradient(
      120deg,
      var(--actuarial-green) 0 55%,
      var(--black) 55%
    );
}

.city-box {
  max-width: 720px;
}

.city-box p {
  font-size: 1.35rem;
  line-height: 1.55;
}

.city-box ul {
  padding-left: 1.2rem;
  line-height: 1.7;
}


/* ==========================================================
   13. ADMISSIONS
   ========================================================== */

.apply {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8vw;

  background: var(--actuarial-green);
}

.apply-copy {
  font-size: 1.05rem;
  line-height: 1.55;
}

.apply-copy li {
  margin-bottom: 1rem;
}

.apply-copy a:not(.button) {
  color: inherit;
}

/* Admission buttons */

.button {
  display: inline-block;

  margin-top: 1rem;
  padding: 14px 18px;

  border: 1px solid var(--white);

  color: var(--white);
  text-decoration: none;
}

/* Program codes */

.program-codes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem 1.2rem;

  margin: 1rem 0 0;
  padding-top: 1rem;

  border-top: 1px solid currentColor;

  font-size: 0.9rem;
  line-height: 1.35;
}

.program-codes dt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.program-codes dd {
  margin: 0;
  text-align: right;
}


/* ==========================================================
   14. FINAL PAGE — DEPARTMENT / CONTACT
   ========================================================== */

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;

  min-height: 100vh;
  padding: 0;

  background: var(--actuarial-green);
  color: var(--white);

  overflow: hidden;
}

/* Contact information */

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 10vh 7vw;
}

.footer-content .eyebrow {
  margin-bottom: 2rem;
}

.footer-content h2 {
  margin: 0 0 3rem;

  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.footer-details {
  font-size: 1rem;
  line-height: 1.8;
  opacity: 0.85;
}

.footer-link {
  display: inline-block;
  width: fit-content;

  margin-top: 1.5rem;
  padding-bottom: 5px;

  color: var(--white);
  text-decoration: none;

  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.footer-social {
  margin-top: 4rem;

  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  opacity: 0.65;
}

/* Final-page building photograph */

.footer-image {
  position: relative;

  width: 100%;
  min-height: 100vh;

  overflow: hidden;
}

.footer-image img {
  position: absolute;
  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: right center;

  max-width: none;
}


/* ==========================================================
   15. MOBILE AND TABLET NAVIGATION
   Breakpoint: 800px
   ========================================================== */

@media (max-width: 800px) {

  /* Navigation container */

  .nav {
    justify-content: flex-end;
    align-items: flex-start;

    padding: 16px 5vw;

    mix-blend-mode: normal;
  }

  /* Hamburger button */

  .nav-toggle {
    display: flex;

    position: relative;
    z-index: 22;

    width: 42px;
    height: 42px;
    padding: 10px;

    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;

    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;

    background: var(--actuarial-green);
    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle span {
    display: block;

    width: 20px;
    height: 2px;

    background: var(--white);
    border-radius: 2px;

    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }

  /* Hamburger transforms into X */

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Closed state */

  .nav nav.nav-menu {
    display: none;
  }

  /* Open dropdown */

  .nav nav.nav-menu.is-open {
    display: flex;

    position: absolute;
    top: 68px;
    right: 5vw;

    flex-direction: column;
    align-items: stretch;
    gap: 0;

    width: min(260px, 90vw);
    padding: 10px 0;

    background: rgba(0, 35, 25, 0.98);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
  }

  .nav nav.nav-menu a {
    display: block;

    padding: 15px 22px;

    color: var(--white);
    font-size: 0.82rem;
    letter-spacing: 0.09em;

    text-decoration: none;
  }

  .nav nav.nav-menu a:hover,
  .nav nav.nav-menu a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
  }


  /* --------------------------------------------------------
     General panel layouts
     -------------------------------------------------------- */

  .panel {
    padding: 12vh 7vw 7vh;
  }

  .cards,
  .program,
  .metrics,
  .research,
  .apply {
    grid-template-columns: 1fr;
  }


  /* --------------------------------------------------------
     Cover
     -------------------------------------------------------- */

  .cover {
    padding: 5vh 5vw;
  }

  .cover-logo {
    width: clamp(190px, 56vw, 320px);
    max-height: 90px;
  }

  .cover-title {
    font-size: clamp(2.8rem, 11vw, 5rem);
  }

  .cover-bottom {
    width: min(560px, 90vw);
  }


  /* --------------------------------------------------------
     Programs
     -------------------------------------------------------- */

  .cards {
    margin-top: 4vh;
  }

  .cards article {
    min-height: auto;
  }

  .program {
    align-content: center;
  }


  /* --------------------------------------------------------
     Metrics
     -------------------------------------------------------- */

  .metric-grid {
    margin-top: 4vh;
  }


  /* --------------------------------------------------------
     Alumni globe
     -------------------------------------------------------- */

  .globe-panel {
    grid-template-columns: 1fr;

    align-content: center;

    gap: 1rem;
  }

  .globe-copy {
    grid-column: 1;
    max-width: none;
  }

  .globe-copy h2 {
    font-size: 3.3rem;
  }

  .globe-copy > p {
    display: none;
  }

  .globe-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 1rem;

    margin-top: 1.5rem;
    max-width: 360px;
  }

  .globe-stats strong {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .globe-container {
    grid-column: 1;

    width: 100%;
    height: 46vh;
    min-height: 310px;
  }


  /* --------------------------------------------------------
     Professional experience
     -------------------------------------------------------- */

  .career-list {
    grid-template-columns: 1fr;
  }

  .columns {
    grid-template-columns: 1fr 1fr;
  }


  /* --------------------------------------------------------
     Professional credentials
     -------------------------------------------------------- */

  .city {
    background: var(--actuarial-green);
  }

  .city-box {
    padding: 4vh 0;
  }


  /* --------------------------------------------------------
     Final page / contact
     -------------------------------------------------------- */

  .footer {
    grid-template-columns: 1fr;
    grid-template-rows: auto 40vh;

    min-height: 100vh;
  }

  .footer-content {
    padding: 10vh 7vw 7vh;
  }

  .footer-content h2 {
    font-size: clamp(3rem, 12vw, 5rem);
    margin-bottom: 2rem;
  }

  .footer-social {
    margin-top: 2rem;
  }

  .footer-image {
    min-height: 40vh;
  }

  .footer-image img {
    object-position: right center;
  }


  /* --------------------------------------------------------
     Scroll snapping
     -------------------------------------------------------- */

  .snap {
    scroll-snap-type: y proximity;
  }
}


/* ==========================================================
   16. SMALL MOBILE
   ========================================================== */

@media (max-width: 520px) {

  .cover-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .cover-subtitle {
    font-size: 1rem;
  }

  .globe-stats {
    gap: 0.6rem;
  }

  .globe-stats strong {
    font-size: 1.8rem;
  }

  .globe-stats span {
    font-size: 0.6rem;
  }

  .globe-container {
    height: 43vh;
    min-height: 290px;
  }

  .columns {
    grid-template-columns: 1fr;
  }

  .program-codes {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .program-codes dd {
    margin-bottom: 0.65rem;
    text-align: left;
  }
}


/* ==========================================================
   17. DESKTOP NAVIGATION
   Explicitly restore horizontal links above 800px
   ========================================================== */

@media (min-width: 801px) {

  .nav {
    justify-content: flex-end;
    align-items: center;
  }

  .nav-toggle {
    display: none !important;
  }

  .nav nav.nav-menu {
    display: flex !important;

    position: static;

    flex-direction: row;
    align-items: center;
    gap: 22px;

    width: auto;
    padding: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .nav nav.nav-menu a {
    padding: 0;
  }
}


/* ==========================================================
   18. REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .snap {
    scroll-snap-type: none;
  }

  .nav-toggle span {
    transition: none;
  }
}
