@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap");

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

/* ===== FIXED BREAKPOINTS FOR CONSISTENT EXPERIENCE ===== */
/* 768px tablets */
@media (width >= 768px) and (width < 1024px) {
  html { font-size: 60%; }
}

/* 1024px tablets */
@media (width >= 1024px) and (width < 1280px) {
  html { font-size: 61%; }
}

/* 1280px small desktop */
@media (width >= 1280px) and (width < 1440px) {
  html { font-size: 62%; }
}

/* 1440px standard desktop */
@media (width >= 1440px) and (width < 1600px) {
  html { font-size: 62.5%; }
}

/* 1600px large desktop */
@media (width >= 1600px) and (width < 1920px) {
  html { font-size: 63%; }
}

/* 1920px+ ultra wide */
@media (width >= 1920px) {
  html { font-size: 64%; }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: Poppins, sans-serif;
}

body{
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #000 0%, #0a0a0a 100%);
    color: white;
}

header{
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: transparent;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  width: 2.5rem;
  height: 0.3rem;
  background-color: #b74b4b;
  margin: 0.4rem 0;
  border-radius: 0.2rem;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Show hamburger on mobile */
@media (width <= 995px) {
  .hamburger {
    display: flex;
  }
}

.logo {
  font-size: 3.4rem;
  color: #b74b4b;
  font-weight: 800;
  cursor: pointer;
  transition: 0.5s ease;
  display: flex;
  align-items: center;
}

.logo:hover {
  transform: scale(1.1);
}

.logo img {
  height: 150px;
  width: auto;
  object-fit: contain;
  display: block;
}

nav a {
  font-size: 1.8rem;
  color: white;
  margin-left: 4rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  display: inline-block;
}

nav a:hover,
nav a:focus,
nav a.active {
  color: #b74b4b;
  border-bottom: 3px solid #b74b4b;
}

nav a:hover {
  background-color: rgba(183, 75, 75, 0.1);
}

nav a:focus {
  outline: 2px solid #b74b4b;
  outline-offset: 2px;
}

/* Desktop Navigation (>995px) - visible inline */
@media (width > 995px) {
  nav {
    display: flex !important;
    position: static;
    width: auto;
    border: none;
    background-color: transparent;
    padding: 0;
  }

  nav a {
    display: inline-block;
    font-size: 1.8rem;
    margin-left: 4rem;
  }

  nav a:not(.active) {
    border-bottom: 3px solid transparent;
  }
}

/* Mobile Navigation (<=995px) - hidden hamburger menu */
@media(width <=995px){
    nav{
        position: fixed;
        display: none;
        top: 80px;
        right: 0;
        width: 40%;
        height: auto;
        max-height: calc(100vh - 80px);
        border-left: 3px solid #b74b4b;
        border-bottom: 3px solid #b74b4b;
        border-bottom-left-radius: 2rem;
        padding: 2rem 1.5rem;
        background-color: #161616;
        border-top: 0.1rem solid rgb(0 0 0 / 10%);
        z-index: 99;
        overflow-y: auto;
    }

    nav.active{
        display: flex;
        flex-direction: column;
    }

    nav a{
        display: block;
        font-size: 2rem;
        margin: 2rem 0;
        border-bottom: none;
        padding: 0.5rem 0;
    }

    nav a:hover,
    nav a.active{
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        border-bottom: none;
        border-left: 4px solid #b74b4b;
        background-color: rgba(183, 75, 75, 0.1);
    }
}

section{
    min-height: 100vh;
    padding: 5rem 9%;
}

.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
}

/* Responsive gaps for home section */
@media (width >= 768px) and (width < 1024px) {
  .home { gap: 5rem; }
}

@media (width >= 1024px) and (width < 1280px) {
  .home { gap: 6rem; }
}

@media (width >= 1280px) {
  .home { gap: 8rem; }
}

.home .home-content h1{
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgb(183 75 75 / 20%);
}

@media (width >= 768px) and (width < 1024px) {
  .home .home-content h1 { font-size: 3.2rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .home .home-content h1 { font-size: 3.5rem; }
}

@media (width >= 1440px) {
  .home .home-content h1 { font-size: 2.8rem; }
}

@media (width >= 1920px) {
  .home .home-content h1 { font-size: 3rem; }
}

span{
    color: #b74b4b;
}

.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #b74b4b;
}

