:root {
  --bg-color: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #666666;
  --tag-bg: #f9f9f9;
  --tag-border: #eeeeee;
  --max-width: 680px;
}

body.dark-mode {
  --bg-color: #121212;
  --text-main: #ffffff;
  --text-muted: #999999;
  --tag-bg: #1e1e1e;
  --tag-border: #333333;
}

body {
  margin: 0;
  padding: 60px 20px 120px 20px;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "Karla", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.6;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 50px;
}

.header-info h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.header-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f4f4f4;
  color: #888;
  font-size: 0.8rem;
  font-style: italic;
  border-radius: 2px;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

body.dark-mode .info-icon {
  background: #2a2a2a;
  color: #cccccc;
}

.bio {
  margin-bottom: 60px;
  font-size: 1rem;
}

.bio p {
  margin-bottom: 20px;
}

.bio .quote {
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.breadcrumb {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 50px;
}

.breadcrumb a {
  color: var(--text-main);
  font-weight: normal;
}

.breadcrumb span {
  color: var(--text-muted);
}

.portfolio {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.project-card {
  width: 100%;
}

.project-image {
  width: 100%;
  height: auto;
  min-height: 380px;
  background-color: #e5e5e5;
  display: block;
  margin-bottom: 12px;
  object-fit: cover;
  border-radius: 4px;
}

body.dark-mode .project-image {
  background-color: #222222;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.tags {
  display: flex;
  gap: 8px;
}

.tag {
  background-color: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 3px 8px;
  color: var(--text-muted);
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.year {
  color: var(--text-muted);
}

.project-header {
  margin-bottom: 40px;
}

.project-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 5px 0;
}

.project-header p {
  font-size: 1rem;
  color: var(--text-muted);
}

.project-intro {
  font-size: 1rem;
  margin-bottom: 20px;
}

.project-visual {
  width: 100%;
  border: 1px solid var(--tag-border);
  margin-bottom: 50px;
  display: block;
  border-radius: 4px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.section-text {
  font-size: 1rem;
  margin-bottom: 40px;
}

.cv-section {
  margin-bottom: 60px;
}

.cv-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-main);
}

.cv-row {
  display: flex;
  margin-bottom: 25px;
  font-size: 1rem;
  align-items: flex-start;
}

.cv-label {
  flex: 0 0 160px;
  color: var(--text-muted);
}

.cv-content {
  flex: 1;
}

.cv-title {
  display: block;
  color: var(--text-main);
  font-weight: 700;
}

.timeline-item .cv-title {
  font-weight: normal;
}

.cv-subtitle {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.portrait-box {
  background-color: var(--tag-bg);
  padding: 50px 20px;
  text-align: center;
  margin-bottom: 70px;
  border-radius: 4px;
}

.portrait-box img {
  max-width: 250px;
  filter: grayscale(100%);
  border-radius: 4px;
}

.archive-section {
  margin-top: 80px;
  border-top: 1px solid var(--tag-border);
}

.archive-trigger {
  background: none;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 20px 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plus-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.archive-trigger.active .plus-icon {
  transform: rotate(45deg);
}

.archive-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.5s ease,
    opacity 0.5s ease;
  opacity: 0;
}

.archive-content.active {
  max-height: 800px;
  opacity: 1;
  padding-bottom: 40px;
}

.archive-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--tag-border);
  display: flex;
  align-items: center;
  gap: 15px;
}

.archive-logo img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}

body.dark-mode .archive-logo img {
  border: 1px solid var(--tag-border);
}

.archive-info {
  display: flex;
  flex-direction: column;
}

.archive-link {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.archive-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline {
  border-left: 2px solid var(--tag-border);
  padding-left: 15px;
  margin-left: 5px;
  margin-top: 10px;
  display: block;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  display: block;
}

@media (max-width: 500px) {
  .cv-row {
    flex-direction: column;
    margin-bottom: 30px;
  }
  .cv-label {
    flex: none;
    margin-bottom: 5px;
  }
}
