:root {
  --bg-light: #ffffff;
  --bg-dark: #0a0a0a;
  --text-light: #2c2c2c;
  --text-dark: #e5e5e5;
  --text-muted-light: #666666;
  --text-muted-dark: #a0a0a0;
  --border-light: #e0e0e0;
  --border-dark: #2a2a2a;
  --accent: #007acc;
  --accent-hover: #005a9e;
  --card-bg-light: #fafafa;
  --card-bg-dark: #1a1a1a;
  --code-bg-light: #f5f5f5;
  --code-bg-dark: #151515;
}

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

body {
  font-family: "JetBrains Mono", monospace;
  line-height: 1.6;
  font-size: 14px;
  transition: all 0.3s ease;
  background: var(--bg-dark);
  color: var(--text-dark);
  overflow-x: hidden;
}

body.light {
  background: var(--bg-light);
  color: var(--text-light);
}

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

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

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--accent);
  }
  50% {
    box-shadow: 0 0 20px var(--accent), 0 0 30px var(--accent);
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  animation: fadeInUp 0.8s ease-out;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid var(--border-dark);
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--bg-dark);
  color: var(--text-dark);
  z-index: 1000;
  animation: float 3s ease-in-out infinite;
}

.light .theme-toggle {
  border-color: var(--border-light);
  background: var(--bg-light);
  color: var(--text-light);
}

.theme-toggle:hover {
  border-color: var(--accent);
  animation: pulse 0.5s ease-in-out;
}

.header {
  margin-bottom: 60px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-dark);
  animation: slideInLeft 0.8s ease-out;
}

.light .header {
  border-bottom-color: var(--border-light);
}

.header h1 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--accent);
  animation: typing 2s steps(15, end), blink 0.75s step-end infinite;
}

.light .header h1 {
  color: var(--text-light);
}

.header .subtitle {
  font-size: 16px;
  color: var(--text-muted-dark);
  margin-bottom: 20px;
  animation: slideInRight 0.8s ease-out 0.3s both;
}

.light .header .subtitle {
  color: var(--text-muted-light);
}

.header .links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.header .links a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.header .links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 122, 204, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.header .links a:hover::before {
  left: 100%;
}

.header .links a:hover {
  border-bottom-color: var(--accent);
  transform: translateY(-2px);
}

.section {
  margin-bottom: 50px;
  animation: fadeInUp 0.6s ease-out;
}

.section:nth-child(even) {
  animation: slideInLeft 0.6s ease-out;
}

.section:nth-child(odd) {
  animation: slideInRight 0.6s ease-out;
}

.section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
  position: relative;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.section:hover h2::after {
  width: 100%;
}

.light .section h2 {
  color: var(--text-light);
}

.section p {
  margin-bottom: 16px;
  color: var(--text-dark);
  animation: fadeInUp 0.6s ease-out;
}

.light .section p {
  color: var(--text-light);
}

.experience-item {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  transition: all 0.3s ease;
  animation: slideInLeft 0.6s ease-out;
}

.experience-item:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  transform: translateX(10px);
  animation: glow 2s ease-in-out infinite;
}

.light .experience-item {
  background: var(--card-bg-light);
  border-color: var(--border-light);
  border-left-color: var(--accent);
}

.experience-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.light .experience-item h3 {
  color: var(--text-light);
}

.experience-item .role {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
}

.experience-item .duration {
  font-size: 12px;
  color: var(--text-muted-dark);
  margin-bottom: 12px;
}

.light .experience-item .duration {
  color: var(--text-muted-light);
}

.experience-item p {
  font-size: 13px;
  color: var(--text-muted-dark);
}

.light .experience-item p {
  color: var(--text-muted-light);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-tag {
  background: var(--code-bg-dark);
  color: var(--text-dark);
  padding: 6px 10px;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.skill-tag:nth-child(odd) {
  animation-delay: 0.1s;
}

.skill-tag:nth-child(even) {
  animation-delay: 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  background: var(--bg-dark);
  transform: scale(1.1) rotate(5deg);
  animation: pulse 0.5s ease-in-out;
}

.light .skill-tag {
  background: var(--code-bg-light);
  color: var(--text-light);
  border-color: var(--border-light);
}

.light .skill-tag:hover {
  border-color: var(--accent);
  background: var(--bg-light);
}

.skill-icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.skill-tag:hover .skill-icon {
  transform: rotate(360deg);
}

.projects-category {
  margin-bottom: 40px;
}

.projects-category h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent);
  position: relative;
  padding-left: 20px;
}

.projects-category h3::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.projects-category:hover h3::before {
  transform: rotate(90deg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.project-card {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 20px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 122, 204, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.project-card:hover::before {
  left: 100%;
}

.light .project-card {
  background: var(--card-bg-light);
  border-color: var(--border-light);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 122, 204, 0.2);
}

.project-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
  position: relative;
  z-index: 1;
}

.light .project-card h3 {
  color: var(--text-light);
}

.project-card p {
  font-size: 13px;
  color: var(--text-muted-dark);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.light .project-card p {
  color: var(--text-muted-light);
}

.project-card a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.project-card a:hover {
  border-bottom-color: var(--accent);
  transform: translateX(5px);
}

.project-badges {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.project-badges img {
  height: 20px;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.project-badges img:hover {
  transform: scale(1.1);
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.github-stars {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.github-stars:hover {
  border-bottom-color: var(--accent);
  transform: translateX(5px);
}

.github-stars .star-count {
  font-weight: 500;
}

.chrome-store-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chrome-rating {
  color: var(--accent);
  font-size: 13px;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.chrome-rating:hover {
  border-bottom-color: var(--accent);
  transform: translateX(5px);
}

.chrome-rating .rating-score {
  font-weight: 500;
}

.chrome-rating .rating-count {
  font-size: 12px;
  opacity: 0.8;
}

.interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.interest-item {
  background: var(--code-bg-dark);
  color: var(--text-muted-dark);
  padding: 8px 14px;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.interest-item:nth-child(odd) {
  animation-delay: 0.1s;
}

.interest-item:nth-child(even) {
  animation-delay: 0.2s;
}

.interest-item:hover {
  border-color: var(--accent);
  background: var(--bg-dark);
  transform: translateY(-3px) rotate(2deg);
  animation: float 2s ease-in-out infinite;
}

.light .interest-item {
  background: var(--code-bg-light);
  color: var(--text-muted-light);
  border-color: var(--border-light);
}

.light .interest-item:hover {
  border-color: var(--accent);
  background: var(--bg-light);
}

.interest-icon {
  font-size: 12px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.interest-item:hover .interest-icon {
  transform: scale(1.3) rotate(360deg);
}

.footer {
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid var(--border-dark);
  text-align: center;
  color: var(--text-muted-dark);
  font-size: 12px;
  animation: fadeInUp 0.8s ease-out;
}

.light .footer {
  border-top-color: var(--border-light);
  color: var(--text-muted-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }

  .header h1 {
    font-size: 24px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .header .links {
    flex-direction: column;
    gap: 10px;
  }

  .project-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* Loading Animation */
.loading {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Scroll Animations - Enhanced but not hiding content */
@media (prefers-reduced-motion: no-preference) {
  .section {
    animation: fadeInUp 0.6s ease-out forwards;
  }

  .section:nth-child(2) {
    animation-delay: 0.1s;
  }
  .section:nth-child(3) {
    animation-delay: 0.2s;
  }
  .section:nth-child(4) {
    animation-delay: 0.3s;
  }
  .section:nth-child(5) {
    animation-delay: 0.4s;
  }
  .section:nth-child(6) {
    animation-delay: 0.5s;
  }

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