@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

/* shell.css — shared layout for all subpages of eunheepark.com */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --mid: #888;
  --faint: #ccc;
  --rule: #e4e2de;
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', sans-serif;
  --nav-w: 360px;
}

html {
  font-size: 16px;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  overflow: hidden;
  height: 100vh;
}

.shell {
  display: flex;
  height: 100vh;
}

#content-frame {
  flex: 1;
  height: 100vh;
  border: none;
}

/* NAV */
.nav {
  width: var(--nav-w);
  min-width: var(--nav-w);
  height: 100vh;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.75rem;
  background: var(--white);
  z-index: 10;
  overflow-y: auto;
}

/* Keep left panel content consistent across pages:
   show only the primary nav list and shared site identity */
.nav .nav-group + .nav-group {
  display: none;
}

.nav-bottom a {
  display: none !important;
}

.nav::-webkit-scrollbar {
  width: 0;
}

.nav-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
}

.nav-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(8%) contrast(1.05);
}

.nav-photo-ph {
  width: 100%;
  height: 100%;
  background: #e8e4de;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--mid);
}

.nav-name {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.1rem;
  letter-spacing: -0.01em;
  color: green;
}

.nav-name em {
  font-style: normal;
  font-weight: 400;
}

.nav-cred {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--mid);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.nav-profile-pic {
  width: 72px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule);
  margin-bottom: 0.5rem;
  display: block;
}

.nav-role {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--mid);
  letter-spacing: 0.06em;
  margin-top: -0.5rem;
  margin-bottom: 0.9rem;
}

.nav-group {
  margin-bottom: 0.75rem;
}

.nav-group-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.5rem;
}

.nav-group ul {
  list-style: none;
}

.nav-group li {
  margin-bottom: 1px;
}

.nav-group a {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--black);
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  margin-left: -0.5rem;
  transition: border-color .15s;
}

.nav-group a:hover {
  border-color: var(--mid);
}

.nav-group a.active {
  color: #2e7d32;
  border-color: #2e7d32;
  font-weight: 500;
}

.nav-sub-dotted a.active {
  color: #2e7d32;
  text-decoration-color: #2e7d32;
}

.nav-group a .arr {
  font-size: 0.65rem;
  color: var(--mid);
  margin-left: 0.2rem;
}

.nav .arr {
  display: none !important;
}

/* Nav sub-list (research areas, shown under Research link) */
.nav-sub {
  list-style: none;
  padding: 0;
  margin: 0.1rem 0 0.3rem 0.7rem;
}
.nav-sub li {
  margin-bottom: 0;
}
.nav-sub a {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--mid);
  text-decoration: none;
  display: block;
  padding: 0.18rem 0 0.18rem 0.5rem;
  border-left: 1px solid var(--rule);
  margin-left: -0.5rem;
  transition: color .15s, border-color .15s;
}
.nav-sub a:hover { color: var(--black); border-color: var(--mid); }

.nav-sub-dotted a {
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: normal;
  color: var(--black);
  text-transform: none;
  border-left: 0;
  padding-left: 0;
  margin-left: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.nav-sub-dotted a:hover {
  color: var(--black);
  text-decoration-color: var(--black);
}

.nav-heading {
  display: block;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--black);
  padding: 0.2rem 0;
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

.nav-bottom {
  margin-top: auto;
  padding-top: 1rem;
}

.nav-bottom a {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--mid);
  text-decoration: none;
  padding: 0.22rem 0;
  transition: color .15s;
}

.nav-bottom a:hover {
  color: var(--black);
}

.nav-copy {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--faint);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.nav-credit {
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--faint);
  margin-top: 0.35rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* CONTENT */
.content {
  flex: 1;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
}

.content::-webkit-scrollbar {
  width: 0;
}

/* Masthead */
.sec-masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.4rem 3rem;
  background: var(--white);
  z-index: 5;
  border-bottom: 1px solid var(--rule);
}

/* Remove page headings globally */
.sec-masthead,
.sec-masthead-title,
.sec-masthead-num {
  display: none !important;
}

.sec-masthead-title {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.sec-masthead-title em {
  font-style: italic;
  font-weight: 400;
}

.sec-masthead-num {
  font-family: var(--mono);
  font-size: 0.56rem;
  color: var(--mid);
  letter-spacing: 0.1em;
}

/* Page body */
.page-body {
  padding: 2.5rem 3rem;
  max-width: 900px;
}

.page-body h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
  margin-top: 2rem;
}

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

.page-body p {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--black);
  margin-bottom: 0.75rem;
  max-width: 680px;
}

.page-body ul,
.page-body ol {
  margin: 0 0 1.2rem 1.2rem;
}

.page-body li {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--black);
}

.page-body a {
  color: var(--black);
}

/* Section divider */
.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1rem 0;
}

/* Archive items */
.archive-group {
  margin-bottom: 1.5rem;
}

.archive-group-head {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  padding-bottom: 0.35rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

.archive-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--mid);
  margin-bottom: 0.3rem;
}

.archive-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.archive-desc {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--black);
  line-height: 1.45;
}

.archive-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}

.archive-title a:hover {
  border-color: var(--black);
}

/* Mobile */
.m-btn {
  display: none;
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 500;
  background: var(--black);
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.m-btn span {
  display: block;
  width: 14px;
  height: 1px;
  background: var(--white);
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 400;
  }

  .nav.open {
    transform: none;
  }

  .m-btn {
    display: flex;
  }

  .content {
    width: 100vw;
  }

  .page-body {
    padding: 2rem 1.5rem;
  }

  .sec-masthead {
    padding: 1.2rem 1.5rem;
  }
}
