/* Base CSS Variables */
:root {
  /* Color palette */
  --color-dark: #0d0f18;
  --color-dark-accent: #191b2a;
  --color-teal: #74d0c6;
  --color-teal-light: #9be8df;
  --color-white: #ffffff;
  --color-light-gray: #f0f0f0;
  
  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 4rem;
  
  /* Container widths */
  --container-max-width: 1200px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* Reset and Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-white);
  background-color: var(--color-dark);
  background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px, 100px 100px;
  overflow-x: hidden;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-teal-light);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
}

p {
  margin-bottom: var(--space-md);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-md);
  color: var(--color-white);
  font-size: clamp(2rem, 5vw, 3rem);
}

.section-subtitle {
  text-align: center;
  margin-bottom: var(--space-xxl);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.accent {
  color: var(--color-teal);
}

/* Layout Components */
.header {
  padding: var(--space-md) 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(13, 15, 24, 0.9);
  backdrop-filter: blur(10px);
}

.main-content {
  padding-top: 80px;
}

/* Back Button */
.back-button-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 99;
  padding: 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-teal);
  text-decoration: underline;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  transition: all var(--transition-base);
  background-color: rgba(25, 27, 42, 0.9);
  border: 1px solid var(--color-teal);
  position: relative;
  overflow: hidden;
  min-height: 44px; /* WCAG touch target */
  min-width: 150px;
  animation: backButtonFadeIn 0.5s ease-out;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes backButtonFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(116, 208, 198, 0.2), transparent);
  transition: left 0.5s ease;
}

.back-button:hover {
  background-color: rgba(25, 27, 42, 0.95);
  border-color: var(--color-teal-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(116, 208, 198, 0.3);
}

.back-button:hover::before {
  left: 100%;
}

.back-button:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

.back-button:focus:not(:focus-visible) {
  outline: none;
}

.back-button:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

.back-icon {
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: transform var(--transition-base);
}

.back-button:hover .back-icon {
  transform: translateX(-3px);
}

.back-text {
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.main-nav > * {
  position: relative;
  z-index: 1;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 767px) {
  .nav-links {
    position: fixed;
    left: auto;
    transform: none;
  }
}

.nav-links a {
  color: var(--color-white);
  text-decoration: none;
  transition: all var(--transition-base);
  display: block;
  padding: var(--space-xs) var(--space-sm);
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  border-radius: 4px;
}

.nav-links a:hover {
  color: var(--color-teal);
  background-color: rgba(116, 208, 198, 0.1);
}

.nav-links a.active {
  color: var(--color-teal);
  text-shadow: 0 0 10px rgba(116, 208, 198, 0.6), 
               0 0 20px rgba(116, 208, 198, 0.4);
  background-color: rgba(116, 208, 198, 0.15);
  box-shadow: 0 0 15px rgba(116, 208, 198, 0.3),
              inset 0 0 10px rgba(116, 208, 198, 0.1);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: var(--color-teal);
  box-shadow: 0 0 10px var(--color-teal);
  border-radius: 2px;
}

.nav-links li {
  list-style: none;
  position: relative;
  z-index: 2;
}

.logo {
  font-weight: 700;
  color: var(--color-white);
  font-size: 1.5rem;
  z-index: 101;
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}

.mobile-nav-toggle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.footer {
  background-color: var(--color-dark-accent);
  padding: var(--space-xl) 0;
  margin-top: var(--space-xxl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--color-teal);
  color: var(--color-dark);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--color-teal-light);
  color: var(--color-dark);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: var(--space-xxl) 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-description {
  margin-bottom: var(--space-xl);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
  color: var(--color-light-gray);
  text-shadow: 0 0 10px rgba(116, 208, 198, 0.6), 
               0 0 20px rgba(116, 208, 198, 0.4), 
               0 0 30px rgba(116, 208, 198, 0.2);
}

/* Featured Work Section */
.featured-work {
  padding: var(--space-xxl) 0;
  background: linear-gradient(180deg, var(--color-dark) 0%, var(--color-dark-accent) 100%);
  position: relative;
}

.featured-work .container {
  /* Standard laptop width: 1280px-1440px, max-width ensures proper display */
  max-width: 1400px;
}

.featured-work::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(116, 208, 198, 0.3), transparent);
}

