/* ======================================================
   Portfolio Stylesheet (Tutorial Version)
   CSS sections are arranged in the same order as index.html.
   ====================================================== */

/* 1) Global variables and theme setup */
:root {
  --bg-black-900: #000000;
  --bg-black-100: #fdf9ff;
  --bg-black-50: #e8dfec;
  --text-black-900: #060606;
  --text-black-700: #504e70;
  --primary: rgb(16, 107, 217);
  --accent: yellow;
  --card-bg: #262626;
}

body.dark {
  --bg-black-900: linear-gradient(90deg, #2c3e50 35%, #4ca1af 100%);
  --bg-black-100: #222222;
  --bg-black-50: #393939;
  --text-black-900: white;
  --text-black-700: #e9e9e9;
}

/* 2) Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-black-900);
  color: white;
  line-height: 1.6;
}

/* Prevent horizontal clipping at source components instead of globally on body */
#header,
.header-layout,
.svg-text {
  max-width: 100%;
  overflow-x: clip;
}

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

.container {
  padding: 10px 10%;
}

.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.sub-title {
  font-size: clamp(2rem, 3.5vw, 3.75rem);
  font-weight: 600;
  color: white;
}

.box {
  opacity: 0;
  transition: opacity 1.1s ease;
}

/* 3) Header section */
#header {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

#header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.65) 40%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: 0;
}

#header .container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* Professional hero layout: text on left, visual on right */
.header-layout {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

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

.logo {
  width: 140px;
}

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

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 20px;
  position: relative;
}

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

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

.header-text {
  margin-top: clamp(30px, 7vh, 90px);
  color: var(--accent);
  max-width: 760px;
}

.header-text h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.15;
  color: white;
  animation: animMarker 0.6s ease-in-out infinite alternate;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

#farzine {
  color: var(--accent);
}

.setdiv {
  padding-top: 40px;
}

.svg-text {
  margin-top: 8px;
  width: min(100%, 700px);
}

.wrapper {
  width: 200px;
  height: 60px;
  position: relative;
  margin-top: 12px;
}

.circle {
  width: 20px;
  height: 20px;
  position: absolute;
  border-radius: 50%;
  background-color: var(--primary);
  left: 15%;
  transform-origin: 50%;
  animation: circle7124 0.5s alternate infinite ease;
}

.circle:nth-child(2) {
  left: 45%;
  animation-delay: 0.2s;
}

.circle:nth-child(3) {
  left: auto;
  right: 15%;
  animation-delay: 0.3s;
}

.shadow {
  width: 20px;
  height: 4px;
  border-radius: 50%;
  background-color: grey;
  position: absolute;
  top: 62px;
  z-index: -1;
  left: 15%;
  filter: blur(1px);
  animation: shadow046 0.5s alternate infinite ease;
}

.shadow:nth-child(4) {
  left: 45%;
  animation-delay: 0.2s;
}

.shadow:nth-child(5) {
  left: auto;
  right: 15%;
  animation-delay: 0.3s;
}

/* 4) Scroll progress button */
#progress {
  position: fixed;
  bottom: 90px;
  right: 18px;
  z-index: 50;
  height: 42px;
  width: 42px;
  display: none;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 0 5px grey;
  cursor: pointer;
}

#progress-value {
  height: calc(100% - 14px);
  width: calc(100% - 14px);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

#progress-value svg {
  width: 16px;
  height: 16px;
  fill: #001a2e;
}

/* 5) About section */
#About {
  padding: 80px 0 30px;
}