@media (width >= 768px) and (width < 1024px) {
  .home-content h3 { font-size: 2.8rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .home-content h3 { font-size: 3.2rem; }
}

@media (width >= 1440px) {
  .home-content h3 { font-size: 4rem; }
}

@media (width >= 1920px) {
  .home-content h3 { font-size: 4.5rem; }
}

.home-content p{
    font-size: 1.6rem;
    line-height: 1.8;
    color: #ccc;
}

@media (width >= 768px) and (width < 1024px) {
  .home-content p { font-size: 1.5rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .home-content p { font-size: 1.55rem; }
}

@media (width >= 1440px) {
  .home-content p { font-size: 1.6rem; }
}

@media (width >= 1920px) {
  .home-content p { font-size: 1.7rem; }
}

.home-img{
    border-radius: 50%;
}

.home-img img{
    position: relative;
    width: 32vw;
    min-width: 250px;
    max-width: 450px;
    border-radius: 50%;
    box-shadow: 0 0 30px rgb(183 75 75 / 40%), inset 0 0 30px rgb(183 75 75 / 10%);
    cursor: pointer;
    transition: all 0.4s ease;
}

@media (width >= 768px) and (width < 1024px) {
  .home-img img { width: 35vw; min-width: 220px; max-width: 350px; }
}

@media (width >= 1024px) and (width < 1280px) {
  .home-img img { width: 33vw; min-width: 280px; max-width: 400px; }
}

@media (width >= 1280px) {
  .home-img img { width: 32vw; min-width: 300px; max-width: 450px; }
}

@media (width >= 1920px) {
  .home-img img { width: 30vw; min-width: 350px; max-width: 500px; }
}

.home-img img:hover{
    box-shadow: 0 0 50px rgb(183 75 75 / 60%), inset 0 0 30px rgb(183 75 75 / 20%);
    transform: scale(1.05);
}

.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #b74b4b;
}

.social-icons a:hover{
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0 0 30px rgb(183 75 75 / 60%), 0 0 50px rgb(183 75 75 / 30%);
    border-color: #b74b4b;
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #b74b4b;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #b74b4b;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.btn:hover{
    transform: translateY(-3px) scale(1.03);
    background-color: #b74b4b;
    color: black;
    box-shadow: 0 10px 30px rgb(183 75 75 / 40%);
}

.btn:active{
    transform: translateY(-1px);
}

.typing-text {
  font-size: 34px;
  font-weight: 600;
  min-width: 280px;
  color: white;
  display: flex;
  align-items: center;
}

.typing-text span {
  position: relative;
}

.typing-text #typing {
  color: #b74b4b;
  border-right: 3px solid #b74b4b;
  white-space: nowrap;
  overflow: hidden;
  animation: blink 0.6s step-end infinite alternate;
}

/* Cursor blinking */
@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Typing effect */
@keyframes typing {
  0% {
    width: 0;
    content: "DevOps Engineer";
  }

  30% {
    width: 15ch;
    content: "DevOps Engineer";
  }

  40% {
    width: 0;
    content: "Cloud Engineer";
  }

  70% {
    width: 23ch;
    content: "Cloud Engineer";
  }

  80% {
    width: 0;
    content: "Freelancer";
  }

  100% {
    width: 11ch;
    content: "Freelancer";
  }
}

@media (width <= 1000px){
    .home{
        gap: 4rem;
    }
}

