/* ============================================================
   VIJAI VARMA — Portfolio CSS
   Complete rebuild with all bugs fixed
   ============================================================ */

/* ------------------------------------------------------------
   GOOGLE FONTS — Poppins properly imported here
   (Was missing before — font was falling back to browser default)
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ------------------------------------------------------------
   CSS VARIABLES — change accent color in one place
   ------------------------------------------------------------ */
:root {
  --accent: #ff004f;
  --accent-dark: #cc0040;
  --bg: #080808;
  --bg-card: #161616;
  --bg-input: #1e1e1e;
  --text: #fff;
  --text-muted: #aaa;
  --text-dim: #666;
  --border: #2a2a2a;
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   CONTAINER — added max-width so it doesn't stretch on 4K screens
   ------------------------------------------------------------ */
.container {
  padding: 10px 8%;
  max-width: 1300px;
  margin: 0 auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#header {
  width: 100%;
  min-height: 100vh;
  background-image: url(images/background.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  flex-wrap: wrap;
}

.logo {
  width: 130px;
}

nav ul {
  display: flex;
  align-items: center;
}

nav ul li {
  display: inline-block;
  list-style: none;
  margin: 0 16px;
}

nav ul li a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  position: relative;
  transition: color var(--transition);
}

nav ul li a::after {
  content: '';
  width: 0;
  height: 2px;
  background: var(--accent);
  position: absolute;
  left: 0;
  bottom: -5px;
  transition: width var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* Hamburger icon — hidden on desktop, shown on mobile via media query below */
nav .fas {
  display: none;
}

/* ============================================================
   HERO / HEADER TEXT
   ============================================================ */
.header-text {
  margin-top: 12%;
  max-width: 640px;
}

.hero-tagline {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}

.header-text h1 {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 18px;
}

.header-text h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: 16px;
  color: #bbb;
  line-height: 1.75;
  margin-bottom: 34px;
  max-width: 480px;
}

/* Hero buttons group */
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS — FIX: removed display:block + margin:50px auto from base .btn
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition), transform 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Filled red button */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Outlined button */
.btn-outline {
  background: transparent;
  border-color: var(--accent);
  color: #fff;
}

.btn-outline:hover {
  background: var(--accent);
}

/* Full-width button */
.btn-block {
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: center;
}

/* Centered standalone button (e.g. "View All Projects") */
.btn-center {
  display: block;
  width: fit-content;
  margin: 50px auto 10px;
}

/* ============================================================
   SECTION COMMON STYLES
   ============================================================ */
.sub-title {
  font-size: 46px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 52px;
  line-height: 1.6;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  padding: 80px 0;
  color: #ccc;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}

.about-col-1 {
  flex-basis: 30%;
  min-width: 220px;
}

.about-col-1 img {
  width: 100%;
  border-radius: var(--radius);
}

.about-col-2 {
  flex-basis: 62%;
}

.about-col-2 > p {
  font-size: 15px;
  line-height: 1.85;
  color: #bbb;
  margin-bottom: 6px;
}

.about-col-2 > p em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

/* TABS */
.tab-titles {
  display: flex;
  margin: 26px 0 32px;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-links {
  margin-right: 36px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 12px;
  transition: color var(--transition);
  user-select: none;
}

.tab-links::after {
  content: '';
  width: 0;
  height: 2px;
  background: var(--accent);
  position: absolute;
  left: 0;
  /* FIX: was bottom:-8px causing misalignment; now aligns with border */
  bottom: -1px;
  transition: width var(--transition);
}

/* FIX: was width:50% — now full width of each tab label */
.tab-links.active-link {
  color: var(--text);
}

.tab-links.active-link::after {
  width: 100%;
}

.tab-contents {
  display: none;
}

.tab-contents.active-tab {
  display: block;
  animation: fadeUp 0.35s ease;
}

.tab-contents ul li {
  list-style: none;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.65;
  color: #bbb;
}

.tab-contents ul li span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

/* ============================================================
   HOW I WORK — Process section
   ============================================================ */
#process {
  padding: 70px 0;
  background: #0e0e0e;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
}

.process-step:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.process-step i {
  font-size: 34px;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.process-step h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.process-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   SERVICES — with pricing cards
   ============================================================ */
#services {
  padding: 70px 0;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  margin-top: 8px;
}

.service-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 38px 30px;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
}

.service-card:hover {
  border-color: rgba(255, 0, 79, 0.4);
  transform: translateY(-6px);
}

/* Featured card gets the red border always */
.service-featured {
  border-color: var(--accent);
}

.featured-tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 18px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
}

.service-card > i {
  font-size: 38px;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}

.service-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.service-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
}

.service-card > p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-features {
  list-style: none;
  margin-bottom: 28px;
}

.service-features li {
  font-size: 13px;
  color: #999;
  margin: 9px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.service-features li i {
  color: #4ade80;
  font-size: 11px;
  flex-shrink: 0;
}

.btn-service {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px 20px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition);
}

.btn-service:hover {
  background: var(--accent);
}

/* ============================================================
   PROJECTS
   ============================================================ */
#portfolio {
  padding: 70px 0;
  background: #0e0e0e;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  margin-top: 8px;
}

.work {
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}

