/* Ismael Ferreira - Guided Lab 8 - Web Development */

:root {
  --primary-color: #1e3a8a;
  --secondary-color: #f97316;
  --accent-blue: #3b82f6;
  --background-color: #f9f9f9;
  --text-color: #333333;
}

/* Page-specific fonts */
body.index-page {
  font-family: 'Poppins', sans-serif;
}
body.interests-page {
  font-family: 'Rubik', 'Poppins', sans-serif;
}
body.about-page {
  font-family: 'Montserrat', 'Poppins', sans-serif;
}
body.resume-page {
  font-family: 'Roboto Slab', serif;
}
body.donate-page {
  font-family: 'Merriweather', serif;
}

/* Global styles */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2% auto;
}

.profile-img {
  max-width: 60%;
}

/* Sidebar navigation */
.sidebar {
  background-color: var(--primary-color);
  padding: 2%;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar nav ul li a {
  display: block;
  width: 100%;
  padding: 0.75em 1em;
  color: white;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background-color: var(--secondary-color);
}

/* Emphasize Showcase link in sidebar */
.showcase-link {
  background-color: var(--accent-blue);
  color: white !important;
  font-weight: bold;
  border-radius: 5px;
  margin-top: 10px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.showcase-link:hover {
  background-color: var(--secondary-color);
}

/* Tables */
.resume-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.resume-table th,
.resume-table td {
  border: 1px solid var(--primary-color);
  padding: 12px;
  text-align: left;
}
.resume-table th {
  background-color: var(--accent-blue);
  color: white;
}
.resume-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Section styling */
section {
  background: white;
  padding: 2em;
  margin-bottom: 2em;
  border-left: 6px solid var(--secondary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

h2,
.section-title {
  font-size: 1.8rem;
  margin-bottom: 1em;
  color: var(--primary-color);
  border-bottom: 3px solid var(--accent-blue);
  padding-bottom: 8px;
}

/* Forms */
form label {
  font-weight: bold;
  color: var(--primary-color);
}

form input[type="text"],
form input[type="email"],
form input[type="number"],
form select,
form textarea {
  width: 100%;
  padding: 10px;
  margin: 8px 0 16px;
  border: 1px solid var(--accent-blue);
  border-radius: 5px;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
  box-shadow: 0 0 6px var(--accent-blue);
  outline: none;
}

form button {
  background-color: var(--primary-color);
  color: white;
  padding: 12px 24px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: var(--secondary-color);
}

/* Social media icons */
.social-media {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
  margin: 0 10px;
}

.social-media:hover {
  transform: scale(1.1);
}

.social-media img:hover {
  transform: scale(1.1);
}

/* Flipbox Animation - Creative Element #1 */
.flip-box {
  background-color: transparent;
  width: 300px;
  height: 200px;
  perspective: 1000px;
  margin-bottom: 2rem;
  overflow: visible;
  position: relative;
  transition: box-shadow 0.4s ease;
}

.flip-box:hover {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}

.flip-box-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  transform: rotateY(0deg);
}

.flip-box:hover .flip-box-inner {
  transform: rotateY(180deg);
}

.flip-box-front,
.flip-box-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 1rem;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
}

.flip-box-front {
  background-color: #f0f0f0;
  color: var(--primary-color);
}

.flip-box-back {
  background-color: var(--accent-blue);
  color: white;
  transform: rotateY(180deg);
}

@media (hover: none) {
  .flip-box:hover .flip-box-inner {
    transform: rotateY(0deg);
  }

  .flip-box:active .flip-box-inner {
    transform: rotateY(180deg);
  }
}

/* Fade-in Scroll Animation - Creative Element #2 */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: none;
}

/* Showcase Highlight Section */
.showcase-highlight {
  background: linear-gradient(135deg, #e0f7fa, #e1f5fe);
  border: 2px solid var(--accent-blue);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-highlight:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .container,
  .w3-row {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    text-align: center;
    min-height: auto;
  }

  .sidebar nav ul {
    align-items: center;
    gap: 0.5em;
  }

  .resume-table th,
  .resume-table td {
    font-size: 0.95em;
  }
}

/* Print Styles */
@media print {
  body {
    color: black;
    background: white;
    font-size: 0.9rem;
  }

  .sidebar,
  .navMenu {
    display: none;
  }
}
