/* ================= RESET ================= */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html{
  scroll-behavior: smooth;
}

/* ✅ prevents accidental horizontal scrolling (also stops “cut off” feeling) */
body{
  overflow-x: hidden;
}

/* ================= VARIABLES ================= */
:root{
  --nav-bg: #2B2A33;        /* Firefox dark */
  --nav-text: #FBFBFE;

  --accent: #2563eb;
  --accent-dark: #1d4ed8;

  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --card: #f1f5f9;
  --border: rgba(15,23,42,0.12);

  /* ✅ Firefox-like dark frame for About image */
  --firefox-frame: #2B2A33;
  --firefox-frame-border: rgba(255,255,255,0.14);
}

/* ================= BODY ================= */
body{
  background: var(--bg);
  color: var(--text);
}

/* ================= HEADER ================= */
#header{
  width: 100%;
  height: 100vh;
  background-image: url(images/background.png);
  background-size: cover;
  background-position: center;
  padding-top: 64px; /* space for fixed navbar */
  position: relative;

  /* center hero properly */
  display: flex;
  flex-direction: column;
}

/* container */
.container{
  padding: 10px 8%;
  position: relative;
  z-index: 1;
}

/* make header container take remaining height and center */
#header .container{
  flex: 1;
  display: flex;
  align-items: center;
}

