/* ROOT VARIABLES */
:root {
  --bg-color: #0a0a0a;
  --text-color: #e0e0e0;
  --accent-color: #8a2be2; /* BlueViolet */
  --accent-gradient: linear-gradient(135deg, #8a2be2, #4b0082);
  --secondary-bg: #111;
  --card-bg: rgba(255, 255, 255, 0.05); /* Glass base */
  --card-border: rgba(255, 255, 255, 0.1);
  --font-main: "Outfit", sans-serif;
  --transition-speed: 0.3s;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Animation Classes */
.scroll-hidden-left {
  opacity: 0;
  transform: translateX(-100vw);
  transition: all 1.5s ease-out;
}

.visible {
  opacity: 1;
  transform: translateY(0) translateX(0); /* Reset both transforms */
}

body {
  background-color: var(--bg-color);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(
      circle at 15% 15%,
      rgba(138, 43, 226, 0.25) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(75, 0, 130, 0.25) 0%,
      transparent 40%
    );
  background-size:
    50px 50px,
    50px 50px,
    100% 100%,
    100% 100%;
  background-attachment: fixed;
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-speed);
}

ul {
  list-style: none;
}

/* HEADER & NAV */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.accent {
  color: var(--accent-color);
  background: linear-gradient(90deg, #a855f7, #8a2be2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

.navbar {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width var(--transition-speed);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-contact {
  border: 1px solid var(--accent-color);
  padding: 8px 20px;
  border-radius: 5px;
  color: var(--accent-color);
}

.btn-contact:hover {
  background: var(--accent-color);
  color: white;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: 0.3s;
}

/* HERO SECTION */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 600px;
  z-index: 10;
}

.greeting {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.name {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
}

.role {
  font-size: 2rem;
  color: #bbb;
  margin-bottom: 30px;
  min-height: 1.2em; /* Prevent layout shift */
}

.role::after {
  content: "|";
  display: inline-block;
  margin-left: 5px;
  animation: blink 0.7s infinite;
  color: var(--accent-color);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.bio-short {
  font-size: 1.1rem;
  color: #888;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.6);
  transform: translateY(-2px) scale(1.02);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  height: 500px;
  opacity: 0.8;
}

.hero-visual canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#bg-particles {
  z-index: 1;
  opacity: 0.6;
}

#hero-canvas {
  z-index: 2;
}

/* SCROLL DOWN INDICATOR */
.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.7;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-color);
  border-radius: 20px;
  margin-bottom: 2px;
}

.arrow {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-color);
  border-bottom: 2px solid var(--text-color);
  transform: rotate(45deg);
  animation: arrow-bounce 1.5s infinite;
}

@keyframes arrow-bounce {
  0% {
    transform: rotate(45deg) translate(0, 0);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: rotate(45deg) translate(8px, 8px);
    opacity: 0;
  }
}

.wheel {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  margin: 10px auto;
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

/* SECTIONS COMMON */
.section {
  padding: 60px 10%;
  /* Removed min-height: 100vh to reduce empty space */
}

.section-white {
  background-color: #ffffff;
  color: #0c0c0c;
  position: relative;
  z-index: 10;
}

.section-white .section-title {
  color: #000;
}

.section-white .section-title::after {
  background: var(--accent-gradient);
}

.section-white .section-title::before {
  color: var(--accent-color);
}

/* OFFER SECTION */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.offer-card {
  background: #f8f8f8;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #eee;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.offer-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(138, 43, 226, 0.15);
  border-color: rgba(138, 43, 226, 0.3);
  background: #fff;
}

.offer-icon {
  font-size: 3.5rem;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.offer-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 700;
  color: #111;
}

.offer-card p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

.offer-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.3s;
  transform-origin: left;
}

.offer-card:hover::before {
  transform: scaleX(1);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 15px auto 0;
  border-radius: 2px;
}

.section-title::before {
  content: "///";
  display: block;
  font-size: 1rem;
  letter-spacing: 5px;
  color: var(--accent-color);
  margin-bottom: 5px;
  opacity: 0.7;
}

/* ABOUT SECTION */
.about-grid {
  display: block;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: #ccc;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glass-shadow);
  border-color: rgba(138, 43, 226, 0.3);
}

/* PROJECTS SECTION */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  border: 1px solid var(--card-border);
  backdrop-filter: blur(5px);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glass-shadow);
  border-color: rgba(138, 43, 226, 0.3);
}

.project-image {
  height: 200px;
  background: #222;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #222, #333);
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.project-content p {
  color: #999;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.tech-stack {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tech-stack li {
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(138, 43, 226, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  color: #d8b4fe;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.project-links {
  display: flex;
  gap: 15px;
}

.link-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid transparent;
}

.link-btn:hover {
  border-bottom: 1px solid var(--accent-color);
}

/* CONTACT SECTION */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  margin-bottom: 30px;
  font-size: 1.2rem;
  color: #ccc;
}

.big-contact-btn {
  font-size: 1.2rem;
  padding: 15px 40px;
}

.social-links {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05); /* Glass input background */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

.form-group textarea {
  resize: vertical;
}

#form-status {
  margin-top: 15px;
  font-weight: 600;
  min-height: 1.5em;
}

.success-message {
  color: #4ade80; /* Green */
}

.error-message {
  color: #f87171; /* Red */
}

.social-link:hover {
  color: var(--accent-color);
  transform: scale(1.1);
}

.footer {
  padding: 40px;
  text-align: center;
  background: var(--secondary-bg);
  color: #555;
  font-size: 0.9rem;
}

/* MEDIA QUERIES */
/* MEDIA QUERIES */

/* Tablet & Intermediate */
@media (max-width: 1024px) {
  .hero {
    padding: 0 5%;
  }

  .section {
    padding: 60px 40px;
  }

  .name {
    font-size: 3.5rem;
  }
}

/* Mobile Devices */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
    background: rgba(
      10,
      10,
      10,
      0.95
    ); /* More solid background for readability */
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1001;
    color: var(--text-color);
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color); /* Matches body bg */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
    z-index: 1000;
  }

  .navbar.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.5rem;
    margin: 15px 0;
  }

  .hero {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-top: 100px; /* Offset for fixed header */
    padding-bottom: 50px;
    height: auto;
    min-height: 100vh;
  }

  .hero-content {
    margin-bottom: 40px;
    max-width: 100%;
    order: 1; /* Ensure content is visually first/prominent if we used flex-direction: column-reverse, but column is fine here */
  }

  .hero-visual {
    position: relative;
    width: 100%;
    height: 300px;
    right: auto;
    top: auto;
    transform: none;
    order: 2; /* Visual below text */
    margin: 20px 0;
  }

  .name {
    font-size: 2.8rem;
    line-height: 1.2;
  }

  .role {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .bio-short {
    font-size: 1rem;
    padding: 0 10px;
    margin-bottom: 30px;
  }

  .hero-btns {
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .section {
    padding: 50px 20px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  /* Force single column for cards on mobile for better readability */
  .offer-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 450px; /* Prevent them from getting too wide on tablets/large phones */
    margin: 0 auto;
    gap: 25px;
  }

  .project-image {
    height: 180px;
  }

  .contact-form {
    padding: 0;
    margin-top: 20px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .name {
    font-size: 2.2rem;
  }

  .greeting {
    font-size: 1rem;
  }

  .btn {
    width: 100%; /* Full width buttons for easier tapping */
    text-align: center;
    display: block;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .hero-visual {
    height: 250px; /* Smaller visual on small screens */
  }

  .section-title {
    font-size: 1.8rem;
  }

  .offer-card,
  .project-card {
    padding: 25px 20px;
  }
}
