/* ==========================================================================
   Jihye Park — Academic Profile
   Warm luxury minimal aesthetic
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  /* Palette */
  --color-bg:             #F5F0EB;
  --color-bg-alt:         #EDE7E0;
  --color-surface:        #FDFBF9;
  --color-text:           #2B2523;
  --color-text-muted:     #6B5E56;
  --color-accent:         #B8956A;
  --color-accent-hover:   #A07B52;
  --color-accent-light:   #D9C8B3;
  --color-border:         #D4C5B9;
  --color-border-light:   #E8DCC8;

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Sizing */
  --max-width:    860px;
  --nav-height:   72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--color-accent-light);
  color: var(--color-text);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border-light);
}

h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-accent-hover);
}

h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

strong {
  font-weight: 500;
}

em {
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 2.5rem 0;
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text);
  text-transform: uppercase;
  border: none;
}

.site-name:hover {
  color: var(--color-accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.25rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Main Container --- */
.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  flex: 1;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.subtitle {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 300;
}

/* --- Home Page --- */
.home-content {
  text-align: center;
}

.home-hero {
  padding: 2rem 0 1rem;
}

.headshot {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  margin-bottom: 1.5rem;
  filter: grayscale(10%);
  transition: filter 0.3s ease;
}

.headshot:hover {
  filter: grayscale(0%);
}

.home-name {
  font-size: 3.2rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.home-position {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.home-bio {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.85;
  text-align: left;
  color: var(--color-text);
}

.home-credentials {
  list-style: none;
  padding: 0;
  margin: 0 auto 2.5rem;
  max-width: 500px;
}

.home-credentials li {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border-light);
  letter-spacing: 0.02em;
}

.home-credentials li:last-child {
  border-bottom: none;
}

/* Social links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: var(--color-text-muted);
  transition: fill 0.2s ease;
}

.social-link:hover svg {
  fill: var(--color-accent);
}

/* --- CV Page --- */
.cv-section {
  text-align: center;
}

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  padding: 0.6rem 1.5rem;
  border-radius: 2px;
  margin-bottom: 2rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.cv-download:hover {
  background: var(--color-accent);
  color: #fff;
}

.pdf-viewer-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.pdf-viewer-container iframe,
.pdf-viewer-container embed {
  width: 100%;
  height: 80vh;
  border: none;
}

/* --- Research Page --- */
.research-section {
  margin-bottom: 3rem;
}

.publication-entry {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.publication-entry:last-child {
  border-bottom: none;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.pub-title a {
  color: var(--color-text);
  border-bottom: 1px solid transparent;
}

.pub-title a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent-light);
}

.pub-authors {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.pub-venue {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pub-abstract {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 0.75rem;
}

.pub-abstract summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.pub-abstract summary:hover {
  color: var(--color-accent-hover);
}

.pub-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.pub-link {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-light);
  padding-bottom: 1px;
}

.pub-link:hover {
  border-bottom-color: var(--color-accent);
}

/* --- Data Page --- */
.dataset-list {
  list-style: none;
  padding: 0;
}

.dataset-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.dataset-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
}

.dataset-desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* --- Teaching Page --- */
.teaching-entry {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.teaching-entry:last-child {
  border-bottom: none;
}

.course-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.course-meta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.course-description {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- Attic / Gallery --- */
.gallery-intro {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  text-align: center;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(43, 37, 35, 0.08);
}

.gallery-item img {
  width: 100%;
  display: block;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.gallery-caption {
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border-light);
  padding: 2rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer p {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin: 0;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
    padding: 1rem 2rem;
    gap: 0.75rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .site-nav {
    position: relative;
  }

  .container {
    padding: 2rem 1.25rem 3rem;
  }

  h1, .home-name {
    font-size: 2.2rem;
  }

  .headshot {
    width: 140px;
    height: 140px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .pdf-viewer-container iframe,
  .pdf-viewer-container embed {
    height: 60vh;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.5rem;
  }

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

/* --- Print --- */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle,
  .cv-download {
    display: none;
  }

  body {
    background: #fff;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}
