* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --layout-width: 1180px;
  --sidebar-menu-width: 264px;
  --sidebar-width: max(360px, calc((100vw - var(--layout-width)) / 2 + var(--sidebar-menu-width)));
  --content-width: calc(var(--layout-width) - var(--sidebar-menu-width));
  --border-soft: #dfe7f2;
  --shadow-panel: 0 22px 70px rgba(15, 35, 70, 0.13);
  --shadow-media: 0 18px 42px rgba(16, 42, 86, 0.15);
  --shadow-card: 0 14px 34px rgba(15, 35, 70, 0.1);
  --shadow-card-hover: 0 22px 48px rgba(15, 35, 70, 0.16);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, #eaf1fa 0%, #eaf1fa 34%, #f6f9fd 34%, #eef4fb 100%);
  color: #111827;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  max-width: 100%;
}

section {
  scroll-margin-top: 84px;
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 30px 40px 30px max(52px, calc(var(--sidebar-width) - var(--sidebar-menu-width)));
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #edf4fc 0%, #e8f0fa 100%);
  border-right: 1px solid var(--border-soft);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
}

.sidebar-brand {
  display: flex;
  justify-content: center;
  margin: 0 0 74px;
  text-decoration: none;
}

.sidebar-brand img {
  width: min(178px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(15, 35, 70, 0.16));
}

.side-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding-top: 58px;
  border-top: 1px solid var(--border-soft);
}

.side-nav a {
  display: block;
  padding: 4px 10px;
  color: #111827;
  border-radius: 7px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.45;
  text-decoration: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.side-nav a:hover {
  color: #000000;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px rgba(15, 35, 70, 0.08);
  transform: translateX(2px);
}

.side-nav-external {
  margin-top: 8px;
}

.sidebar-footer {
  margin: 34px 0 0;
  color: #7b8494;
  font-size: 13px;
  line-height: 1.45;
}

.page-shell {
  width: min(var(--content-width), calc(100% - var(--sidebar-width)));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  margin-right: auto;
  padding: 0 40px 56px;
  background: #ffffff;
  border-left: 1px solid rgba(229, 231, 235, 0.85);
  border-right: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: var(--shadow-panel);
}

.content-topbar {
  height: 70px;
  margin: 0 -40px 52px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 28px rgba(15, 35, 70, 0.05);
}

.topbar-link {
  color: #0b2346;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease;
}

.topbar-link::before {
  content: "●";
  margin-right: 7px;
  font-size: 10px;
}

.topbar-link:hover {
  color: #1d4ed8;
}

.page-hero {
  text-align: left;
}

.page-hero h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.15;
}

.page-hero p {
  width: fit-content;
  max-width: 100%;
  margin: 18px 0;
  padding-left: 18px;
  border-left: 3px solid #e5e7eb;
  color: #4b5563;
  font-size: 16px;
  font-weight: 700;
}

.hero-banner,
.section-image {
  width: 100%;
  max-width: 860px;
  height: auto;
  display: block;
  margin: 18px auto;
  border: 1px solid rgba(219, 226, 238, 0.9);
  border-radius: 5px;
  box-shadow: var(--shadow-media);
}

section {
  margin: 30px 0;
  text-align: left;
}

h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.25;
}

h2::after {
  content: "";
  width: 34px;
  height: 3px;
  display: block;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f3f77, #6b8ed6);
  box-shadow: 0 6px 14px rgba(31, 63, 119, 0.18);
}

.feature-copy {
  max-width: 760px;
  margin: 0;
  text-align: left;
}

.feature-copy h3 {
  margin: 20px 0 6px;
  font-size: 17px;
}

.feature-copy p {
  margin: 0 0 12px;
  color: #374151;
}

hr {
  height: 1px;
  margin: 30px 0;
  border: 0;
  background: #e5e7eb;
}

.main-content .member-grid,
.member-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 24px 0 34px;
}

