:root {
  --bg-color: #05070a;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --container-width: 1400px;
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
}

body.light-mode {
  --bg-color: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 40px 40px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background-color 0.4s,
    color 0.4s;
}

.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  background: var(--accent-gradient);
  filter: blur(120px);
  opacity: 0.12;
  border-radius: 50%;
  animation: blobFloat 25s infinite alternate ease-in-out;
  will-change: transform;
}

.blob-1 {
  top: -10%;
  left: -10%;
  background: var(--accent-primary);
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  background: var(--accent-secondary);
  animation-delay: -7s;
}

.blob-3 {
  top: 30%;
  left: 40%;
  width: 40vw;
  height: 40vw;
  background: var(--accent-primary);
  animation-delay: -12s;
  opacity: 0.08;
}

body.light-mode .blob {
  opacity: 0.05;
}

@keyframes blobFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(5%, 10%) scale(1.1);
  }
  66% {
    transform: translate(-5%, 5%) scale(0.9);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Glassmorphism Utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 0;
  transition: 0.4s;
}

header.scrolled {
  padding: 0;
  background: rgba(5, 7, 10, 0.8);
  backdrop-filter: blur(10px);
}
.scroll-progress {
  height: 10px;
  background: var(--accent-gradient);
  width: 0%;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo img {
  height: 40px;
}

.navigation ul {
  display: flex;
  gap: 30px;
}

.navigation a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
}

.navigation a:hover {
  color: var(--text-color);
}

/* Button Component */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.4s;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* Home Page Sections */
.section-padding {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 3rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Mobile Menu - Hidden for now, handled by original theme structure but I will restyle it if needed */
/* Mobile Menu Toggler */
.resp_menu_toggle {
  display: block;
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
}

.resp_menu_toggle div {
  height: 3px;
  width: 100%;
  background: var(--text-color);
  margin-bottom: 5px;
  border-radius: 3px;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .navigation {
    display: none; /* Will be replaced by mobile menu */
  }
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero_section {
  min-height: max-content;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
  position: relative;
}

.hero_section::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 40%;
  height: 40%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 70%
  );
  z-index: -1;
  filter: blur(50px);
}

.hero_section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero_content {
  flex: 1.2;
  max-width: 800px;
}

.hero_content h1 {
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: 25px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
}

.hero_content p {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero_image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hero_image img {
  max-width: 120%;
  width: 120%;
  height: auto;
  border-radius: 40px;
  box-shadow: var(--glass-shadow);
  transform: perspective(1000px) rotateY(-8deg) rotateX(5deg);
  transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero_image img:hover {
  transform: perspective(1000px) rotateY(0deg);
}

/* Portfolio grid */
.portfolio_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 30px;
}
@media (max-width: 421px) {
  .portfolio_grid {
    grid-template-columns: 1fr;
  }
}

.portfolio_item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 400px;
  border: 1px solid var(--glass-border);
}

.portfolio_item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.portfolio_info {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 30px;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.9), transparent);
  transform: translateY(20px);
  opacity: 0;
  transition: 0.5s;
}
.portfolio_info h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.portfolio_info a {
  display: inline-flex;
  width: max-content;
}

.portfolio_item:hover img {
  transform: scale(1.1);
}

.portfolio_item:hover .portfolio_info {
  transform: translateY(0);
  opacity: 1;
}

/* Technologies Section */
.tech_grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.tech_item {
  padding: 20px 40px;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 15px;
}
@media (max-width: 421px) {
  .tech_item {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

.tech_item i {
  font-size: 2rem;
  color: var(--accent-primary);
}

/* About Section */
.about_wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about_image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}

.about_content {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.about_content h3 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 25px;
}

/* Contact Section */
.contact_wrap {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact_links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.contact_links a {
  font-size: 1.5rem;
  color: var(--text-muted);
}

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

@media (max-width: 992px) {
  .hero_section .container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .hero_content {
    max-width: 100%;
  }
  .hero_content h1 {
    font-size: 3.5rem;
  }
  .hero_content p {
    margin: 0 auto 30px;
  }
  .hero_image {
    width: 100%;
    justify-content: center;
  }
  .hero_image img {
    max-width: 100%;
    transform: none;
  }
  .about_wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .portfolio_item {
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
  }
  .portfolio_item img {
    height: 250px;
  }
  .portfolio_info {
    position: relative;
    opacity: 1;
    transform: none;
    background: transparent;
    padding: 20px;
    height: auto;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
}

.sun-icon {
  display: none;
}

body.light-mode .moon-icon {
  display: none;
}

body.light-mode .sun-icon {
  display: block;
}

body.light-mode .hero_section::before {
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.05) 0%,
    transparent 70%
  );
}