/* ================= NAVBAR ================= */
nav{
  width: 100%;
  background: var(--nav-bg);
  padding: 6px 30px;
  padding-left: 15px; /* logo 15px from left edge */
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* logo */
.logo{
  width: 130px;
  display: block;
  filter:
    drop-shadow(1px 0 0 #fff)
    drop-shadow(-1px 0 0 #fff)
    drop-shadow(0 1px 0 #fff)
    drop-shadow(0 -1px 0 #fff);
}

/* links */
nav ul{
  list-style: none;
  display: flex;
  gap: 22px;
  align-items: center;
}

nav ul li a{
  color: var(--nav-text);
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
}

nav ul li a::after{
  content: '';
  width: 0;
  height: 2px;
  background: var(--nav-text);
  position: absolute;
  left: 0;
  bottom: -5px;
  transition: 0.25s ease;
  border-radius: 4px;
}

nav ul li a:hover::after{
  width: 100%;
}

/* hide icons on desktop (forced) */
nav > .menu-icon,
#sidemenu > .menu-icon{
  display: none !important;
}

/* ================= HERO TEXT ================= */
.header-text{
  max-width: 720px;
}

.header-text p{
  font-size: 30px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.header-text h1{
  font-size: 75px;
  line-height: 1.02;
  margin-top: 14px;
  font-weight: 800;
  color: var(--text);
}

.header-text h1 span{
  color: var(--accent);
}

/* ================= ABOUT ================= */
#about{
  padding: 80px 0;
}

.row{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.about-col-1{ flex-basis: 35%; }

/* ✅ About image with Firefox-dark frame */
.about-col-1 img{
  width: 100%;
  display: block;

  /* frame look */
  background: var(--firefox-frame);
  padding: 5px;                           /* thickness of frame */
  border-radius: 16px;

  /* subtle borders/shadow like a UI frame */
  border: 1px solid var(--firefox-frame-border);
  box-shadow:
    0 10px 22px rgba(15,23,42,0.18),
    inset 0 0 0 1px rgba(0,0,0,0.35);
}

.about-col-2{ flex-basis: 60%; }

.sub-title{
  font-size: 56px;
  font-weight: 700;
}

.about-text{
  margin-top: 12px;
  line-height: 1.75;
  color: var(--muted);
}

/* ================= TABS ================= */
.tab-titles{
  display: flex;
  gap: 24px;
  margin: 26px 0 36px;
  flex-wrap: wrap;
}

.tab-links{
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.tab-links::after{
  content: '';
  width: 0;
  height: 3px;
  background: var(--accent);
  position: absolute;
  left: 0;
  bottom: -8px;
  transition: 0.3s ease;
  border-radius: 6px;
}

.tab-links.active-link::after{
  width: 55%;
}

.tab-contents{ display: none; }
.tab-contents.active-tab{ display: block; }

.tab-contents ul li{
  list-style: none;
  margin: 10px 0;
  line-height: 1.6;
  color: var(--muted);
}

.tab-contents ul li span{
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

/* ================= SERVICES ================= */
#services{
  padding: 80px 0;
}

.services-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.services-list > div{
  background: var(--card);
  padding: 32px;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.services-list > div i{
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 14px;
}

.services-list > div h2{
  font-size: 22px;
  margin-bottom: 12px;
}

.services-list > div p{
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.services-list > div a{
  text-decoration: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  margin-top: 18px;
  display: inline-block;
}

.services-list > div:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15,23,42,0.12);
}

/* ================= PROJECTS ================= */
#portfolio{
  padding: 80px 0;
}

/* stack one under the other */
.projects-list{
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 40px;
}

/* project card style (similar feel to services/about) */
.project-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card h3{
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text);
}

.project-card p{
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* subtle hover lift like services */
.project-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15,23,42,0.10);
}

/* ================= CONTACT ================= */
#contact{
  padding: 80px 0 0;
}

.contact-left{ flex-basis: 35%; }
.contact-right{ flex-basis: 60%; }

/* ✅ spacing + better layout for left column */
.contact-left{
  display: flex;
  flex-direction: column;
  gap: 18px; /* consistent vertical spacing */
}

/* email row */
.contact-item{
  margin-top: 6px;          /* replaces old big margin */
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-item i{
  color: var(--accent);
  font-size: 18px;
}

/* clickable email link */
.contact-link{
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.contact-link:hover{
  color: var(--accent);
}

/* socials spacing and alignment */
.social-icons{
  margin-top: 2px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-icons a{
  font-size: 30px;
  color: var(--muted);
  transition: 0.25s ease;
}

.social-icons a:hover{
  color: var(--accent);
  transform: translateY(-4px);
}

/* make CV button not stick to icons */
.contact-btn{
  margin-top: 6px;
  width: fit-content;
}

/* ================= BUTTONS ================= */
.btn{
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn.btn2{
  background: var(--accent);
  color: #ffffff;
  border: none;
}

.btn.btn2:hover{
  background: var(--accent-dark);
}

/* ================= FORM ================= */
form input,
form textarea{
  width: 100%;
  border: 1px solid var(--border);
  outline: none;
  background: #ffffff;
  padding: 14px;
  margin: 12px 0;
  font-size: 16px;
  border-radius: 10px;
}

form .btn2{
  padding: 14px 60px;
}

/* ================= COPYRIGHT ================= */
.copyright{
  text-align: center;
  padding: 22px 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  color: var(--muted);
}

/* ================= CV MODAL (NEW FEATURE ONLY) ================= */
.cv-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.cv-modal.is-open{
  display: block;
}

.cv-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(3px);
}

.cv-modal__content{
  position: relative;
  width: min(520px, 92vw);
  margin: 12vh auto 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 22px 55px rgba(15,23,42,0.22);
}

.cv-modal__content h3{
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--text);
}

.cv-modal__content p{
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  font-size: 14px;
}

.cv-modal__actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-choice{
  flex: 1;
  text-align: center;
}

.cv-modal__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.cv-modal__close i{
  font-size: 18px;
  color: var(--muted);
}

.cv-modal__close:hover i{
  color: var(--accent);
}

/* ================= MOBILE (PORTRAIT) ================= */
/* Only applies when phone is vertical */
@media (max-width: 600px) and (orientation: portrait){

  /* ✅ HOME: keep background fully visible + remove empty gap */
  #header{
    background-image: url(images/phone-background.png);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top center;

    height: auto;
    min-height: 0;
    aspect-ratio: 9 / 16;
  }

  /* ✅ move logo closer to left */
  nav{
    padding-left: 5px;
  }

  /* ✅ hero text near TOP */
  #header .container{
    min-height: 0;
    align-items: flex-start;
    padding-top: 70px;
    padding-bottom: 0;
  }

  /* ✅ remove mobile text outline */
  .header-text p,
  .header-text h1{
    -webkit-text-stroke: 0;
    text-shadow: none;
  }

  /* ✅ mobile sizes (portrait baseline) */
  .header-text{
    max-width: 92%;
  }

  .header-text p{
    font-size: 16px;
    line-height: 1.35;
    color: var(--text);
  }

  .header-text h1{
    font-size: 34px;
    line-height: 1.1;
    color: var(--text);
  }

  /* show menu icons only on mobile */
  nav > .menu-icon.open{
    display: block !important;
    color: var(--nav-text);
    font-size: 24px;
    cursor: pointer;
  }

  #sidemenu > .menu-icon.close{
    display: block !important;
    color: var(--nav-text);
    font-size: 28px;
    position: absolute;
    top: 16px;
    left: 16px;
    cursor: pointer;
  }

  /* ✅ SIDE MENU (centered + slim) */
  nav ul{
    background: var(--nav-bg);
    position: fixed;
    top: 0;
    right: -180px;
    width: 170px;
    max-width: 75vw;
    height: 100vh;
    padding-top: 70px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    transition: right 0.5s ease;
    z-index: 999;
  }

  nav ul li{
    width: 100%;
    text-align: center;
  }

  nav ul li a{
    color: var(--nav-text);
    font-size: 18px;
    display: inline-block;
    padding: 10px 0;
    position: relative;
    text-align: center;
  }

  /* ✅ centered underline */
  nav ul li a::after{
    content: '';
    width: 0;
    height: 2px;
    background: var(--nav-text);
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    transition: 0.25s ease;
    border-radius: 4px;
  }

  nav ul li a:hover::after,
  nav ul li a:focus::after,
  nav ul li a:active::after{
    width: 60%;
  }

  /* ✅ FIX: reduce big gaps ONLY in portrait */
  #about{ padding: 40px 0 22px; }
  #services{ padding: 40px 0; }
  #portfolio{ padding: 40px 0; }
  #contact{ padding: 40px 0 0; }

  .sub-title{
    font-size: 40px;
    margin-bottom: 10px;
  }

  /* ✅ HIDE ABOUT IMAGE ON MOBILE */
  .about-col-1{
    display: none;
  }

  .about-col-2,
  .contact-left,
  .contact-right{
    flex-basis: 100%;
  }

  /* reduce extra spacing under tabs */
  .tab-titles{
    margin: 18px 0 22px;
    gap: 16px;
  }

  .services-list{
    margin-top: 22px;
  }

  /* ✅ projects padding slightly smaller on phones */
  .project-card{
    padding: 20px 18px;
  }

  /* ✅ contact left spacing */
  .contact-left{
    gap: 14px;
  }

  .contact-btn{
    width: 100%;
    text-align: center;
  }

  /* modal spacing on very small screens */
  .cv-modal__content{
    margin-top: 18vh;
  }
}


/* ================= MOBILE LANDSCAPE FIX ================= */
/* Only applies when phone is sideways */
@media (max-width: 900px) and (orientation: landscape){

  /* keep your previous landscape header behavior */
  #header .container{
    padding-top: 64px;
  }

  .header-text p{
    font-size: 20px;
    line-height: 1.25;
  }

  .header-text h1{
    font-size: 45px;
    line-height: 1.1;
    margin-top: 8px;
  }

  .logo{
    width: 110px;
  }

  /* ✅ FIX: reduce big gaps between sections in landscape */
  #about{ padding: 45px 0 24px; }
  #services{ padding: 45px 0; }
  #portfolio{ padding: 45px 0; }
  #contact{ padding: 45px 0 0; }

  /* optional: tighten some “top margins” that can visually add extra whitespace */
  .services-list{ margin-top: 24px; }
  .projects-list{ margin-top: 24px; }

  /* modal position in landscape */
  .cv-modal__content{
    margin-top: 8vh;
  }
}
