/* =========================
   GOOGLE FONT
   ========================= */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

/* =========================
   ROOT VARIABLES
   ========================= */
:root {
  --header-height: 3rem;

  /* Colors */
  --first-color: #F93F22;
  --second-color: #c1c2c5;

  /* Typography */
  --body-font: "Poppins", sans-serif;
  --font-semi: 600;
  --big-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;
  --smaller-font-size: .75rem;

  /* Spacing */
  --mb-2: 1rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;

  /* Layers */
  --z-back: -10;
  --z-fixed: 100;

  background-color: #25262b;
}

@media (min-width: 968px) {
  :root {
    --big-font-size: 3.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --smaller-font-size: .875rem;
  }
}

/* =========================
   BASE
   ========================= */
*, ::before, ::after {
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--second-color);
  background-color: #25262b;
}

.l-main { padding-top: 4rem; }

h1, h2, p { margin: 0; }

ul { padding: 0; list-style: none; }

a { text-decoration: none; }

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

/* =========================
   TITLES + SECTIONS
   ========================= */
.section {
  padding: 3rem 0 2rem;
}

.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-top: var(--mb-2);
  margin-bottom: var(--mb-4);
  text-align: center;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  bottom: -0.75rem;
  background-color: var(--first-color);
}

/* =========================
   GRID
   ========================= */
.bd-grid {
  max-width: 1024px;
  display: grid;
  margin: 0 var(--mb-2);
  row-gap: 2rem;
}

@media (min-width: 992px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================
   HEADER + NAV
   ========================= */
.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background: #1a1b1e;
  box-shadow: 0 1px 4px rgba(146, 161, 176, .15);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
}

.nav__logo-img {
  height: 2.5rem;
  object-fit: contain;
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  color: #fff;
  position: relative;
}

.nav__link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  top: 2rem;
  width: 100%;
  height: .18rem;
  background: red;
}

.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 2rem;
  width: 100%;
  height: .18rem;
  background: var(--first-color);
}

.nav__toggle {
  color: var(--second-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Links inherit color */
a {
  color: inherit;
}
a:hover {
  color: var(--first-color);
}

/* =========================
   MOBILE NAV
   ========================= */
@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: 100%;
    padding: 2rem;
    background-color: #1a1b1e;
    transition: right 0.5s ease;
    z-index: var(--z-fixed);
  }

  .nav__menu.show {
    right: 0;
  }

  .nav__list {
    padding-top: 1rem;
  }

  .nav__item {
    margin-bottom: var(--mb-4);
  }
}

/* =========================
   DESKTOP NAV
   ========================= */
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

  .nav__menu {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    background-color: transparent;
  }

  .nav__list {
    display: flex;
  }

  .nav__item {
    margin-left: var(--mb-6);
    margin-bottom: 0;
  }

  .nav__toggle {
    display: none;
  }

  .nav__link {
    color: var(--second-color);
  }

  .nav__item--home {
    display: none;
  }
}

/* =========================
   HOME / HERO
   ========================= */
.home {
  padding: 4rem 0 5rem;
  row-gap: 5rem;
  position: relative;
}

.home__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-5);
}

.home__title-color {
  color: var(--first-color);
}

.home__social {
  display: flex;
  flex-direction: column;
}

.home__social-icon {
  font-size: 1.5rem;
  margin-bottom: var(--mb-2);
  color: var(--second-color);
}

.home__social-icon:hover {
  color: var(--first-color);
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
}

@media (min-width: 576px) {
  .home {
    padding: 4rem 0 2rem;
  }

  .home__social {
    flex-direction: row;
  }

  .home__social-icon {
    margin-right: var(--mb-4);
  }

  .home__img {
    width: 300px;
  }
}

@media (min-width: 768px) {
  .home {
    padding: 8rem 0 2rem;
  }

  .home__img {
    width: 400px;
    bottom: 10%;
  }
}

/* =========================
   BUTTONS
   ========================= */
.button {
  display: inline-block;
  background: var(--first-color);
  color: #fff;
  padding: .75rem 2.5rem;
  font-weight: var(--font-semi);
  border-radius: .5rem;
  transition: .3s;
  cursor: pointer;
}

.button:hover {
  box-shadow: 0px 10px 36px rgba(0, 0, 0, .25);
}

.inline-btn {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.2s ease;
  cursor: pointer;
}

