/* Base styles */
:root {
  --background-color: #000;
  --text-color: #fff;
  --accent-color: #f0f0f0;
  --highlight-color: #64ffda;
  --border-color: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.03);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Light theme variables */
body.light-theme {
  --background-color: #fff;
  --text-color: #000;
  --accent-color: #333;
  --highlight-color: #0070f3;
  --border-color: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(0, 0, 0, 0.02);
}

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

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s;
}

/* Loading Animation */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--highlight-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  width: 50px;
  height: 26px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  position: relative;
  padding: 0 5px;
  transition: background-color 0.3s;
}

body.light-theme .theme-toggle label {
  background-color: rgba(0, 0, 0, 0.1);
}

.theme-toggle .slider {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--highlight-color);
  transition: 0.3s;
  left: 3px;
}

.theme-toggle input:checked + label .slider {
  transform: translateX(24px);
}

.theme-toggle .fa-moon {
  color: #f1c40f;
}

.theme-toggle .fa-sun {
  color: #f39c12;
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid var(--highlight-color);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.3s;
  z-index: 9999;
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background-color: var(--highlight-color);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: background-color 0.3s;
}

a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
.skills-list li:hover ~ .custom-cursor,
.theme-toggle:hover ~ .custom-cursor {
  width: 40px;
  height: 40px;
  border-color: var(--highlight-color);
  background-color: rgba(100, 255, 218, 0.1);
}

/* Container */
.container {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.content {
  max-width: 900px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Typography */
h1 {
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  background: linear-gradient(to right, var(--text-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--highlight-color);
}

h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  opacity: 0.8;
}

.highlight {
  color: var(--highlight-color);
  font-weight: 500;
  position: relative;
  display: inline-block;
  transition: color 0.3s;
}

/* Animated Text */
.animate-text {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}

.animate-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Intro section */
.intro {
  margin-bottom: 3rem;
  text-align: center;
}

.tagline {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
  color: var(--accent-color);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.info-card {
  position: relative;
  padding: 1.75rem;
  background-color: var(--card-bg);
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
}

/* Unique borders for each card */
.about {
  border-top: 2px solid var(--highlight-color);
}

.experience {
  border-right: 2px solid var(--highlight-color);
}

.education {
  border-bottom: 2px solid var(--highlight-color);
}

.skills {
  border-left: 2px solid var(--highlight-color);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--border-color);
  top: 0;
  bottom: 0;
  left: 20px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  margin-bottom: 20px;
}

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

.timeline-item::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--highlight-color);
  border-radius: 50%;
  left: 14px;
  top: 15px;
  z-index: 1;
}

/* Experience and Education items */
.experience-item, .education-item {
  margin-bottom: 1.25rem;
}

.experience-item:last-child, .education-item:last-child {
  margin-bottom: 0;
}

.company, .institution {
  color: var(--highlight-color);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.period {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

/* Skills list */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
}

.skills-list li {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.skills-list li:hover {
  background-color: rgba(100, 255, 218, 0.1);
  border-color: var(--highlight-color);
  transform: translateY(-2px);
}

.skills-list li:hover::after {
  content: attr(data-level);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--highlight-color);
  color: var(--background-color);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

/* Typed text animation */
.typed-text {
  font-weight: 500;
}

.cursor {
  display: inline-block;
  width: 2px;
  background-color: var(--highlight-color);
  animation: blink 1s infinite;
  height: 1.2em;
  position: relative;
  top: 3px;
}

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

/* Connect section */
.connect {
  margin-top: 3rem;
  text-align: center;
}

.social-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  justify-content: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--text-color);
  font-size: 1.25rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--highlight-color);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 50%;
  z-index: -1;
}

.social-links a:hover {
  color: var(--background-color);
  border-color: var(--highlight-color);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

.social-links a:hover::before {
  transform: scale(1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--background-color);
  padding: 2rem;
  border-radius: 4px;
  max-width: 600px;
  width: 90%;
  position: relative;
  border: 1px solid var(--border-color);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

#modal-image {
  width: 100%;
  height: auto;
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}

/* Media queries */
@media (max-width: 768px) {
  .container {
    padding: 2rem;
  }

  h1 {
    font-size: 3rem;
  }

  .tagline {
    font-size: 1.5rem;
  }

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

  .about, .experience, .education, .skills {
    border: none;
    border-left: 2px solid var(--highlight-color);
  }

  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .tagline {
    font-size: 1.25rem;
  }

  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .info-card {
    padding: 1.25rem;
  }

  .timeline-item {
    padding: 10px 30px;
  }
}

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

.intro {
  animation: fadeIn 0.8s ease-out forwards;
}

.info-card {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.about {
  animation-delay: 0.2s;
}

.experience {
  animation-delay: 0.3s;
}

.education {
  animation-delay: 0.4s;
}

.skills {
  animation-delay: 0.5s;
}

.social-links {
  animation: fadeIn 0.8s ease-out 0.6s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Particles Canvas */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Subtle gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(30, 30, 30, 0.5), transparent 70%);
  z-index: -1;
  transition: background 0.3s;
}

body.light-theme::before {
  background: radial-gradient(circle at top right, rgba(200, 200, 200, 0.5), transparent 70%);
}

/* Subtle noise texture */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  z-index: -1;
  opacity: 0.03;
  pointer-events: none;
}

