.footer__content {
  font-size: 0.7rem;
}

/* Profile image for about page */
.profile-image {
  display: block;
  border-radius: 50%;
  max-width: 150px;
  margin: 0 auto 1.5rem auto;
}

@media (min-width: 700px) {
  .profile-image {
    float: left;
    margin: 0 1.5rem 1rem 0;
  }
}

.project {
    width: 100%;
    max-width: 800px;
    text-align: left;
}

/* Section intro */
.section-intro {
  margin-bottom: 2rem;
}

/* Card grid layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 860px;
}

@media (max-width: 700px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Content card styling */
.content-card {
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Card image (thumbnail in list view) */
.card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Project header image (single view) */
.project-header-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.content-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.content-card h2 a {
  text-decoration: none;
}

/* Card metadata (year, event, etc.) */
.card-meta {
  font-weight: normal;
  font-size: 0.9em;
  color: #777;
}

.card-subtitle {
  margin: 0.25rem 0 0.5rem;
  font-weight: 500;
  color: #555;
}

.card-description {
  margin: 0.5rem 0;
  color: #555;
}

/* Card tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.card-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  background: #f0f0f0;
  border-radius: 4px;
  color: #555;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.card-tag:hover {
  background: #e0e0e0;
  color: #333;
}

/* Inline links */
.links-inline {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.links-inline a {
  text-decoration: none;
}

.links-inline a:hover {
  text-decoration: underline;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Links section on single pages */
.links-section {
  margin-top: 2rem;
}

.links-section h3 {
  margin-bottom: 0.5rem;
}

/* Dark mode support via prefers-color-scheme */
@media (prefers-color-scheme: dark) {
  .content-card {
    border-color: #4e4e57;
  }

  .content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .card-meta {
    color: #888;
  }

  .card-subtitle,
  .card-description {
    color: #a9a9b3;
  }

  .card-tag {
    background: #3a3a42;
    color: #a9a9b3;
  }

  .card-tag:hover {
    background: #4a4a52;
    color: #c9c9d3;
  }
}

/* Dark mode support via data-theme attribute */
[data-theme="dark"] .content-card {
  border-color: #4e4e57;
}

[data-theme="dark"] .content-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card-meta {
  color: #888;
}

[data-theme="dark"] .card-subtitle,
[data-theme="dark"] .card-description {
  color: #a9a9b3;
}

[data-theme="dark"] .card-tag {
  background: #3a3a42;
  color: #a9a9b3;
}

[data-theme="dark"] .card-tag:hover {
  background: #4a4a52;
  color: #c9c9d3;
}

/* Light mode override when explicitly set */
[data-theme="light"] .content-card {
  border-color: #dcdcdc;
}

[data-theme="light"] .content-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card-meta {
  color: #777;
}

[data-theme="light"] .card-subtitle,
[data-theme="light"] .card-description {
  color: #555;
}

[data-theme="light"] .card-tag {
  background: #f0f0f0;
  color: #555;
}

[data-theme="light"] .card-tag:hover {
  background: #e0e0e0;
  color: #333;
}

/* Animated Light Effect - Header/Content Separator
 *
 * Timing control (fully independent):
 *   --sweep-time: duration of one sweep across the screen
 *   --pause-time: pause at each edge before reversing
 *
 * Keyframes are generated dynamically by /js/light-animation.js
 */
body {
  overflow-x: hidden;
}

.content {
  position: relative;
  overflow: visible;
  --sweep-time: 0.7s;
  --pause-time: 5s;
}

.content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgba(76, 175, 80, 0.1);
  z-index: 10;
  pointer-events: none;
}

.content::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80px;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(76, 175, 80, 0.4) 20%,
    #4CAF50 50%,
    rgba(76, 175, 80, 0.4) 80%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(76, 175, 80, 0.6),
    0 0 15px rgba(76, 175, 80, 0.3);
  z-index: 11;
  pointer-events: none;
  -webkit-animation: light-sweep calc(2 * var(--sweep-time) + 2 * var(--pause-time)) infinite;
  animation: light-sweep calc(2 * var(--sweep-time) + 2 * var(--pause-time)) infinite;
}

/* Dark mode - brighter glow */
@media (prefers-color-scheme: dark) {
  .content::before { background-color: rgba(76, 175, 80, 0.15); }
  .content::after {
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.8), 0 0 20px rgba(76, 175, 80, 0.4);
  }
}

[data-theme="dark"] .content::before { background-color: rgba(76, 175, 80, 0.15); }
[data-theme="dark"] .content::after {
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.8), 0 0 20px rgba(76, 175, 80, 0.4);
}

/* Homepage title link - no underline */
main h1 a {
  text-decoration: none;
}

/* Logo cursor glow effect with voltage flicker */
.logo__cursor {
  box-shadow:
    0 0 8px rgba(76, 175, 80, 0.6),
    0 0 15px rgba(76, 175, 80, 0.3);
}

/* Dark mode - brighter glow */
@media (prefers-color-scheme: dark) {
  .logo__cursor {
    box-shadow:
      0 0 12px rgba(76, 175, 80, 0.8),
      0 0 20px rgba(76, 175, 80, 0.4);
  }
}

[data-theme="dark"] .logo__cursor {
  box-shadow:
    0 0 12px rgba(76, 175, 80, 0.8),
    0 0 20px rgba(76, 175, 80, 0.4);
}

/* Voltage drop flicker - triggered by JS */
.logo__cursor.flicker {
  animation: cursor-flicker 0.15s ease-out;
}

@keyframes cursor-flicker {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  30% {
    opacity: 0.5;
    filter: brightness(0.4);
  }
  50% {
    opacity: 0.8;
    filter: brightness(0.7);
  }
  70% {
    opacity: 0.4;
    filter: brightness(0.3);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}