.work-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.work-slider {
  display: flex;
  gap: var(--space-xl);
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Standard laptop width: show 3 cards initially */
  /* Each card: ~350px + gap, so 3 cards = ~1150px visible area */
  width: 100%;
  max-width: 100%;
  /* Allow expansion - users can scroll to see more */
  padding-bottom: var(--space-sm);
}

/* Hide scrollbar but keep functionality */
.work-slider::-webkit-scrollbar {
  height: 8px;
}

.work-slider::-webkit-scrollbar-track {
  background: rgba(116, 208, 198, 0.1);
  border-radius: 4px;
}

.work-slider::-webkit-scrollbar-thumb {
  background: rgba(116, 208, 198, 0.3);
  border-radius: 4px;
}

.work-slider::-webkit-scrollbar-thumb:hover {
  background: rgba(116, 208, 198, 0.5);
}

.carousel-arrow {
  background: rgba(116, 208, 198, 0.5);
  border: 2px solid var(--color-teal);
  color: var(--color-dark);
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.carousel-arrow:hover {
  background: rgba(116, 208, 198, 0.7);
  border-color: var(--color-teal-light);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(116, 208, 198, 0.5);
}

.carousel-arrow:active {
  transform: scale(0.95);
  background: rgba(116, 208, 198, 0.8);
}

.carousel-arrow:focus {
  outline: 3px solid var(--color-teal-light);
  outline-offset: 3px;
  background: rgba(116, 208, 198, 0.6);
  box-shadow: 0 0 0 3px rgba(116, 208, 198, 0.3), 0 4px 15px rgba(116, 208, 198, 0.5);
}

.carousel-arrow:focus:not(:focus-visible) {
  outline: none;
}

.carousel-arrow:focus-visible {
  outline: 3px solid var(--color-teal-light);
  outline-offset: 3px;
  background: rgba(116, 208, 198, 0.6);
  box-shadow: 0 0 0 3px rgba(116, 208, 198, 0.3), 0 4px 15px rgba(116, 208, 198, 0.5);
}

.carousel-arrow .arrow-icon {
  line-height: 1;
  display: block;
  color: var(--color-dark);
}

.carousel-arrow .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Screen reader only class for announcements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.work-card {
  background: linear-gradient(135deg, rgba(25, 27, 42, 0.8) 0%, rgba(25, 27, 42, 0.6) 100%);
  padding: var(--space-xl);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(116, 208, 198, 0.1);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(116, 208, 198, 0.05);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  /* Card sizing - responsive: 1 card mobile, 2 cards tablet/desktop for optimal readability */
  /* WCAG 2.1: Optimal line length 45-75 characters, reduce blank space, maintain accessibility */
  flex: 0 0 calc((100% - var(--space-xl)) / 2);
  min-width: 0;
  max-width: 650px;
  width: 100%;
  scroll-snap-align: start;
}

.work-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-teal-light));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(116, 208, 198, 0.2);
  border-color: rgba(116, 208, 198, 0.3);
}

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

.work-card h3 {
  color: var(--color-teal);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.work-card p {
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
  opacity: 0.9;
}

.work-card .result {
  margin-top: auto;
  margin-bottom: var(--space-lg);
  font-weight: 500;
  color: var(--color-white);
  background: rgba(116, 208, 198, 0.1);
  padding: var(--space-md);
  border-radius: 8px;
  border-left: 3px solid var(--color-teal);
}

.work-card .btn {
  align-self: center;
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-light));
  color: var(--color-dark);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  width: 100%;
}

.work-card .btn:hover {
  background: linear-gradient(135deg, var(--color-teal-light), var(--color-teal));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(116, 208, 198, 0.3);
}

/* Card structure elements */
.work-card .card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(116, 208, 198, 0.1);
}

.work-card .card-content {
  flex: 1;
  margin-bottom: var(--space-lg);
}