.about-col-1 {
  flex: 1 1 360px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.about-col-1 img {
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
  max-height: 620px;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  transition: transform 0.35s;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.about-col-1 img:hover {
  transform: scale(1.03);
}

.about-col-2 {
  flex: 1 1 100%;
  max-width: 980px;
  margin: 0 auto;
  align-self: center;
}

.tab-titles {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0 30px;
}

.tab-links {
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  text-align: left;
}

.tab-links::after {
  content: "";
  width: 0;
  height: 3px;
  background: var(--primary);
  position: absolute;
  left: 0;
  bottom: -8px;
  transition: 0.4s;
}

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

.tab-contents {
  display: none;
}

.tab-contents.active-tab {
  display: block;
}

.tab-contents ul li {
  list-style: none;
  margin: 10px 0;
}

.tab-contents ul li span {
  color: var(--accent);
  font-size: 14px;
}

.space1 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.Education {
  color: var(--primary);
  font-size: 25px;
  font-weight: 700;
}

/* 6) Shared button component */
.button {
  appearance: none;
  border: none;
  background: none;
  color: #0f1923;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  position: relative;
  padding: 8px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.15s ease;
}

.button::before,
.button::after {
  content: "";
  display: block;
  position: absolute;
  right: 0;
  left: 0;
  height: calc(50% - 5px);
  border: 3px solid #272431;
  transition: all 0.15s ease;
}

.button::before {
  top: 0;
  border-bottom-width: 0;
}

.button::after {
  bottom: 0;
  border-top-width: 0;
}

.button:focus {
  outline: 3px solid #ffd54a;
  outline-offset: 3px;
}

.button:focus-visible {
  outline: 3px solid #ffd54a;
  outline-offset: 3px;
}

.button_lg {
  position: relative;
  display: block;
  padding: 10px 20px;
  color: var(--accent);
  background-color: #0f1923;
  overflow: hidden;
}

.button_lg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  background-color: #0f1923;
}

.button_lg::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 4px;
  height: 4px;
  background-color: #020202;
  transition: all 0.2s ease;
}

.button_sl {
  display: block;
  position: absolute;
  top: 0;
  bottom: -1px;
  left: -8px;
  width: 0;
  background-color: var(--primary);
  transform: skew(-15deg);
  transition: all 0.2s ease;
}

.button:hover .button_sl {
  width: calc(100% + 15px);
}

.button:hover .button_lg::after {
  background-color: #fff;
}

/* 7) Projects section */
#projects {
  padding: 50px 0;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-top: 30px;
}

.projects-list div {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition:
    background 0.35s,
    transform 0.35s;
  min-height: 235px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.projects-list div i {
  font-size: 40px;
  margin-bottom: 10px;
}

.projects-list div h2 {
  font-size: 23px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

.projects-list div a {
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  margin-top: auto;
  display: inline-block;
  padding-top: 8px;
}

.projects-list div:hover {
  background: var(--primary);
  transform: translateY(-8px);
}

/* 8) Services section */
#services {
  padding: 50px 0;
}

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

.services-list div {
  background: var(--card-bg);
  padding: 34px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition:
    background 0.35s,
    transform 0.35s;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.services-list div i {
  font-size: 40px;
  margin-bottom: 10px;
}

.services-list div h2 {
  font-size: 25px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

.services-list div a {
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  margin-top: auto;
  display: inline-block;
  padding-top: 8px;
}

.services-list div:hover {
  background: var(--primary);
  transform: translateY(-8px);
}

/* 9) Portfolio section */
#Portfolio {
  padding: 50px 0;
}

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

.work {
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
}

.layer {
  width: 100%;
  height: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.45), var(--primary));
  border-radius: 12px;
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 0 24px;
  text-align: center;
  font-size: 14px;
  transition: height 0.45s;
}

.layer h3 {
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 14px;
  color: var(--accent);
}

.layer a {
  margin-top: 20px;
  color: var(--accent);
  text-decoration: none;
  font-size: 18px;
  line-height: 56px;
  background: #343030;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  align-self: center;
}

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

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

#btn {
  display: block;
  margin: 45px auto 0;
  width: fit-content;
}

/* 10) Follower section */
.follower {
  margin: 80px 0 0;
}

