/* Global Styles & Variables */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #2563eb; /* Vibrant Blue */
  --primary-dark: #1e40af;
  --secondary-color: #0ea5e9; /* Sky Blue */
  --accent-color: #f59e0b; /* Amber for highlights */
  
  --text-primary: #111827; /* Very Dark Gray */
  --text-secondary: #4b5563; /* Dark Gray */
  --text-light: #9ca3af;    /* Light Gray */
  
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6; /* Cool Gray 100 */
  --bg-surface: #ffffff;

  --border-color: #e5e7eb;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 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);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  --bg-header: rgba(255, 255, 255, 0.8);
  --bg-header-scrolled: rgba(255, 255, 255, 0.98);
}

[data-theme="dark"] {
  --primary-color: #3b82f6; /* Lighter Blue for dark mode */
  --primary-dark: #2563eb;
  --secondary-color: #38bdf8; 
  
  --text-primary: #f9fafb; /* Cool Gray 50 */
  --text-secondary: #d1d5db; /* Cool Gray 300 */
  --text-light: #9ca3af;

  --bg-primary: #111827; /* Cool Gray 900 */
  --bg-secondary: #1f2937; /* Cool Gray 800 */
  --bg-surface: #1f2937;
  
  --bg-header: rgba(17, 24, 39, 0.8);
  --bg-header-scrolled: rgba(17, 24, 39, 0.98);

  --border-color: #374151; /* Cool Gray 700 */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Accessibility Focus Styles */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 0.5rem;
}

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

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

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

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

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  transition: all 0.3s ease;
}

nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

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

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

/* Mobile Menu Toggle */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.mobile-menu span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.mobile-menu.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  color: white;
  padding-top: 80px; /* header height */
  position: relative;
  overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-text .subtitle {
  font-size: 1.5rem;
  color: #93c5fd;
  margin-bottom: 1.5rem;
  font-weight: 500;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-text p {
  font-size: 1.125rem;
  color: #d1d5db;
  margin-bottom: 2.5rem;
  max-width: 600px;
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* Social Links (Desktop) */
.social-links {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 900;
}

.social-links a {
  width: 48px;
  height: 48px;
  background: var(--bg-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.5rem;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.social-links a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-dark);
}

.mobile-social-links {
    display: none;
    gap: 1rem;
    margin-top: 2rem;
}

/* Section Common */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

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

.section-title p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* About Section */
.about {
    background-color: var(--bg-primary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about-image .profile-img {
  width: 300px;
  height: 300px;
  background: var(--bg-secondary);
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary-color);
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* Create a simple pattern or shape for profile placeholder */
.about-image .profile-img::after {
    content: "";
    position: absolute;
    width: 120%;
    height: 120%;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 40%;
    animation: rotate 10s infinite linear;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.about-text h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

.languages-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.languages-section h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.language-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-list i {
    color: var(--primary-color);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-item .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

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

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

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

.skill-category {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.skill-category h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.skill-category h3 i {
    color: var(--primary-color);
}

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

.skill-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.skill-category:hover .skill-tag {
    background: #eff6ff; /* light blue bg */
    color: var(--primary-color);
}

/* Experience Section */
.experience {
    background-color: var(--bg-primary);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-date {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.timeline-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
}

.company {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.position {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

.experience-details li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.experience-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

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

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

.project-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

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

.project-image {
  height: 200px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden; /* Ensure image doesn't overflow border radius if not inherited */
}

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

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

.project-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

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

.tech-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: #eff6ff;
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

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

/* Education Section */
.education {
    background-color: var(--bg-secondary);
}

.education-content {
    text-align: center;
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.education-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    display: inline-block;
}

.education-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.education-content .institution {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-content .year {
    color: var(--text-secondary);
}

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

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.contact-item.clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.contact-item i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.contact-form {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    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;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

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

/* Footer */
footer {
    background: #111827;
    color: white;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
}

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

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 3rem; }
    .about-content, .contact-content { grid-template-columns: 1fr; gap: 3rem; }
    .timeline::before { left: 0; }
    .timeline-item { padding-left: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 71px;
        left: 0;
        width: 100%;
        height: calc(100vh - 71px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu {
        display: flex;
    }

    .social-links { display: none; }
    .mobile-social-links { display: flex; justify-content: center; margin-top: 1.5rem; }
    
    .mobile-social-links a {
        width: 40px; height: 40px;
        background: var(--bg-surface);
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        box-shadow: var(--shadow-sm);
        color: var(--primary-color);
        font-size: 1.2rem;
        border: 1px solid var(--border-color);
    }

    .hero { text-align: center; justify-content: center; padding-top: 100px; }
    .hero-content { margin: 0 auto; }
    .cta-buttons { justify-content: center; }
    
    .about-image .profile-img { width: 200px; height: 200px; font-size: 4rem; }
    .about-stats { grid-template-columns: 1fr; gap: 1rem; }
    
    .contact-form { padding: 1.5rem; }
}