/* ============================================ */
/* Modern Portfolio - Clean Minimalist Design  */
/* Author: Jignesh Shiyal                       */
/* ============================================ */

/* ============================================ */
/* CSS Custom Properties (Light/Dark Theming)  */
/* ============================================ */
:root {
  /* Light Mode (Default) */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-glow: rgba(37, 99, 235, 0.15);

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-navbar: rgba(255, 255, 255, 0.85);

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 2px 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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Source Code Pro', 'Fira Code', monospace;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Dark Mode */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: #1e3a5f;
  --primary-glow: rgba(59, 130, 246, 0.2);

  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-navbar: rgba(15, 23, 42, 0.9);

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-color: #334155;
  --border-light: #1e293b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* ============================================ */
/* Particle Background                          */
/* ============================================ */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ============================================ */
/* Typography                                   */
/* ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

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

.highlight {
  color: var(--primary);
}

/* ============================================ */
/* Container & Layout                           */
/* ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding-top: 80px;
}

section {
  padding: 5rem 0;
  position: relative;
}

/* ============================================ */
/* Navbar                                       */
/* ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-navbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

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

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.navbar .logo:hover {
  color: var(--primary);
}

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

.navbar .nav-item {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.navbar .nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-normal);
}

.navbar .nav-item:hover {
  color: var(--primary);
}

.navbar .nav-item:hover::after {
  width: 100%;
}

.navbar .social-icon {
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.navbar .social-icon:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(15deg);
}

/* Mobile Nav Toggle */
.nav-toggle-input {
  display: none;
}

.nav-toggle {
  display: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.5rem;
  background: transparent;
  border: none;
  padding: 0.25rem;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  color: #ffffff;
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ============================================ */
/* Hero Section                                 */
/* ============================================ */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  position: relative;
}

.hero-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.hero-left {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 0 0 8px var(--primary-glow), var(--shadow-xl);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 12px var(--primary-glow), var(--shadow-xl);
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 500px;
}

.hero-right h1 {
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-right h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  text-align: left;
  margin-bottom: 1.25rem;
  min-height: 2rem;
}

.typing-container {
  display: inline;
}

.typing-text {
  color: var(--primary);
  border-right: 3px solid var(--primary);
  padding-right: 2px;
  animation: blink 0.7s infinite;
}

@keyframes blink {

  0%,
  50% {
    border-color: var(--primary);
  }

  51%,
  100% {
    border-color: transparent;
  }
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ============================================ */
/* Section Title                                */
/* ============================================ */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* ============================================ */
/* About Section                                */
/* ============================================ */
#about {
  background: transparent;
  border-top: 1px solid var(--border-color);
}

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

.about-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ============================================ */
/* GitHub Section                               */
/* ============================================ */
#github {
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.github-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.github-stats img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ============================================ */
/* Skills Section                               */
/* ============================================ */
#skills {
  background: transparent;
  border-top: 1px solid var(--border-color);
}

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

.skill-card {
  background: var(--bg-card);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  cursor: default;
}

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

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
}

.skill-card p {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

/* ============================================ */
/* Projects Section                             */
/* ============================================ */
#projects {
  border-top: 1px solid var(--border-color);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.project-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.project-card h3 a {
  color: inherit;
  transition: color var(--transition-fast);
}

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

.project-card p {
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.project-tags span,
.project-card strong+span {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-links .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* ============================================ */
/* Experience Section                           */
/* ============================================ */
#experience {
  background: transparent;
  border-top: 1px solid var(--border-color);
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3.5rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.timeline-period {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: var(--primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.timeline-item h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.timeline-item ul {
  list-style: none;
  padding: 0;
}

.timeline-item li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.timeline-item li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

#blog {
  border-top: 1px solid var(--border-color);
}

/* ============================================ */
/* Blog Section                                 */
/* ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
}

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

.blog-card h3 {
  margin-bottom: 0.5rem;
}

.blog-card h3 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.read-more:hover {
  gap: 0.5rem;
}

/* ============================================ */
/* Contact Section                              */
/* ============================================ */
#contact {
  background: transparent;
  border-top: 1px solid var(--border-color);
}

.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

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

.contact-info p {
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.contact-link i {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

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

.contact-link:hover i {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.1);
}



/* ============================================ */
/* Footer                                       */
/* ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: auto;
}

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

.footer p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

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

.footer-socials a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

/* ============================================ */
/* Fade In Animation                            */
/* ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================ */
/* Responsive Design                            */
/* ============================================ */

/* Laptop (Small Screens) */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }

  .hero-container {
    gap: 3rem;
    max-width: 900px;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-photo {
    width: 280px;
    height: 280px;
  }
}

/* Tablet */
@media (max-width: 992px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .hero-left {
    order: 1;
  }

  .hero-right {
    order: 2;
    align-items: center;
    text-align: center;
  }

  .hero-right h1,
  .hero-right h2 {
    text-align: center;
  }

  .hero-tagline {
    text-align: center;
    margin: 0 auto 1.5rem;
  }

  .cta-buttons {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .about-image {
    max-width: 280px;
    margin: 0 auto;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  section {
    padding: 3.5rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Mobile Nav */
  .nav-toggle {
    display: block;
  }

  .navbar nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition-slow);
    border-bottom: 1px solid var(--border-color);
    gap: 0;
  }

  .nav-toggle-input:checked~nav {
    max-height: 400px;
    padding: 1rem 0;
  }

  .navbar .nav-item {
    display: block;
    padding: 0.875rem 1.5rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
  }

  .navbar .nav-item::after {
    display: none;
  }

  .navbar .social-icon {
    padding: 0.75rem;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  /* Hero */
  .hero {
    padding: 3rem 1rem;
    min-height: auto;
  }

  .hero-container {
    gap: 2rem;
  }

  .hero-photo {
    width: 200px;
    height: 200px;
    border-width: 3px;
    box-shadow: 0 0 0 6px var(--primary-glow), var(--shadow-lg);
  }

  .hero-right h1 {
    font-size: 1.75rem;
  }

  .hero-right h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    min-height: auto;
  }

  .hero-tagline {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Timeline */
  .timeline {
    padding-left: 2rem;
  }

  .timeline-item::before {
    left: -2rem;
    width: 12px;
    height: 12px;
  }

  /* Footer */
  .footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-photo {
    width: 160px;
    height: 160px;
  }

  h1 {
    font-size: 2rem;
  }

  .skill-card {
    padding: 1.5rem 1rem;
  }

  .skill-card i {
    font-size: 2rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================ */
/* Utility Classes                              */
/* ============================================ */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}