:root {
  --primary-color: #366091;
  --secondary-color: #a2bddd;
  --background-light: #f8f9fa;
  --background-dark: #255080;
  --text-dark: #333;
  --text-light: #666;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --highlight-bg: #e8f2ff;
  --skill: #667eea;
  --accent-color: #4CAF50;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #1a1a2e;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(
    135deg,
    #1a1a2e 0%,
    #16213e 25%,
    var(--primary-color) 50%,
    var(--secondary-color) 75%,
    #e8f2ff 100%
  );
  background-size: 400% 400%;
  /* animation: gradientShift 15s ease infinite; */
}

.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.shape {
  position: absolute;
  opacity: 0.1;
  animation: float 20s infinite linear;
}

.shape:nth-child(1) {
  top: 20%;
  left: 10%;
  width: 5rem;
  height: 5rem;
  background: rgba(54, 96, 145, 0.3);
  border-radius: 50%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.shape:nth-child(2) {
  top: 60%;
  left: 80%;
  width: 4rem;
  height: 4rem;
  background: rgba(162, 189, 221, 0.4);
  transform: rotate(45deg);
  animation-delay: -5s;
  animation-duration: 30s;
}

.shape:nth-child(3) {
  top: 30%;
  left: 70%;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(102, 126, 234, 0.3);
  border-radius: 30%;
  animation-delay: -10s;
  animation-duration: 20s;
}

.shape:nth-child(4) {
  top: 80%;
  left: 20%;
  width: 6rem;
  height: 1rem;
  background: rgba(54, 96, 145, 0.2);
  border-radius: 0.5rem;
  animation-delay: -15s;
  animation-duration: 35s;
}

.shape:nth-child(5) {
  top: 10%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  background: rgba(76, 175, 80, 0.3);
  border-radius: 50%;
  animation-delay: -8s;
  animation-duration: 22s;
}

.shape:nth-child(6) {
  top: 70%;
  left: 5%;
  width: 3rem;
  height: 3rem;
  background: rgba(162, 189, 221, 0.3);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation-delay: -12s;
  animation-duration: 28s;
}

.code-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  z-index: -1;
  opacity: 0.15;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  animation: codeScroll 45s linear infinite;
  white-space: pre;
  text-shadow: 0 0 1rem rgba(54, 96, 145, 0.5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: space-around;
  overflow: hidden;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-2rem) rotate(120deg);
  }
  66% {
    transform: translateY(2rem) rotate(240deg);
  }
  100% {
    transform: translateY(0) rotate(360deg);
  }
}

@keyframes codeScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3rem);
  }
}

.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(54, 96, 145, 0.15);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(0.125rem);
  animation: twinkleCode 4s infinite;
  white-space: nowrap;
  text-shadow: 0 0 0.5rem rgba(54, 96, 145, 0.6);
  z-index: -1;
  pointer-events: none;
}

@keyframes floatCode {
  0% {
    transform: translateX(-6rem) translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateX(calc(100vw + 6rem)) translateY(-3rem) rotate(5deg);
    opacity: 0;
  }
}

@keyframes twinkleCode {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
  }
  20% {
    opacity: 0.9;
    transform: scale(1.1) rotate(2deg);
  }
  80% {
    opacity: 0.9;
    transform: scale(1) rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) rotate(3deg);
  }
}

.container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 1rem;
}

.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(0.5rem);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
}

.profile-img {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: #ddd;
  display: block;
  border: 0.25rem solid #fff;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.header h1 {
  font-size: 2.5em;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.header p {
  font-size: 1.2em;
  color: var(--text-dark);
}

.contact-info {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  text-decoration: underline;
}

.section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(0.5rem);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
}

.section h2 {
  font-size: 2em;
  margin-bottom: 2rem;
  color: var(--text-dark);
  text-align: center;
}

.case-study {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--background-light);
  border-radius: 1rem;
  border-left: 0.25rem solid var(--primary-color);
}

.case-study:last-child {
  margin-bottom: 0;
}

.case-study h3 {
  font-size: 1.8em;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.case-study .subtitle {
  font-size: 1.1em;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.case-study p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.9em;
  font-weight: 500;
}

.highlight {
  background: var(--highlight-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
  border-left: 0.25rem solid var(--primary-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.expanded-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-detail {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 1rem;
  border-left: 0.25rem solid var(--primary-color);
}

.skill-detail h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2em;
}

.skill-detail ul {
  list-style: none;
  padding: 0;
}

.skill-detail li {
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.skill-detail li::before {
  /* content: "▶"; */
  content: "-";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  /* top: 50%; */
  /* transform: translateY(-50%); */
  /* top: 0.9rem;
  width: 0;
  height: 0;
  border-left: 0.5rem solid var(--primary-color);
  border-top: 0.25rem solid transparent;
  border-bottom: 0.25rem solid transparent; */
}

.experience-section {
  margin: 2rem 0;
}

.job-entry {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  border-left: 0.25rem solid var(--primary-color);
}

.job-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.job-company {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.job-description {
  line-height: 1.8;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.education-item {
  background: var(--background-light);
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 0.25rem solid var(--accent-color);
}

.education-degree {
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.education-school {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer {
  text-align: center;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.career-timeline {
  margin: 2rem 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-item {
  background: var(--background-light);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-align: center;
  border-left: 0.25rem solid var(--primary-color);
  flex: 0 1 auto;
  min-width: 8rem;
}

.timeline-year {
  font-size: 0.85em;
  color: var(--primary-color);
  font-weight: 600;
}

.timeline-role {
  font-size: 1em;
  font-weight: bold;
  color: var(--text-dark);
  margin-top: 0.25rem;
}

.timeline-arrow {
  font-size: 1.5em;
  color: var(--primary-color);
  font-weight: bold;
  flex: 0 0 auto;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.metric {
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
}

.metric-number {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-color);
}

.metric-label {
  font-size: 0.9em;
  color: var(--text-light);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }

  .header,
  .section {
    padding: 1rem;
  }

  .header h1 {
    font-size: 2em;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .timeline-item {
    min-width: 7rem;
    padding: 0.5rem 0.75rem;
  }

  .timeline-role {
    font-size: 0.9em;
  }

  .timeline-arrow {
    font-size: 1.2em;
  }

  .case-study {
    border-left: none;
    padding: 1rem;
  }

  .expanded-skills {
    grid-template-columns: 1fr;
  }

  /* Hide particles on mobile for better performance */
  .particle-container {
    display: none;
  }

  .code-pattern {
    display: none;
    /* opacity: 0.08; */
    /* opacity: 1; */
    /* font-size: 0.5rem; */
  }

  .floating-shapes .shape {
    animation-duration: 30s;
  }
}