@media(width <=995px){
    .home{
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home .home-content h3{
        font-size: 2.5rem;
    }

    .home-content h1{
        font-size: 5rem;
    }

    .home-img img{
        width: 70vw;
        margin-top: 4rem;
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
  background-color: black;
  padding: 6rem 9%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  position: relative;
}

@media (width >= 768px) and (width < 1024px) {
  .contact { padding: 5rem 9%; }
}

@media (width >= 1024px) and (width < 1440px) {
  .contact { padding: 5.5rem 9%; }
}

@media (width >= 1440px) {
  .contact { padding: 6rem 9%; }
}

@media (width >= 1920px) {
  .contact { padding: 7rem 9%; }
}

.contact-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #b74b4b;
  border-radius: 2rem;
  padding: 4rem 5rem;
  width: 90%;
  max-width: 1200px;
  background: linear-gradient(135deg, rgb(10 10 10 / 80%) 0%, rgb(17 17 17 / 80%) 100%);
  color: white;
  gap: 3rem;
  transition: all 0.4s ease;
  box-shadow: 0 10px 40px rgb(183 75 75 / 15%);
}

@media (width >= 768px) and (width < 1024px) {
  .contact-container { 
    padding: 3rem 3.5rem;
    gap: 2.5rem;
    max-width: 1000px;
  }
}

@media (width >= 1024px) and (width < 1280px) {
  .contact-container { 
    padding: 3.5rem 4rem;
    gap: 2.8rem;
    max-width: 1100px;
  }
}

@media (width >= 1280px) {
  .contact-container { 
    padding: 4rem 5rem;
    gap: 3rem;
    max-width: 1200px;
  }
}

@media (width >= 1920px) {
  .contact-container { 
    padding: 5rem 6rem;
    gap: 4rem;
    max-width: 1400px;
  }
}

.contact-container:hover {
  box-shadow: 0 20px 60px rgb(183 75 75 / 25%);
  transform: translateY(-5px);
  border-color: #b74b4b;
}

.contact-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mail-icon {
  font-size: 14rem;
  color: transparent;
  -webkit-text-stroke: 2px #b74b4b; /* outlined mail icon */
}

.contact-right {
  flex: 1;
}

.contact-right .heading {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
  text-align: left;
}

@media (width >= 768px) and (width < 1024px) {
  .contact-right .heading { font-size: 2.8rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .contact-right .heading { font-size: 3rem; }
}

@media (width >= 1440px) {
  .contact-right .heading { font-size: 3.5rem; }
}

@media (width >= 1920px) {
  .contact-right .heading { font-size: 4rem; }
}

.contact-right .heading span {
  color: #b74b4b;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border: 2px solid #333;
  background: rgb(255 255 255 / 2%);
  color: white;
  border-radius: 1rem;
  font-size: 1.6rem;
  transition: all 0.4s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #b74b4b;
  box-shadow: 0 0 20px rgb(183 75 75 / 30%), inset 0 0 10px rgb(183 75 75 / 5%);
  background: rgb(255 255 255 / 4%);
  transform: translateY(-2px);
}

.contact-form .btn {
  align-self: flex-start;
  background-color: black;
  color: #b74b4b;
  border: 2px solid #b74b4b;
  border-radius: 4rem;
  padding: 1rem 2.8rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.2rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.contact-form .btn:hover {
  background-color: #b74b4b;
  color: black;
  box-shadow: 0 0 25px #b74b4b;
  transform: scale(1.05);
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #b74b4b;
  color: black;
}

.contact-form .btn:disabled:hover {
  transform: scale(1);
  box-shadow: 0 0 15px #b74b4b;
}

/* Responsive layout */
@media (width <= 900px) {
  .contact-container {
    flex-direction: column;
    text-align: center;
  }

  .mail-icon {
    font-size: 10rem;
    margin-bottom: 2rem;
  }

  .contact-right .heading {
    text-align: center;
  }

  .contact-form .btn {
    align-self: center;
  }
}

/* ================= SKILLS SECTION ================= */
.skills {
  min-height: 90vh;
  background-color: black;
  padding: 6rem 9%;
  text-align: center;
  position: relative;
}

@media (width >= 768px) and (width < 1024px) {
  .skills { padding: 5rem 9%; }
}

@media (width >= 1024px) and (width < 1440px) {
  .skills { padding: 5.5rem 9%; }
}

@media (width >= 1440px) {
  .skills { padding: 6rem 9%; }
}

@media (width >= 1920px) {
  .skills { padding: 7rem 9%; }
}


.skills-heading {
    font-size: 4rem;
    font-weight: 700;
    color: white;
}

@media (width >= 768px) and (width < 1024px) {
  .skills-heading { font-size: 3rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .skills-heading { font-size: 3.5rem; }
}

@media (width >= 1440px) {
  .skills-heading { font-size: 4rem; }
}

@media (width >= 1920px) {
  .skills-heading { font-size: 4.5rem; }
}

.skills-heading span {
    color: #b74b4b;
}

.skills-subtext {
    font-size: 1.8rem;
    color: #aaa;
    margin: 1rem 0 4rem;
}

@media (width >= 768px) and (width < 1024px) {
  .skills-subtext { font-size: 1.5rem; margin: 1rem 0 3rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .skills-subtext { font-size: 1.6rem; margin: 1rem 0 3.5rem; }
}

@media (width >= 1440px) {
  .skills-subtext { font-size: 1.8rem; margin: 1rem 0 4rem; }
}

@media (width >= 1920px) {
  .skills-subtext { font-size: 1.9rem; margin: 1rem 0 4.5rem; }
}

/* Responsive columns: 4 on desktop, 5 on 1600px+, adjusts with gap */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 3rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

@media (width >= 768px) and (width < 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 2.2rem;
  }
}

@media (width >= 1024px) and (width < 1280px) {
  .skills-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 2.5rem;
  }
}

@media (width >= 1280px) and (width < 1600px) {
  .skills-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 2.8rem;
  }
}

@media (width >= 1600px) {
  .skills-grid {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 3rem;
  }
}

@media (width >= 1920px) {
  .skills-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 3.5rem;
  }
}

/* fallback for narrow screens */
@media (width <= 900px) {
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
  }
}

