/* Premium Professional Portfolio - Beautiful & Employer-Ready */

/* CSS Variables */
:root {
  --primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --primary-text: #1d4ed8;
  --secondary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #f1f5f9;
  --border: #e2e8f0;
  --glass: rgba(255,255,255,0.6);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --radius: 16px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Premium Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.025em;
}

.logo svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 4px 12px rgb(29 78 216 / 0.3));
}

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

.nav-links a {
  position: relative;
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 0.5rem;
  transition: var(--transition);
}

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

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

.nav-links a:hover {
  color: var(--primary-text);
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--primary-text);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

/* HERO - BEAUTIFUL & ATTRACTIVE */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #e2e8f0 100%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-highlight {
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.hero-description {
  font-size: 1.3rem;
  max-width: 550px;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  padding: 1.25rem 2.75rem;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

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

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2), transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 35px 60px -12px rgb(29 78 216 / 0.4);
}

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

.btn-secondary:hover {
  background: var(--primary-text);
  color: white;
  border-color: var(--primary-text);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
}

.hero-visual svg {
  filter: drop-shadow(0 25px 50px rgb(0 0 0 / 0.15));
  transform: rotate(-3deg) scale(1.05);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards - Premium Glass Effect */
.card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 0.05;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-icon {
  font-size: 4.5rem;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  display: block;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

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

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  transition: var(--transition);
}

.project-image {
  height: 280px;
  position: relative;
  overflow: hidden;
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

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

.project-card:hover .project-image::after {
  opacity: 1;
}

.project-content {
  padding: 3rem;
  background: var(--bg-secondary);
}

.project-meta {
  margin: 1.5rem 0 2rem;
}

.project-meta p {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.project-meta p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 4px;
  height: 4px;
  background: var(--primary-text);
  border-radius: 50%;
}

.project-cta {
  text-align: center;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.about-main {
  max-width: 800px;
  margin: 0 auto 6rem auto;
}

/* Modal Styles for Case Studies */
.modals {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.modal {
  background: var(--bg-secondary);
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.4s ease;
  width: 100%;
}

@keyframes modalSlide {
  from { opacity: 0; transform: scale(0.9) translateY(-20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 2.5rem;
}

.modal-gallery img {
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.modal-content {
  padding: 0 2.5rem 3rem;
}

.case-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.case-tab {
  padding: 1rem 2rem;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.case-tab.active {
  color: var(--primary-text);
  border-bottom-color: var(--primary-text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.metric-highlight {
  background: var(--secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 1.3rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.project-tech span {
  background: linear-gradient(135deg, var(--primary), #1e40af);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-tech .update-badge {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  animation: pulse 2s infinite;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.project-tech .update-badge.book-themed {
  background: linear-gradient(135deg, #8b4513, #d2691e);
  animation: bookPulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bookPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(1deg); }
}

.book-theme::after {
  content: '📚';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  opacity: 0.8;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.updated-timestamp {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.8;
}

body.dark-mode .updated-timestamp {
  color: #94a3b8;
}

/* About - Detailed */
.about-main {
  max-width: 800px;
  margin: 0 auto 6rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 6rem auto;
  max-width: 800px;
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-form {
  background: var(--glass);
  backdrop-filter: blur(20px);
  padding: 3.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  font-family: inherit;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-text);
  box-shadow: 0 0 0 4px rgb(29 78 216 / 0.1);
  background: white;
}

/* Footer */
footer {
  background: linear-gradient(180deg, var(--text-primary) 0%, #000000 100%);
  margin-top: 20px;
  color: var(--text-light);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 5rem 0 3rem;
  position: relative;
}

.footer-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(29,78,216,0.1), transparent);
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.footer-content p {
  opacity: 0.9;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.social-links a {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.4rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  border-color: var(--primary-text);
  transform: translateY(-8px) scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* Dark Mode */
body.dark-mode {
  --bg-primary: #0a0e1a;
  --bg-card: #151824;
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --border: #475569;
  --glass: rgba(21,24,36,0.8);
}

body.dark-mode .project-card {
  background: #0f172a;
  border-color: #475569;
  box-shadow: 
    0 10px 25px rgb(0 0 0 / 0.4),
    0 4px 6px rgb(0 0 0 / 0.2);
}

body.dark-mode .project-content {
  background: #0f172a;
}

body.dark-mode .project-content h3,
body.dark-mode .project-content p {
  color: var(--text-primary);
}

body.dark-mode header {
  background: rgba(21,24,36,0.95);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }
  
  .about-main {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    padding: 2rem;
    width: 80vw;
  }

  .burger {
    display: flex;
  }

  .burger span:nth-child(1) {
    transform-origin: left center;
  }

  .burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px,5px);
  }

  .burger.active span:nth-child(2) {
    opacity: 0;
  }

  .burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px,-6px);
  }

  .skills-grid, .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-text);
  border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #0a0e1a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #60a5fa;
}

