@import url("../../common/css/theme.css");

body {
  color: var(--color-text);
}

.container {
  width: min(100%, var(--content-wide));
  margin: 0 auto;
  padding: 34px 24px 54px;
}

.header {
  padding: 38px 0 28px;
  border-bottom: 1px solid var(--color-line);
}

.header h1 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 900;
}

.header p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.project-detail-card {
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.section {
  padding: 30px 0;
  border-bottom: 1px solid var(--color-line);
}

.section:first-child {
  padding-top: 0;
}

.section:last-of-type {
  border-bottom: 0;
}

.section h2 {
  margin: 0 0 18px;
  color: var(--color-text);
  font-size: 1.55rem;
  line-height: 1.25;
}

.section h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  vertical-align: 0.16em;
}

.section h3 {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: 1.08rem;
  line-height: 1.35;
}

.section p {
  margin: 0 0 12px;
  color: var(--color-muted);
  overflow-wrap: anywhere;
}

.section strong {
  color: var(--color-text);
}

.feature-card,
.role-card,
.contact-info {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.feature-card {
  position: relative;
  margin: 12px 0;
  padding: 18px 18px 18px 20px;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--color-cyan);
}

.feature-card p {
  margin-bottom: 0;
}

.architecture-image {
  margin: 16px 0 22px;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
}

.architecture-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.role-card {
  padding: 20px;
  min-width: 0;
}

.role-card h3 {
  color: var(--color-primary);
}

.role-card p {
  margin-bottom: 14px;
}

.requirements-list,
.benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.requirements-list {
  display: grid;
  gap: 8px;
}

.requirements-list li,
.benefits-list li {
  position: relative;
  padding-left: 18px;
  color: var(--color-muted);
}

.requirements-list li::before,
.benefits-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-cyan);
}

.benefits-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.benefits-list li {
  min-height: 74px;
  padding: 16px 16px 16px 34px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.benefits-list li::before {
  left: 16px;
  top: 1.45em;
}

.progress-container {
  width: 100%;
  height: 12px;
  margin: 16px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf2;
}

.progress-bar {
  height: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-primary);
  color: transparent;
}

.progress-5 {
  width: 5%;
}

.progress-20 {
  width: 20%;
}

.progress-30 {
  width: 30%;
}

.progress-35 {
  width: 35%;
}

.progress-100 {
  width: 100%;
  background: var(--color-success);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-line);
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -22px;
  top: 19px;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 1px var(--color-line);
}

.timeline-item.completed .timeline-marker {
  background: var(--color-success);
}

.timeline-item.completed .timeline-content h3 {
  color: var(--color-success);
}

.timeline-item.in-progress .timeline-marker {
  background: var(--color-primary);
}

.timeline-item.in-progress .timeline-content h3 {
  color: var(--color-primary);
}

.timeline-item.not-started .timeline-content {
  opacity: 0.82;
}

.timeline-content {
  padding: 16px 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.timeline-content h3 {
  background: transparent;
}

.timeline-date {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.timeline-header {
  position: relative;
  padding-right: 28px;
  cursor: pointer;
  user-select: none;
}

.timeline-header h3,
.timeline-header p {
  margin-right: 22px;
}

.timeline-toggle-icon {
  position: absolute;
  right: 0;
  top: 4px;
  color: var(--color-muted);
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.timeline-header.expanded .timeline-toggle-icon {
  transform: rotate(180deg);
}

.timeline-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  list-style: none;
  transition: max-height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.timeline-features.expanded {
  max-height: 520px;
  margin-top: 12px;
  opacity: 1;
}

.timeline-features li {
  padding: 6px 10px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-muted);
  background: var(--color-surface-soft);
  font-size: 0.82rem;
}

.contact-info {
  margin-top: 28px;
  padding: 22px;
}

.contact-info h3 {
  margin: 0 0 12px;
  color: var(--color-text);
  font-size: 1.22rem;
}

.contact-info p {
  margin: 8px 0;
  color: var(--color-muted);
  overflow-wrap: anywhere;
}

.email-link,
.modal-email {
  color: var(--color-primary);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

code {
  display: inline;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-soft);
  color: var(--color-text);
  font-size: 0.92em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.email-link:hover,
.modal-email:hover {
  color: var(--color-primary-dark);
}

.apply-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.apply-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

footer {
  padding: 32px 0 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 32, 51, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10001;
  width: min(90vw, 480px);
  transform: translate(-50%, -48%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal.show {
  transform: translate(-50%, -50%);
  opacity: 1;
}

.modal-content {
  padding: 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(16, 32, 51, 0.18);
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--color-success);
}

.modal-content h3 {
  margin: 14px 0 8px;
  color: var(--color-text);
  font-size: 1.35rem;
}

.modal-content p {
  margin: 8px 0;
  color: var(--color-muted);
}

.modal-note {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  font-size: 0.9rem;
}

.modal-close-btn {
  min-height: 42px;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 900px) {
  .benefits-list {
    grid-template-columns: 1fr;
  }

  .project-detail-card {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 20px 16px 42px;
  }

  .header {
    padding: 20px 0 22px;
  }

  .header h1 {
    font-size: 2.05rem;
    line-height: 1.12;
  }

  .header p {
    margin-top: 12px;
    font-size: 1rem;
  }

  .project-detail-card {
    padding: 18px;
  }

  .section {
    padding: 24px 0;
  }

  .section h2 {
    font-size: 1.32rem;
  }

  .section h3 {
    font-size: 1rem;
  }

  .social-links {
    gap: 8px;
  }

  .social-link {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    min-width: 0;
  }

  .architecture-image {
    margin-right: -4px;
    margin-left: -4px;
    padding: 12px;
  }

  .roles-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .role-card,
  .contact-info {
    padding: 16px;
  }

  .timeline {
    padding-left: 18px;
  }

  .timeline-marker {
    left: -20px;
  }

  .timeline-content {
    padding: 14px;
  }

  .timeline-header {
    padding-right: 22px;
  }

  .timeline-header h3,
  .timeline-header p {
    margin-right: 0;
  }

  .timeline-date {
    margin-bottom: 6px;
  }

  .timeline-features {
    display: grid;
    gap: 8px;
  }

  .timeline-features li {
    width: 100%;
    border-radius: var(--radius-sm);
    line-height: 1.45;
  }

  .benefits-list li {
    min-height: auto;
    padding: 14px 14px 14px 32px;
  }

  .benefits-list li::before {
    left: 14px;
  }

  .contact-info {
    margin-top: 20px;
  }

  .apply-button {
    min-height: 48px;
    padding: 0 12px;
  }

  .modal {
    width: calc(100vw - 32px);
  }

  .modal-content {
    padding: 22px 16px;
  }
}

@media (max-width: 390px) {
  .container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .header h1 {
    font-size: 1.82rem;
  }

  .social-link {
    flex-basis: 100%;
  }
}
