/* Prabhu Kasinathan - Main Stylesheet */
/* Personal Portfolio design system */

/* ===== CSS CUSTOM PROPERTIES (VARIABLES) ===== */
:root {
  /* Accent (primary brand red) */
  --accent-red: #D62828;
  --accent-red-dark: #AD2020;
  --accent-red-light: #E84545;
  
  /* Dark Foundation */
  --black-primary: #000000;
  --black-secondary: #141414;
  --black-tertiary: #1F1F1F;
  
  /* Sophisticated Grays */
  --gray-900: #0F0F0F;
  --gray-800: #1A1A1A;
  --gray-700: #2D2D2D;
  --gray-600: #404040;
  --gray-500: #737373;
  --gray-400: #A3A3A3;
  --gray-300: #D4D4D4;
  --gray-200: #E5E5E5;
  --gray-100: #F5F5F5;
  
  /* Pure & Accent */
  --white: #FFFFFF;
  --white-soft: #FAFAFA;
  
  /* Semantic Colors */
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  
  /* Interactive States */
  --hover-red: #E84545;
  --active-red: #AD2020;
  --focus-outline: #D62828;
  
  /* Typography Scale */
  --text-hero: clamp(3rem, 8vw, 6rem);        /* 48px - 96px */
  --text-display: clamp(2.5rem, 6vw, 4.5rem); /* 40px - 72px */
  --text-headline: clamp(2rem, 4vw, 3rem);    /* 32px - 48px */
  --text-title: clamp(1.5rem, 3vw, 2.25rem);  /* 24px - 36px */
  --text-subtitle: clamp(1.25rem, 2.5vw, 1.75rem); /* 20px - 28px */
  --text-large: clamp(1.125rem, 2vw, 1.375rem);    /* 18px - 22px */
  --text-body: clamp(1rem, 1.5vw, 1.125rem);       /* 16px - 18px */
  --text-small: clamp(0.875rem, 1.25vw, 1rem);     /* 14px - 16px */
  --text-caption: clamp(0.75rem, 1vw, 0.875rem);   /* 12px - 14px */
  
  /* Font Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;
  
  /* Spacing Scale */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */
  --space-32: 8rem;    /* 128px */
  
  /* Container Sizes */
  --container-xs: 20rem;    /* 320px */
  --container-sm: 24rem;    /* 384px */
  --container-md: 28rem;    /* 448px */
  --container-lg: 32rem;    /* 512px */
  --container-xl: 36rem;    /* 576px */
  --container-2xl: 42rem;   /* 672px */
  --container-3xl: 48rem;   /* 768px */
  --container-4xl: 56rem;   /* 896px */
  --container-5xl: 64rem;   /* 1024px */
  --container-6xl: 72rem;   /* 1152px */
  --container-7xl: 80rem;   /* 1280px */
  --container-full: 90rem;  /* 1440px */
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 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-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-accent: 0 8px 25px 0 rgba(229, 9, 20, 0.4);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--white);
  background-color: var(--black-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--white);
}

h1 {
  font-size: var(--text-hero);
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-headline);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-subtitle);
  font-weight: var(--weight-semibold);
}

h5 {
  font-size: var(--text-large);
  font-weight: var(--weight-medium);
}

h6 {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
}

p {
  margin-bottom: var(--space-4);
  color: var(--gray-300);
  line-height: 1.7;
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: color var(--transition-normal);
}

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

a:focus {
  outline: 2px solid var(--focus-outline);
  outline-offset: 2px;
}

strong, b {
  font-weight: var(--weight-semibold);
  color: var(--white);
}

em, i {
  font-style: italic;
}

/* ===== LAYOUT UTILITIES ===== */
.container {
  width: 100%;
  max-width: var(--container-6xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-full {
  max-width: var(--container-full);
}

.container-narrow {
  max-width: var(--container-4xl);
}

/* ===== SECTION STYLES ===== */
section {
  padding: var(--space-20) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header.text-left {
  text-align: left;
}

.section-title {
  font-size: var(--text-headline);
  font-weight: var(--weight-bold);
  color: var(--white);
  margin-bottom: var(--space-4);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -var(--space-2);
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-red) 0%, var(--accent-red-light) 100%);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: var(--text-large);
  color: var(--gray-400);
  font-weight: var(--weight-regular);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--black-primary) 0%, var(--gray-900) 50%, var(--black-secondary) 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(229, 9, 20, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-20) 0;
  position: relative;
  z-index: 2;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
  width: 100%;
  max-width: var(--container-6xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.hero-text {
  text-align: center;
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: var(--weight-black);
  color: var(--white);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  color: var(--accent-red);
  margin-bottom: var(--space-2);
}

.hero-tagline {
  font-size: var(--text-subtitle);
  font-weight: var(--weight-medium);
  color: var(--gray-300);
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: var(--text-large);
  color: var(--gray-300);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

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

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-image {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-red);
  box-shadow: 0 0 40px rgba(229, 9, 20, 0.3);
  transition: transform var(--transition-slow);
}

.avatar-image:hover {
  transform: scale(1.05);
}

/* ===== ABOUT SECTION ===== */
.about-section {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--black-secondary) 100%);
}

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

