/* ===================================
   CSS Variables & Custom Properties
   =================================== */
:root {
  /* Colors - Dark Luxury Theme */
  --color-bg: #0a0a0b;
  --color-bg-card: #111113;
  --color-bg-elevated: #18181b;
  --color-bg-muted: #1c1c1f;
  
  /* Accent - Warm Gold/Amber */
  --color-accent: #d4a853;
  --color-accent-light: #e8c778;
  --color-accent-dark: #b08d3e;
  --color-accent-glow: rgba(212, 168, 83, 0.15);
  
  /* Text */
  --color-text-primary: #fafafa;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;
  
  /* Borders */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-accent: rgba(212, 168, 83, 0.3);
  
  /* Gradients */
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  --gradient-dark: linear-gradient(180deg, var(--color-bg) 0%, #0d0d0f 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 4px 20px rgba(212, 168, 83, 0.2);
  
  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ===================================
   Background Decorations
   =================================== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--color-accent);
  top: -200px;
  right: -100px;
  opacity: 0.08;
}

.bg-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--color-accent-dark);
  bottom: -100px;
  left: -100px;
  opacity: 0.06;
}

.bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
}

/* ===================================
   Layout Container
   =================================== */
.container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================
   Profile Card - Main Component
   =================================== */
.profile-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.8s ease-out;
}

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

/* ===================================
   Header Section
   =================================== */
.profile-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  position: relative;
}

.header-accent {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: var(--color-accent);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
}

.name-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent-glow);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  animation: fadeIn 0.6s ease-out 0.2s both;
}

.badge-icon {
  color: var(--color-accent);
  font-size: 0.875rem;
}

.badge-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  animation: fadeIn 0.6s ease-out 0.3s both;
}

.title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
  animation: fadeIn 0.6s ease-out 0.4s both;
}

.contact-pill {
  display: inline-block;
  font-style: normal;
  animation: fadeIn 0.6s ease-out 0.5s both;
}

.contact-pill a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-base);
}

.contact-pill a:hover {
  border-color: var(--color-border-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-accent);
}

.contact-pill i {
  color: var(--color-accent);
}

/* ===================================
   About Section
   =================================== */
.about-section {
  position: relative;
  margin-bottom: var(--space-2xl);
  animation: fadeIn 0.6s ease-out 0.6s both;
}

.section-line {
  width: 60px;
  height: 2px;
  background: var(--gradient-accent);
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-full);
}

.description {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.description strong {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* ===================================
   Content Grid
   =================================== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-header-wide {
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-glow);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  font-size: 0.9rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

/* ===================================
   Skills Section
   =================================== */
.skills-section {
  grid-column: 1 / -1;
  animation: fadeIn 0.6s ease-out 0.7s both;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  list-style: none;
}

.skill-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  transition: all var(--transition-base);
}

.skill-item:hover {
  border-color: var(--color-border-accent);
  background: var(--color-accent-glow);
  transform: translateY(-2px);
}

.skill-icon {
  color: var(--color-accent);
  font-size: 0.9rem;
}

/* ===================================
   Experience Section - Timeline
   =================================== */
.experience-section {
  animation: fadeIn 0.6s ease-out 0.8s both;
}

.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 2px);
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-bg-card), 0 0 0 6px var(--color-border);
}

.timeline-content {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-base);
}

.timeline-content:hover {
  border-color: var(--color-border-accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--gradient-accent);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  line-height: 1.5;
}

/* ===================================
   Education Section
   =================================== */
.education-section {
  animation: fadeIn 0.6s ease-out 0.9s both;
}

