/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Primary colors */
  --color-light-blue: #e1eaf0;
  --color-muted-teal: #a9c8d0;
  --color-navy: #162f56;
  --color-black: #000000;

  /* Secondary colors */
  --color-cream: #fff9ef;
  --color-yellow: #eebf34;

  /* Layout */
  --page-padding: 1.5rem;
  --sidebar-width: 340px;
  --col-gap: 2rem;
}

/* ── Page ──────────────────────────────────────────────────────────────────── */
body,
.main,
.main > .container {
  overflow-x: hidden;
}

.jd-page {
  display: flex;
  flex-direction: column;
}

.jd-container {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 2rem 0 4rem;
}

/* ── Hero banner ────────────────────────────────────────────────────────────── */
.jd-hero {
  background: var(--color-light-blue);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 2.5rem 0;
}

.jd-hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--page-padding);
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--col-gap);
  position: relative;
}

.jd-hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.jd-hero-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  flex-shrink: 0;
}

.jd-hero-info {
  flex: 1;
}

.jd-company-name {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.jd-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: var(--color-black);
}

.jd-view-btn {
  display: inline-block;
  background: var(--color-navy);
  color: #fff;
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  transition: background 0.15s;
}

.jd-view-btn:hover {
  background: #374151;
  color: #fff;
}

.jd-deadline {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.fav-icon {
  font-size: 28px;
  color: var(--color-muted-teal);
  cursor: pointer;
  position: absolute;
  top: 0;
  right: 1.5rem;
  transition: color 0.15s, transform 0.15s;
}

.fav-icon:hover {
  color: var(--color-muted-teal);
  transform: scale(1.15);
}

.fav-icon.active {
  color: var(--color-yellow);
  transform: scale(1.15);
  font-variation-settings: 'FILL' 1;
}

/* ── Metadata grid ─────────────────────────────────────────────────────────── */
.jd-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem 2rem;
  margin-bottom: 2rem;
}

.jd-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.jd-meta-label {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--color-black);
}

.jd-meta-value {
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--color-black);
}

/* Study year circles */
.jd-year-circles {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.jd-year-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-navy);
  background: transparent;
}

.jd-year-circle.active {
  background: var(--color-navy);
  color: #fff;
}

/* ── Two-column body ───────────────────────────────────────────────────────── */
.jd-body {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--page-padding);
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--col-gap);
  align-items: start;
}

/* ── Description ───────────────────────────────────────────────────────────── */
.jd-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-navy);
}

.jd-description {
  margin-bottom: 2.5rem;
}

.jd-description-body {
  font-size: 0.95rem;
  color: #374151;
}

.jd-description-body p {
  margin-bottom: 1em;
}

/* ── Other jobs ────────────────────────────────────────────────────────────── */
.jd-other-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.jd-other-job-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-navy);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: #f9fafb;
  transition: background 0.15s;
}

.jd-other-job-card:hover {
  background: #374151;
  color: #fff;
}

.jd-other-job-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.jd-other-job-card div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.jd-other-job-card strong {
  font-size: 0.85rem;
}

.jd-other-job-card span {
  font-size: 0.9rem;
}

.jd-other-job-card small {
  font-size: 0.78rem;
  color: var(--color-muted-teal);
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.jd-sidebar {
  margin-top: -60px;
}

.jd-contact-card {
  background: var(--color-navy);
  color: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.jd-contact-heading {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: underline;
  margin-bottom: 0.85rem;
  color: #fff;
}

.jd-contact-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #fff;
}

.jd-contact-row {
  font-size: 0.875rem;
  color: var(--color-muted-teal);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jd-contact-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.jd-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0.9rem 0;
}

.jd-website-link {
  color: var(--color-muted-teal);
  text-decoration: none;
}

.jd-website-link:hover {
  text-decoration: underline;
  color: var(--color-light-blue);
}

/* About card — nested inside navy sidebar */
.jd-about-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.25rem;
}

.jd-about-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-navy);
}

.jd-about-body {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4b5563;
  margin-bottom: 0.75rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  line-clamp: 10;
}

.jd-about-footer {
  text-align: center;
}

.jd-learn-more-btn {
  display: inline-block;
  border: 1px solid var(--color-navy);
  color: var(--color-navy);
  padding: 0.4rem 1.1rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.jd-learn-more-btn:hover {
  background: var(--color-navy);
  color: #fff;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .jd-body {
    grid-template-columns: 1fr;
  }

  .jd-sidebar {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .jd-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .jd-title {
    font-size: 1.35rem;
  }

  .jd-logo {
    width: 64px;
    height: 64px;
  }

  .jd-hero {
    order: 1;
  }

  .jd-container {
    order: 2;
  }
}

.jd-contact-card #contact-person {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.75rem;
  margin-bottom: 0.6rem;
  color: #ffffff;
}

.jd-contact-card .contact-person-info {
  font-size: 0.875rem;
  color: #ffffff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jd-contact-card .contact-person-info a {
  color: #ffffff;
  text-decoration: underline;
}

.jd-contact-card .contact-person-info a:hover {
  color: var(--color-muted-teal);
}