/* ============================================
   Prince Saajid - Portfolio Styles
   Dark mode default, Light mode toggle
   ============================================ */

:root {
  /* Dark theme (default) */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-primary: #58a6ff;
  --accent-secondary: #79c0ff;
  --accent-gradient-start: #58a6ff;
  --accent-gradient-end: #a371f7;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(22, 27, 34, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --shadow-color: rgba(0, 0, 0, 0.4);
  --hero-gradient-1: #0d1117;
  --hero-gradient-2: #161b22;
  --hero-gradient-3: #1a1f35;
  --card-hover-bg: rgba(88, 166, 255, 0.06);
}

[data-theme="light"] {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eaeef2;
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-muted: #8c959f;
  --accent-primary: #0969da;
  --accent-secondary: #0550ae;
  --accent-gradient-start: #0969da;
  --accent-gradient-end: #8250df;
  --border-color: rgba(31, 35, 40, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(31, 35, 40, 0.08);
  --shadow-color: rgba(31, 35, 40, 0.12);
  --hero-gradient-1: #f0f4ff;
  --hero-gradient-2: #e8eeff;
  --hero-gradient-3: #dde5ff;
  --card-hover-bg: rgba(9, 105, 218, 0.06);
}

/* Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Navigation */
.nav-glass {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 0;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.navbar-brand {
  color: var(--text-primary) !important;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-primary) !important;
  background: var(--card-hover-bg);
}

.navbar-toggler {
  color: var(--text-primary);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.nav-glass.scrolled {
  padding: 0.5rem 0;
}

/* Theme toggle */
.btn-theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--glass-bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-theme-toggle:hover {
  background: var(--card-hover-bg);
  color: var(--accent-primary);
  transform: scale(1.05);
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--hero-gradient-1) 0%, var(--hero-gradient-2) 50%, var(--hero-gradient-3) 100%);
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(88, 166, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(163, 113, 247, 0.1), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(88, 166, 255, 0.08), transparent);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-particles::before,
.hero-particles::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.03;
  animation: float 15s ease-in-out infinite;
}

.hero-particles::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.hero-particles::after {
  bottom: 20%;
  right: 10%;
  width: 150px;
  height: 150px;
  background: var(--accent-gradient-end);
  animation-delay: -7s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent-primary);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  font-style: italic;
}

/* Hero profile photo - one place only, centered */
.hero-profile-photo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-profile-photo-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 4px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-color);
  overflow: hidden;
  background: var(--bg-tertiary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-profile-photo-wrap:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px var(--shadow-color);
}

.hero-profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-profile-photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--bg-tertiary);
  letter-spacing: -0.02em;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
  border: none;
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.35);
}

.btn-glow:hover {
  box-shadow: 0 8px 32px rgba(88, 166, 255, 0.4);
}

[data-theme="light"] .btn-glow:hover {
  box-shadow: 0 8px 32px rgba(9, 105, 218, 0.35);
}

.btn-outline-light {
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline-light:hover {
  background: var(--glass-bg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline-primary {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline-primary:hover {
  background: var(--card-hover-bg);
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

/* Hero social */
.hero-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--glass-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  color: var(--accent-primary);
  background: var(--card-hover-bg);
  transform: translateY(-3px);
}

.social-link-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--glass-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.social-link-lg:hover {
  color: var(--accent-primary);
  background: var(--card-hover-bg);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-down {
  color: var(--text-muted);
  font-size: 1.5rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Sections */
.section-py {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-color);
  border-color: rgba(88, 166, 255, 0.15);
}

[data-theme="light"] .glass-card:hover {
  border-color: rgba(9, 105, 218, 0.2);
}

/* About */
.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
}

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

/* Certifications */
.cert-card {
  text-align: center;
  cursor: default;
}

.cert-card .cert-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.cert-icon {
  font-size: 2.5rem;
  display: inline-block;
}

.cert-icon-google {
  color: #4285f4;
}

[data-theme="light"] .cert-icon-google {
  color: #1a73e8;
}

.cert-icon-microsoft {
  color: #00a4ef;
}

.cert-provider-name {
  font-size: 0.85rem;
}

/* Skills */
.skill-card {
  padding: 1.75rem;
}

.skill-icon {
  font-size: 2rem;
  color: var(--accent-primary);
}

.skill-category {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.skill-card:hover .skill-list li {
  background: var(--card-hover-bg);
  color: var(--accent-primary);
}

.skill-badge {
  display: inline-block;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}

.skill-card:hover .skill-badge {
  background: var(--card-hover-bg);
  color: var(--accent-primary);
}

/* Projects */
.project-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.project-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
  color: #fff;
  border-radius: 6px;
  white-space: nowrap;
}

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

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

.project-tech span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

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

/* Experience timeline */
.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 1.75rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
  box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 2.25rem;
  bottom: -1rem;
  width: 2px;
  background: var(--border-color);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 500;
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-list li {
  margin-bottom: 0.35rem;
}

/* GitHub section */
.github-card .github-icon {
  font-size: 3rem;
  color: var(--text-secondary);
}

.github-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
}

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

/* Contact form */
.form-control, .form-control:focus {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 10px;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
}

[data-theme="light"] .form-control {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="light"] .form-control:focus {
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
}

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

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--accent-primary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--card-hover-bg);
  color: var(--accent-secondary);
  transform: translateY(-2px);
}

/* AOS overrides */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(24px);
}

/* Form submit state */
.contact-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 991.98px) {
  .section-py {
    padding: 3.5rem 0;
  }

  .navbar-collapse {
    padding: 1rem 0;
  }
}

@media (max-width: 575.98px) {
  .hero-section .btn-lg {
    width: 100%;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}
