/* =========================================================
   AYOUNG CHUN — ONE-PAGE ACADEMIC WEBSITE
   ========================================================= */

:root {
  --background: #fbfaf8;
  --surface: #ffffff;
  --surface-soft: #f5f3ef;

  --text: #2f3338;
  --heading: #22262b;
  --muted: #6d747c;

  --accent: #2f7f9e;
  --accent-dark: #215f78;
  --accent-soft: #eaf3f6;

  --border: #e3dfd8;
  --border-strong: #d4cec4;

  --content-width: 960px;

  --shadow-soft:
    0 1px 2px rgba(30, 36, 42, 0.04),
    0 10px 28px rgba(30, 36, 42, 0.05);
}

/* =========================================================
   RESET AND BASE
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);

  font-family:
    "Source Sans 3",
    "Source Sans Pro",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 1rem;
  line-height: 1.68;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

a:hover,
a:focus {
  color: var(--accent-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

/* =========================================================
   HEADER AND NAVIGATION
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(251, 250, 248, 0.94);
  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
  width: min(var(--content-width), calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.site-name {
  color: var(--heading);
  font-size: 1.03rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-name:hover,
.site-name:focus {
  color: var(--accent-dark);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.93rem;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;

  height: 2px;

  content: "";
  background: var(--accent);
  border-radius: 999px;

  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--heading);
}

.site-nav a:hover::after,
.site-nav a:focus::after {
  transform: scaleX(1);
}

/* =========================================================
   PAGE CONTAINER
   ========================================================= */

.site-container {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 84px;
}

.site-container > section {
  margin-top: 4.6rem;
}

