/* --- Modern Bento Grid Portfolio Styles --- */

:root {
  /* Colors */
  --bg-color: #F9FAFB;
  --text-main: #111827;
  --text-muted: #6B7280;
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;
  --primary: #4F46E5;
  --accent: #EC4899;
  --gradient-text: linear-gradient(135deg, #4F46E5 0%, #EC4899 100%);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: 12px;

  /* Shadows */
  --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);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

/* --- Dark Mode Variables --- */
body.dark-mode {
  --bg-color: #0F172A;
  --text-main: #F9FAFB;
  --text-muted: #94A3B8;
  --card-bg: #1E293B;
  --card-border: #334155;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  padding-bottom: 100px;
  /* Space for dock */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* --- Floating Dock Navigation --- */
.dock-nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.dock-list {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.dock-item {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
}

.dock-item:hover {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-4px);
}

/* --- Main Container --- */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* --- Hero Section --- */
.hero-section {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* --- Bento Grid Layout --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

/* Grid Spans */
.profile-card {
  grid-column: span 2;
  grid-row: span 2;
}

.project-card.wide {
  grid-column: span 2;
}

.project-card {
  grid-column: span 2;
}

.skill-card {
  grid-column: span 1;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.social-card {
  grid-column: span 1;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.certs-card {
  grid-column: span 2;
  grid-row: span 1;
}

/* Card Specific Styles */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.bio-text {
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-grow: 1;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.skill-card i {
  font-size: 2.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.project-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

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

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

.tags span {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-link {
  align-self: flex-start;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.project-link:hover {
  background: var(--text-main);
  color: var(--bg-color);
  border-color: var(--text-main);
}

.project-bg-icon {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 10rem;
  opacity: 0.05;
  transform: rotate(-15deg);
  pointer-events: none;
}

.social-card.linkedin {
  background: #0077B5;
  color: white;
  border: none;
}

.social-card.email {
  background: var(--text-main);
  color: var(--bg-color);
  border: none;
}

.social-card i {
  font-size: 1.5rem;
}

.cert-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.cert-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cert-list i {
  color: var(--accent);
}

/* Click Hint in Bento Card */
.click-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.certs-card:hover .click-hint {
  opacity: 1;
  transform: translateY(0);
}

/* --- Certifications Section --- */
.cert-section {
  padding: 4rem 0;
  border-top: 1px solid var(--card-border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.cert-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.cert-img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
  padding: 0.5rem;
}

.cert-card:hover .cert-img-wrapper img {
  transform: scale(1.05);
}

.cert-info {
  padding: 1.5rem;
}

.cert-info h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.cert-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Soul Enhancements --- */

/* Particles */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5;
}

/* Typing Animation */
.typing-text {
  color: var(--primary);
  position: relative;
}

.cursor {
  display: inline-block;
  width: 2px;
  background-color: var(--text-main);
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Quote Card */
.quote-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(79, 70, 229, 0.05) 100%);
}

.quote-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.quote-card p {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.quote-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Contact Form Card */
.contact-form-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-form-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: rgba(30, 41, 59, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-send {
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-send:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* --- Footer --- */
.main-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.main-footer i {
  color: var(--accent);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-card {
    grid-column: span 2;
  }

  .project-card {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

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

  .profile-card,
  .project-card,
  .project-card.wide,
  .skill-card,
  .social-card,
  .certs-card,
  .quote-card,
  .contact-form-card {
    grid-column: span 1;
  }

  .dock-nav {
    bottom: 1rem;
    width: 90%;
    justify-content: space-around;
  }

  .dock-list {
    width: 100%;
    justify-content: space-between;
  }
}