.skill-card {
    background: #0a0a0a;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 2px solid #111;
    transition: 0.3s ease;
    box-shadow: 0 0 10px rgb(183 75 75 / 0%);
}

.skill-card img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.skill-card p {
    font-size: 1.6rem;
    color: white;
    font-weight: 500;
}

/* Hover Effects */
.skill-card:hover {
  transform: translateY(-8px);
  border-color: #b74b4b;
  box-shadow: 0 0 25px rgb(183 75 75 / 60%);
}

/* the vertical label */
.skills-side-label {
  position: absolute;
  left: 3.5rem;               /* distance from left page edge; tweak as needed */
  top: 50%;
  transform: translateY(-50%) rotate(-90deg); /* rotate to be vertical */
  transform-origin: left center;
  letter-spacing: 0.2rem;
  color: #b74b4b;
  font-weight: 700;
  font-size: 1.8rem;
  background: transparent;
  padding: 0.4rem 0;
  z-index: 10;
}

/* Add the little vertical divider line to mimic your earlier screenshot */
.skills-side-label::after {
  content: "";
  display: block;
  width: 120px;               /* length of underline line (horizontal because rotated) */
  height: 3px;
  background: #b74b4b;
  margin-top: 0.8rem;
  opacity: 0.85;
}

/* hide on small screens so it doesn't collide */
@media (width <= 900px) {
  .skills-side-label {
    display: none;
  }
}

@media (width >= 901px) {
  .skills {
    padding-left: 9%; /* your existing padding likely fine; increase slightly if overlap */
  }
}

/* Projects side label */
.projects-side-label {
  position: absolute;
  left: 3.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  letter-spacing: 0.2rem;
  color: #b74b4b;
  font-weight: 700;
  font-size: 1.8rem;
  background: transparent;
  padding: 0.4rem 0;
  z-index: 10;
}

.projects-side-label::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  background: #b74b4b;
  margin-top: 0.8rem;
  opacity: 0.85;
}

/* Contact side label */
.contact-side-label {
  position: absolute;
  left: 3.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  letter-spacing: 0.2rem;
  color: #b74b4b;
  font-weight: 700;
  font-size: 1.8rem;
  background: transparent;
  padding: 0.4rem 0;
  z-index: 10;
}

.contact-side-label::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  background: #b74b4b;
  margin-top: 0.5rem;
  opacity: 0.85;
}

/* Hide side labels on small screens */
@media (width <= 900px) {
  .projects-side-label,
  .contact-side-label {
    display: none;
  }
}

@media (width >= 901px) {
  .projects {
    padding-left: 9%;
  }
  .contact {
    padding-left: 9%;
  }
}

/* ================= PROJECTS SECTION ================= */
.projects {
    min-height: 70vh;
    background: black;
    padding: 6rem 9%;
    text-align: center;
    position: relative;
}

@media (width >= 768px) and (width < 1024px) {
  .projects { padding: 5rem 9%; }
}

@media (width >= 1024px) and (width < 1440px) {
  .projects { padding: 5.5rem 9%; }
}

@media (width >= 1440px) {
  .projects { padding: 6rem 9%; }
}

@media (width >= 1920px) {
  .projects { padding: 7rem 9%; }
}