.wrapperpp {
  width: min(100%, 1020px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
}

.containerpp {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 1rem;
  border-radius: 0.7rem;
  background-color: #202124d0;
  border-bottom: 8px solid var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.wrapperpp i {
  color: var(--accent);
  font-size: 2.3rem;
  text-align: center;
}

span.num {
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

span.text {
  color: var(--accent);
  font-size: 0.95rem;
  text-align: center;
  font-weight: 500;
}

/* 11) Contact section */
#contact {
  padding-top: 50px;
}

.contact-left {
  flex: 1 1 280px;
}

.contact-right {
  flex: 1.2 1 420px;
}

.contact-left p {
  margin-top: 20px;
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.contact-left p i {
  color: var(--accent);
  margin-right: 12px;
}

.social-icons {
  margin-top: 24px;
}

.social-icons a {
  text-decoration: none;
  font-size: 34px;
  margin-right: 12px;
  color: white;
  display: inline-block;
  transition:
    transform 0.35s,
    color 0.35s;
}

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

#btn2 {
  display: inline-block;
  margin: 24px 0;
}

.contact-sub-titles {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 6px;
}

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

form input,
form textarea {
  width: 100%;
  border: 0;
  background: #262626;
  padding: 15px;
  margin: 12px 0;
  color: white;
  font-size: 16px;
  border-radius: 8px;
}

form input:focus,
form textarea:focus,
form input:focus-visible,
form textarea:focus-visible {
  outline: 3px solid #ffd54a;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(255, 213, 74, 0.25);
}

#msg {
  color: var(--accent);
  margin-top: 8px;
  display: block;
  min-height: 28px;
}

/* 12) Chatbot + footer */
.chatbot {
  margin-top: 14px;
}

.copyright {
  width: 100%;
  text-align: center;
  padding: 20px 0;
  background: #262626;
  font-weight: 300;
  margin-top: 30px;
}

/* 13) Utility link colors */
.acm1,
.acm2,
.college,
.varsity,
.school {
  text-decoration: none;
  color: var(--primary);
}

/* 14) Keyframe animations */
@keyframes animMarker {
  0% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(10px);
  }
}

@keyframes circle7124 {
  0% {
    top: 60px;
    height: 5px;
    border-radius: 50px 50px 25px 25px;
    transform: scaleX(1.7);
  }

  40% {
    height: 20px;
    border-radius: 50%;
    transform: scaleX(1);
  }

  100% {
    top: 0;
  }
}

@keyframes shadow046 {
  0% {
    transform: scaleX(1.5);
  }

  40% {
    transform: scaleX(1);
    opacity: 0.7;
  }

  100% {
    transform: scaleX(0.2);
    opacity: 0.4;
  }
}

/* 15) Responsive layout */
nav .fas {
  display: none;
}

@media only screen and (max-width: 1024px) {
  #header {
    min-height: 100vh;
  }

  .container {
    padding: 10px 7%;
  }

  .header-layout {
    justify-content: center;
  }

  .wrapperpp {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media only screen and (max-width: 700px) {
  #header {
    min-height: 100svh;
  }

  #header::before {
    /* Stronger gradient for text readability on mobile */
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.55) 45%,
      rgba(0, 0, 0, 0.25) 100%
    );
  }

  .header-text {
    margin-top: clamp(72px, 14vh, 120px);
    max-width: 100%;
  }

  .header-layout {
    align-content: start;
    padding-top: 6px;
  }

  .svg-text {
    width: min(100%, 500px);
  }

  nav .fas {
    display: block;
    font-size: 25px;
  }

  nav ul {
    background: var(--primary);
    position: fixed;
    top: 0;
    right: -200px;
    width: 200px;
    height: 100vh;
    padding-top: 50px;
    z-index: 140;
    transition: right 0.5s;
  }

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

  nav ul .fas {
    position: absolute;
    top: 25px;
    left: 25px;
    cursor: pointer;
  }

  /* Pin menu icon and keep it away from floating controls */
  nav > .fa-bars {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 150;
    width: 38px;
    height: 38px;
    display: grid !important;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
  }

  .about-col-1,
  .about-col-2,
  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }

  .about-col-1 img {
    width: min(100%, 340px);
    aspect-ratio: 4 / 5;
  }

  .wrapperpp {
    grid-template-columns: 1fr;
  }

  #progress {
    bottom: 75px;
    right: 12px;
    height: 36px;
    width: 36px;
  }

  .copyright {
    font-size: 14px;
  }
}

@media only screen and (max-width: 450px) {
  .header-text {
    margin-top: clamp(66px, 12vh, 98px);
  }

  .header-text h1 {
    font-size: 2rem;
  }

  .svg-text {
    width: min(100%, 330px);
  }

  #progress {
    height: 30px;
    width: 30px;
  }

  nav > .fa-bars {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
  }
}
