/* ================================================================
   Experience / Project / Presentation Cards
   Terminal-style aesthetic matching the timeline
   ================================================================ */

/* ---- Light theme (default) ---- */
.exp-section {
  max-width: 100%;
  margin: 2rem 0;
}

.exp-card {
  border: 1px solid rgba(13, 150, 104, 0.2);
  border-radius: 4px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.6);
}

.exp-card:hover {
  border-color: rgba(13, 150, 104, 0.4);
  box-shadow: 0 0 12px rgba(13, 150, 104, 0.08);
}

.exp-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  background: rgba(13, 150, 104, 0.03);
  transition: background 0.2s ease;
}

.exp-header:hover {
  background: rgba(13, 150, 104, 0.06);
}

.exp-logo {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(13, 150, 104, 0.05);
  padding: 4px;
  border: 1px solid rgba(13, 150, 104, 0.1);
}

/* ---- Terminal prompt & cursor ---- */
.exp-prompt {
  display: block;
  font-size: 0.6rem;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  color: #0d9668;
  opacity: 0.5;
  padding: 4px 8px 0;
  line-height: 1;
}

.exp-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: #0d9668;
  flex-shrink: 0;
  opacity: 0;
  animation: exp-blink 1s step-end infinite;
}

.exp-card:hover .exp-cursor {
  opacity: 1;
}

@keyframes exp-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.decrypting {
  color: #0d9668 !important;
}

[data-theme="dark"] .decrypting {
  color: #00ff9c !important;
  text-shadow: 0 0 6px rgba(0, 255, 156, 0.4);
}

[data-theme="dark"] .exp-prompt {
  color: #00ff9c;
}

[data-theme="dark"] .exp-cursor {
  background: #00ff9c;
}

.exp-summary {
  flex: 1;
  min-width: 0;
}

.exp-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f3d2b;
  line-height: 1.3;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

.exp-title {
  font-size: 0.88rem;
  color: #6a9a82;
  line-height: 1.4;
  margin-top: 0.15rem;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

.exp-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #6a9a82;
  transition: transform 0.25s ease;
}

.exp-card.open .exp-chevron {
  transform: rotate(180deg);
}

.exp-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.25rem;
  background: transparent;
}

.exp-card.open .exp-details {
  max-height: 600px;
  padding: 0 1.25rem 1.25rem;
}

.exp-details-inner {
  border-top: 1px dashed rgba(13, 150, 104, 0.15);
  padding-top: 1rem;
}

.exp-role {
  margin-bottom: 0.75rem;
}

.exp-role:last-child {
  margin-bottom: 0;
}

.exp-role-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a5a3e;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