.projects-heading {
    font-size: 4rem;
    font-weight: 700;
    color: white;
}

@media (width >= 768px) and (width < 1024px) {
  .projects-heading { font-size: 3rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .projects-heading { font-size: 3.5rem; }
}

@media (width >= 1440px) {
  .projects-heading { font-size: 4rem; }
}

@media (width >= 1920px) {
  .projects-heading { font-size: 4.5rem; }
}

.projects-heading span {
    color: #b74b4b;
}

.projects-subtext {
    font-size: 1.8rem;
    color: #aaa;
    margin-bottom: 4rem;
}

@media (width >= 768px) and (width < 1024px) {
  .projects-subtext { font-size: 1.5rem; margin-bottom: 3rem; }
}

@media (width >= 1024px) and (width < 1440px) {
  .projects-subtext { font-size: 1.6rem; margin-bottom: 3.5rem; }
}

@media (width >= 1440px) {
  .projects-subtext { font-size: 1.8rem; margin-bottom: 4rem; }
}

@media (width >= 1920px) {
  .projects-subtext { font-size: 1.9rem; margin-bottom: 4.5rem; }
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7rem;
    align-items: stretch;
    width: 90%;
    max-width: 1200px;
    min-height: 350px;
    margin: 0 auto;
}

@media (width >= 768px) and (width < 1024px) {
  .projects-container {
    gap: 4rem;
    width: 95%;
    max-width: 1000px;
  }
}

@media (width >= 1024px) and (width < 1280px) {
  .projects-container {
    gap: 5.5rem;
    width: 92%;
    max-width: 1100px;
  }
}

@media (width >= 1280px) {
  .projects-container {
    gap: 7rem;
    width: 90%;
    max-width: 1200px;
  }
}

@media (width >= 1920px) {
  .projects-container {
    gap: 8rem;
    width: 88%;
    max-width: 1400px;
  }
}

.project-card {
    background: linear-gradient(135deg, #0a0a0a 0%, #111 100%);
    border: 2px solid #1a1a1a;
    border-radius: 1.5rem;
    padding: 3rem;
    transition: all 0.4s ease;
    text-align: left;
    box-shadow: 0 5px 15px rgb(0 0 0 / 50%), inset 0 1px 0 rgb(183 75 75 / 10%);
}

@media (width >= 768px) and (width < 1024px) {
  .project-card { padding: 2rem; }
}

@media (width >= 1024px) and (width < 1280px) {
  .project-card { padding: 2.5rem; }
}

@media (width >= 1280px) {
  .project-card { padding: 3rem; }
}

@media (width >= 1920px) {
  .project-card { padding: 3.5rem; }
}
}
}

