@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --bg-dark: #0f172a;
  --bg-light: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --border: #e2e8f0;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-bg: rgba(255, 255, 255, 0.8);
  --card-bg: var(--white);
  --hero-bg: var(--bg-light);
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --secondary-color: #94a3b8;
  --bg-dark: #020617;
  --bg-light: #0f172a;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --white: #1e293b;
  --border: #334155;
  --header-bg: rgba(15, 23, 42, 0.8);
  --card-bg: #1e293b;
  --hero-bg: #0f172a;
}

* {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

/* Header & Navigation */
header {
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 10%;
  border-bottom: 1px solid var(--border);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.theme-toggle .fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  display: none;
}

.logo {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
}

.navigation a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 0;
  transition: var(--transition);
}

.navigation {
  display: flex;
  gap: 2rem;
}

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

/* Section Common Styles */
section {
  padding: 100px 10%;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3rem;
  text-align: center;
  letter-spacing: -1px;
}

/* 1. Home Section */
.main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--hero-bg);
  position: relative;
  overflow: hidden;
}

/* Subtle background pattern */
.main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  width: 100%;
  padding: 0 2rem;
}

.hero-content {
  text-align: left;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}

.accent-text {
  color: var(--primary-color);
  background: linear-gradient(120deg, var(--primary-color), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.highlight {
  color: var(--text-main);
  font-weight: 600;
}

.hero-btns {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.hero-tech-stack {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-tech-stack span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.hero-content .tech-tag {
  padding: 0.4rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

.hero-content .tech-tag:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.main-btn, .secondary-btn {
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

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

.main-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.secondary-btn {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.secondary-btn:hover {
  background-color: var(--hero-bg);
  border-color: var(--primary-color);
}

.cv-btn {
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.cv-btn:hover {
  border-color: var(--primary-color);
  background-color: var(--hero-bg);
  transform: translateY(-2px);
}

/* 2. About Section */
.about {
  background-color: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

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

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

.card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.card .icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

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

/* 4. Skills Section */
.skills {
  background-color: var(--bg-dark);
  color: var(--white);
}

.skills .title {
  color: var(--white);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-item span {
  display: block;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.skill-item p {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* 5. Projects Section */
.projects {
  background-color: var(--hero-bg);
}

.projects .content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.repo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.repo-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.repo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.repo-title {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.repo-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
}

.repo-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.repo-footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.repo-stat {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.repo-lang-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.repo-lang {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 6. Contact Section */
.contact {
  background-color: var(--card-bg);
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}

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

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}

.contact-info-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--hero-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--primary-color);
  transform: translateX(10px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.25rem;
}

.contact-details span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.contact-details a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--primary-color);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--hero-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--card-bg);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.contact-form .main-btn {
  width: fit-content;
  cursor: pointer;
  border: none;
}

@media (max-width: 900px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  padding: 5rem 10% 2rem;
  border-top: 1px solid var(--border);
  color: #94a3b8;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  max-width: 400px;
}

.footer-brand .logo {
  display: block;
  margin-bottom: 1.5rem;
}

.footer-bio {
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 5rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.95rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.85rem;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  text-decoration: none;
  color: #64748b;
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--white);
}

@media (max-width: 900px) {
  .footer-main {
    flex-direction: column;
    gap: 3rem;
  }
  
  .footer-links {
    gap: 3rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-legal {
    justify-content: center;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  header {
    padding: 1.25rem 5%;
  }
  section {
    padding: 80px 5%;
  }
  .hero-content h2 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .navigation {
    display: none; /* In a real app, you'd add a mobile menu */
  }
  .hero-container {
    padding: 0 1.5rem;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .main-btn, .secondary-btn {
    text-align: center;
  }
  .hero-tech-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .title {
    font-size: 2rem;
  }
}