.work img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  transition: transform 0.5s ease;
  /* Consistent image height regardless of image dimensions */
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.layer {
  width: 100%;
  height: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.82), var(--accent));
  border-radius: var(--radius);
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 28px;
  text-align: center;
  transition: height 0.5s ease;
}

/* Tech tags row inside layer */
.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px;
}

.project-tags span {
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.layer h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.layer p {
  font-size: 12px;
  color: #eee;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* Links row inside layer (GitHub + Live Demo) */
.project-links {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.project-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s;
}

.project-links a:hover {
  transform: scale(1.12);
}

.work:hover img {
  transform: scale(1.07);
}

.work:hover .layer {
  height: 100%;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  padding: 80px 0;
}

.contact-left {
  flex-basis: 36%;
  min-width: 260px;
}

.contact-right {
  flex-basis: 56%;
}

.contact-intro {
  font-size: 15px;
  color: #bbb;
  line-height: 1.75;
  margin: 14px 0 24px;
}

/* Calendly book-a-call CTA */
.contact-left .btn-primary {
  margin-bottom: 28px;
  font-size: 15px;
}

.contact-info {
  margin-top: 8px;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  font-size: 14px;
  color: #bbb;
}

.contact-info p i {
  color: var(--accent);
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.contact-info p a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.contact-info p a:hover {
  color: var(--accent);
}

.social-icons {
  margin: 24px 0;
  display: flex;
  gap: 12px;
}

.social-icons a {
  text-decoration: none;
  font-size: 20px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.social-icons a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* Contact form */
.contact-right form {
  width: 100%;
}

form input,
form textarea {
  width: 100%;
  border: 1px solid var(--border);
  outline: none;
  background: var(--bg-input);
  padding: 14px 16px;
  margin: 10px 0;
  color: var(--text);
  font-size: 15px;
  border-radius: 8px;
  transition: border-color var(--transition);
  font-family: 'Poppins', sans-serif;
}

form input:focus,
form textarea:focus {
  border-color: var(--accent);
}

form textarea {
  resize: vertical;
  min-height: 140px;
}

#submit-btn {
  margin-top: 8px;
  border: none;
  font-size: 15px;
}

/* Form feedback messages */
#form-success {
  color: #4ade80;
  font-size: 14px;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(74, 222, 128, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

#form-error {
  color: var(--accent);
  font-size: 14px;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 0, 79, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(255, 0, 79, 0.2);
}

/* ============================================================
   SCROLL-TO-TOP BUTTON
   ============================================================ */
#scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  /* Hidden by default — JS adds .visible class on scroll */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.25s, background 0.25s;
  box-shadow: 0 4px 16px rgba(255, 0, 79, 0.4);
}

#scroll-top.visible {
  display: flex;
}

#scroll-top:hover {
  transform: translateY(-3px);
  background: var(--accent-dark);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 28px;
  background: #040404;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.footer-sub {
  font-size: 11px;
  margin-top: 6px;
  opacity: 0.5;
  letter-spacing: 1px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — TABLET (max 900px)
   Added: was missing entirely in old code
   ============================================================ */
@media only screen and (max-width: 900px) {
  .container {
    padding: 10px 6%;
  }

  .header-text {
    margin-top: 18%;
  }

  .header-text h1 {
    font-size: 40px;
  }

  .sub-title {
    font-size: 36px;
  }

  .about-col-1 {
    flex-basis: 100%;
    max-width: 280px;
  }

  .about-col-2 {
    flex-basis: 100%;
  }

  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 600px)
   ============================================================ */
@media only screen and (max-width: 600px) {

  #header {
    background-image: url(images/phone-background.png);
    background-attachment: scroll;
    min-height: 100svh;
  }

  .header-text {
    margin-top: 28%;
  }

  .hero-tagline {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .header-text h1 {
    font-size: 28px;
    margin-top: 8px;
  }

  .hero-sub {
    font-size: 13px;
    margin-bottom: 24px;
  }

  .hero-btns {
    flex-direction: column;
    gap: 10px;
  }

  .hero-btns .btn {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  /* Show hamburger icon on mobile */
  nav .fas {
    display: block;
    font-size: 22px;
    cursor: pointer;
  }

  /* Slide-in side menu */
  nav ul {
    background: #0f0f0f;
    border-left: 3px solid var(--accent);
    position: fixed;
    top: 0;
    right: -220px;
    width: 220px;
    height: 100vh;
    padding-top: 55px;
    z-index: 100;
    transition: right 0.4s ease;
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul li {
    display: block;
    margin: 20px 25px;
  }

  nav ul li a {
    font-size: 16px;
  }

  nav ul .fas {
    position: absolute;
    top: 20px;
    left: 22px;
    cursor: pointer;
    font-size: 20px;
  }

  .sub-title {
    font-size: 30px;
  }

  .tab-titles {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tab-links {
    margin-right: 20px;
    font-size: 14px;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .process-step {
    padding: 22px 16px;
  }

  .process-step i {
    font-size: 26px;
  }

  .services-list {
    grid-template-columns: 1fr;
  }

  .work-list {
    grid-template-columns: 1fr;
  }

  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }

  #scroll-top {
    bottom: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
}