.work-card .card-footer {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(116, 208, 198, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Enhanced card spacing and visual hierarchy */
.work-card .card-header h3 {
  margin-bottom: 0;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.work-card .card-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

/* YouTube Thumbnails */
.youtube-thumbnails {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.youtube-thumbnail {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
  min-width: 150px;
  max-width: 300px;
  transition: transform var(--transition-base);
  border: 2px solid rgba(116, 208, 198, 0.2);
}

.youtube-thumbnail:hover {
  transform: scale(1.05);
  border-color: var(--color-teal);
  box-shadow: 0 4px 15px rgba(116, 208, 198, 0.4);
}

.youtube-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.youtube-thumbnail .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.9);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  pointer-events: none;
  transition: all var(--transition-base);
}

.youtube-thumbnail:hover .play-icon {
  background: rgba(255, 0, 0, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

/* Article Link Thumbnails */
.article-thumbnails {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.article-thumbnail {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
  min-width: 150px;
  max-width: 300px;
  transition: transform var(--transition-base);
  border: 2px solid rgba(116, 208, 198, 0.2);
}

.article-thumbnail:hover {
  transform: scale(1.05);
  border-color: var(--color-teal);
  box-shadow: 0 4px 15px rgba(116, 208, 198, 0.4);
}

.article-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.work-card .card-footer .result {
  margin-bottom: var(--space-lg);
  background: rgba(116, 208, 198, 0.08);
  border: 1px solid rgba(116, 208, 198, 0.15);
  border-radius: 12px;
  padding: var(--space-md);
  border-left: 4px solid var(--color-teal);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-white);
  opacity: 0.3;
  cursor: pointer;
  transition: opacity var(--transition-base);
}

.dot.active {
  background-color: var(--color-teal);
  opacity: 1;
}

/* About Section */
.about {
  padding: var(--space-xxl) 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  align-items: center;
}

.about-image img {
  border-radius: 8px;
}

.stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-top: var(--space-xl);
}

.stat h3 {
  font-size: 3rem;
  color: var(--color-teal);
  margin-bottom: var(--space-xs);
}

.stat p {
  font-size: 0.875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Skills Section */
.skills {
  padding: var(--space-xxl) 0;
  background-color: var(--color-dark-accent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.skill-category {
  margin-bottom: var(--space-lg);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  background-color: rgba(116, 208, 198, 0.2);
  color: var(--color-teal);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Testimonials Section */
.testimonials {
  padding: var(--space-xxl) 0;
}

.testimonial {
  background-color: var(--color-dark-accent);
  padding: var(--space-xl);
  border-radius: 8px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial blockquote {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  position: relative;
}

.testimonial blockquote::before,
.testimonial blockquote::after {
  content: '"';
  font-size: 3rem;
  color: var(--color-teal);
  opacity: 0.5;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
}

.author-info h4 {
  margin-bottom: 0;
}

.author-info p {
  font-size: 0.875rem;
  margin-bottom: 0;
  color: var(--color-light-gray);
}

.slider-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.slider-nav button {
  background-color: transparent;
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
}

.slider-nav button:hover {
  background-color: var(--color-teal);
  color: var(--color-dark);
}

/* Contact Section */
.contact {
  padding: var(--space-xxl) 0;
  background-color: var(--color-dark-accent);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.contact-methods {
  margin-top: var(--space-lg);
}

.contact-method {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
}

.resume-download {
  background-color: rgba(13, 15, 24, 0.5);
  padding: var(--space-lg);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.resume-download .btn {
  margin-top: var(--space-lg);
}

/* Media Queries */
@media (max-width: 768px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .stats {
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .nav-links {
    display: none;
  }
}

/* Responsive design for work cards - Mobile: show 1 card */
@media (max-width: 767px) {
  .work-slider {
    gap: var(--space-lg);
    padding: 0 var(--space-md);
  }
  
  .work-card {
    flex: 0 0 calc(100% - (2 * var(--space-md)));
    max-width: 100%;
    padding: var(--space-lg);
    margin: 0 var(--space-md);
  }
  
  .work-card .card-header h3 {
    font-size: 1.4rem;
  }
  
  .work-card .card-content p {
    font-size: 1rem;
  }
  
  .work-card .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .work-card {
    padding: var(--space-md);
    border-radius: 12px;
  }
  
  .work-card .card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
  }
  
  .work-card .card-content {
    margin-bottom: var(--space-md);
  }
  
  .work-card .card-footer {
    padding-top: var(--space-sm);
  }
}
