/* Basic Reset & Layout */
body {
  font-family: system-ui, sans-serif;
  background: #f9fafb;
  margin: 0;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #111827;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
  background: #111827;
  color: #f9fafb;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #3b82f6;
  margin-bottom: 0.75rem;
}

h1 {
  margin: 0 0 1.5rem 0;
  font-weight: 700;
  font-size: 1.75rem;
  color: #1e40af;
}

body.dark h1 {
  color: #93c5fd;
}

/* Social Links Row - icons only, smaller size, accessible buttons with tooltip */
.social-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  font-size: 28px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  text-decoration: none;
  color: #3b82f6;
  border: 2px solid transparent;
  border-radius: 0.375rem;
  user-select: none;
  display: inline-block;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.social-link:hover,
.social-link:focus {
  border-color: #3b82f6;
  background-color: #dbeafe;
  outline: none;
}

body.dark .social-link {
  color: #60a5fa;
}

body.dark .social-link:hover,
body.dark .social-link:focus {
  background-color: #1e40af;
  border-color: #60a5fa;
}

/* Icon images */
.icon-img {
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* Show label next to icon on large screens */
@media (min-width: 640px) {
  .social-link {
    font-size: 20px;
    width: auto;
    height: auto;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Tabs Container */
.tabs {
  width: 100%;
  max-width: 440px;
}

.tab-buttons {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tab-button {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.3s ease;
  user-select: none;
  flex: 1 1 33%;
  text-align: center;
  min-width: 80px;
}

.tab-button.active {
  border-color: #3b82f6;
  color: #1e40af;
}

body.dark .tab-button {
  color: #a1a1aa;
}

body.dark .tab-button.active {
  color: #93c5fd;
  border-color: #60a5fa;
}

.tab-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  padding: 1rem 1.5rem;
  display: none;
  color: #111827;
}

.tab-content.active {
  display: block;
}

body.dark .tab-content {
  background: #1f2937;
  color: #d1d5db;
  box-shadow: 0 2px 8px rgb(255 255 255 / 0.1);
}

.tab-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tab-links li {
  margin-bottom: 0.75rem;
  word-break: break-word;
}

.tab-links a,
.tab-links button.copy-email {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.tab-links a:hover,
.tab-links a:focus,
.tab-links button.copy-email:hover,
.tab-links button.copy-email:focus {
  text-decoration: underline;
  outline: none;
}

/* External link warning overlay */
#external-link-warning {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255 0 0 / 0.1);
  backdrop-filter: blur(5px);
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem 2rem;
  box-sizing: border-box;
  color: #b91c1c;
  font-weight: 700;
  font-size: 1.25rem;
  text-shadow: 0 0 8px #b91c1c;
}

#external-link-warning.active {
  display: flex;
}

#external-link-warning .warning-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: pulse-glow 1.5s infinite alternate;
}

#external-link-warning .url-text {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  word-break: break-word;
  font-weight: 500;
  color: white;  /* Changed from #991b1b to white */
  text-shadow: 0 0 8px #b91c1c; /* Keep the subtle red glow */
}

#external-link-warning button {
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  margin: 0 0.5rem;
  font-size: 1rem;
  box-shadow: 0 0 10px #b91c1c;
  transition: background-color 0.3s ease;
}

#external-link-warning button.continue {
  background-color: #b91c1c;
  color: white;
}

#external-link-warning button.continue:hover {
  background-color: #7f1212;
}

#external-link-warning button.stay {
  background-color: white;
  color: #b91c1c;
  border: 2px solid #b91c1c;
}

#external-link-warning button.stay:hover {
  background-color: #fee2e2;
}

@keyframes pulse-glow {
  0% {
    text-shadow: 0 0 5px #b91c1c, 0 0 15px #b91c1c;
  }
  100% {
    text-shadow: 0 0 12px #f87171, 0 0 25px #f87171;
  }
}

/* Dark mode toggle button */
#dark-mode-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #3b82f6;
  user-select: none;
  transition: color 0.3s ease;
}

body.dark #dark-mode-toggle {
  color: #93c5fd;
}

#dark-mode-toggle:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Future-looking contact buttons */
.copy-email {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.6);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.copy-email:hover,
.copy-email:focus {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.8);
  outline: none;
}
