/* ---- Import & Variables ---- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
  --bg-color: #121212;
  --sidebar-bg: #282925;
  --text-color: #ECDFCC;
  --accent-color: #68A357;
  --card-bg: #23251b;
}

/* ---- Base Styles ---- */
body {
  margin: 0;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

.container {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--sidebar-bg);
  width: 220px;
  padding: 2rem 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sidebar-menu {
  width: 100%;
  margin-top: 2rem;
}
.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-menu li {
  margin-bottom: 1.2rem;
}
.sidebar-menu a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.sidebar-menu a:hover {
  color: #fff;
}

/* ---- Main Card (About/Home) ---- */
.center-card {
  margin: 60px auto 0 auto;
  margin-top: -25px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.center-card .profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  margin-bottom: 1rem;
}
.center-card h1 {
  margin: 0.5rem 0 0.2rem 0;
  font-size: 2rem;
  text-align: center;
}
.center-card .subtitle {
  color: var(--accent-color);
  margin-bottom: 1.2rem;
  text-align: center;
  font-size: .9rem;
}
.center-card .mexFlagIcon,
.center-card .canFlagIcon {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-left: 0.2rem;
}
.main-links {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  align-items: flex-end;
}
.main-links a {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 56px;
  min-height: 56px;
  padding: 0.2rem 0.3rem;
  display: flex;
  gap: 0.3rem;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.main-links a:hover {
  color: #fff;
}
.icon-link {
  width: 60px;
  height: 60px;
  object-fit: contain;
  vertical-align: middle;
}
.about {
  margin-top: 0rem;
}
.about h2 {
  color: var(--accent-color);
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}
.about p {
  margin-bottom: 0.7rem;
  max-width: 400px;
  text-align: left;
}

/* ---- Content Section ---- */
.content {
  flex: 1;
  padding: 3rem;
  background: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.content::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 560px;
  z-index: -1;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* ---- Gallery (Projects) ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  /*flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;*/
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background: rgba(18,18,18,0.68);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  font-size: 1.2rem;
  font-weight: 700;
  transition: opacity 0.25s;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
  border-radius: 0;
}

.gallery-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 2;
}

.caption-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: block;
}

.caption-role {
  font-weight: 400;
  display: block;
  font-size: .8rem;
  opacity: 1;
  text-align: center;
  margin-top: 0;
}
/*
.gallery-item:hover .gallery-video {
  opacity: 1;
  pointer-events: auto;
}
*/
.gallery-item:hover .gallery-caption {
  opacity: 1;

}

.project-img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: 1; /* Remove radius for flush edges */
  background: #222;
  box-shadow: none;
  margin: 0;
  display: block;
  transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
}

.gallery-item:hover {
  transform: scale(1.20);
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  position: relative;
}

/* ---- Client Gallery ---- */
.client-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.client-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  border-radius: 8px;
  /*background: #222;*/
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
}

/* ---- CV Section ---- */
.cv-section {
  width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  align-items: left;
}
.cv-widget {
  width: 100%;
  height: 500px;
  align-items: center;
  align-self: center;
  border: none;
  border-radius: 12px;
}
.cv-download-btn {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.cv-download-btn:hover {
  background: #4e7c3a;
}

/* ---- Contact Form ---- */
.contact-form-section {
  margin-top: 2.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 2rem 1.5rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10rem;
}
.contact-form-section h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-align: center;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form input,
.contact-form textarea {
  padding: .7rem 1rem;
  border-radius: 6px;
  border: none;
  background: #181818;
  color: var(--text-color);
  font-size: 1rem;
  resize: both;
  text-align: left;
}
.contact-form button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover {
  background: #4e7c3a;
}

/* ---- Background Video ---- */
.bg-video-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
#bg-video-iframe {
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 aspect ratio */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.25; /* Adjust for desired visibility */
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding: 2rem;
  }
  .content {
    padding: 2rem 1rem;
  }
  .cv-section {
    width: 100%;
    padding: 1rem;
  }
}

