/* shironchen.github.io — 典雅紙質 */

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

:root {
  --bg: #f5f4f0;
  --dark: #1a1a1a;
  --accent: #c0392b;
  --text-muted: #888;
  --border: #ddd9d2;
  --left-bg: #1a1a1a;
  --left-text: rgba(245,244,240,0.9);
  --left-muted: rgba(245,244,240,0.5);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background: #eceae4;
  color: var(--dark);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 80px;
}

a { text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ---- Language Switcher ---- */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1000;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--dark);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.lang-current::after {
  content: '▾';
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 4px;
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 130px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  overflow: hidden;
}

.lang-menu.open { display: block; }

.lang-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--dark);
}

.lang-menu a:hover { background: #f5f4f0; }
.lang-menu a.active { color: var(--accent); background: #fdf5f5; }

/* ---- Resume Container ---- */
.resume {
  display: flex;
  width: 100%;
  max-width: 1060px;
  min-height: 800px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.18);
  border-radius: 2px;
  overflow: hidden;
}

/* ---- Left Column ---- */
.col-left {
  flex: 0 0 320px;
  background: var(--left-bg);
  color: var(--left-text);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.profile { text-align: center; }

.profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 14px;
}

.profile-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.3px;
  color: white;
}

.profile-sub {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--left-muted);
  text-transform: uppercase;
  margin-top: 5px;
}

.profile-divider {
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin: 10px auto 0;
}

/* ---- Left section label ---- */
.lbl {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  font-family: var(--sans);
}

/* ---- Contact ---- */
.contact-list li {
  font-size: 12px;
  color: rgba(245,244,240,0.65);
  padding: 3px 0;
  word-break: break-all;
}

/* ---- Link buttons ---- */
.links { display: flex; flex-wrap: wrap; gap: 7px; }

.link-btn {
  display: inline-block;
  padding: 5px 11px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  color: rgba(245,244,240,0.8);
  letter-spacing: 0.3px;
  transition: border-color 0.15s, color 0.15s;
}

.link-btn:hover { border-color: var(--accent); color: white; }
.link-btn.fill { background: var(--accent); border-color: var(--accent); color: white; }

/* ---- Skill tags ---- */
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.skill-tag {
  font-size: 11px;
  padding: 3px 9px;
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: 3px;
  color: rgba(245,244,240,0.75);
}

/* ---- Education timeline (left) ---- */
.edu-list { display: flex; flex-direction: column; gap: 16px; }

.edu-item { display: flex; gap: 12px; }

.edu-year {
  font-size: 11px;
  color: var(--accent);
  min-width: 34px;
  padding-top: 2px;
  letter-spacing: 0.3px;
}

.edu-body {
  border-left: 2px solid rgba(192,57,43,0.25);
  padding-left: 10px;
  flex: 1;
}

.edu-body strong {
  display: block;
  font-size: 12px;
  color: white;
  font-weight: 500;
  margin-bottom: 2px;
}

.edu-body span {
  display: block;
  font-size: 11px;
  color: var(--left-muted);
  line-height: 1.5;
}

/* ---- Language bars ---- */
.lang-bars { display: flex; flex-direction: column; gap: 9px; }

.lang-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(245,244,240,0.65);
}

.lang-bar-row .name { min-width: 80px; }

.bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Right Column ---- */
.col-right {
  flex: 1;
  background: var(--bg);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---- Section heading (right) ---- */
.sec-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.sec-title small {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--sans);
  font-weight: 400;
  margin-left: 6px;
}

/* ---- Experience list (right) ---- */
.exp-list { display: flex; flex-direction: column; gap: 20px; }

.exp-item { display: flex; gap: 14px; }

.exp-year {
  font-size: 11px;
  color: var(--accent);
  min-width: 38px;
  padding-top: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.exp-body {
  border-left: 2px solid #e0ddd2;
  padding-left: 14px;
  flex: 1;
}

.exp-company {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 3px;
}

.exp-body ul li {
  font-size: 12.5px;
  color: #555;
  line-height: 1.65;
}

/* ---- Project groups ---- */
.proj-group { margin-bottom: 18px; }

.proj-group-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.proj-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.proj-lang-badge {
  font-size: 10px;
  background: var(--dark);
  color: white;
  padding: 2px 7px;
  border-radius: 3px;
  margin-top: 3px;
  white-space: nowrap;
}

.proj-items { flex: 1; }

.proj-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.8;
}

.proj-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }

.proj-link {
  font-size: 11px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.proj-link:hover { border-color: var(--accent); }

.demo-btn {
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: 1px solid rgba(192,57,43,0.35);
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s, color 0.15s;
}

.demo-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-box {
  position: relative;
  background: #111;
  border-radius: 4px;
  padding: 10px;
  max-width: 860px;
  width: 90%;
}

#modal-close {
  position: absolute;
  top: -13px;
  right: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-video { width: 100%; display: block; border-radius: 2px; }

/* ---- Responsive ---- */
@media (max-width: 800px) {
  body { padding: 0 0 40px; }

  .resume { flex-direction: column; box-shadow: none; border-radius: 0; }

  .col-left { flex: none; padding: 36px 24px; }
  .col-right { padding: 32px 24px; }

  .lang-switcher { top: 12px; right: 12px; }
}