.education-card {
  display: flex;
  gap: var(--space-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.education-card:hover {
  border-color: var(--color-border-accent);
}

.education-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-glow);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.education-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.school {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.education-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.education-meta time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--gradient-accent);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.gpa {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 500;
}

/* ===================================
   Projects Section
   =================================== */
.projects-section {
  margin-bottom: var(--space-2xl);
  animation: fadeIn 0.6s ease-out 1s both;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.project-card {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-card:hover {
  border-color: var(--color-border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.project-number {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-border);
  line-height: 1;
  pointer-events: none;
  transition: color var(--transition-base);
}

.project-card:hover .project-number {
  color: var(--color-accent-glow);
}

.project-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  padding-right: 40px;
}

.project-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-glow);
  border: 1px solid var(--color-border-accent);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.project-content p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.tech-stack li {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-bg-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

/* ===================================
   Social Links
   =================================== */
.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  animation: fadeIn 0.6s ease-out 1.1s both;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  min-height: 48px;
}

.social-link i {
  font-size: 1.1rem;
}

.social-link-email {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
}

.social-link-email:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.social-link-linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
  color: white;
}

.social-link-linkedin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 119, 181, 0.3);
}

.social-link-github {
  background: linear-gradient(135deg, #24292e 0%, #404448 100%);
  color: white;
  border: 1px solid var(--color-border);
}

.social-link-github:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ===================================
   Footer
   =================================== */
.footer {
  text-align: center;
  animation: fadeIn 0.6s ease-out 1.2s both;
}

.footer-line {
  width: 100px;
  height: 1px;
  background: var(--color-border);
  margin: 0 auto var(--space-lg);
}

.footer p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: var(--space-md);
    align-items: flex-start;
    padding-top: var(--space-xl);
  }
  
  .profile-card {
    padding: var(--space-xl);
    border-radius: var(--radius-md);
  }
  
  .name {
    font-size: 2.25rem;
  }
  
  .title {
    font-size: 1rem;
  }
  
  .section-header h2 {
    font-size: 1.25rem;
  }
  
  .timeline {
    padding-left: var(--space-lg);
  }
  
  .timeline-marker {
    left: calc(-1 * var(--space-lg) + 2px);
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .education-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .education-meta {
    justify-content: center;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
  
  .social-link {
    width: 100%;
    max-width: 220px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: var(--space-sm);
    padding-top: var(--space-md);
  }
  
  .profile-card {
    padding: var(--space-lg) var(--space-md);
  }
  
  .name {
    font-size: 1.875rem;
  }
  
  .name-badge {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .badge-text {
    font-size: 0.65rem;
  }
  
  .description {
    font-size: 0.9rem;
    line-height: 1.7;
  }
  
  .section-icon {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  
  .section-header h2 {
    font-size: 1.125rem;
  }
  
  .skill-item {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-sm);
  }
  
  .timeline-content {
    padding: var(--space-sm);
  }
  
  .timeline-header h3 {
    font-size: 0.9rem;
  }
  
  .project-card {
    padding: var(--space-md);
  }
  
  .project-number {
    font-size: 2rem;
    top: var(--space-sm);
    right: var(--space-sm);
  }
  
  .project-content h3 {
    font-size: 1rem;
    padding-right: 30px;
  }
  
  .project-content p {
    font-size: 0.85rem;
  }
  
  .tech-stack li {
    font-size: 0.65rem;
    padding: 3px 8px;
  }
  
  .social-link {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.85rem;
    min-height: 44px;
  }
}

@media (max-width: 320px) {
  .profile-card {
    padding: var(--space-md) var(--space-sm);
  }
  
  .name {
    font-size: 1.5rem;
  }
  
  .skill-item {
    font-size: 0.75rem;
  }
}

/* ===================================
   Accessibility
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip Link (for accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  z-index: 1000;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Print Styles */
@media print {
  .bg-decoration {
    display: none;
  }
  
  .profile-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .name,
  .section-header h2,
  .timeline-header h3,
  .project-content h3,
  .education-details h3 {
    color: black;
  }
  
  .title,
  .skill-icon,
  .section-icon,
  .gpa,
  .project-year {
    color: #666;
  }
}
