/* ==========================================================================
   MyHub CV — style.css
   Monochrome palette + single accent color, shadcn/ui-inspired minimalism
   ========================================================================== */

:root {
  --accent: #3457d5;
  --accent-fg: #ffffff;

  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f4f4f5;
  --border: #e4e4e7;
  --text: #18181b;
  --text-muted: #6f6f76;
  --text-subtle: #a1a1aa;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.03);

  --header-h: 64px;
  --radius: 10px;
  --radius-sm: 7px;
  --transition: 160ms ease;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-subtle: #131314;
  --surface: #18181b;
  --surface-hover: #212124;
  --border: #2b2b2f;
  --text: #f4f4f5;
  --text-muted: #a3a3ab;
  --text-subtle: #71717a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-subtle);
  color: var(--text);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.header-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.icon-btn svg { width: 17px; height: 17px; }

.icon-btn.text-btn {
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.hamburger { display: none; }

/* Desktop nav */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

#nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

#nav-list a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

#nav-list a:hover {
  background: var(--surface-hover);
  color: var(--text);
}

#nav-list a.active {
  color: var(--accent);
  font-weight: 700;
}

.nav-scrim {
  display: none;
}

/* ---------------------------------- Layout ---------------------------------- */

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 28px) 20px 60px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

/* ---------------------------------- Profile panel ---------------------------------- */

.profile-panel {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.profile-photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-subtle);
  box-shadow: 0 0 0 1px var(--border);
}

.profile-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name-primary {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.profile-name-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.profile-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.profile-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-meta-row svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.profile-meta-row a:hover {
  color: var(--accent);
}

.profile-socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 6px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.social-link:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: var(--accent);
}
.social-link svg { width: 15px; height: 15px; }

/* ---------------------------------- Content panel ---------------------------------- */

.content-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.cv-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.cv-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 16px;
}

.intro-text {
  font-size: 15px;
  color: var(--text);
  margin: 0;
  line-height: 1.85;
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border);
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-period {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

.timeline-role {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

.timeline-org {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-desc {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Tag list */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Plain list */
.plain-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plain-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.7;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-h) + 20px);
  }

  .profile-panel {
    position: static;
  }

  .hamburger {
    display: inline-flex;
  }

  .header-name {
    font-size: 14px;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 78%;
    max-width: 300px;
    height: calc(100vh - var(--header-h));
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: block;
    justify-content: flex-start;
    padding: 12px;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    overflow-y: auto;
  }

  .site-nav.open {
    transform: translateX(0);
  }

  #nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  #nav-list a {
    padding: 12px 14px;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  .nav-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }

  .cv-section {
    padding: 20px;
  }
}

/* ---------------------------------- Print ---------------------------------- */

@media print {
  :root, html[data-theme="dark"] {
    --bg: #ffffff;
    --bg-subtle: #ffffff;
    --surface: #ffffff;
    --surface-hover: #ffffff;
    --border: #dddddd;
    --text: #111111;
    --text-muted: #444444;
    --text-subtle: #666666;
    color-scheme: light;
  }

  .site-header,
  .nav-scrim,
  .icon-btn {
    display: none !important;
  }

  body { background: #ffffff; }

  .layout {
    display: block;
    max-width: 100%;
    padding: 0;
  }

  .profile-panel {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 16px;
    page-break-after: avoid;
  }

  .content-panel { gap: 12px; }

  .cv-section {
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 0;
    break-inside: avoid;
  }
}
