/*
  Shared stylesheet for Giovanni Michel's personal website.
  Defines color variables, base typography, layout helpers, and
  componentâ€'specific styles for each page. The design takes
  inspiration from the provided contact page screenshot with a
  contemporary dark theme, generous spacing, and rounded corners.
*/

:root {
  --bg-color: #0a0a0a;
  --surface-color: #121212;
  --card-color: #1a1a1a;
  --primary-color: #c4d6c4;
  --accent-color: #6f8be4;
  --text-color: #ffffff;
  --secondary-text: #bbbbbb;
  --error-color: #e57373;
}

/* Reset & base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navigation */
/* Navigation */
.site-header {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.nav-bar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
  transition: color 0.3s;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Fix the active state - make it more specific and clear */
.nav-links a.active {
  color: var(--primary-color) !important;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 1px;
}
/* .site-header {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.nav-bar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 1px;
} */

/* Hero section on home page */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color);
  background-image: url('63992c39-556c-430b-aa1d-71b7de695f5a.png');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 0.5rem;
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.25rem;
  margin: 0 0 1.5rem;
  color: var(--secondary-text);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  border: none;
}

.primary-btn {
  background-color: var(--primary-color);
  color: #0a0a0a;
}

.primary-btn:hover {
  background-color: #b5cbb5;
}

/* Page header (title sections) */
.page-header {
  text-align: center;
  padding: 3rem 1rem 1rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin: 0;
}

/* Bio section */
.bio-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  align-items: flex-start;
}

.bio-image {
  flex: 1 1 280px;
  max-width: 350px;
}

.bio-image img {
  border-radius: 12px;
}

.bio-content {
  flex: 2 1 400px;
}

.bio-content h2 {
  margin-top: 0;
  font-size: 1.75rem;
  color: var(--primary-color);
}

.bio-content p {
  color: var(--secondary-text);
  margin-bottom: 1.25rem;
}

/* Experience & project sections */
.experience-section,
.project-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.experience-section h2,
.project-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* ✅ Make Experience vertical */
.experience-section .card-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* ✅ Projects grid with flip card support */
.project-section .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
  perspective: 1000px;
}

/* Traditional card styles (for experience page) */
.card {
  background-color: var(--card-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
  color: var(--accent-color);
}

.card-date {
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-bottom: 0.75rem;
  display: block;
}

.card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--secondary-text);
}

.card li {
  margin-bottom: 0.5rem;
}

/* Project flip card styles */
.project-card {
  width: 100%;
  height: 320px; /* Increased height to accommodate buttons */
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-in-out;
  cursor: pointer;
}

.project-card:hover {
  transform: rotateY(180deg);
}

/* Create a larger hover area to prevent losing hover state */
.project-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  z-index: -1;
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.card-front {
  background-color: var(--card-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-back {
  background: linear-gradient(135deg, var(--accent-color) 0%, #4a5fd4 100%);
  color: white;
  transform: rotateY(180deg);
  padding: 1.5rem;
  display: block; /* Changed from flex to block for simpler layout */
  overflow-y: auto; /* Allow scrolling if needed */
}

.project-image {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 50%;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  text-align: center;
}

.project-subtitle {
  color: var(--secondary-text);
  font-size: 0.9rem;
  text-align: center;
}

.project-description h3 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
}

.project-description ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}

.project-description li {
  margin-bottom: 0.6rem;
  padding-left: 1rem;
  position: relative;
  font-size: 0.85rem;
  line-height: 1.4;
}

.project-description li::before {
  content: "•";
  color: var(--primary-color);
  font-size: 1.2rem;
  position: absolute;
  left: 0;
  top: 0;
}

/* Project action buttons */
.project-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.project-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Add explicit colors to ensure visibility */
  min-height: 36px;
  box-sizing: border-box;
}

.github-btn {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.github-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.presentation-btn {
  background: rgba(196, 214, 196, 0.3) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.presentation-btn:hover {
  background: var(--primary-color);
  color: #0a0a0a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-icon {
  font-size: 1rem;
}

.btn-text {
  font-weight: 600;
}

/* Hover indicator */
.card-front::after {
  content: "Hover to learn more";
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 0.75rem;
  color: var(--secondary-text);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .card-front::after {
  opacity: 0.7;
}

/* Contact page */
.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.contact-left {
  flex: 1 1 300px;
  max-width: 500px;
}

.contact-left h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-left p {
  color: var(--secondary-text);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.contact-right {
  flex: 1 1 400px;
  max-width: 600px;
}

.contact-right form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-right label {
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
  display: block;
}

.required {
  font-size: 0.75rem;
  color: var(--secondary-text);
}

.contact-right input,
.contact-right textarea {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  color: #000;
  background-color: #f2f2f2;
  width: 100%;
  font-family: inherit;
  box-sizing: border-box;
}

.contact-right textarea {
  border-radius: 20px;
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.submit-btn {
  margin-top: 1rem;
  background-color: var(--primary-color);
  color: #0a0a0a;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background-color 0.3s;
  align-self: flex-start;
  font-size: 1rem;
}

.submit-btn:hover {
  background-color: #b5cbb5;
}

.confirmation {
  background-color: var(--card-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  display: none;
}

.confirmation h2 {
  margin-top: 0;
  color: var(--primary-color);
}

.confirmation p {
  margin: 0.5rem 0;
}

/* Fix any form field alignment issues */
.contact-right form > * {
  margin-bottom: 0.5rem;
}

.contact-right form label {
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.contact-right form label:first-child {
  margin-top: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .welcome-section {
    padding: 1.5rem 1rem;
  }
  
  .welcome-section p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .contact-wrapper {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .contact-left,
  .contact-right {
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  .contact-left h1 {
    font-size: 2rem;
  }
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: var(--secondary-text);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .contact-left,
  .contact-right {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .bio-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .bio-content {
    flex: 1 1 auto;
  }
  .bio-content h2 {
    margin-top: 1rem;
  }

  /* Welcome section on home page */
  .welcome-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
  }

  .welcome-section p {
    color: var(--secondary-text);
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0 auto;
    max-width: 800px;
  }

  .welcome-section strong {
    color: var(--text-color);
    font-weight: 600;
  }

  .welcome-section em {
    font-style: italic;
    color: var(--primary-color);
  }
  
  /* Mobile adjustments for project cards */
  .project-section .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-card {
    height: 280px; /* Slightly smaller on mobile */
  }
  
  .project-image {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .project-title {
    font-size: 1.1rem;
  }
  
  .project-description h3 {
    font-size: 1.1rem;
  }
  
  .project-description li {
    font-size: 0.85rem;
  }
  
  .card-front::after {
    content: "Tap to learn more";
    opacity: 0.7;
  }
  
  /* Mobile button adjustments */
  .project-buttons {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  
  .project-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }
}

