/* --- CSS Reset & Variables --- */
:root {
  /* Light Theme */
  --bg-color: #f8fafc;
  --surface-color: rgba(255, 255, 255, 0.7);
  --surface-border: rgba(255, 255, 255, 0.5);
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --error: #ef4444;
  --success: #10b981;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --surface-color: rgba(30, 41, 59, 0.7);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #818cf8;
  --primary-hover: #6366f1;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
}

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

/* Typography elements */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Utility classes */
.hidden { display: none !important; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px;
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 10px auto 0;
  border-radius: 2px;
}
.mt-3 { margin-top: 1rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-block {
  width: 100%;
  display: block;
  text-align: center;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--surface-color);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
  transition: all 0.3s ease;
}
#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.logo span {
  color: var(--primary);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
}

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 5%;
}
.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
}
.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.highlight {
  color: var(--primary);
}
.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: 1;
}
.shape-1 {
  width: 400px;
  height: 400px;
  background: #6366f1;
  top: -100px;
  right: -100px;
}
.shape-2 {
  width: 300px;
  height: 300px;
  background: #ec4899;
  bottom: 10%;
  left: -50px;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.experience-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.experience-cards .date {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.skill-item {
  text-align: center;
}
.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-img {
  height: 200px;
  width: 100%;
}
.bg-grad-1 { background: linear-gradient(135deg, #6366f1, #a855f7); }
.bg-grad-2 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.bg-grad-3 { background: linear-gradient(135deg, #10b981, #3b82f6); }

.project-info {
  padding: 1.5rem;
}
.project-info h3 {
  margin-bottom: 0.5rem;
}
.project-info p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.project-info .link {
  color: var(--primary);
  font-weight: 600;
}
.project-info .link:hover {
  text-decoration: underline;
}

/* Contact Section */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
}
.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.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--surface-border);
  background: var(--surface-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.error-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}
.success-msg {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 1rem;
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--surface-border);
  color: var(--text-muted);
}
footer a {
  color: var(--primary);
}

/* Admin Center */
#admin-login-view {
  height: 100vh;
  display: flex!important; 
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
}
#admin-login-view.hidden {
  display: none!important;
}
.auth-container {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.auth-container h2 {
  margin-bottom: 0.5rem;
}
.auth-container p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.auth-container form {
  text-align: left;
}

/* Admin Dashboard */
#admin-dashboard-view {
  min-height: 100vh;
  background: var(--bg-color);
  display: block;
}
#admin-dashboard-view.hidden {
  display: none !important;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--surface-color);
  border-bottom: 1px solid var(--surface-border);
}
.dashboard-container {
  padding: 2rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}
.messages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.msg-card {
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
}
.msg-card .msg-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.msg-card .msg-name {
  font-weight: 600;
  font-size: 1.1rem;
}
.msg-card .msg-email {
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.msg-card .msg-content {
  color: var(--text-main);
  background: rgba(0,0,0,0.05);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
[data-theme="dark"] .msg-content {
  background: rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 0;
    text-align: center;
  }
  .nav-links.active { display: flex; }
  .menu-btn { display: block; cursor: pointer; }
}
