/* 
 * style.css — Polished Final Version
 */

:root {
  /* Backgrounds */
  --bg-primary: #0f0f0f;
  --bg-secondary: #111111;
  --bg-black: #000000;
  --bg-card: #161616;
  --bg-hero: radial-gradient(circle at center, #111111 0%, #000000 100%);
  --bg-navbar: rgba(15, 15, 15, 0.8);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #e5e7eb;
  --text-muted: #9ca3af;
  --text-dim: #737373;
  --text-zinc: #a1a1aa;
  --text-gray: #888888;
  --text-footer: #525252;
  --text-white: #ffffff;

  /* Brand/Accent */
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-400: #818cf8;

  /* Borders & Dividers */
  --border-primary: #262626;
  --border-secondary: #374151;
  --border-hover: #404040;
  --border-footer: #1a1a1a;
  --border-navbar: rgba(255, 255, 255, 0.1);

  /* Badges & Overlays */
  --overlay-card: rgba(0, 0, 0, 0.6);
  --status-completed-bg: rgba(34, 197, 94, 0.1);
  --status-completed-text: #4ade80;
  --status-completed-border: rgba(34, 197, 94, 0.2);
  --status-live-bg: rgba(239, 68, 68, 0.1);
  --status-live-text: #ef4444;
  --status-live-border: rgba(239, 68, 68, 0.2);
}

/* Light Theme Variables */
html:not(.dark) {
  --bg-primary: #f0ebe0;
  --bg-secondary: #f9fafba8;
  --bg-black: #ffffffc0;
  --bg-card: #ffffffc0;
  --bg-hero: radial-gradient(circle at center, #f0ebe0 0%, #ffffff 100%);
  --bg-navbar: rgba(255, 255, 255, 0.8);

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --text-zinc: #4b5563;
  --text-gray: #6b7280;
  --text-footer: #9ca3af;

  --border-primary: #e5e7eb;
  --border-secondary: #d1d5db;
  --border-hover: #cbd5e1;
  --border-footer: #f3f4f6;
  --border-navbar: rgba(0, 0, 0, 0.05);

  --overlay-card: rgba(255, 255, 255, 0.6);
}


/* 1. Global Base Styles */
html {
  scroll-behavior: smooth;
}

/* 
 * This ensures that when we click a link, the section 
 * doesn't get hidden under our sticky navbar.
 */
section {
  scroll-margin-top: 4rem;
}

/* Custom Scrollbar for a premium look */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-500);
}

/* Custom Text Selection */
::selection {
  background-color: var(--brand-500);
  color: #ffffff;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 2. Layout Containers */
.section-spacing {
  padding-top: 7rem;
  padding-bottom: 7rem;
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 10rem;
    padding-bottom: 10rem;
  }
}

/* 3. Hero Section Components */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 5rem;
  /* Increased top padding for better breathing room */
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: 7rem;
  }
}

.hero-content-wrapper {
  animation: floatIn 1.2s ease-out forwards;
  z-index: 10;
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar-container {
  margin-bottom: 2.5rem;
  position: relative;
}

.avatar-glow {
  position: absolute;
  inset: -10px;
  background-color: var(--brand-500);
  border-radius: 9999px;
  filter: blur(50px);
  opacity: 0.15;
  animation: pulse 3s infinite ease-in-out;
}

.avatar-img {
  position: relative;
  width: 9rem;
  height: 9rem;
  border-radius: 9999px;
  border: 4px solid var(--border-primary);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  object-fit: cover;
}

@media (min-width: 768px) {
  .avatar-img {
    width: 11rem;
    height: 11rem;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  /* Tighter gap to tagline */
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 900px;
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  color: var(--text-secondary);
  /* Switched to secondary for better contrast */
  max-width: 32rem;
  margin-bottom: 3rem;
  font-weight: 400;
  line-height: 1.7;
}

/* 4. Buttons */
.btn-primary,
.btn-secondary {
  padding: 1rem 2.5rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Faster, snappier transition */
  display: inline-block;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--brand-600);
  color: var(--text-primary);
  box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3);
}

.btn-primary:not(.dark) {
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--brand-500);
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  border: 1px solid var(--border-secondary);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background-color: #1f2937;
  color: #ffffff;
  border-color: #4b5563;
  transform: translateY(-3px);
}

/* 5. Section General Styles */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

/* 6. About Section Specifics */
.about-container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.about-content {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-zinc);
  line-height: 1.8;
  text-align: justify;
}

.about-content p+p {
  margin-top: 2.5rem;
}

