/* ===== Base ===== */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  background-color: #f0f4f8;
  color: #1e293b;
}

/* ===== Hero ===== */
header.hero-header {
  position: relative;
  min-height: 100vh;
  background-image: url('../img/background.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

header.hero-header h1 {
  font-size: 6.5rem;
  font-weight: 100;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

header.hero-header p.subtitle {
  font-size: 4.5rem;
  font-weight: 500;
  color: #d6d5d5;
}

.contact-bubble {
  background-color: rgba(0,0,0,.9);
  padding: 2rem;
  border-radius: 12px;
  max-width: 100%;
}

.contact-bubble h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.contact-bubble p {
  font-size: 1.5rem;
  font-weight: 500;
}

.contact-bubble a {
  color: #93c5fd;
  text-decoration: underline;
  font-weight: 600;
}

.download-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: .75rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color .3s;
}

.download-btn:hover {
  background: #2563eb;
}

section {
  padding: 2rem;
}

/* ===== Layout helpers ===== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  background: #fff;
}

.flex-wrap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.flex-col {
  flex: 1 1 240px;
}

ul.disc-list {
  list-style: disc;
  margin-left: 1.2rem;
}

.back-to-top {
  display: inline-block;
  padding: .75rem 1.5rem;
  background: #3b82f6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}

.back-to-top:hover {
  background: #2563eb;
}

/* ===== Logos ===== */
#education .logo-img,
#certificates .logo-img {
  width: 96px !important;
  height: 96px !important;
  max-width: 96px !important;
  max-height: 96px !important;
  object-fit: contain;
  display: block;
  flex: 0 0 96px;
  margin-left: 1rem;
}

/* ===== Projects ===== */
.project-media-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding-bottom: 1rem;
}

.project-media {
  max-width: 100%;
  width: 350px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, z-index 0.3s;
}

@media (hover:hover) {
  .project-media:hover {
    transform: scale(2.5);
    z-index: 10;
    object-fit: contain;
  }
}

.project-video {
  width: 50%;
  border-radius: 8px;
  transition: transform .3s ease;
}

.project-video:hover {
  transform: scale(1.5);
  z-index: 10;
}

.github-icon {
  width: 40px;
  height: 40px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ===== Cards, nav, forms, about ===== */
.info-section {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  background: #fff;
  margin: 0 1rem 2rem;
}

nav {
  background: #1e293b;
  padding: .75rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  font-weight: 600;
  color: #f1f5f9;
  text-decoration: none;
  transition: color .3s;
}

nav ul li a:hover {
  color: #3b82f6;
}

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

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  padding: .75rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 1rem;
}

.contact-form button {
  padding: .75rem;
  background: #3b82f6;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .3s;
}

.contact-form button:hover {
  background: #2563eb;
}

.skill-bubble {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 20px;
  margin: .3rem;
  font-weight: 500;
}

.about-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  background: #fff;
}

.about-text {
  flex: 2;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1e293b;
}

.about-text strong {
  color: #3b82f6;
}

.about-img-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

#form-status {
  font-weight: 600;
  margin-top: .75rem;
  transition: opacity .3s ease;
}

#form-status.hidden { opacity: 0; }
#form-status.show   { opacity: 1; }
#form-status.success { color: #16a34a; }
#form-status.error   { color: #dc2626; }

.contact-note {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .625rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, var(--brand-100), rgba(156,155,155,.9));
  border: 1px solid rgba(20,93,209,.35);
  box-shadow: 0 6px 18px rgba(59,130,246,.12);
  color: var(--brand);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  align-self: center;
}

.contact-note .note-icon { font-size: 1.05rem; }
.contact-note .note-text strong { font-weight: 800; }
.contact-note .note-muted { opacity: .78; font-weight: 500; }

/* ===== Utilities ===== */
.profile-img,
.logo-img,
.project-video {
  max-width: 100%;
  height: auto;
}

#contact {
  position: relative;
  z-index: 1;
}

section {
  scroll-margin-top: 80px;
}

/* ===== Mobile ≤ 767px ===== */
@media (max-width: 767px) {
  nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 0 1rem;
  }

  nav li a {
    font-size: .95rem;
  }

  .skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section-card {
    padding: 1rem;
  }

  #projects {
    padding: 1rem;
  }

  .projects-grid {
    gap: 1.25rem;
  }

  .project-media-wrapper {
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-media {
    width: 100%;
    max-width: 320px;
    height: 180px;
    object-fit: cover;
    transform: none;
  }

  #education .logo-img,
  #certificates .logo-img {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    margin-left: .5rem;
  }

  .about-container {
    display: grid;
    gap: 1rem;
  }

  .profile-img {
    max-width: 240px;
    border-radius: 12px;
  }

  #send-btn,
  .download-btn {
    width: 100%;
    padding: .9rem 1rem;
  }

  .contact-note {
    font-size: .95rem;
    padding: .6rem .9rem;
  }

  section {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Small Mobile ≤ 480px ===== */
@media (max-width: 480px) {
  header.hero-header h1 {
    font-size: 2.2rem;
  }

  header.hero-header .subtitle {
    font-size: 1.3rem;
  }

  .contact-bubble {
    padding: 1rem;
  }

  .project-media {
    height: 160px;
  }

  .skill-bubble {
    font-size: .9rem;
    padding: .35rem .7rem;
  }

  body {
    line-height: 1.5;
  }
}

/* Disable hover zoom on touch */
@media (hover: none) {
  .project-media:hover { transform: none; }
}