/* ==========================================================================
   Daniel Chanda Portfolio — Professional Styles
   ========================================================================== */

/* CSS Variables */
:root {
  --primary: #0f172a;
  --primary-dark: #020617;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --max-width: 1000px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.25rem;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

ul { list-style-type: disc; }

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 1.5rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.navbar-brand span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbar-links a {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.navbar-links a:hover {
  color: var(--accent);
}

.navbar-links a.active {
  color: var(--accent);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  margin: 5px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  padding: 120px 1.5rem 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-alt) 0%, #ffffff 100%);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  color: var(--accent);
}

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

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-icon {
  margin-right: 0.5rem;
}

/* Section */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-kicker {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: auto;
}

.about-text p {
  margin-bottom: 1.25rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.service-card {
  background: var(--bg-alt);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

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

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

.service-card ul {
  list-style: none;
  padding-left: 0;
}

.service-card li {
  margin-bottom: 0.625rem;
  color: var(--text-muted);
}

.service-card li::before {
  content: "\2022";
  color: var(--accent);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* Progress Bars */
.skill-progress {
  margin-bottom: 2rem;
}

.skill-progress h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.progress-bar-container {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.8s ease;
}

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

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.project-image {
  height: 200px;
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  background: var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 500;
}

.project-actions {
  display: flex;
  gap: 0.75rem;
}

.project-actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  flex: 1;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  font-size: 1.25rem;
  color: var(--accent);
  margin-top: 0.125rem;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-item p, .contact-item a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-form {
  background: var(--bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* Footer */
footer {
  background: var(--primary);
  color: #fff;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: #fff;
}

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

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.125rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

/* Loader - hidden by default */
#page-loader {
  display: none;
}

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--accent); }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

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

/* Mobile Responsive */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.5rem; }
  .about-grid { gap: 2rem; }
  .contact-grid { gap: 2rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .hero h1 { font-size: 2.25rem; }
  
  .navbar-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow);
  }
  
  .navbar-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  /* Hamburger to X animation */
  .mobile-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .mobile-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .hero { padding: 100px 1.5rem 60px; }
  .hero h1 { font-size: 2rem; }
  
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions .btn {
    width: 250px;
  }
  
  /* Section padding on mobile */
  .section {
    padding: 60px 0;
  }
  
  .project-image { height: 180px; }
  
  .contact-form { padding: 1.5rem; }
  
  .about-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .container { padding: 0 1rem; }
  .navbar { padding: 0 1rem; }
  .contact-form { padding: 1.5rem; }
  
  .hero-actions .btn { width: 100%; }
  .project-actions { flex-direction: column; }
  .project-actions .btn { width: 100%; }
  
  .section { padding: 50px 0; }
  
  .about-stats { flex-direction: column; gap: 1rem; }
  .stat { text-align: left; }
}

/* Remove old template classes that conflict */
.colorlib-table, .colorlib-table-cell, .owl-carousel, .owl-carousel3,
.colorlib-navbar-brand, .colorlib-logo, .colorlib-nav-toggle {
  display: none !important;
}