.site-container > section:first-child {
  margin-top: 0;
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */

.profile-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.profile-photo {
  width: 220px;
  aspect-ratio: 1 / 1.1;

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

  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.about-text {
  min-width: 0;
}

.about-text p {
  margin: 0 0 1.15rem;
}

.about-text p:first-of-type {
  font-size: 1.03rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  margin-top: 1.3rem;
  gap: 0.55rem;
}

.profile-links a {
  display: inline-flex;
  align-items: center;

  padding: 0.38rem 0.72rem;

  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;

  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.profile-links a:hover,
.profile-links a:focus {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #bed8e2;
  text-decoration: none;
}

.profile-links a::after {
  content: none !important;
}

.pronunciation-note {
  margin-top: 1.15rem !important;
  color: var(--muted);
  font-size: 0.9rem;
}

/* =========================================================
   MAJOR SECTION HEADINGS
   ========================================================= */

/* =========================================================
   MAJOR SECTION HEADINGS
   ========================================================= */

.section-title {
  position: relative;

  display: flex;
  align-items: baseline;
  gap: 0.65rem;

  margin: 0 0 1.9rem;
  padding-bottom: 0.75rem;

  color: var(--heading);

  font-size: 1.72rem;
  font-weight: 780;
  line-height: 1.15;
  letter-spacing: -0.028em;

  border-bottom: 1px solid var(--border);
}

.section-title::after {
  position: absolute;
  bottom: -1px;
  left: 0;

  width: 60px;
  height: 3px;

  content: "";
  background: var(--accent);
  border-radius: 999px;
}

.section-number {
  color: var(--accent);

  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.section-context {
  color: var(--muted);

  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
/* =========================================================
   RESEARCH SUBSECTIONS
   ========================================================= */

.research-section {
  margin-top: 2.45rem;
}

.research-section:first-of-type {
  margin-top: 0;
}

.research-section-title {
  display: inline-block;

  margin: 0 0 0.95rem;
  padding: 0.3rem 0.7rem;

  color: var(--accent-dark);
  background: var(--accent-soft);

  border-radius: 5px;

  font-size: 0.8rem;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   PAPER ENTRIES
   ========================================================= */

.paper-entry {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.paper-entry + .paper-entry {
  margin-top: 1.55rem;
}

.paper-entry h4 {
  margin: 0 0 0.34rem;

  color: var(--heading);

  font-size: 1.08rem;
  font-weight: 710;
  line-height: 1.38;
  letter-spacing: -0.01em;
}

.paper-meta {
  margin: 0;

  color: var(--muted);

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

.paper-award {
  margin: 0.3rem 0 0;

  color: #7a5c23;

  font-size: 0.89rem;
  font-style: italic;
  line-height: 1.45;
}

/* =========================================================
   PAPER INTERACTIONS
   ========================================================= */

.paper-entry:not(.featured-paper) {
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.paper-entry h4 {
  transition: color 0.18s ease;
}

.paper-entry:not(.featured-paper):hover {
  transform: translateX(4px);
}

.paper-entry:hover h4 {
  color: var(--accent-dark);
}

.featured-paper {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.featured-paper:hover {
  transform: translateY(-2px);
  border-color: #bdd7e1;
  box-shadow:
    0 3px 8px rgba(30, 36, 42, 0.06),
    0 14px 32px rgba(30, 36, 42, 0.07);
}
/* =========================================================
   FEATURED JOB MARKET PAPER
   ========================================================= */

.featured-paper {
  position: relative;

  margin-top: 0;
  padding: 1.35rem 1.5rem;

  background:
    linear-gradient(
      135deg,
      var(--surface) 0%,
      #f7fbfc 100%
    );

  border: 1px solid #cfdfe5;
  border-radius: 11px;
  box-shadow: var(--shadow-soft);
}

.featured-paper::before {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0;

  width: 4px;

  content: "";
  background: var(--accent);
  border-radius: 0 999px 999px 0;
}

.featured-paper h4 {
  font-size: 1.13rem;
}

/* =========================================================
   PAPER LINKS AND ABSTRACT BUTTONS
   ========================================================= */

.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  gap: 0.5rem;
  margin-top: 0.65rem;
}

.paper-links a,
.abstract-toggle {
  display: inline-flex;
  align-items: center;

  padding: 0.3rem 0.65rem;

  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;

  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.abstract-toggle {
  cursor: pointer;
}

.paper-links a:hover,
.paper-links a:focus,
.abstract-toggle:hover,
.abstract-toggle:focus {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #bdd7e1;
  text-decoration: none;
}

.abstract-toggle[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: #bdd7e1;
}

/* =========================================================
   ABSTRACTS
   ========================================================= */

.paper-abstract {
  margin-top: 0.9rem;
  padding: 0.95rem 1.1rem;

  color: #4d555d;
  background: var(--surface-soft);

  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;

  font-size: 0.93rem;
  line-height: 1.7;
}

.paper-abstract p {
  margin: 0;
}

.paper-abstract[hidden] {
  display: none;
}

/* =========================================================
   COLLABORATIVE PROJECTS
   ========================================================= */

.compact-paper {
  margin: 0;
  padding: 0;
}

.compact-paper + .compact-paper {
  margin-top: 1.15rem;
}

.compact-paper h4 {
  margin-bottom: 0.22rem;
}

/* =========================================================
   TEACHING SECTION
   ========================================================= */

#research + #teaching {
  margin-top: 4.2rem;
}

.teaching-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 30px;
}

.teaching-column {
  padding: 1.3rem 1.35rem;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;

  box-shadow:
    0 1px 2px rgba(30, 36, 42, 0.025),
    0 8px 20px rgba(30, 36, 42, 0.035);
}

.teaching-column h3 {
  margin: 0 0 0.9rem;

  color: var(--accent-dark);

  font-size: 0.92rem;
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.teaching-column ul {
  margin: 0;
  padding-left: 1.15rem;
}

.teaching-column li {
  margin-bottom: 0.78rem;
  padding-left: 0.12rem;
}

.teaching-column li:last-child {
  margin-bottom: 0;
}

.course-detail {
  display: block;
  margin-top: 0.1rem;

  color: var(--muted);

  font-size: 0.87rem;
  line-height: 1.45;
}

.course-resource-separator {
  margin: 0 0.35rem;
  color: var(--muted);
}

.course-resource-link {
  font-size: 0.92rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 1.4rem 0 2.6rem;

  color: var(--muted);
  border-top: 1px solid var(--border);

  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(47, 127, 158, 0.24);
  outline-offset: 3px;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {
  html {
    font-size: 16.5px;
  }

  .nav-wrap {
    min-height: 68px;
  }

  .site-nav {
    gap: 22px;
  }

  .site-container {
    padding-top: 40px;
  }

  .profile-row {
    grid-template-columns: 195px minmax(0, 1fr);
    gap: 34px;
  }

  .profile-photo {
    width: 195px;
  }

  .teaching-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {
  html {
    scroll-padding-top: 120px;
     .profile-photo-wrap {
  width: 180px;
}

.profile-photo-wrap::before {
  top: 8px;
  left: 8px;
}

.eyebrow {
  font-size: 0.72rem !important;
}

.section-title {
  gap: 0.5rem;
}

.section-context {
  font-size: 0.73rem;
}

.paper-entry:not(.featured-paper):hover {
  transform: none;
}
  }

  .nav-wrap,
  .site-container,
  .site-footer {
    width: min(100% - 32px, var(--content-width));
  }

  .nav-wrap {
    min-height: auto;
    padding: 15px 0;

    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .site-nav {
    width: 100%;
    gap: 22px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .site-container {
    padding-top: 32px;
    padding-bottom: 58px;
  }

  .site-container > section {
    margin-top: 3.8rem;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .profile-photo {
    width: 180px;
    border-radius: 12px;
  }

  .section-title {
    margin-bottom: 1.55rem;
    font-size: 1.48rem;
  }

  .research-section {
    margin-top: 2.15rem;
  }

  .research-section-title {
    margin-bottom: 0.8rem;
    font-size: 0.76rem;
  }

  .paper-entry + .paper-entry {
    margin-top: 1.35rem;
  }

  .featured-paper {
    padding: 1.2rem 1.15rem;
  }

  .featured-paper::before {
    top: 0.9rem;
    bottom: 0.9rem;
  }

  .paper-entry h4 {
    font-size: 1.03rem;
  }

  .paper-abstract {
    padding: 0.9rem 1rem;
  }

  #research + #teaching {
    margin-top: 3.6rem;
  }

  .teaching-column {
    padding: 1.15rem;
  }
}

/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 400px) {
  .profile-links {
    gap: 0.45rem;
  }

  .profile-links a,
  .paper-links a,
  .abstract-toggle {
    font-size: 0.84rem;
  }

  .site-nav {
    font-size: 0.9rem;
  }
}

/* =========================================================
   ENHANCED ABOUT SECTION
   ========================================================= */

.profile-photo-wrap {
  position: relative;
  width: 220px;
  isolation: isolate;
}

.profile-photo-wrap::before {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: -1;

  width: 100%;
  height: 100%;

  content: "";
  background: var(--accent-soft);
  border: 1px solid #d2e4ea;
  border-radius: 14px;
}

.profile-photo {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.75rem !important;

  color: var(--accent-dark);

  font-size: 0.76rem !important;
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.status-badge {
  display: inline-flex;
  align-items: center;

  width: fit-content;
  margin: 0.15rem 0 0 !important;
  padding: 0.38rem 0.75rem;

  color: #73571f;
  background: #faf1dc;
  border: 1px solid #ead8aa;
  border-radius: 999px;

  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.25;
}
