/* ===== TABLET (768px - 1024px) ===== */
@media screen and (max-width: 1024px) {
  /* Navigation */
  .nav-container .links {
    gap: 15px;
  }

  .nav-container .links a {
    font-size: 1rem;
    padding: 6px 10px;
  }

  /* Main Section */
  section .main-container {
    padding-left: 50px;
    gap: 30px;
  }

  .main-container .image {
    width: 400px;
    height: 60vh;
  }

  .main-container .content {
    width: 45%;
  }

  .content h1 {
    font-size: 2rem;
  }

  .content p {
    font-size: 0.95rem;
  }

  .content button {
    width: 60%;
    height: 5vh;
  }

  /* About Section */
  .about .about-details .left {
    width: 40%;
  }

  .about .left img {
    height: 350px;
    width: 350px;
  }

  .about-details .right {
    width: 55%;
  }

  section .topic {
    font-size: 22px;
  }

  /* Skills */
  .skills-details .text {
    width: 45%;
  }

  .skills-details .boxes {
    width: 50%;
  }

  /* Services */
  .services .boxes .box {
    width: calc(100%/2 - 20px);
  }

  .contact-form input,
  .contact-form textarea {
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

/* ===== TABLET PORTRAIT (600px - 768px) ===== */
@media screen and (max-width: 768px) {
  /* Navigation */
  nav {
    height: 8vh;
  }

  .nav-container {
    padding: 0 15px;
  }

  .nav-container .links {
    display: none;
  }

  .hamburg,
  .cancel {
    opacity: 1;
    pointer-events: auto;
    font-size: 1.8rem;
  }

  .dropdown {
    transform: translateY(-100%);
    width: 100%;
    top: 8vh;
    display: block; /* enable dropdown on tablet/phone */
  }

  /* Main Section */
  section {
    min-height: auto;
    padding: 40px 0;
  }

  section .main-container {
    padding: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .main-container .image {
    width: 300px;
    height: 300px;
    margin-bottom: 30px;
  }

  .main-container .content {
    width: 100%;
    text-align: center;
  }

  .content h1 {
    font-size: 1.8rem;
  }

  .content p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .content button {
    width: 70%;
    height: 5vh;
    margin: 20px auto;
  }

  .social {
    justify-content: center;
  }

  /* About Section */
  .about .about-details {
    flex-direction: column;
  }

  .about .about-details .left {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
  }

  .about .left img {
    height: 300px;
    width: 300px;
    object-fit: cover;
  }

  .about-details .right {
    width: 100%;
  }

  section .title span {
    font-size: 24px;
  }

  section .topic {
    font-size: 20px;
    text-align: center;
  }

  .about-details .right p {
    text-align: center;
  }

  /* Skills */
  .skills .skills-details {
    flex-direction: column;
  }

  .skills-details .text {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
  }

  .skills-details .boxes {
    width: 100%;
    justify-content: center;
  }

  .skills-details .box {
    width: 48%;
  }

  .skills-details .experience {
    justify-content: center;
    margin: 15px 0;
  }

  .skills-details .experience .num {
    font-size: 60px;
  }

  /* Services */
  .services .boxes {
    flex-wrap: wrap;
  }

  .services .boxes .box {
    width: 100%;
    margin: 15px 0;
  }

  /* Contact */
  .contact-container {
    flex-direction: column;
  }

  .contact-map,
  .contact-form {
    min-height: 300px;
    flex: 1 1 100%;
  }

  .contact-form {
    padding: 20px;
  }

  .contact-form h3 {
    font-size: 1.4em;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 8px 10px;
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .contact-form button {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
}

/* ===== MOBILE (320px - 600px) ===== */
@media screen and (max-width: 600px) {
  /* Navigation */
  nav {
    height: 7vh;
  }

  .logo {
    font-size: 1.5rem;
  }

  .hamburg,
  .cancel {
    font-size: 1.5rem;
  }

  .dropdown {
    top: 7vh;
    display: block; /* enable dropdown on small phones */
  }

  .dropdown .links a {
    padding: 12px 0;
    font-size: 0.95rem;
  }

  /* Main Section */
  section .main-container {
    padding: 15px;
  }

  .main-container .image {
    width: 250px;
    height: 250px;
    margin-bottom: 25px;
  }

  .main-container .content {
    width: 100%;
    text-align: center;
  }

  .content h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .content-typewriter {
    font-size: 1.3rem;
  }

  .content p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 10px 0;
  }

  .content button {
    width: 80%;
    height: 5vh;
    margin: 15px auto;
    font-size: 1rem;
  }

  .sosial-links i {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.2rem;
    margin: 5px 8px;
  }

  /* Section Content */
  section .content {
    width: 95%;
  }

  section .title span {
    font-size: 20px;
  }

  section .title span::before,
  section .title span::after {
    width: 60px;
  }

  section .title span::after {
    width: 50%;
  }

  section .topic {
    font-size: 18px;
    margin-bottom: 8px;
  }

  /* About Section */
  .about .about-details .left {
    width: 100%;
  }

  .about .left img {
    height: 250px;
    width: 250px;
  }

  .about-details .right {
    width: 100%;
  }

  .about-details .right p {
    font-size: 0.85rem;
    text-align: center;
  }

  /* Skills */
  .skills-details .text {
    width: 100%;
    text-align: center;
  }

  .skills-details .boxes {
    width: 100%;
    flex-direction: column;
  }

  .skills-details .box {
    width: 100%;
    margin: 15px 0;
  }

  /* Ensure all skills elements are centered on small screens */
  .skills .skills-details,
  .skills .skills-details .text,
  .skills .skills-details .boxes,
  .skills .skills-details .box,
  .skills .skills-details .experience {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .skills-details .boxes {
    gap: 12px;
    align-items: center;
    justify-content: center;
  }

  .skills-details .boxes .per,
  .skills-details .boxes .topic {
    margin: 6px 0;
  }

  .skills-details .experience .num {
    font-size: 50px;
  }

  .skills-details .experience .exp {
    font-size: 16px;
  }

  /* Services */
  .services .boxes .box {
    width: 100%;
    padding: 20px 15px;
    margin: 10px 0;
  }

  .services .boxes .box .icon {
    width: 45px;
    height: 45px;
    line-height: 45px;
    font-size: 16px;
  }

  .services .boxes .box .topic {
    font-size: 16px;
  }

  .services .boxes .box p {
    font-size: 0.85rem;
  }

  /* Contact */
  .contact-section {
    padding: 30px 15px;
  }

  .contact-container {
    gap: 15px;
  }

  .contact-map,
  .contact-form {
    min-height: 250px;
  }

  .contact-form {
    padding: 15px;
  }

  .contact-form h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .contact-form h3 {
    font-size: 1.1em;
    margin-bottom: 12px;
  }

  .contact-form label {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 7px 10px;
    font-size: 0.85rem;
    margin-bottom: 10px;
  }

  .contact-form button {
    width: 100%;
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  /* Toast */
  #toast {
    min-width: 200px;
    margin-left: -100px;
    right: 10px;
    bottom: 10px;
    padding: 12px;
    font-size: 0.85rem;
  }

  /* Footer */
  footer {
    padding: 10px 15px;
  }

  footer .text span {
    font-size: 14px;
  }

  /* Scroll Button */
  .scroll-button a {
    bottom: 15px;
    right: 15px;
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* ===== EXTRA SMALL PHONES (320px) ===== */
@media screen and (max-width: 400px) {
  .logo {
    font-size: 1.2rem;
  }

  .content h1 {
    font-size: 1.3rem;
  }

  .content-typewriter {
    font-size: 1.1rem;
  }

  .content p {
    font-size: 0.8rem;
  }

  .main-container .image {
    width: 200px;
    height: 200px;
  }

  .about .left img {
    height: 200px;
    width: 200px;
  }

  section .title span {
    font-size: 18px;
  }

  section .topic {
    font-size: 16px;
  }

  .skills-details .experience .num {
    font-size: 40px;
  }

  .services .boxes .box {
    padding: 15px 10px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 14px;
  }
}