/* 7. Projects Section Components */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 3rem;
  align-items: start;
  /* Prevents cards in the same row from stretching when one expands */
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.project-card.active:hover {
  transform: translateY(-0.75rem);
  border-color: var(--brand-500);
  /* Highlight border with brand color */
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
}

.project-img-box {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border-primary);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.active:hover .project-img {
  transform: scale(1.08);
}

.project-card.active {
  cursor: pointer;
}

.project-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid transparent;
  margin-top: 0;
}

.project-card.expanded {
  height: fit-content;
}

.project-card.expanded .project-details {
  max-height: 500px;
  opacity: 1;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top-color: var(--border-primary);
}

.details-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.details-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.25rem;
  display: block;
}

.details-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.details-btn {
  margin-top: 1.5rem;
  text-align: center;
  display: block;
  font-size: 0.875rem;
  box-shadow: none;
  /* Removed shadow to keep it clean inside the card */
}

.details-btn:hover {
  box-shadow: none;
  /* Ensure no shadow appears on hover either */
}

.project-card.expanded .expand-hint {
  display: none;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  padding: 0.35rem 0.85rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  /* Added a slight blur for better contrast */
}

.status-completed {
  background-color: var(--status-completed-bg);
  color: var(--status-completed-text);
  border: 1px solid var(--status-completed-border);
}

.status-live {
  background-color: var(--status-live-bg);
  color: var(--status-live-text);
  border: 1px solid var(--status-live-border);
  animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
  0% {
    opacity: 0.8;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.8;
  }
}

.status-planned {
  background-color: rgba(163, 163, 163, 0.3);
  color: var(--text-primary);
  border: 1px solid rgba(163, 163, 163, 0.2);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tech-tag {
  padding: 0.3rem 0.75rem;
  background-color: var(--border-primary);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

/* Coming Soon Overlay */
.project-card.disabled {
  opacity: 0.7;
  filter: grayscale(1);
}

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--overlay-card);
  backdrop-filter: blur(4px);
}

.coming-soon-badge {
  padding: 0.65rem 1.5rem;
  background-color: var(--brand-600);
  color: var(--text-primary);
  font-weight: 800;
  border-radius: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 8. Contact Section Components */
.contact-section {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.contact-message {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--text-zinc);
  line-height: 1.6;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 4rem;
}

.social-link {
  color: var(--text-dim);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
  color: var(--brand-400);
  transform: translateY(-5px) scale(1.1);
}

/* 9. Footer Components */
.footer {
  padding: 5rem 0;
  border-top: 1px solid var(--border-footer);
  text-align: center;
}

.footer-text {
  color: var(--text-footer);
  font-size: 0.9rem;
  font-weight: 400;
}

/* 10. Utilities & Animations */

/* Geometric Hero Shapes */
.hero-shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border: 2px solid rgba(79, 70, 229, 0.2);
  opacity: 0.5;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 15%;
  animation: driftLTR 35s linear infinite;
}

.shape-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  border-radius: 50%;
  animation: driftRTL 45s linear infinite;
}

.shape-3 {
  width: 70px;
  height: 70px;
  top: 40%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), transparent);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%, 50% 10%, 10% 90%, 90% 90%, 50% 10%, 100% 100%);
  border: none;
  animation: driftLTR 25s linear infinite;
}

.shape-4 {
  width: 100px;
  height: 100px;
  top: 75%;
  animation: driftRTL 50s linear infinite;
}

.hero-polygon {
  position: absolute;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), transparent);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  z-index: 0;
  pointer-events: none;
  animation: driftLTR 40s linear infinite;
  top: 25%;
}

@keyframes driftLTR {
  from {
    left: -10%;
    transform: rotate(0deg);
  }

  to {
    left: 110%;
    transform: rotate(360deg);
  }
}

@keyframes driftRTL {
  from {
    right: -10%;
    transform: rotate(0deg);
  }

  to {
    right: 110%;
    transform: rotate(-360deg);
  }
}

.gradient-divider {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, var(--brand-600), var(--brand-400), transparent);
  opacity: 0.3;
}

.gradient-divider-reverse {
  height: 1px;
  flex: 1;
  background: linear-gradient(to left, var(--brand-600), var(--brand-400), transparent);
  opacity: 0.3;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(1.1);
  }
}

/* 11. Navbar & Theme Toggle */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-navbar);
  padding: 0.75rem 1.5rem;
  /* Slightly more compact */
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  /* Slightly wider for the copyright symbol */
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.project-info {
  padding: 2rem;
}

.theme-toggle-btn {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-navbar);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}