.main-content .member-card,
.member-card {
  min-height: 390px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(225, 231, 240, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), #ffffff),
    linear-gradient(135deg, rgba(229, 239, 253, 0.8), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.main-content .member-card:hover,
.member-card:hover {
  border-color: rgba(183, 199, 224, 0.95);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.main-content .member-photo,
.member-photo {
  width: min(150px, 100%) !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  margin: 0 auto 18px;
  display: block;
  border-radius: 22px;
  box-shadow: 0 12px 24px rgba(15, 35, 70, 0.14);
  object-fit: cover;
}

.main-content .member-card h3,
.member-card h3 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.main-content .member-card h3 span,
.member-card h3 span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
}

.main-content .member-card p,
.member-card p {
  margin: 6px 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}

.main-content .member-link,
.member-link {
  display: inline-block;
  margin-top: 12px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.main-content .member-link:hover,
.member-link:hover {
  color: #111827;
  text-decoration: underline;
}

.stack-table {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid rgba(225, 231, 240, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.stack-table th,
.stack-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.stack-table th {
  width: 180px;
  background: linear-gradient(180deg, #f8fbff, #f1f5fb);
  color: #111827;
}

.stack-table img {
  height: 24px;
  max-width: 100%;
  margin: 2px 3px 2px 0;
}

.project-links {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  text-align: left;
}

.project-links a {
  color: #2563eb;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.page-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  color: #4b5563;
  text-align: center;
}

@media (max-width: 1320px) {
  :root {
    --sidebar-width: 300px;
    --content-width: calc(100vw - 300px);
  }

  .site-sidebar {
    padding: 28px 36px 28px 44px;
  }

  .side-nav a {
    font-size: 17px;
  }

  .page-shell {
    width: min(900px, calc(100% - var(--sidebar-width)));
    margin-left: var(--sidebar-width);
    margin-right: auto;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 100%;
    --content-width: 100%;
  }

  html {
    scroll-padding-top: 78px;
  }

  section {
    scroll-margin-top: 88px;
  }

  .site-sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    min-height: auto;
    padding: 10px 18px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid #dce5f1;
  }

  .sidebar-brand {
    flex: 0 0 auto;
    margin: 0;
  }

  .sidebar-brand img {
    width: 96px;
  }

  .side-nav {
    min-width: 0;
    flex: 1;
    flex-direction: row;
    padding-top: 0;
    border-top: 0;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .side-nav a {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #dce5f1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .side-nav-external {
    margin-top: 0;
  }

  .sidebar-footer {
    display: none;
  }

  .page-shell {
    margin: 0 auto;
    width: min(100% - 36px, 840px);
    min-height: auto;
    padding: 0 28px 44px;
  }

  .content-topbar {
    height: 58px;
    margin: 0 -28px 34px;
    padding: 0 28px;
  }

  .hero-banner,
  .section-image {
    max-width: 100%;
  }

  .member-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .stack-table th {
    width: 150px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 70px;
  }

  section {
    scroll-margin-top: 82px;
  }

  .side-nav {
    gap: 6px;
  }

  .side-nav a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .page-shell {
    width: min(100% - 24px, 960px);
    padding: 0 18px 36px;
  }

  .content-topbar {
    margin: 0 -18px 26px;
    padding: 0 18px;
  }

  .page-hero h1 {
    font-size: 30px;
  }

  .page-hero p {
    font-size: 14px;
  }

  section {
    margin: 24px 0;
  }

  h2 {
    margin-bottom: 14px;
    font-size: 21px;
  }

  .feature-copy h3 {
    margin-top: 16px;
    font-size: 16px;
  }

  .feature-copy p {
    font-size: 14px;
  }

  hr {
    margin: 24px 0;
  }

  .member-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 18px 0 26px;
  }

  .member-card {
    min-height: auto;
    padding: 18px 16px;
  }

  .member-photo {
    width: min(132px, 100%) !important;
    margin-bottom: 14px;
    border-radius: 18px;
  }

  .member-card h3 {
    font-size: 20px;
  }

  .member-card h3 span,
  .member-card p {
    font-size: 13px;
  }

  .stack-table,
  .stack-table tbody,
  .stack-table tr,
  .stack-table th,
  .stack-table td {
    display: block;
    width: 100%;
  }

  .stack-table tr {
    border-bottom: 1px solid #e5e7eb;
  }

  .stack-table th {
    padding: 10px 12px 6px;
    border-bottom: 0;
  }

  .stack-table td {
    padding: 6px 12px 12px;
    border-bottom: 0;
  }

  .stack-table img {
    height: 22px;
  }
}

@media (max-width: 520px) {
  html {
    scroll-padding-top: 68px;
  }

  .side-nav {
    gap: 6px;
  }

  .page-shell {
    width: min(100% - 28px, 960px);
    padding-left: 14px;
    padding-right: 14px;
  }

  .content-topbar {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-hero h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

  .main-content .member-grid,
  .member-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .main-content .member-card,
  .member-card {
    min-height: auto;
    padding: 20px 18px;
    border-radius: 8px;
  }

  .main-content .member-photo,
  .member-photo {
    width: min(140px, 100%) !important;
    margin-bottom: 16px;
    border-radius: 20px;
  }

  .main-content .member-card h3,
  .member-card h3 {
    font-size: 21px;
  }

  .main-content .member-card p,
  .member-card p {
    font-size: 14px;
  }

  .page-footer {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .side-nav {
    gap: 5px;
  }

  .page-shell {
    width: min(100% - 18px, 960px);
  }

  .side-nav a {
    font-size: 11px;
  }

  .member-card {
    padding: 16px 12px;
  }
}
