:root {
  /* LIGHT MODE (DEFAULT) */
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --surface-border: rgba(0, 0, 0, 0.1);
  --primary: #4f46e5;
  --secondary: #9333ea;
  --accent: #0ea5e9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --nav-bg: rgba(248, 250, 252, 0.85);
  --footer-bg: #f1f5f9;
  --tag-bg: rgba(0, 0, 0, 0.05);
  --tag-border: rgba(0, 0, 0, 0.15);
  --shadow-color: rgba(0, 0, 0, 0.08);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
  /* DARK MODE */
  --bg-color: #05050A;
  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --secondary: #a855f7;
  --accent: #22d3ee;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --nav-bg: rgba(5, 5, 10, 0.75);
  --footer-bg: #030305;
  --tag-bg: rgba(255, 255, 255, 0.05);
  --tag-border: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.3s ease, background-color 0.4s ease;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 1rem 5%;
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 4px 30px var(--shadow-color);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-main);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.theme-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  color: var(--primary);
  transform: rotate(15deg);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-color);
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
}

.lang-switch span {
  color: var(--surface-border);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.3s ease;
  padding: 0.2rem;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  color: var(--primary);
}

.btn-contact {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(5,5,10,0) 70%);
}

[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(168,85,247,0.15) 0%, rgba(5,5,10,0) 70%);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  border-top: 1px solid var(--surface-border);
  padding-top: 3rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* General Section Styling */
section {
  padding: 8rem 5%;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

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

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(168,85,247,0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

[data-theme="dark"] .service-card::before {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1));
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(99,102,241,0.5);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.service-card:hover::before {
  opacity: 1;
}

.service-content {
  position: relative;
  z-index: 1;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* About / CV Section */
.about {
  background: relative;
}

.about-container {
  display: flex;
  gap: 4rem;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 30px;
  padding: 4rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px var(--shadow-color);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text .role {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.tech-tag {
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Footer */
footer {
  border-top: 1px solid var(--surface-border);
  padding: 4rem 5% 2rem;
  text-align: center;
  background: var(--footer-bg);
  transition: background-color 0.4s ease;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--primary);
}

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

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero h1 { font-size: 3rem; }
  .about-container { flex-direction: column; padding: 2rem; }
  .nav-links { display: none; } /* Could add a hamburger menu */
}
