/* ============================================
   MODERN PORTFOLIO STYLES
   ============================================
   Updated for clean, professional design with
   proper spacing, accessibility, and modern UX
*/

:root {
  --color-bg-primary: #0f0f0f;
  --color-bg-secondary: #1a1a1a;
  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-brand: #ffbd39;
  --color-brand-hover: #e6a820;
  --color-accent: #007bff;
  --color-border: #2a2a2a;
  
  --font-primary: 'Poppins', sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   BASE STYLES
============================================ */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* ============================================
   TYPOGRAPHY
============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.5px;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--font-weight-light);
  letter-spacing: -1px;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.35rem;
  font-weight: var(--font-weight-semibold);
}

p {
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-secondary) !important;
}

/* ============================================
   HERO SECTION
============================================ */

.hero-section {
  background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
  padding: var(--spacing-2xl) 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 189, 57, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.min-vh-100 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -2px;
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease-out;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta-buttons .btn {
  padding: 0.75rem 2rem;
  font-weight: var(--font-weight-medium);
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-size: 1rem;
}

.hero-cta-buttons .btn-primary {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-bg-primary);
}

.hero-cta-buttons .btn-primary:hover {
  background-color: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 189, 57, 0.2);
}

.hero-cta-buttons .btn-outline-primary {
  color: var(--color-brand);
  border-color: var(--color-brand);
  background-color: transparent;
}

.hero-cta-buttons .btn-outline-primary:hover {
  background-color: rgba(255, 189, 57, 0.1);
  border-color: var(--color-brand-hover);
  color: var(--color-brand-hover);
  transform: translateY(-2px);
}

/* ============================================
   SECTIONS
============================================ */

.portfolio-container {
  background-color: var(--color-bg-primary);
}

.portfolio-container > .container {
  padding-top: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
}

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

section:first-of-type {
  padding-top: 0;
}

/* Section titles and descriptions */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
  opacity: 0;
  animation: slideInUnderline 0.6s ease-out 0.3s forwards;
}

/* ============================================
   PROJECT CARDS - FEATURED
============================================ */

.featured-project {
  animation: fadeInUp 0.6s ease-out;
}

.featured-project:nth-child(1) { animation-delay: 0.1s; }
.featured-project:nth-child(2) { animation-delay: 0.2s; }
.featured-project:nth-child(3) { animation-delay: 0.3s; }
.featured-project:nth-child(4) { animation-delay: 0.4s; }

.project-card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.featured-project .project-card {
  min-height: 420px;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-brand);
  box-shadow: 0 16px 40px rgba(255, 189, 57, 0.15);
}

/* Card Overlay Effect */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 189, 57, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

.project-media {
  height: 240px;
  overflow: hidden;
  position: relative;
  background-color: var(--color-bg-primary);
}

.featured-project .project-media {
  height: 280px;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease-out;
}

.project-card:hover .project-media img {
  transform: scale(1.05);
}

.card-body {
  padding: var(--spacing-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.card-title {
  font-size: 1.35rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand);
  margin-bottom: var(--spacing-xs);
  transition: color 0.3s ease-out;
}

.project-card:hover .card-title {
  color: var(--color-brand-hover);
}

.card-subtitle {
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: auto;
}

.tech-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background-color: rgba(255, 189, 57, 0.12);
  color: var(--color-brand);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: var(--font-weight-medium);
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 189, 57, 0.2);
}

.tech-tag:hover {
  background-color: rgba(255, 189, 57, 0.2);
  border-color: var(--color-brand);
}

/* ============================================
   PORTFOLIO ITEMS - OTHER/SMALLER
============================================ */

.portfolio-item:not(.featured-project) .project-card {
  min-height: 320px;
}

.portfolio-item:not(.featured-project) .project-media {
  height: 200px;
}

/* ============================================
   FILTER BUTTONS
============================================ */

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--color-border);
  background-color: transparent;
  color: var(--color-text-primary);
  border-radius: 25px;
  transition: var(--transition-smooth);
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.filter-btn:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.filter-btn:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.filter-btn.active {
  background-color: var(--color-brand);
  color: var(--color-bg-primary);
  border-color: var(--color-brand);
}

/* ============================================
   VISIBILITY
============================================ */

.portfolio-item {
  transition: opacity 0.4s ease-out;
}

.portfolio-item.hide {
  display: none !important;
}

.portfolio-item.show {
  display: block !important;
  animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   ABOUT SECTION
============================================ */

#about-section {
  padding-top: var(--spacing-2xl) !important;
}

#about-section img {
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.4s ease-out;
}

#about-section img:hover {
  transform: scale(1.02);
}

.skills-grid {
  gap: var(--spacing-lg) !important;
}

.skill-card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--spacing-lg);
  transition: var(--transition-smooth);
}

.skill-card:hover {
  border-color: var(--color-brand);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 189, 57, 0.1);
}

.skill-card h3 {
  color: var(--color-brand);
  margin-bottom: var(--spacing-md);
  font-size: 1.2rem;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-card li {
  padding: var(--spacing-xs) 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.skill-card li::before {
  content: '✓ ';
  color: var(--color-brand);
  font-weight: bold;
  margin-right: var(--spacing-xs);
}

/* ============================================
   BUTTONS & LINKS
============================================ */

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 8px;
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color 0.3s ease-out;
}

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

.text-decoration-none {
  text-decoration: none;
}

.portfolio-item a:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============================================
   FOOTER
============================================ */

.ftco-footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-xl) 0;
}

.ftco-footer p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.ftco-footer a {
  color: var(--color-brand);
}

/* ============================================
   ANIMATIONS
============================================ */

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

@keyframes slideInUnderline {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 60px;
    opacity: 1;
  }
}

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

@media (max-width: 768px) {
  .hero-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

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

  .hero-cta-buttons .btn-primary {
    margin-bottom: 0;
    margin-right: 0;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .featured-project {
    margin-bottom: var(--spacing-lg);
  }

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

@media (max-width: 576px) {
  .hero-section {
    padding: var(--spacing-lg) 0;
  }

  .min-vh-100 {
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

  h2 {
    font-size: 1.5rem;
  }

  .project-card {
    min-height: 300px;
  }

  .project-media {
    height: 180px;
  }

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

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

  .portfolio-container > .container {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
  }
}

/* ============================================
   ACCESSIBILITY
============================================ */

/* Ensure proper color contrast for text */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .tech-tag {
    border: 2px solid var(--color-brand);
  }

  .filter-btn {
    border-width: 3px;
  }

  .project-card {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode (system preference - already dark by default) */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}
