/* Components CSS - Cards, Buttons, Navigation, Forms, etc. */

/* Cards */
.service-card {
  background: var(--card-gradient);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.service-card h4 {
  flex-shrink: 0;
}

.service-card p {
  flex-grow: 1;
  margin-bottom: 0;
}

/* Portfolio Cards */
.portfolio-item {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.portfolio-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--input-bg);
  flex-shrink: 0;
}

.portfolio-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-content h4 {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.portfolio-content p {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.portfolio-tag {
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Styles for the portfolio item link wrapper */
.portfolio-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.portfolio-item-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Portfolio Item Details */
.portfolio-item-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--muted);
}

.portfolio-item-details p {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.portfolio-item-details strong {
    color: var(--text);
    margin-right: 0.25rem;
}

/* Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Buttons */
.filter-btn {
  background: var(--card);
  color: var(--text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease-out;
}

.filter-btn:hover {
  background-color: var(--primary);
  color: white;
}

.filter-btn.active {
  background: var(--primary);
  color: white;
}

/* Style for initially hidden filter buttons */
.filter-btn-hidden {
    display: none;
}

/* Style for showing hidden buttons when container has the class */
.portfolio-filters.show-all-filters .filter-btn-hidden {
    display: inline-block; /* Or flex, depending on container */
}

/* Style for the Show More/Less button */
.filter-toggle-btn {
    /* Optional: Slightly different style to distinguish it */
    background-color: var(--muted); 
    color: var(--background);
    font-weight: bold;
}

.filter-toggle-btn:hover {
    background-color: var(--text); /* Different hover */
}

.submit-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease-out, transform 0.3s ease-out;
  font-weight: 600;
  width: 100%;
}

.submit-btn:hover {
  background: var(--hover);
  transform: translateY(-2px);
}

/* Social Icons */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  font-size: 1.2rem;
  transition: background-color 0.3s ease-out, color 0.3s ease-out, transform 0.3s ease-out;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Navigation Links */
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  display: block;
  transition: color 0.3s ease-out, background-color 0.3s ease-out;
  position: relative;
}

.nav-links a:hover {
  color: var(--text);
  background-color: var(--card-hover);
}

.menu-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Section Headers */
.section-header {
  margin-bottom: 2rem;
  position: relative;
}

.section-line {
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin-top: 0.5rem;
}

/* Contact Info */
.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.info-item i {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 50%;
  margin-right: 1rem;
  color: var(--primary);
  flex-shrink: 0;
}

.info-item span {
  word-break: break-all;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Skills */
.skill-item {
  margin-bottom: 1.5rem;
}

.skill-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Circular background for the icon */
.skill-icon-background {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Icon styles (img or i tag) inside the background */
.skill-icon {
  object-fit: contain;
  margin-right: 1rem;
  display: block;
  margin-right: 0;
}

/* Font Awesome icon specific adjustments */
.skill-icon.fas,
.skill-icon.fab,
.skill-icon.far {
  font-size: 18px;
  line-height: 1;
  text-align: center;
  color: var(--primary);
  width: auto;
  height: auto;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  flex-grow: 1;
}

.skill-bar {
  height: 8px;
  background: var(--card);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 4px;
  transition: width 0.6s ease-out;
}

/* Map Container */
.map-container {
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
}

/* Sidebar Profile */
.profile {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Profile */
.mobile-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 1;
  min-width: 0;
}

.mobile-profile img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.mobile-profile > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mobile-profile .name {
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-profile .title {
    font-size: 0.8rem;
    margin: 0;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Header Contact Info */
.mobile-header-contact {
    margin-top: 0.25rem;
    display: none;
}

.mobile-header-contact-item {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Show mobile header contact only on smaller screens */
@media screen and (max-width: 1023px) {
    .mobile-header-contact {
        display: block; 
    }
}

/* Certification List */
.certification-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.certification-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.certification-list li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  line-height: 1;
}

/* Resume Timeline Content Adjustments */
.timeline-content h4 {
    margin-bottom: 0.25rem;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.company-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    background-color: white;
    border-radius: 4px;
}

.company-info .company {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
}

.timeline-content .period {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.timeline-content .description {
    color: var(--text);
    line-height: 1.6;
}

/* Add subtle visual cue for redacted items, e.g., slight opacity */
.portfolio-item.is-redacted {
    /* Optional: Add styles like opacity or border to distinguish the whole card */
    /* opacity: 0.9; */
}

/* Redacted Badge Styles */
.redacted-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6); /* Dark semi-transparent background */
    color: #f0f0f0; /* Light grey text */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2; /* Ensure it's above the image */
    display: inline-flex; /* Use flex for icon alignment */
    align-items: center;
    gap: 4px; /* Space between icon and text */
}

.redacted-badge .fa-lock {
    font-size: 0.7rem; /* Slightly smaller icon */
}

/* Ensure content doesn't overlap badge - adjust padding if needed */
.portfolio-content {
  /* padding: 1.5rem; */ /* Ensure padding is sufficient */
}

/* Interests Section Styles */

.interests-content h2, 
.interests-content h3 {
    /* Sub-section titles */
    margin-top: 3rem; 
    margin-bottom: 0.5rem; 
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-light); /* Slightly lighter than normal text */
}

.interest-card {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    height: 100%; 
    display: flex;
    flex-direction: column; 
}

.interest-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.interest-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.interest-icon {
    font-size: 1.5rem; /* Icon size */
    color: var(--primary);
    margin-right: 0.75rem;
    width: 30px; /* Fixed width for alignment */
    text-align: center;
}

.interest-card h3, 
.interest-card h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.interest-card p {
    color: var(--muted);
    line-height: 1.6;
    flex-grow: 1; 
    margin-bottom: 1rem; /* Add margin back below paragraph */
}

/* Container for multiple link buttons at the bottom of the card */
.interest-card-links {
    margin-top: auto; /* Push to bottom */
    padding-top: 1rem; /* Increased space above links */
    text-align: right; 
    /* Add flex properties if needed for better alignment/spacing */
    /* display: flex; */
    /* justify-content: flex-end; */
    /* gap: 0.5rem; */
}

/* Interest Link Button - Style updated to match homelab buttons */
.interest-link-btn {
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    /* Removed fixed width/height and circular border-radius */
    padding: 0.5rem 0.8rem; /* Adjust padding */
    background-color: var(--card); /* Match homelab base bg */
    color: var(--primary); /* Match homelab base text color */
    border: 1px solid var(--border); /* Match homelab border */
    border-radius: 6px; /* Match homelab border-radius */
    text-decoration: none;
    font-size: 0.9rem; /* Match homelab icon size */
    line-height: 1;
    box-shadow: var(--shadow-sm); /* Match homelab shadow */
    transition: background-color 0.2s ease-out, color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.2s ease-out; /* Match homelab transitions */
    margin-left: 0.5rem; 
}

.interest-link-btn:hover {
    background-color: var(--primary); /* Match homelab hover bg */
    color: white; /* Match homelab hover text color */
    box-shadow: var(--shadow-md); /* Match homelab hover shadow */
    transform: scale(1.05); /* Slightly different hover transform */
}

/* Ensure icon size consistency */
.interest-link-btn i {
    font-size: 1em; /* Inherit font-size from button */
    line-height: 1;
}

/* Specific style for fusion item card titles if needed */
.fusion-item h4 {
    font-size: 1rem; /* Slightly smaller than core interest titles */
}

/* Homelab Showcase Styles */
.homelab-showcase {
    margin-top: 3rem; 
}

.homelab-image-container {
    /* Container for the image */
    position: relative; 
    display: block; /* Ensure it takes block space */
}

/* If image container is wrapped in a link */
.homelab-content a .homelab-image-container {
    transition: transform 0.3s ease-out; 
}

.homelab-content a:hover .homelab-image-container {
    transform: scale(1.03); /* Example hover effect for linkable image */
}

.homelab-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: block;
}

.homelab-description {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.homelab-specs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.homelab-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border); /* Subtle separator */
    color: var(--muted);
}

.homelab-specs li:last-child {
    border-bottom: none;
}

.homelab-specs strong {
    color: var(--text-light);
    margin-right: 0.5rem;
}

/* Homelab Links Container (below title) */
.homelab-links {
    margin-top: 1rem; /* Space below section line */
    margin-bottom: 1.5rem; /* Space above main content */
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* Space between buttons */
}

.homelab-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--card);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease-out, color 0.2s ease-out, box-shadow 0.2s ease-out;
    box-shadow: var(--shadow-sm);
}

.homelab-link-btn i {
    margin-right: 0.5rem; /* Space between icon and potential text */
    font-size: 1em;
}

.homelab-link-btn:hover {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
} 