:root {
  /* Colors */
  --bg-color: #0a0a0a;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --primary-color: #6d28d9;
  /* Example Purple */
  --primary-hover: #5b21b6;
  --accent-color: #14b8a6;
  /* Example Teal */
  --surface-color: #171717;
  --border-color: #262626;

  /* Typography */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  margin-left: 1rem;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

/* Header */
.header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.lang-flag {
    height: 28px;
    width: 28px;
    vertical-align: middle;
    transition: transform 0.2s ease;
    border-radius: 50%;
    object-fit: cover;
}

.lang-flag:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  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);
  background-size: 50px 50px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-color), transparent);
  pointer-events: none;
}

.hero .eyebrow {
  color: var(--primary-color);
  font-weight: 600;
  display: block;
  margin-bottom: var(--spacing-sm);
}

.hero-title {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
}

.gradient-text {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  max-width: 600px;
}

/* Sections General */
section {
  padding: var(--spacing-xl) 0;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.profile-image-wrapper {
  width: 250px; /* Fixed width for the avatar circle */
  aspect-ratio: 1 / 1; /* Ensures it stays a perfect circle */
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 25px rgba(109, 40, 217, 0.3);
  overflow: hidden; /* Clips the image to the circle */
  flex-shrink: 0;
}

.profile-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
  display: block;
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-image-wrapper {
    width: 180px;
    margin-bottom: var(--spacing-md);
  }
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.project-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #1f1f1f 0%, #171717 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    opacity: 0.2;
    z-index: 1; /* Keep placeholder/overlay on top if desired, or remove */
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.project-info {
  padding: var(--spacing-md);
}

.project-info h3 {
  margin-bottom: var(--spacing-xs);
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tags span {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
  padding: var(--spacing-md) 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-xl);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: var(--spacing-md) auto 0;
    text-align: left;
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-lg);
        transition: right 0.3s ease;
        z-index: 1000;
        border-left: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex; /* Ensure it's flex when active */
        right: 0;
    }

    .nav-links li a {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
