/* ===================================
   PERSONAL WEBSITE - GLOBAL STYLES
   Modern, Colorful, Premium Design
   =================================== */

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap");

/* ===================================
   CSS VARIABLES - DESIGN TOKENS
   =================================== */
:root {
  /* Color Palette - Vibrant & Modern */
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-secondary: #8b5cf6;
  --color-accent-cyan: #06b6d4;
  --color-accent-pink: #ec4899;
  --color-accent-orange: #f97316;
  --color-accent-green: #10b981;

  /* Background Colors */
  --color-bg-dark: #0f172a;
  --color-bg-medium: #1e293b;
  --color-bg-light: #334155;
  --color-bg-card: rgba(30, 41, 59, 0.6);

  /* Text Colors */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #ec4899 100%);
  --gradient-warm: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  --gradient-hero: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e293b 50%,
    #312e81 100%
  );

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* Typography */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* 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);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg-dark);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 900;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 800;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: 700;
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

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

a:hover {
  color: var(--color-accent-pink);
}

/* ===================================
   NAVIGATION BAR
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm) 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-fast);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: rgba(99, 102, 241, 0.1);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active {
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.15);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* ===================================
   LAYOUT CONTAINERS
   =================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-3xl) 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--spacing-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  padding-top: 80px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(99, 102, 241, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(139, 92, 246, 0.2) 0%,
      transparent 50%
    );
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--spacing-2xl);
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: 900;
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-2xl);
  animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-align: center;
  font-family: var(--font-body);
}

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

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

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

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

.btn-group {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s backwards;
}

.stats-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.stats-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* ===================================
   CARDS
   =================================== */
.card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all var(--transition-base);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.2);
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--spacing-xs);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.card-body {
  margin-bottom: var(--spacing-md);
}

.card-footer {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ===================================
   GRID LAYOUTS
   =================================== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===================================
   BADGES & TAGS
   =================================== */
.badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.2);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.badge-accent {
  background: rgba(6, 182, 212, 0.2);
  color: var(--color-accent-cyan);
  border: 1px solid var(--color-accent-cyan);
}

.badge-pink {
  background: rgba(236, 72, 153, 0.2);
  color: var(--color-accent-pink);
  border: 1px solid var(--color-accent-pink);
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: var(--color-bg-medium);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-3xl);
}

.footer-content {
  text-align: center;
}

.footer-text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Extra Large Screens (1920px+) */
@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }

  .section {
    padding: var(--spacing-3xl) 0;
  }
}

/* Large Desktop (1440px - 1919px) */
@media (max-width: 1440px) {
  .container {
    max-width: 1200px;
  }
}

/* Desktop (1200px - 1439px) */
@media (max-width: 1200px) {
  .container {
    max-width: 1000px;
  }

  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Laptop / Tablet Landscape (1024px - 1199px) */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 3rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --spacing-3xl: 5rem;
  }

  .container {
    max-width: 900px;
  }

  .section {
    padding: var(--spacing-2xl) 0;
    min-height: auto;
  }

  .hero {
    min-height: 80vh;
  }

  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-menu {
    gap: var(--spacing-md);
  }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
    --spacing-3xl: 4rem;
    --spacing-2xl: 3rem;
    --spacing-xl: 2rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  /* Mobile Navigation */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    width: 100%;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
    transition: left var(--transition-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--spacing-sm);
  }

  /* Buttons */
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* Hero */
  .hero {
    min-height: 70vh;
    padding-top: 70px;
  }

  .hero-content {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  /* Cards */
  .card {
    padding: var(--spacing-md);
  }

  /* Section */
  .section {
    padding: var(--spacing-xl) 0;
  }

  .section-header {
    margin-bottom: var(--spacing-xl);
  }
}

/* Mobile Landscape / Large Phone (640px - 767px) */
@media (max-width: 640px) {
  :root {
    --text-6xl: 2.25rem;
    --text-5xl: 1.875rem;
    --text-4xl: 1.5rem;
    --spacing-2xl: 2.5rem;
  }

  .nav-logo {
    font-size: var(--text-xl);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .section-subtitle {
    font-size: var(--text-base);
  }
}

/* Mobile Portrait (480px - 639px) */
@media (max-width: 480px) {
  :root {
    --text-6xl: 2rem;
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
    --text-3xl: 1.375rem;
    --text-2xl: 1.125rem;
    --text-xl: 1.0625rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 1.75rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 3rem;
  }

  html {
    font-size: 15px;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero-content {
    padding: var(--spacing-lg);
  }

  .hero-title {
    line-height: 1.1;
  }

  .hero-description {
    font-size: var(--text-base);
  }

  .card {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .badge {
    font-size: 0.65rem;
    padding: 0.375rem 0.625rem;
  }

  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--text-sm);
  }

  .nav-menu {
    padding: var(--spacing-md);
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  .grid {
    gap: var(--spacing-sm);
  }
}

/* Small Mobile (375px - 479px) */
@media (max-width: 375px) {
  :root {
    --text-6xl: 1.75rem;
    --text-5xl: 1.5rem;
    --text-4xl: 1.375rem;
    --text-3xl: 1.25rem;
  }

  html {
    font-size: 14px;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-content {
    padding: var(--spacing-md);
  }

  .nav-logo {
    font-size: var(--text-lg);
  }

  .card-title {
    font-size: var(--text-lg);
  }
}

/* Extra Small Mobile (320px - 374px) */
@media (max-width: 320px) {
  :root {
    --text-6xl: 1.5rem;
    --text-5xl: 1.375rem;
    --text-4xl: 1.25rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 0.875rem;
    --spacing-lg: 1.25rem;
  }

  html {
    font-size: 13px;
  }

  .container {
    padding: 0 0.75rem;
  }

  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }

  .badge {
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
  }
}

/* Landscape Orientation Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }

  .section {
    min-height: auto;
    padding: var(--spacing-xl) 0;
  }

  .nav-menu {
    max-height: calc(100vh - 60px);
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .nav-toggle,
  .btn,
  .footer {
    display: none;
  }

  .hero {
    min-height: auto;
    page-break-after: always;
  }

  .section {
    min-height: auto;
    page-break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-center {
  text-align: center;
}

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

.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}
.mt-xl {
  margin-top: var(--spacing-xl);
}

/* ===================================
   HIGHLIGHTS SECTION CUSTOM STYLES
   =================================== */

/* Default grid behavior (mobile/tablet) */
.highlights-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Ensure cards and buttons align properly on ALL screens */
.highlights-grid .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.highlights-grid .card-body {
  flex-grow: 1;
}

/* Flexbox for Big Screens (Changing layout from grid to flex row) */
@media (min-width: 1024px) {
  .highlights-grid {
    display: flex !important;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: nowrap;
  }

  .highlights-grid > .card {
    flex: 1;
    width: 100%;
  }
}
