:root {
  --bg: #eef3f8;
  --bg-alt: #f8fbff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: rgba(15, 23, 42, 0.12);
  --ring: rgba(37, 99, 235, 0.2);
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --highlight: #ca8a04;
  --shadow-card: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.07);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --content-max: 1040px;
  --page-bg:
    radial-gradient(72% 52% at 90% -5%, rgba(14, 116, 144, 0.24), transparent 54%),
    radial-gradient(84% 58% at 0% 100%, rgba(202, 138, 4, 0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--page-bg);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: transparent;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(248, 251, 255, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.78rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.nav-brand {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.nav-links a {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.36rem 0.74rem;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-links .primary-link,
.nav-links .active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hamburger {
  display: none;
  width: 28px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 100%;
  height: 2px;
  display: block;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

main {
  flex: 1;
  width: 100%;
  padding: calc(5.2rem + env(safe-area-inset-top, 0px)) 1.5rem 2.6rem;
}

.landing-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 1.2rem;
}

.landing-main .hero-landing {
  width: 100%;
}

.section,
.page,
.hero,
.updates-section {
  max-width: var(--content-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section,
.updates-section {
  margin-bottom: 2rem;
}

.page-title,
.hero-title,
.profile-name {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: #0b1224;
}

.page-title {
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  margin-bottom: 0.45rem;
}

.page-subtitle,
.hero-subtitle,
.profile-role,
.about-text,
.project-desc,
.pub,
.honor,
.item,
.updates-text,
.photo-caption {
  color: var(--text-muted);
}

.eyebrow,
.section-title,
.group-heading {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: #334155;
}

.section-title {
  margin-bottom: 0.8rem;
}

.card,
.project-card,
.updates-card,
.hero-right {
  background: linear-gradient(160deg, var(--surface), rgba(255, 255, 255, 0.75));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-xl);
}

.card,
.project-card,
.updates-card {
  padding: 1.2rem 1.35rem;
}

.card + .card,
.item + .item,
.honor + .honor,
.pub + .pub,
.project-card + .project-card {
  margin-top: 0.9rem;
}

.honor + .honor,
.pub + .pub {
  border-top: 1px dashed rgba(51, 65, 85, 0.26);
  padding-top: 0.8rem;
}

.highlight-text,
.text-accent {
  color: var(--accent-strong);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.hero-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
  text-align: left;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
}

.hero-bottom {
  max-width: 42rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4.3vw, 3.1rem);
}

.hero-subtitle {
  max-width: 44rem;
}

.hero-landing .hero-subtitle {
  max-width: 34rem;
}

.typed-prefix {
  color: var(--accent-strong);
}

.typed-wrapper {
  display: inline-flex;
  align-items: baseline;
  min-height: 1.2em;
  white-space: pre;
}

.typed-main {
  font-weight: 600;
}

.typed-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--text);
  margin-left: 0.08em;
  animation: caret-blink 1s steps(2, start) infinite;
}

@keyframes caret-blink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

.hero-tags,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tag,
.pill {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.3rem 0.76rem;
  font-size: 0.77rem;
  color: #1e293b;
}

.hero-right {
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.hero-right-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  font-size: 0.69rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #475569;
  pointer-events: none;
  background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.88));
  z-index: 2;
}

#networkCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
}

.profile-photo {
  width: min(230px, 42vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 28px 42px rgba(15, 23, 42, 0.22);
}

.profile-links,
.hero-links {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 0.7rem;
}

.profile-link,
.hero-link {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  background: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.profile-link:hover,
.hero-link:hover {
  transform: translateY(-2px);
  background: #111827;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.26);
}

.profile-link-icon,
.hero-link-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.updates-list,
.list {
  list-style: none;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0.68rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.updates-list li,
.list li {
  font-size: 0.9rem;
}

.updates-list::-webkit-scrollbar,
.photo-strip::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.updates-list::-webkit-scrollbar-thumb,
.photo-strip::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.35);
  border-radius: 999px;
}

.updates-date {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.76rem;
  min-width: 4.4rem;
  color: #334155;
  font-weight: bold;
}

.card a,
.project-desc a,
.honor a,
.pub-title a,
.item-body a {
  color: #0f172a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.card a:hover,
.project-desc a:hover,
.honor a:hover,
.pub-title a:hover,
.item-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
}

.label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #334155;
  margin-bottom: 0.55rem;
}

.photo-strip {
  display: flex;
  gap: 0.95rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.35rem;
}

.photo-item {
  flex: 0 0 225px;
  scroll-snap-align: start;
}

.photo-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: #dbeafe;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dog-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.85fr);
  align-items: start;
}

.dog-text .about-text {
  max-width: 66ch;
}

.dog-layout .photo-item {
  flex: 0 0 338px;
}

.project-header,
.pub-meta,
.item-header,
.honor-header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.project-title,
.item-title,
.honor-title,
.pub-title {
  color: #0f172a;
}

.item-header-main,
.honor-header-main {
  min-width: 0;
}

.project-title,
.item-title {
  font-weight: 600;
}

.item-subtitle,
.honor-subtitle,
.pub-authors {
  font-size: 0.82rem;
}

.author-highlight {
  font-weight: 600;
  font-style: italic;
  text-decoration: underline;
}

.project-dates,
.item-dates,
.item-location,
.honor-date,
.honor-location,
.pub-year,
.pub-venue {
  white-space: nowrap;
  font-size: 0.77rem;
  color: #475569;
}

.item-meta,
.honor-meta {
  text-align: right;
}

.list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.38rem;
}

.list li::before {
  content: "•";
  position: absolute;
  left: 0.15rem;
  color: var(--accent-strong);
}

.js-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.js-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

footer {
  padding: 1rem 1.5rem 1.4rem;
  text-align: center;
  font-size: 0.76rem;
  color: #334155;
}

@media (max-width: 940px) {
  .hero-landing {
    grid-template-columns: 1fr;
  }

  .hero-right {
    min-height: 270px;
  }

  .project-dates,
  .item-dates,
  .item-location,
  .honor-date,
  .honor-location,
  .pub-year,
  .pub-venue {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  main {
    padding-top: calc(4.9rem + env(safe-area-inset-top, 0px));
  }

  .nav-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0;
    padding: 0.6rem 1rem 0.85rem;
    flex-direction: column;
    align-items: stretch;
    background: rgba(248, 251, 255, 0.96);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: none;
  }

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

  .nav-links a {
    text-align: left;
  }

  .hero-title,
  .profile-name,
  .page-title {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .hero-top {
    flex-direction: column;
  }

  .profile-links,
  .hero-links {
    grid-template-columns: repeat(3, 38px);
  }

  .hero .profile-links {
    grid-template-columns: repeat(3, minmax(0, 40px));
    gap: 0.45rem;
    width: min(100%, 21rem);
    justify-content: center; 
    margin: 0 auto 1rem;   /* 위 1rem, 좌우 auto(중앙), 아래 0 */
  }

  .hero .profile-link {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .hero .profile-link-icon {
    width: 17px;
    height: 17px;
  }

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

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

  .photo-item {
    flex-basis: 74%;
  }

  .dog-layout .photo-item {
    flex: 0 0 74%;
  }
}
