/* ---- RESET & ROOT ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1a5cad;
  --blue-dark: #14459e;
  --blue-light: #2d72d9;
  --gold: #e8a217;
  --bg-light: #f4f6fb;
  --bg-white: #ffffff;
  --text-dark: #0f2044;
  --text-body: #3a4a6b;
  --text-muted: #6b7a99;
  --border: #dde3f0;
  --shadow: 0 4px 24px rgba(26, 92, 173, 0.10);
  --radius: 12px;
  --radius-lg: 18px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.7;
}

/*
   NAVBAR
*/
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--blue);
  padding: 0 5%;
  height: 64px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 16px rgba(26, 92, 173, 0.18);
  transition: background var(--transition);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--gold);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/*
   HERO
*/
.hero {
  min-height: 100vh;
  padding: 100px 5% 60px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #eef3fb 0%, #f8faff 100%);
}

.hero-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-dark);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-text p {
  color: var(--text-body);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 32px;
}


/*
   BUTTONS 
*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 92, 173, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
  font-size: 0.88rem;
  padding: 9px 20px;
}

.btn-outline:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* 
   SECTIONS
*/
.section-container {
  max-width: 1100px;
  margin: auto;
  padding: 80px 5%;
}

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 14px;
}

.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: 12px auto 0;
}

/*
   ABOUT
*/
.about {
  background: var(--bg-white);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-top: 48px;
}

.about-img-wrap {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-lg);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #dceeff, #f0f7ff);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img-wrap img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.about-text {
  flex: 1;
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.8;
}

/* 
   SKILLS
*/
.skills {
  background: var(--bg-light);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 48px;
}

.skill-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.skill-card:hover {
  border-color: var(--blue-light);
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(26, 92, 173, 0.18);
}

.skill-icon {
  font-size: 2.2rem;
}

.html-icon {
  color: #e34f26;
}

.css-icon {
  color: #264de4;
}

.js-icon {
  color: #f7df1e;
}

.git-icon {
  color: #f05032;
}

.resp-icon {
  color: var(--blue);
}

.dom-icon {
  color: #0d9488;
}

/*
   MODAL 
*/
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 50, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(26, 92, 173, 0.25);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition);
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-icon-wrap {
  font-size: 3rem;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.modal-desc {
  color: var(--text-body);
  font-size: 0.97rem;
  line-height: 1.7;
}

/*
   CONTACT
*/
.contact {
  background: var(--bg-light);
}

.contact-form-wrap {
  max-width: 560px;
  margin: 48px auto 0;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(45, 114, 217, 0.12);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e53e3e;
}

.error-msg {
  display: block;
  color: #e53e3e;
  font-size: 0.82rem;
  margin-top: 5px;
  min-height: 18px;
}

.success-msg {
  display: none;
  text-align: center;
  color: #16a34a;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 16px;
}

.success-msg.show {
  display: block;
}

/*
   FOOTER
*/
.footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 28px 20px;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-icons a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.3rem;
  transition: color var(--transition), transform var(--transition);
  text-decoration: none;
}

.footer-icons a:hover {
  color: var(--gold);
  transform: translateY(-3px);
}

.footer p {
  font-size: 0.85rem;
}

/*
   RESPONSIVE
*/
@media (max-width: 768px) {

  /* Navbar */
  .nav-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 999;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 18px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .nav-link::after {
    display: none;
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hero */
  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-text p {
    margin: 0 auto 32px;
  }

  /* About */
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-img-wrap {
    flex: 0 0 auto;
  }

  /* Skills */
  .skills-grid {
    gap: 14px;
  }

  .skill-card {
    min-width: 100px;
    padding: 22px 16px 16px;
  }


  /* Contact */
  .contact-form-wrap {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .section-container {
    padding: 60px 4%;
  }

  .hero {
    padding: 90px 4% 50px;
  }

  .skill-card {
    min-width: 85px;
    font-size: 0.8rem;
  }

  .skill-icon {
    font-size: 1.8rem;
  }
}