.inline-btn:hover {
  background-color: #ff5d3b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* =========================
   ABOUT
   ========================= */
.about__container {
  row-gap: 2rem;
  text-align: center;
}

.about__img img {
  width: 200px;
  border-radius: .5rem;
}

@media (min-width: 576px) {
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
    align-items: center;
  }

  .about__img img {
    width: 260px;
  }
}

/* =========================
   SKILLS
   ========================= */
.skills__container {
  row-gap: 2rem;
}

.skills__data {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1b1e;
  padding: .5rem 1rem;
  border-radius: .5rem;
  margin-bottom: var(--mb-4);
  font-weight: var(--font-semi);
  box-shadow: 0px 4px 25px rgba(14, 36, 49, .3);
}

.skills__icon {
  font-size: 2rem;
  margin-right: var(--mb-2);
  color: var(--first-color);
}

.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: .25rem;
  background: var(--first-color);
  border-radius: .5rem;
  z-index: var(--z-back);
}

.skills__html { width: 95%; }
.skills__css { width: 85%; }
.skills__js  { width: 65%; }
.skills__ux  { width: 85%; }

.skills__percentage {
  font-size: var(--smaller-font-size);
}

@media (min-width: 576px) {
  .skills__container {
    grid-template-columns: .7fr 1fr;
    column-gap: 1.5rem;
  }
}

/* =========================
   MODALS
   ========================= */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .6);
  z-index: var(--z-fixed);
}

.modal-content {
  background: #1a1b1e;
  border: 1px solid var(--first-color);
  color: var(--second-color);
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  margin: 10% auto;
  text-align: center;
}

.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
}

/* =========================
   APP CARDS
   ========================= */
.appbody {
  padding: 2rem 0;
}

.app-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
}

.app-link {
  text-decoration: none;
  color: inherit;
}

.app-card {
  background-color: #25262b;
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.app-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.app-icon .icn {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.app-text {
  text-align: center;
  font-weight: 500;
}

@media screen and (max-width: 600px) {
  .app-menu {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   HELP ICON
   ========================= */
.help-icon {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--first-color);
  color: #fff;
  padding: 12px;
  border-radius: 50%;
}

.help-icon:hover {
  background: #ff5e42;
}

.help-icon .material-symbols-outlined {
  font-size: 24px;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background: #1a1b1e;
  padding: 2rem 0;
  text-align: center;
  color: #fff;
  font-weight: var(--font-semi);
}

.footer__title {
  font-size: 2rem;
  margin-bottom: var(--mb-4);
}

.footer__icon {
  font-size: 1.5rem;
  margin: 0 var(--mb-2);
}

.footer__copy {
  font-size: var(--smaller-font-size);
}

/* =========================
   HOW TO DROPDOWN (DESKTOP)
   ========================= */
.nav__item--dropdown {
  position: relative;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1a1b1e;
  border-radius: 0.25rem;
  padding: 0.5rem 0;
  min-width: 200px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 1000;
}

.nav__item--dropdown:hover .nav__dropdown {
  display: block;
}

.nav__dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--second-color);
  white-space: nowrap;
}

.nav__dropdown-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.nav__dropdown-icon {
  font-size: 1rem;
  margin-left: 0.25rem;
}

/* =========================
   MOBILE DROPDOWN FLATTEN
   ========================= */
@media screen and (max-width: 768px) {
  .nav__item--dropdown {
    width: 100%;
  }

  .nav__item--dropdown > .nav__link,
  .nav__dropdown-icon {
    display: none;
  }

  .nav__dropdown {
    position: static;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    display: block;
  }

  .nav__dropdown-link {
    padding: 0.5rem 0;
  }
}

/* =========================
   REQUESTING HOW-TO PAGE
   ========================= */
.howto {
  padding: 2rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 90px auto 0;
}

@media (max-width: 768px) {
  .howto {
    margin-top: 75px;
  }
}

.howto__intro {
  margin-bottom: 1.5rem;
}

/* FIX — only apply this styling inside .howto */
.howto .section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-size: 1rem;
  opacity: 0.75;
}

.howto__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .howto__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .howto__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.howto__step {
  background: #202126;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.howto__step h2 {
  color: #e94e2f;
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.howto__step p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.howto-img {
  margin-top: 0.75rem;
  width: 100%;
  border-radius: 10px;
}

.howto__divider {
  margin: 3rem 0 1rem;
  opacity: 0.15;
}
