:root {
  --primary-color: #ff6b6b;
  --primary-hover: #ff5252;
  --primary-rgb: 255, 107, 107;
  --bg-dark: #1a1a2e;
  --bg-gradient-start: #1a1a2e;
  --bg-gradient-mid: #16213e;
  --bg-gradient-end: #0f3460;
  --text-white: #ffffff;
  --text-muted: #b0b0b0;
  --text-gray: #8a8a8a;
}

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

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

body {
  font-family: "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-white);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-white);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

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

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

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

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 5% 60px;
  min-height: 100vh;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  animation: slideInLeft 1s ease-out;
}

.hero-title {
  font-size: 4rem;
  font-weight: 300;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-title .dot {
  color: var(--primary-color);
  font-size: 5rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  border-left: 3px solid var(--primary-color);
  padding-left: 15px;
}

.hero-description {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 40px;
  background: linear-gradient(45deg, var(--text-white), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  padding: 15px 30px;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Skills Section */
.skills {
  overflow: hidden;
  padding: 2rem 0;
  border-top: 1px solid #1e293b;
  position: relative;
  width: 100vw;
  left: calc(-50vw + 50%);
}

.skills-track {
  display: inline-flex;
  gap: 3rem;
  padding-right: 3rem;
  /* important for seamless loop */
  align-items: center;
  white-space: nowrap;
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.skill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-gray);
  transition: color 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.skill svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.skill:hover {
  color: var(--primary-color);
  transform: scale(1.1) translateY(-5px);
  text-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.skill:hover svg {
  filter: drop-shadow(0 0 6px rgba(var(--primary-rgb), 0.5));
  transform: scale(1.15);
}

.skills:hover .skills-track {
  animation-play-state: paused;
}

/* Hero Image */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: slideInRight 1s ease-out;
}

.image-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.circle-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), #ff8a65);
  opacity: 0.8;
  animation: pulse 3s ease-in-out infinite;
}

.profile-image {
  position: relative;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  margin: 25px;
  border: 5px solid rgba(255, 255, 255, 0.1);
}

/* Decorative Elements */
.deco-arrow {
  position: absolute;
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.3;
  animation: float 3s ease-in-out infinite;
}

.deco-arrow.left {
  top: 20%;
  left: -10%;
  transform: rotate(-45deg);
}

.deco-arrow.right {
  bottom: 20%;
  right: -10%;
  transform: rotate(135deg);
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  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) rotate(-45deg);
  }

  50% {
    transform: translateY(-10px) rotate(-45deg);
  }
}

.deco-arrow.right {
  animation-name: floatRight;
}

@keyframes floatRight {

  0%,
  100% {
    transform: translateY(0px) rotate(135deg);
  }

  50% {
    transform: translateY(-10px) rotate(135deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(22, 33, 62, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 5% 40px;
  }

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

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .image-container {
    width: 300px;
    height: 300px;
  }

  .profile-image {
    width: 250px;
    height: 250px;
  }

  .skills {
    padding: 1rem 0;
  }

  .skills-track {
    animation-duration: 15s;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator::before {
  content: "\2193";
  font-size: 24px;
  color: var(--primary-color);
}

/* About Section */
.about {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.02);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: center;
}

.services {
  position: relative;
}

.services::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}

.service-item {
  display: flex;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}

.service-item::before {
  content: "";
  position: absolute;
  left: 19px;
  width: 14px;
  height: 14px;
  background: var(--primary-color);
  border-radius: 50%;
  z-index: 2;
}

.service-icon {
  margin-left: 60px;
  margin-right: 20px;
  padding: 15px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.service-item:hover .service-icon {
  background: rgba(var(--primary-rgb), 0.2);
  transform: scale(1.05);
}

.service-item h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-white);
}

.about-text h2 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--text-white);
}

.about-text p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 50px;
}

.stats {
  display: flex;
  gap: 60px;
}

.stat-item {
  text-align: left;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: bold;
  color: var(--text-white);
  margin-bottom: 10px;
}

.plus,
.percent {
  color: var(--primary-color);
  font-size: 2.5rem;
}

.stat-label {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.4;
}

/* Resume Section */
.resume-section {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.02);
}

.resume-container {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.resume-container embed {
  border-radius: 10px;
  border: none;
}

.resume-fallback {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: var(--text-muted);
}

.resume-fallback a {
  color: var(--primary-color);
  text-decoration: none;
}

.resume-fallback a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .resume-container embed {
    display: none;
  }

  .resume-fallback {
    display: block !important;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 20px;
    border-radius: 10px;
  }

  .resume-fallback a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
  }
}

/* Certifications Section */
.certifications {
  padding: 100px 0;
}

.cert-grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 30px;
}

.cert-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cert-card:hover {
  box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.cert-image {
  position: relative;
  overflow: hidden;
  height: 360px;
}

.cert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}



.cert-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cert-card:hover .cert-overlay {
  opacity: 1;
}

.cert-title {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  background: rgba(var(--primary-rgb), 0.2);
}

@media (max-width: 768px) {
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Projects Section */
.projects {
  padding: 100px 0;
}

.section-title {
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-white);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
}

.project-grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.3s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 46, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.project-link {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.project-link-disabled {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 10px;
}

.project-info p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  padding: 5px 12px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  border-radius: 15px;
  font-size: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.3);
}

/* Responsive Design Updates */
@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .stats {
    flex-direction: column;
    gap: 30px;
  }

  .stat-item {
    text-align: center;
  }

  .about-text h2 {
    font-size: 2.5rem;
    text-align: center;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services::before {
    display: none;
  }

  .service-item::before {
    display: none;
  }

  .service-icon {
    margin-left: 0;
  }

  .service-item {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 15px;
  }
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.02);
}

.contact-subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 60px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-content {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 60px;
  margin-bottom: 60px;
}

.contact-info {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  width: 100%;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  min-width: 200px;
}

.contact-icon {
  padding: 20px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  transition: all 0.3s ease;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item:hover .contact-icon {
  background: rgba(var(--primary-rgb), 0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.15);
}

.contact-details h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 10px;
}

.contact-details p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}



.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--primary-color);
  border-color: rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.1);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 40px 0;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-content p {
  color: var(--text-gray);
  font-size: 14px;
}

.heart {
  color: var(--primary-color);
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  50%,
  100% {
    transform: scale(1);
  }

  25%,
  75% {
    transform: scale(1.1);
  }
}

/* Contact Responsive Design */
@media (max-width: 768px) {
  .contact-info {
    flex-direction: column;
    gap: 40px;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* Inline style replacements */
.project-collab-note {
  font-size: 0.9em;
  opacity: 0.9;
  font-style: italic;
}

.project-nda-note {
  color: var(--primary-color);
  opacity: 0.8;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--text-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

/* Active nav link */
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  width: 100%;
}

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

  .particle {
    display: none;
  }
}

/* Background particles */
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.1;
  animation: float-particles 8s linear infinite;
}

@keyframes float-particles {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.1;
  }

  90% {
    opacity: 0.1;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}