:root {
  color-scheme: light;
  --accent: #80543a;
  --accent-dark: #603b29;
  --accent-light: #f6eee7;
  --text: #282522;
  --muted: #6d655e;
  --line: #e5ded8;
  --background: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 95px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.7 "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

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

.page-width {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--accent-dark);
  color: white;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(45, 32, 23, 0.035);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--accent);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-icon {
  font-size: 29px;
  line-height: 1;
}

.site-header nav {
  display: flex;
  gap: clamp(20px, 3vw, 42px);
  align-items: center;
}

.site-header nav a {
  color: #514841;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-header nav a:hover {
  color: var(--accent);
}

/* Two-column academic profile */
.page-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "profile main"
    "news main";
  gap: 31px 48px;
  align-items: start;
  padding-top: 42px;
}

.sidebar {
  grid-area: profile;
  min-width: 0;
}

.profile-card {
  text-align: center;
}

.profile-photo {
  width: 188px;
  height: 188px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
}

.profile-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.social-link {
  min-width: 38px;
  padding: 3px 6px;
  color: var(--accent);
  border: 1px solid #d8c5b7;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.social-link:hover {
  color: white;
  background: var(--accent);
}

.profile-email {
  display: inline-block;
  margin-top: 13px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.profile-email:hover {
  color: var(--accent);
  text-decoration: underline;
}

.profile-location {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.news {
  grid-area: news;
}

.news h2,
.main-section h2 {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.news ol,
.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 5px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
}

.news-item time {
  color: var(--accent-dark);
  font-weight: 700;
}

.flag-de {
  display: inline-block;
  width: 16px;
  height: 11px;
  margin-left: 2px;
  vertical-align: -1px;
  background: linear-gradient(to bottom, #000 0 33.333%, #dd0000 33.333% 66.667%, #ffce00 66.667%);
}

/* Main content */
.main-content {
  grid-area: main;
  min-width: 0;
  padding-bottom: 70px;
}

.introduction {
  padding-top: 1px;
}

.introduction p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.82;
}

.introduction a {
  color: var(--accent-dark);
  font-weight: 650;
  text-decoration-color: #cba98f;
  text-underline-offset: 3px;
}

.introduction a:hover {
  text-decoration-color: var(--accent-dark);
}

.main-section {
  margin-top: 58px;
}

.publication-list,
.project-list {
  border-top: 1px solid var(--line);
}

.publication {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0 23px;
  border-bottom: 1px solid var(--line);
}

.publication-type {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  padding-top: 4px;
}

.publication h3,
.project h3 {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.publication-venue,
.project p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.publication-authors {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.publication-author-self {
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.publication-contribution {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.publication-contribution span {
  color: var(--accent-dark);
  font-weight: 700;
}

.publication-links {
  display: flex;
  gap: 7px;
}

.simple-row a {
  color: var(--accent-dark);
  text-decoration-color: #cba98f;
  text-underline-offset: 3px;
}

.small-button {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #cbb7a7;
  border-radius: 4px;
  color: var(--accent-dark);
  background: white;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease;
}

.small-button:hover {
  background: var(--accent-light);
}

.project {
  padding: 20px 0 23px;
  border-bottom: 1px solid var(--line);
}

.project-links {
  display: flex;
  gap: 7px;
}

.simple-row,
.education {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}

.simple-row:last-child,
.education {
  border-bottom: 1px solid var(--line);
}

.row-date {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.simple-row strong,
.education strong {
  display: block;
  font-weight: 700;
}

.simple-row div span,
.education div span {
  display: block;
  color: var(--muted);
}

.education {
  margin-top: 16px;
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.footer-meta {
  flex: 1 1 360px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.site-footer a {
  text-decoration: none;
}

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

.site-credit a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 20px;
}

/* Interactive woodland footer */
.woodland-scene {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(142px, 16vw, 184px);
  min-height: 142px;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(246, 238, 231, 0), rgba(246, 238, 231, 0.28));
}

.woodland-ground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grass-hill-back {
  fill: #e7eee0;
}

.grass-hill-front {
  fill: #ceddbf;
}

.tree-trunk {
  fill: #80543a;
}

.tree-branch {
  fill: none;
  stroke: #80543a;
  stroke-width: 5;
  stroke-linecap: round;
}

.tree-leaf {
  fill: #829665;
}

.tree-leaf-deep {
  fill: #6f8452;
}

.tree-leaf-light {
  fill: #9bab7c;
}

.woodland-tree,
.woodland-squirrel {
  position: absolute;
  bottom: 0;
  display: block;
  height: auto;
  overflow: visible;
  pointer-events: none;
}

.woodland-tree-left {
  left: clamp(14px, 5vw, 82px);
  width: clamp(96px, 9vw, 128px);
}

.woodland-tree-right {
  right: clamp(14px, 5vw, 82px);
  width: clamp(82px, 7.5vw, 108px);
}

.woodland-squirrel {
  left: clamp(125px, 29vw, 450px);
  width: clamp(108px, 10vw, 132px);
  filter: drop-shadow(0 2px 1px rgba(76, 47, 29, 0.12));
}

.grass-tuft {
  position: absolute;
  bottom: 1px;
  width: 38px;
  height: 32px;
  pointer-events: none;
}

.grass-tuft::before,
.grass-tuft::after {
  position: absolute;
  bottom: 0;
  width: 5px;
  height: 31px;
  border-radius: 999px;
  background: #80543a;
  content: "";
  transform-origin: bottom;
}

.grass-tuft::before {
  left: 12px;
  transform: rotate(-32deg);
}

.grass-tuft::after {
  right: 10px;
  transform: rotate(34deg);
}

.grass-tuft-left {
  left: clamp(116px, 15vw, 250px);
}

.grass-tuft-right {
  right: clamp(116px, 15vw, 250px);
}

.squirrel-tail,
.squirrel-body,
.squirrel-head {
  fill: #b96c2c;
  stroke: #6e3e21;
  stroke-width: 3;
  stroke-linejoin: round;
}

.squirrel-belly {
  fill: #e1a15f;
}

.squirrel-ear,
.squirrel-face,
.squirrel-arm,
.squirrel-foot {
  fill: none;
  stroke: #5e3520;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.squirrel-eye {
  fill: #493021;
}

.squirrel-acorn path:first-child {
  fill: #694026;
}

.squirrel-acorn path:nth-child(2) {
  fill: #a96532;
}

.squirrel-acorn path:last-child {
  fill: none;
  stroke: #694026;
  stroke-width: 5;
  stroke-linecap: round;
}

.playful-acorn {
  --acorn-x: 0px;
  --acorn-y: 0px;
  --acorn-rotation: 0deg;
  position: absolute;
  left: 62%;
  bottom: 17px;
  z-index: 3;
  width: 48px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  transform: translate3d(var(--acorn-x), var(--acorn-y), 0) rotate(var(--acorn-rotation));
  transform-origin: 50% 86%;
  will-change: transform;
  filter: drop-shadow(0 3px 2px rgba(67, 42, 27, 0.17));
  touch-action: manipulation;
}

.playful-acorn:active {
  cursor: grabbing;
}

.playful-acorn svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.acorn-stem {
  fill: none;
  stroke: #694026;
  stroke-width: 5;
  stroke-linecap: round;
}

.acorn-cap {
  fill: #694026;
  stroke: #54301d;
  stroke-width: 2;
}

.acorn-body {
  fill: #b96c35;
  stroke: #714126;
  stroke-width: 2;
}

.acorn-shine {
  fill: none;
  stroke: rgba(255, 226, 185, 0.65);
  stroke-width: 4;
  stroke-linecap: round;
}

.drifting-leaf {
  position: absolute;
  z-index: 2;
  bottom: 20px;
  width: 15px;
  height: 9px;
  border-radius: 100% 0 100% 0;
  background: #c97935;
  opacity: 0.9;
  pointer-events: none;
  animation: leaf-roll 8s ease-in-out infinite alternate;
}

.leaf-one {
  left: 21%;
  animation-delay: -2.2s;
}

.leaf-two {
  left: 49%;
  bottom: 12px;
  width: 12px;
  height: 8px;
  background: #a65332;
  animation-duration: 10s;
  animation-delay: -6s;
}

.leaf-three {
  right: 18%;
  bottom: 27px;
  background: #d69532;
  animation-duration: 9s;
  animation-delay: -4.5s;
}

.leaf-four {
  right: 34%;
  bottom: 8px;
  width: 11px;
  height: 7px;
  background: #9a5c31;
  animation-duration: 11s;
  animation-delay: -8s;
}

@keyframes leaf-roll {
  0%, 18% {
    transform: translate3d(-10px, 0, 0) rotate(12deg);
  }
  48% {
    transform: translate3d(22px, -7px, 0) rotate(190deg);
  }
  68% {
    transform: translate3d(38px, 0, 0) rotate(280deg);
  }
  100% {
    transform: translate3d(74px, -3px, 0) rotate(430deg);
  }
}

@media (max-width: 780px) {
  .page-width {
    width: min(100% - 36px, 640px);
  }

  .page-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 28px;
  }

  .sidebar,
  .main-content {
    width: 100%;
  }

  .profile-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    column-gap: 20px;
    width: 100%;
    margin-bottom: 31px;
    text-align: left;
  }

  .profile-photo {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 118px;
    height: 118px;
    margin: 0;
  }

  .profile-links {
    justify-content: flex-start;
    grid-column: 2;
    margin-top: 0;
  }

  .profile-email {
    grid-column: 2;
    margin-top: 7px;
  }

  .profile-location {
    grid-column: 2;
  }

  .main-content {
    order: 1;
    padding-bottom: 20px;
  }

  .news {
    order: 2;
    width: 100%;
    margin: 28px 0 40px;
  }

  .news ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 18px;
  }

  .news-item {
    grid-template-columns: 1fr;
    margin-bottom: 12px;
  }

}

@media (max-width: 520px) {
  .footer-actions {
    gap: 12px;
  }

  .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .brand {
    gap: 5px;
    font-size: 20px;
  }

  .brand-icon {
    font-size: 24px;
  }

  .site-header nav {
    gap: 12px;
  }

  .site-header nav a {
    font-size: 12px;
  }

  .profile-card {
    grid-template-columns: 94px minmax(0, 1fr);
    column-gap: 16px;
  }

  .profile-photo {
    width: 94px;
    height: 94px;
  }

  .social-link {
    min-width: 32px;
    font-size: 12px;
  }

  .profile-email {
    font-size: 12px;
  }

  .introduction p {
    font-size: 15px;
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .publication-type {
    padding-top: 0;
  }

  .simple-row,
  .education {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .news ol {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding-bottom: 18px;
  }

  .woodland-scene {
    height: 142px;
  }

  .playful-acorn {
    left: 66%;
    width: 43px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .drifting-leaf {
    animation: none;
  }

  .playful-acorn {
    will-change: auto;
  }
}
