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

body {
  font-family: 'Segoe UI', 'Noto Sans KR', Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #fff;
}

a {
  color: #5C3317;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #3E2009;
}

/* ===== Top Navigation ===== */
nav.top-nav {
  background: #fff;
  border-bottom: 2px solid #5C3317;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav.top-nav .nav-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2em;
}

nav.top-nav .nav-name {
  font-size: 1.1em;
  font-weight: 700;
  color: #5C3317;
  letter-spacing: 0.5px;
  padding: 0.8em 0;
}

nav.top-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

nav.top-nav ul li a {
  display: block;
  padding: 0.8em 1.2em;
  color: #555;
  font-size: 0.95em;
  font-weight: 500;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 3px solid transparent;
}

nav.top-nav ul li a:hover,
nav.top-nav ul li a.active {
  color: #5C3317;
  text-decoration: none;
  border-bottom: 3px solid #5C3317;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em;
  color: #5C3317;
  cursor: pointer;
}

/* ===== Main Content ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2em 2em 3em;
}

/* ===== Hero / Bio Section ===== */
.hero {
  display: flex;
  gap: 3em;
  align-items: flex-start;
  margin-bottom: 1em;
  padding-top: 1em;
}

.hero-left {
  flex-shrink: 0;
  text-align: center;
}

/* Flip card */
.flip-card {
  width: 220px;
  height: 220px;
  perspective: 800px;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 50%;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.hero-left .profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #d6c7b5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-left .photo-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: #d6c7b5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5C3317;
  font-size: 0.85em;
  border: 4px solid #c4ad94;
}

.social-links {
  margin-top: 1em;
  display: flex;
  justify-content: center;
  gap: 0.8em;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #5C3317;
  color: #fff;
  font-size: 1em;
  transition: background 0.2s, transform 0.2s;
}

.social-links a:hover {
  background: #3E2009;
  transform: scale(1.1);
  text-decoration: none;
}

.hero-right {
  flex: 1;
}

.hero-right .name {
  font-size: 2.5em;
  font-weight: 800;
  margin-bottom: 0.3em;
  line-height: 1.2;
}

.hero-right .name .first-name {
  color: #5C3317;
}

.hero-right .name .last-name {
  color: #333;
}

.hero-right .tagline {
  color: #666;
  font-size: 1.05em;
  margin-bottom: 1em;
  font-style: italic;
}

.hero-right .bio {
  font-size: 0.98em;
  color: #444;
  margin-bottom: 1em;
}

.hero-right .bio p {
  margin-bottom: 0.8em;
}

.hero-right .contact-info {
  font-size: 0.92em;
  color: #555;
}

.hero-right .contact-info a {
  font-weight: 600;
}

/* ===== Section Divider ===== */
.section-divider {
  border: none;
  border-top: 1px solid #e0d5c8;
  margin: 1.5em 0;
}

/* ===== Section Headings ===== */
.section-title {
  font-size: 1.5em;
  font-weight: 700;
  color: #5C3317;
  margin-bottom: 0.7em;
}

/* ===== Lists ===== */
.info-list {
  list-style: none;
  padding-left: 0;
}

.info-list li {
  margin-bottom: 0.4em;
  font-size: 0.95em;
  color: #444;
  padding-left: 1em;
  position: relative;
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: #8B6B3D;
  border-radius: 50%;
}

.info-list li strong {
  color: #333;
}

.info-list li .period {
  color: #888;
  font-size: 0.9em;
}

.info-list li .note {
  display: block;
  color: #888;
  font-size: 0.88em;
  margin-top: 0.1em;
  padding-left: 0.2em;
}

/* ===== Publication Entry (simple, for home page) ===== */
.pub-entry {
  margin-bottom: 1em;
  padding-left: 1.5em;
  position: relative;
}

.pub-entry::before {
  content: "\2022";
  position: absolute;
  left: 0.3em;
  color: #5C3317;
  font-weight: bold;
}

.pub-entry .pub-title {
  font-weight: 700;
  color: #333;
}

.pub-entry .pub-venue {
  color: #666;
  font-style: italic;
}

/* ===== Publication Card Inline (badge + title on same line) ===== */
.pub-card-inline {
  margin-bottom: 1.2em;
  padding-bottom: 1.2em;
  border-bottom: 1px solid #d6c7b5;
}

.pub-card-inline:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  margin-bottom: 0.4em;
}

/* ===== Publication Card (detailed, for publication page) ===== */
.pub-card {
  display: flex;
  gap: 2em;
  margin-bottom: 2.5em;
  padding-bottom: 2.5em;
  border-bottom: 1px solid #d6c7b5;
}

