:root {
  /* Color Palette - Vercel/Linear inspired */
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-card: #0a0a0a;
  --text-primary: #ededed;
  --text-secondary: #a1a1a1;
  --text-tertiary: #666666;
  --accent-primary: #3291ff; /* Electric Blue */
  --accent-secondary: #7928ca; /* Purple */
  --border-subtle: #333333;
  --border-hover: #555555;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  padding-top: 80px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: var(--accent-primary);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

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

/* Background Grid Pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(
    circle at center,
    black 40%,
    transparent 100%
  );
}

/* Ambient Glows */
body::after {
  content: "";
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(50, 145, 255, 0.08) 0%,
    transparent 70%
  );
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.hero-section::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(121, 40, 202, 0.08) 0%,
    transparent 70%
  );
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

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

ul {
  list-style: none;
}

.container {
  max-width: 1000px; /* Slightly tighter container for readability */
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

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

.section-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  opacity: 0.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-lg);
  align-items: center;
  width: 100%;
}

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

.hero-image-placeholder {
  width: 280px;
  height: 350px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.placeholder-avatar {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.15);
}

.hero-name {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: var(--space-xs);
  background: linear-gradient(135deg, #ffffff, #a1a1a1 60%, #3291ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}

.hero-name::after {
  content: '|';
  position: absolute;
  right: -10px;
  animation: blink 1s infinite;
  color: var(--accent-primary);
}

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

.hero-role {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
}

.hero-subline {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Projects Section */
.projects-section {
  padding-bottom: var(--space-xl);
}

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

.project-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-md);
  background-color: rgba(10, 10, 10, 0.6); /* More transparent */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden; /* For spotlight effect */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Spotlight Effect Layer */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

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

.project-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -10px rgba(50, 145, 255, 0.2), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card > * {
  position: relative;
  z-index: 2;
}

.project-preview {
  height: 100%;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumbnail {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(45deg, #1a1a1a, #222);
}

.project-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
  font-size: 1.2rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-xs);
}

.project-name {
  font-size: 1.5rem;
}

.project-tag {
  font-size: 0.8rem;
  color: var(--accent-primary);
  background: rgba(50, 145, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.project-summary {
  margin-bottom: var(--space-sm);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
}

.project-tech span {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.project-outcomes {
  margin-bottom: var(--space-md);
  padding-left: 1.2rem;
  list-style: disc;
}

.project-outcomes li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.project-links {
  display: flex;
  gap: var(--space-sm);
}

/* Skills Section */
.skills-section {
  padding-bottom: var(--space-xl);
  overflow: hidden; /* Hide scrollbar for marquee */
}

.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.skills-marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.skills-content {
  display: flex;
  gap: var(--space-sm);
  animation: marquee 40s linear infinite;
}

.marquee-right .skills-content {
  animation-direction: reverse;
}

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

.skill-pill {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.5rem;
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Timeline Section */
.timeline-section {
  padding-bottom: var(--space-xl);
}

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--border-subtle);
}

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

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

.timeline-marker {
  position: absolute;
  left: -2.35rem; /* Adjust to center on line */
  top: 0.4rem;
  width: 10px;
  height: 10px;
  background-color: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
}

.timeline-date {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.2rem;
}

.timeline-role {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.timeline-place {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.95rem;
  max-width: 600px;
}

/* Extra Section */
.extra-section {
  padding-bottom: var(--space-xl);
}

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

.extra-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: var(--space-md);
  border-radius: 8px;
}

.extra-card h4 {
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

/* Footer */
.footer {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

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

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.21, 0.92, 0.27, 0.99), transform 0.8s cubic-bezier(0.21, 0.92, 0.27, 0.99);
  will-change: opacity, visibility;
}

.fade-in-section.visible {
  opacity: 1;
  transform: none;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Enhanced hover animations */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.21, 0.92, 0.27, 0.99), box-shadow 0.3s cubic-bezier(0.21, 0.92, 0.27, 0.99);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Enhanced button animations */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-md);
  }

  .hero-image-container {
    order: -1;
  }

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

  .hero-actions {
    justify-content: center;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-preview {
    min-height: 200px;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}
