/* Tab Navigation Container */
.tab-navigation {
  display: flex;
  border-bottom: 2px solid #404040;
  margin-bottom: 1.2rem;
  margin-top: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

/* Individual Tab Button */
.tab {
  flex: 0 0 auto;
  min-width: 110px;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: #5A5A5A;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  scroll-snap-align: start;
  position: relative;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #5A5A5A;
  transition: width 0.3s ease;
}

.tab:hover {
  color: #808080;
  background: rgba(90, 90, 90, 0.05);
  transform: translateY(-1px);
}

.tab:hover::after {
  width: 100%;
}

.tab:focus {
  outline: 2px solid #404040;
  outline-offset: -2px;
}

.tab[aria-selected="true"] {
  color: #808080;
  border-bottom-color: transparent;
  background: transparent;
}

.tab[aria-selected="true"]::after {
  width: 100%;
}

/* Resume header section */
#resume-header {
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 3px solid var(--primary);
}

#resume-header h1 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex-shrink: 0;
}

#resume-header h2 {
  margin: 0;
  padding-left: 0;
  border-left: none;
  color: #5A5A5A;
  font-size: 1.3em;
  font-weight: 400;
}

#resume-header + hr,
#resume-header ~ hr:first-of-type {
  display: none;
}

/* Export PDF Button - Top Right (inside container) */
.container {
  position: relative;
}

.export-pdf-btn {
  position: absolute;
  top: 25px;
  right: 30px;
  padding: 8px 16px;
  font-size: 0.9em;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tab Panel Container */
.tab-panel {
  animation: fadeInSlide 0.4s ease-out;
}

.tab-panel[hidden] {
  display: none;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progressive Enhancement - CSS :target fallback */
.tab-panel:target {
  display: block;
}

/* GitHub Activity Styles */
.github-activity {
  margin-top: 0.8rem;
}

.github-intro {
  text-align: center;
  margin-bottom: 1rem;
}

.github-contributions {
  width: 100%;
}

.github-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.stat-card {
  background: #f8f8f8;
  padding: 0.8rem;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.stat-card.full-width {
  grid-column: 1 / -1;
}

.stat-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: #404040;
  font-size: 0.95em;
}

.github-stats img {
  background: #1A1A1A;
  padding: 0.8rem;
  border-radius: 4px;
}

.github-event {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #2A2A2A;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.github-event:hover {
  background: #404040;
}

.event-icon {
  flex: 0 0 32px;
  height: 32px;
  margin-right: 1rem;
  color: #5A5A5A;
}

.event-content {
  flex: 1;
}

.event-title {
  margin: 0 0 0.25rem 0;
  font-size: 16px;
  font-weight: 500;
  color: #F5F5F5;
}

.event-subtitle {
  margin: 0 0 0.5rem 0;
  font-size: 14px;
  color: #5A5A5A;
}

.event-time {
  font-size: 12px;
  color: #5A5A5A;
}

.event-link {
  flex: 0 0 24px;
  height: 24px;
  color: #5A5A5A;
  transition: color 0.2s ease;
  text-decoration: none;
}

.event-link:hover {
  color: #F5F5F5;
}

/* Loading and Error States */
.loading {
  padding: 2rem;
  text-align: center;
  color: #5A5A5A;
}

.error {
  padding: 2rem;
  text-align: center;
  color: #ff6b6b;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1em;
  font-family: inherit;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(64, 64, 64, 0.1);
}

.form-group input[type="text"]:invalid:not(:placeholder-shown),
.form-group input[type="email"]:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: var(--error);
}

.form-group input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.form-group label[for="consent"] {
  display: flex;
  align-items: center;
  font-weight: normal;
}

/* Contact Section */
.contact-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 3px solid var(--primary);
}

.contact-section h2 {
  margin-top: 0;
}

.contact-section p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Contact Info Styles */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.5rem 0;
  padding: 1.2rem;
  background: #f8f8f8;
  border-radius: 6px;
  border-left: 4px solid var(--primary);
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95em;
}

.contact-method strong {
  min-width: 80px;
  color: var(--secondary);
}

.contact-method a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary);
  transition: all 0.2s ease;
}

.contact-method a:hover {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

/* Success Message */
.success-message {
  padding: 16px;
  background-color: #E8F8F5;
  border-left: 4px solid var(--success);
  border-radius: 4px;
  color: #27AE60;
  margin-bottom: 20px;
  font-weight: 500;
}

.success-message p {
  margin: 0;
}

/* Error Message */
.error-message {
  padding: 16px;
  background-color: #FFF5F5;
  border-left: 4px solid var(--error);
  border-radius: 4px;
  color: #E74C3C;
  margin-bottom: 20px;
  font-weight: 500;
}

/* Button States */
button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}