.pub-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-card-left {
  flex-shrink: 0;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

.pub-venue-badge {
  display: inline-block;
  background: #8B6B3D;
  color: #fff;
  font-weight: 700;
  font-size: 0.82em;
  padding: 0.2em 0.8em;
  border-radius: 5px;
  text-align: center;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-card-header .pub-card-title {
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.4;
}

.pub-card-header .pub-card-title a {
  color: #5C3317;
}

.pub-card-header .pub-card-title a:hover {
  color: #3E2009;
}

.pub-card-inline .pub-authors {
  font-size: 0.92em;
  color: #555;
  margin-bottom: 0.3em;
  line-height: 1.5;
}

.pub-card-inline .pub-authors .me {
  font-weight: 700;
  color: #333;
}

.pub-card-inline .pub-authors .equal-contrib {
  display: inline;
  font-size: 0.82em;
  color: #aaa;
  font-style: italic;
  margin-left: 0.3em;
}

.pub-card-inline .pub-card-venue {
  font-style: italic;
  color: #888;
  font-size: 0.9em;
  margin-bottom: 0.6em;
}

.pub-card-venue-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.6em;
  flex-wrap: wrap;
}

.pub-card-venue-row span {
  font-style: italic;
  color: #888;
  font-size: 0.9em;
}

.pub-card-venue-row .pub-link-btn {
  display: inline-block;
  padding: 0.2em 0.7em;
  font-size: 0.8em;
  font-weight: 600;
  color: #fff;
  background: #5C3317;
  border-radius: 4px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.pub-card-venue-row .pub-link-btn:hover {
  background: #3E2009;
  text-decoration: none;
}

.pub-card-inline .pub-buttons {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

.pub-card-inline .pub-buttons a {
  display: inline-block;
  padding: 0.35em 1em;
  font-size: 0.85em;
  font-weight: 600;
  color: #fff;
  background: #5C3317;
  border-radius: 5px;
  transition: background 0.2s;
}

.pub-card-inline .pub-buttons a:hover {
  background: #3E2009;
  text-decoration: none;
}

.pub-card-left .pub-thumb {
  width: 240px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e0d5c8;
}

.pub-card-left .pub-thumb-placeholder {
  width: 240px;
  height: 150px;
  border-radius: 6px;
  background: #f0e8df;
  border: 1px dashed #c4ad94;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8a08a;
  font-size: 0.8em;
  text-align: center;
}

.pub-card-right {
  flex: 1;
}

.pub-card-right .pub-card-title {
  font-size: 1.15em;
  font-weight: 700;
  color: #5C3317;
  margin-bottom: 0.4em;
  line-height: 1.4;
}

.pub-card-right .pub-card-title a {
  color: #5C3317;
}

.pub-card-right .pub-card-title a:hover {
  color: #3E2009;
}

.pub-card-right .pub-authors {
  font-size: 0.92em;
  color: #555;
  margin-bottom: 0.4em;
  line-height: 1.5;
}

.pub-card-right .pub-authors .me {
  font-weight: 700;
  color: #333;
}

.pub-card-right .pub-authors .equal-contrib {
  display: inline;
  font-size: 0.82em;
  color: #aaa;
  font-style: italic;
  margin-left: 0.3em;
}

.pub-card-right .pub-card-venue {
  font-style: italic;
  color: #888;
  font-size: 0.9em;
  margin-bottom: 0.8em;
}

.pub-buttons {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

.pub-buttons a {
  display: inline-block;
  padding: 0.35em 1em;
  font-size: 0.85em;
  font-weight: 600;
  color: #fff;
  background: #5C3317;
  border-radius: 5px;
  transition: background 0.2s;
}

.pub-buttons a:hover {
  background: #3E2009;
  text-decoration: none;
}

/* Responsive pub cards */
@media (max-width: 768px) {
  .pub-card {
    flex-direction: column;
    gap: 1em;
  }

  .pub-card-left {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }

  .pub-card-left .pub-thumb,
  .pub-card-left .pub-thumb-placeholder {
    width: 160px;
    height: 100px;
  }
}

/* ===== Awards ===== */
.award-item {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.award-item .award-year {
  color: #5C3317;
  font-weight: 700;
  min-width: 50px;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 1.5em 0;
  color: #999;
  font-size: 0.85em;
  border-top: 1px solid #eee;
  margin-top: 2em;
}

/* ===== Page Content (for sub-pages) ===== */
.page-header {
  margin-bottom: 2em;
}

.page-header h1 {
  font-size: 2.2em;
  color: #5C3317;
  font-weight: 700;
}

.pub-note {
  color: #888;
  font-size: 0.9em;
  font-style: italic;
  margin-top: 0.3em;
}

.pub-abstract {
  font-size: 0.88em;
  color: #666;
  line-height: 1.6;
  margin-bottom: 0.8em;
}

.page-content p {
  margin-bottom: 1em;
  color: #555;
}

.coming-soon {
  text-align: center;
  padding: 4em 0;
  color: #999;
  font-size: 1.1em;
}

/* ===== Portfolio Logo Grid ===== */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
  margin-top: 1em;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em;
  transition: opacity 0.2s;
}

.logo-item:hover {
  opacity: 0.6;
  text-decoration: none;
}

.logo-item img {
  max-width: 180px;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s;
}

.logo-item:hover img {
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
  }

  .logo-item {
    padding: 1.5em;
  }

  .logo-item img {
    max-width: 140px;
    max-height: 60px;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5em;
  }

  .hero-right .name {
    font-size: 2em;
  }

  .hero-left .profile-photo,
  .hero-left .photo-placeholder {
    width: 180px;
    height: 180px;
  }

  .container {
    padding: 1.5em 1.2em;
  }

  nav.top-nav .nav-container {
    flex-wrap: wrap;
    padding: 0 1em;
  }

  .menu-toggle {
    display: block;
  }

  nav.top-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 0.5em;
  }

  nav.top-nav ul.show {
    display: flex;
  }

  nav.top-nav ul li a {
    padding: 0.6em 1em;
    border-bottom: none;
  }
}