.exp-role-dates {
  font-size: 0.8rem;
  color: #6a9a82;
  margin-top: 0.1rem;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

.exp-role-desc {
  font-size: 0.88rem;
  color: #2a6a50;
  margin-top: 0.35rem;
  line-height: 1.54;
  opacity: 0.85;
  font-style: italic;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
}

/* ---- Year labels ---- */
.exp-year-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0d9668;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.exp-year-label:first-child,
.exp-section .exp-year-label:first-child {
  margin-top: 0;
}

/* ---- Card inner content ---- */
.exp-details-inner {
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  color: #1a5a3e;
  font-size: 0.9rem;
  line-height: 1.54;
}

.exp-details-inner p {
  margin: 0.4rem 0;
}

.exp-details-inner a {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  margin: 0.2rem 0.3rem 0.2rem 0;
  border: 1px solid rgba(13, 150, 104, 0.2);
  border-radius: 4px;
  text-decoration: none;
  color: #0d9668;
  font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.exp-details-inner a:hover {
  border-color: rgba(13, 150, 104, 0.4);
  background: rgba(13, 150, 104, 0.06);
}

.exp-details-inner figure a,
.exp-header a {
  border: none;
  padding: 0;
  margin: 0;
}

.exp-details-inner figure a:hover,
.exp-header a:hover {
  background: none;
}

.exp-details-inner iframe {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 4px;
  margin-top: 0.75rem;
  display: block;
}

.exp-details-inner img {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.exp-details-inner figure {
  margin: 0.75rem 0 0;
}

.exp-details-inner figure img {
  max-width: 560px;
}

/* ================================================================
   Dark theme — terminal / cyberspace aesthetic
   ================================================================ */
[data-theme="dark"] .exp-card {
  border-color: rgba(0, 255, 156, 0.15);
  background: rgba(10, 15, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .exp-card:hover {
  border-color: rgba(0, 255, 156, 0.4);
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.1), 0 0 30px rgba(0, 255, 156, 0.04);
}

[data-theme="dark"] .exp-header {
  background: rgba(0, 255, 156, 0.03);
}

[data-theme="dark"] .exp-header:hover {
  background: rgba(0, 255, 156, 0.06);
}

[data-theme="dark"] .exp-logo {
  background: rgba(0, 255, 156, 0.06);
  border: 1px solid rgba(0, 255, 156, 0.1);
}

[data-theme="dark"] .exp-card:hover .exp-logo {
  border-color: rgba(0, 255, 156, 0.25);
  box-shadow: 0 0 6px rgba(0, 255, 156, 0.1);
}

[data-theme="dark"] .exp-company {
  color: #c0fce8;
  text-shadow: 0 0 6px rgba(0, 255, 156, 0.15);
}

[data-theme="dark"] .exp-title {
  color: #3d7a60;
}

[data-theme="dark"] .exp-chevron {
  color: #3d7a60;
}

[data-theme="dark"] .exp-details {
  background: transparent;
}

[data-theme="dark"] .exp-details-inner {
  border-top-color: rgba(0, 255, 156, 0.1);
  color: #7dccaa;
}

[data-theme="dark"] .exp-role-title {
  color: #7dccaa;
}

[data-theme="dark"] .exp-role-dates {
  color: #3d7a60;
}

[data-theme="dark"] .exp-role-desc {
  color: #7dccaa;
}

[data-theme="dark"] .exp-year-label {
  color: rgba(0, 255, 156, 0.5);
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.15);
}

[data-theme="dark"] .exp-details-inner a {
  border-color: rgba(0, 255, 156, 0.15);
  color: #00ff9c;
}

[data-theme="dark"] .exp-details-inner a:hover {
  border-color: rgba(0, 255, 156, 0.4);
  background: rgba(0, 255, 156, 0.06);
}

[data-theme="dark"] .exp-details-inner figure a {
  border: none;
}

[data-theme="dark"] .exp-details-inner figure a:hover {
  background: none;
}

/* ---- Dark theme: prefers-color-scheme (auto mode) ---- */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .exp-card {
    border-color: rgba(0, 255, 156, 0.15);
    background: rgba(10, 15, 20, 0.85);
  }
  html:not([data-theme="light"]) .exp-card:hover {
    border-color: rgba(0, 255, 156, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 156, 0.1);
  }
  html:not([data-theme="light"]) .exp-header {
    background: rgba(0, 255, 156, 0.03);
  }
  html:not([data-theme="light"]) .exp-header:hover {
    background: rgba(0, 255, 156, 0.06);
  }
  html:not([data-theme="light"]) .exp-logo {
    background: rgba(0, 255, 156, 0.06);
  }
  html:not([data-theme="light"]) .exp-company {
    color: #c0fce8;
  }
  html:not([data-theme="light"]) .exp-title {
    color: #3d7a60;
  }
  html:not([data-theme="light"]) .exp-chevron {
    color: #3d7a60;
  }
  html:not([data-theme="light"]) .exp-details {
    background: transparent;
  }
  html:not([data-theme="light"]) .exp-details-inner {
    border-top-color: rgba(0, 255, 156, 0.1);
    color: #7dccaa;
  }
  html:not([data-theme="light"]) .exp-role-title {
    color: #7dccaa;
  }
  html:not([data-theme="light"]) .exp-role-dates {
    color: #3d7a60;
  }
  html:not([data-theme="light"]) .exp-role-desc {
    color: #7dccaa;
  }
  html:not([data-theme="light"]) .exp-year-label {
    color: rgba(0, 255, 156, 0.5);
  }
  html:not([data-theme="light"]) .exp-details-inner a {
    border-color: rgba(0, 255, 156, 0.15);
    color: #00ff9c;
  }
  html:not([data-theme="light"]) .exp-details-inner a:hover {
    border-color: rgba(0, 255, 156, 0.4);
    background: rgba(0, 255, 156, 0.06);
  }
}

/* ---- Card grid layout ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.card-grid .exp-card {
  display: flex;
  flex-direction: column;
}

.card-grid .exp-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  gap: 0.75rem;
}

.card-grid .exp-logo {
  width: 56px;
  height: 56px;
}

.card-grid .exp-summary {
  min-width: 0;
}

.card-grid .exp-chevron {
  display: none;
}

.card-grid .exp-details {
  max-height: 0;
  padding: 0 1rem;
}

.card-grid .exp-card.open .exp-details {
  max-height: 600px;
  padding: 0 1rem 1rem;
}

.card-grid .exp-details-inner {
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 684px) {
  .exp-header {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .exp-logo {
    width: 36px;
    height: 36px;
  }

  .exp-company {
    font-size: 0.95rem;
  }

  .exp-title {
    font-size: 0.82rem;
  }

  .exp-card.open .exp-details {
    padding: 0 1rem 1rem;
  }

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