.about-image {
  display: flex;
  justify-content: center;
}

.about-photo {
  width: 300px;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
}

.about-text {
  max-width: 600px;
}

.about-intro {
  margin-bottom: var(--space-6);
}

.about-role {
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  color: var(--white);
  margin-bottom: var(--space-2);
}

.about-tenure {
  font-size: var(--text-body);
  color: var(--accent-red);
  font-weight: var(--weight-medium);
}

.about-description p {
  margin-bottom: var(--space-6);
  font-size: var(--text-body);
  line-height: 1.7;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.highlight-item {
  text-align: center;
  padding: var(--space-4);
  background: rgba(229, 9, 20, 0.1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(229, 9, 20, 0.2);
}

.highlight-number {
  display: block;
  font-size: var(--text-title);
  font-weight: var(--weight-bold);
  color: var(--accent-red);
  margin-bottom: var(--space-1);
}

.highlight-label {
  font-size: var(--text-small);
  color: var(--gray-300);
  font-weight: var(--weight-medium);
}

/* ===== ACHIEVEMENTS SECTION ===== */
.achievements-section {
  background: var(--black-primary);
}

.achievements-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: stretch;
}

/* ===== SKILLS SECTION ===== */
.skills-section {
  background: linear-gradient(135deg, var(--black-secondary) 0%, var(--gray-900) 100%);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.skill-category {
  background: linear-gradient(145deg, var(--gray-900) 0%, var(--black-tertiary) 100%);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform var(--transition-normal);
}

.skill-category:hover {
  transform: translateY(-4px);
  border-color: var(--gray-600);
}

.category-title {
  font-size: var(--text-subtitle);
  font-weight: var(--weight-semibold);
  color: var(--white);
  margin-bottom: var(--space-6);
  text-align: center;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.skill-name {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--gray-200);
  flex: 0 0 120px;
}

.skill-level {
  flex: 1;
  height: 8px;
  background: var(--gray-700);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-red) 0%, var(--accent-red-light) 100%);
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
  position: relative;
}

.skill-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
  background: var(--black-primary);
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
  flex-wrap: wrap;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials-section {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--black-secondary) 100%);
}

.testimonials-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scroll-snap-type: y proximity;
  max-height: 70vh;
  padding-right: var(--space-2);
}

.testimonials-grid::-webkit-scrollbar {
  width: 10px;
}

.testimonials-grid::-webkit-scrollbar-thumb {
  background: var(--gray-700);
  border-radius: var(--radius-full);
}

.testimonials-grid::-webkit-scrollbar-track {
  background: var(--black-tertiary);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: linear-gradient(135deg, var(--black-primary) 0%, var(--gray-900) 100%);
}

.contact-content {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-size: var(--text-headline);
  font-weight: var(--weight-bold);
  color: var(--white);
  margin-bottom: var(--space-6);
}

.contact-description {
  font-size: var(--text-large);
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: var(--space-10);
  max-width: 100%;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5) var(--space-8);
  margin: var(--space-8) auto;
  max-width: 700px;
  text-align: center;
  align-items: start;
  justify-content: center;
  justify-items: center;
}

/* Special styling for the last item (Escalate) to span full width */
.contact-methods .contact-method:last-child {
  grid-column: 1 / -1;
  max-width: 300px;
  margin: 0 auto;
  grid-template-columns: 48px auto;
  justify-content: center;
}

.contact-method {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: start;
  column-gap: var(--space-3);
  justify-self: center;
  max-width: 300px;
  width: 100%;
}

.method-icon {
  position: static;
  width: 48px;
  font-size: var(--text-subtitle);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-content {
  display: block;
  text-align: left;
}

.method-title {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  color: var(--white);
  margin-bottom: var(--space-1);
}

.method-link {
  font-size: var(--text-small);
  color: var(--gray-400);
  transition: color var(--transition-normal);
  display: inline-block;
}

.method-link:hover {
  color: var(--accent-red);
}

.contact-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-10);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black-primary);
  border-top: 1px solid var(--gray-800);
  padding: var(--space-12) 0 var(--space-8);
}

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

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gray-800);
  border-radius: 50%;
  color: var(--gray-400);
  transition: all var(--transition-normal);
  font-size: var(--text-large);
}

.social-link:hover {
  background: var(--accent-red);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.footer-link {
  color: var(--gray-400);
  font-size: var(--text-small);
  transition: color var(--transition-normal);
}

.footer-link:hover {
  color: var(--accent-red);
}

.footer-copyright {
  color: var(--gray-500);
  font-size: var(--text-caption);
}

.powered-by {
  margin-top: var(--space-2);
  opacity: 0.7;
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-red);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  transition: top var(--transition-normal);
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  :root {
    --accent-red: #FF0000;
    --gray-300: #FFFFFF;
    --gray-700: #000000;
  }
  
  .skill-category,
  .achievement-card,
  .portfolio-card,
  .testimonial-card {
    border: 2px solid var(--white);
  }
}