.project-card:hover {
    border-color: #b74b4b;
    box-shadow: 0 15px 40px rgb(183 75 75 / 30%), inset 0 1px 0 rgb(183 75 75 / 20%);
    transform: translateY(-12px);
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

.project-card h3 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.project-card p {
    color: #ccc;
    font-size: 1.5rem;
    line-height: 2.2rem;
    margin-bottom: 2rem;
}

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

.project-btn {
    background: black;
    color: #b74b4b;
    border: 2px solid #b74b4b;
    border-radius: 3rem;
    padding: 0.8rem 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.4s ease;
    cursor: pointer;
}

.project-btn:hover {
    background: #b74b4b;
    color: black;
    box-shadow: 0 8px 25px rgb(183 75 75 / 40%);
    transform: translateY(-3px);
}

/* ===========================
   📱 FULL RESPONSIVE FIXES
   =========================== */

/* --- GLOBAL FIXES --- */
@media (width <= 768px) {
  html {
    font-size: 52%; /* smaller base font */
  }

  header {
    padding: 1.5rem 5%;
  }

  nav a {
    margin-left: 2rem;
  }

  /* HOME SECTION */
  .home {
    flex-direction: column;
    gap: 3rem;
    text-align: center;
    padding-top: 10rem;
  }

  .home-img img {
    width: 70vw;
  }

  .home-content h1 {
    font-size: 4rem;
  }

  .home-content h3 {
    font-size: 2.4rem;
  }

  .home-content p {
    font-size: 1.4rem;
    line-height: 2.2rem;
  }

  .social-icons {
    justify-content: center;
  }

  /* SKILLS SECTION */
  .skills-subtext {
    width: 95%;
    margin: 0 auto 3rem;
    font-size: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .skill-card {
    padding: 1.5rem 1rem;
  }

  .skill-card img {
    width: 55px;
    height: 55px;
  }

  /* PROJECTS SECTION */
  .projects-container {
    grid-template-columns: 1fr; /* one card per row */
    width: 100%;
    gap: 3rem;
  }

  .project-card {
    padding: 2rem;
  }

  .project-card h3 {
    font-size: 2rem;
  }

  .project-card p {
    font-size: 1.4rem;
  }

  /* CONTACT SECTION */
  .contact-container {
    flex-direction: column;
    padding: 3rem 2rem;
  }

  .mail-icon {
    font-size: 8rem;
  }

  .contact-right .heading {
    text-align: center;
    font-size: 2.8rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 1.4rem;
    padding: 1rem;
  }

  .contact-form .btn {
    width: 100%;
    text-align: center;
  }
}

/* HUGE PHONES FIX (MAX 480px) */
@media (width <= 480px) {
  html {
    font-size: 47%;
  }

  .home-img img {
    width: 80vw;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr); /* 1 per row */
  }

  .projects-heading {
    font-size: 3rem;
  }

  .projects-subtext {
    font-size: 1.4rem;
  }
}

/* Remove huge empty gaps between sections ONLY on mobile */
@media (width <= 768px) {
    section {
        min-height: 60vh !important;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .projects {
        padding-bottom: 2rem !important;
    }

    .projects-container {
        margin-bottom: 2rem !important;
    }
}

/* Justify home section paragraphs ONLY on mobile */
@media (width <= 768px) {
    .home-content p {
        text-align: justify;
        text-justify: inter-word;
    }
}

/* Center the typing text ONLY on mobile */
@media (width <= 768px) {
    .typing-text {
        text-align: center;
        justify-content: center;
        width: 100%;
    }
}

/* Fix typing text weird wrapping issue on mobile */
@media (width <= 768px) {
    .typing-text {
        font-size: 2.5rem;         /* smaller so long words fit */
        text-align: center;
        justify-content: center;
        width: 100%;
        white-space: nowrap;       /* PREVENT line break */
        overflow: hidden;
    }

    #typing {
        white-space: nowrap !important;   /* really force no wrapping */
        display: inline-block;
        max-width: 95vw;                  /* fit inside screen */
    }
}

/* Extra small screens (<600px) - phone optimization */
@media (width <= 600px) {
  html {
    font-size: 55%;
  }

  header {
    padding: 1rem 5%;
  }

  .logo {
    font-size: 2.2rem;
  }

  .logo img {
    height: 75px;
    width: auto;
  }

  section {
    padding: 3rem 5%;
  }

  .home-content h1 {
    font-size: 4.5rem;
  }

  .home-content h3 {
    font-size: 2.5rem;
  }

  .home-content p {
    font-size: 1.4rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 1.5rem;
  }

  .skill-card {
    padding: 1.5rem;
  }

  .skill-card img {
    width: 60px;
    height: 60px;
  }

  .btn {
    padding: 0.8rem 2rem;
    font-size: 1.4rem;
  }

  .home-img img {
    width: 85vw;
  }

  .skills-side-label {
    font-size: 1.4rem;
  }

  .projects-container {
    flex-direction: column;
  }

  .project-card {
    width: 100%;
  }

  .contact-container {
    flex-direction: column;
    gap: 2rem;
  }

  .contact-left {
    text-align: center;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 1.4rem;
    padding: 1rem 1.2rem;
  }
}

/* ===== LARGE DESKTOP OPTIMIZATION (1400px+) ===== */
@media (width >= 1400px) {
  section {
    max-width: 1600px;
    margin: 0 auto;
  }

  .home {
    gap: 8rem;
  }

  .skills-grid {
    gap: 3.5rem;
  }

  .projects-container {
    gap: 7rem;
  }

  .contact-container {
    max-width: 1300px;
    padding: 5rem;
  }
}

/* ===== ULTRA WIDE SCREENS (1600px+) ===== */
@media (width >= 1600px) {
  section {
    max-width: 1800px;
    margin: 0 auto;
  }

  .contact-container {
    max-width: 1500px;
  }

  .projects-container {
    width: 85%;
    max-width: 1300px;
  }
}
