:root {
  /* Light Theme Variables */
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --gradient-text: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

[data-theme="dark"] {
  /* Dark Theme Variables */
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-primary: #60a5fa;
  --accent-secondary: #a78bfa;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--accent-primary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-secondary);
}

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

/* Header & Navigation */
header {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links li a {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--gradient-text);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--surface-color);
}

/* Main Content Area */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}

/* Hero Section (Index) */
.hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  min-height: 70vh;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.hero-content h1 span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
  background: var(--gradient-text);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 2rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.02) rotate(1deg);
}

/* Portfolio Section */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

.portfolio-card {
  background: var(--surface-color);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.portfolio-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.portfolio-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--bg-color);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

/* Contact Section */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-color);
  padding: 3rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: inherit;
  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(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--gradient-text);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Footer */
footer {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  margin-top: auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-primary);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .contact-container {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
}
