/* ===================================
   Reset & Base
   =================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ===================================
   Layout
   =================================== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
}

/* ===================================
   Site Header
   =================================== */
.site-header {
  padding: 56px 0 40px;
  background: #2d3748;
  border-bottom: none;
  margin-bottom: 0;
}

.site-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
  color: #fff;
}

.site-role {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
}

.availability {
  color: #fff;
  font-weight: 600;
}

.site-bio {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 24px;
}

/* CTA Pills */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cta-btn {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 7px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.01em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.cta-btn:hover {
  border-color: rgba(255, 255, 255, 0.9);
  color: #fff;
}

.cta-primary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
}

.cta-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* ===================================
   Accordion — Section Level
   =================================== */
.accordion {
  border-bottom: 1px solid #eee;
}

.acc-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #f5f5f5;
  border: none;
  text-align: left;
  transition: background 0.12s;
  cursor: pointer;
  margin: 0 -24px;
  width: calc(100% + 48px);
}

.acc-header:hover {
  background: #eeeeee;
}

.acc-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.acc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  flex-shrink: 0;
}

.acc-summary {
  font-size: 0.8125rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.acc-meta {
  font-size: 0.75rem;
  background: #e0e0e0;
  color: #666;
  padding: 3px 8px;
  white-space: nowrap;
}

.acc-arrow {
  font-size: 1.25rem;
  color: #bbb;
  line-height: 1;
  transition: transform 0.2s ease;
  display: inline-block;
  width: 18px;
  text-align: center;
}

.acc-header[aria-expanded="true"] .acc-arrow {
  transform: rotate(90deg);
  color: #111;
}

/* Accordion body */
.acc-body {
  display: none;
  padding-bottom: 8px;
}

.acc-body.open {
  display: block;
}

/* ===================================
   Role / Project List (inside acc-body)
   =================================== */
.role-list {
  border-top: 1px solid #f0f0f0;
}

.role-item {
  border-bottom: 1px solid #f0f0f0;
}

.role-item:last-child {
  border-bottom: none;
}

.role-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.role-header:hover {
  background: #fafafa;
  margin: 0 -24px;
  padding: 14px 24px;
  width: calc(100% + 48px);
}

.role-header[aria-expanded="true"] .role-title {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.role-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.role-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
}

.role-company {
  font-size: 0.8125rem;
  color: #777;
}

.role-date {
  font-size: 0.75rem;
  color: #bbb;
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

/* Role right (date + arrow) */
.role-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.role-arrow {
  font-size: 1rem;
  color: #ccc;
  line-height: 1;
  transition: transform 0.2s ease;
  display: inline-block;
  width: 16px;
  text-align: center;
}

.role-header[aria-expanded="true"] .role-arrow {
  transform: rotate(90deg);
  color: #666;
}

/* Role detail (inner expand) */
.role-detail {
  display: none;
  padding: 4px 0 18px 16px;
  border-left: 2px solid #eee;
  margin-left: 1px;
}

.role-detail.open {
  display: block;
}

.role-detail p {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 10px;
}

.role-detail ul {
  list-style: none;
}

.role-detail ul li {
  font-size: 0.8125rem;
  color: #555;
  padding-left: 16px;
  position: relative;
  margin-bottom: 5px;
  line-height: 1.55;
}

.role-detail ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #ccc;
}

/* ===================================
   About Section
   =================================== */
.about-body {
  padding-bottom: 8px;
}

.about-body p {
  font-size: 0.9375rem;
  color: #333;
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 580px;
}

.about-aside {
  font-size: 0.875rem !important;
  color: #888 !important;
  font-style: italic;
  border-left: 3px solid #e8e8e8;
  padding: 6px 14px !important;
  margin: 16px 0 20px !important;
}

.competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.comp-tag {
  font-size: 0.75rem;
  border: 1px solid #ddd;
  color: #555;
  padding: 4px 10px;
}

/* ===================================
   Contact Section
   =================================== */
.contact-intro {
  font-size: 0.9375rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 520px;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #f2f2f2;
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-key {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  min-width: 72px;
  flex-shrink: 0;
}

.contact-val {
  font-size: 0.9375rem;
  color: #111;
  transition: color 0.15s;
}

.contact-val:hover {
  color: #444;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===================================
   Footer
   =================================== */
.site-footer {
  border-top: 1px solid #eee;
  margin-top: 0;
  padding: 24px 0 32px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: #bbb;
}

.footer-note {
  font-style: italic;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 600px) {
  .site-header {
    padding: 36px 0 28px;
    /* background extends full-width on mobile since main has no side borders */
  }

  .site-name {
    font-size: 1.625rem;
  }

  .acc-summary {
    display: none;
  }

  .acc-header {
    margin: 0 -24px;
    width: calc(100% + 48px);
  }

  .role-header:hover {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    padding: 14px 0;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 400px) {
  .cta-row {
    flex-direction: column;
  }

  .cta-btn {
    width: fit-content;
  }
}

/* ===================================
   Smooth transition for acc-body
   =================================== */
@media (prefers-reduced-motion: no-preference) {
  .role-detail,
  .acc-body {
    transition: none;
  }
}
