:root {
  --primary-color: #e94560;
  --primary-hover: #d63050;
  --dark-navy: #1a1a2e;
  --text-primary: #333;
  --text-secondary: #555;
  --text-light: #666;
  --bg-light: #f8f8f8;
  --bg-white: #fff;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.15);
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
}

/* Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary-color);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease-out;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--bg-white);
}

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

.nav-links a {
  color: var(--bg-white);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: #ff0088;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a1a2e 100%);
  background-size: 300% 300%;
  animation: gradientShift 20s ease infinite;
  color: var(--bg-white);
  padding: 0 2rem;
  position: relative;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
  animation: fadeInDown 1s ease-out;
}

.hero .title {
  font-size: 3.5rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  animation: fadeInDown 1s ease-out 0.2s both;
}

.hero .hero-tagline {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  animation: fadeInDown 1s ease-out 0.3s both;
  min-height: 1.6em;
}

/* Typing Effect */
.typing-cursor {
  animation: blink 1s infinite;
  font-weight: 100;
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Hero Scroll Indicator */
.scroll-indicator-hero {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  cursor: pointer;
  text-decoration: none;
}

.scroll-indicator-hero span {
  display: block;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.scroll-indicator-hero:hover span {
  color: var(--primary-hover);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

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

/* Main Content */
main {
  padding-top: 2rem;
}

section {
  padding: 1rem 4rem;
  max-width: 900px;
  margin: auto;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--dark-navy);
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
}

/* About Section */
#about p {
  text-align: justify;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.skill-category, .portfolio-item {
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.skill-category {
  padding: 1.5rem;
}

.skill-category:hover, .portfolio-item:hover, .featured-project-card:hover, .project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.skill-category h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-navy);
}

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

.skill-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.skill-list li:last-child {
  border-bottom: none;
}

/* Experience Timeline */
.portfolio-grid {
  position: relative;
  padding: 2rem 0 2rem 2rem;
}

/* Timeline line */
.portfolio-grid::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-color), rgba(233, 69, 96, 0.3));
}

.portfolio-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 2rem;
}

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

/* Timeline dot */
.portfolio-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  background: var(--bg-white);
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.2);
}

/* Current position indicator */
.portfolio-item.current::before {
  background: var(--primary-color);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-item h3 {
  margin: 0.5rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--dark-navy);
}

.portfolio-role {
  font-size: 0.95rem;
  color: var(--text-light);
  margin: 0 0 1rem;
  font-style: italic;
  font-weight: 500;
}

.portfolio-item p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.portfolio-tags, .project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-tags span, .project-tech span {
  background: #f0f0f0;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-light);
  transition: background 0.3s ease;
}

.portfolio-tags span:hover, .project-tech span:hover {
  background: #e0e0e0;
}

.counter {
  display: inline-block;
}

/* Featured Project Section */
#featured-project, #contact {
  text-align: center;
}

#featured-project {
  margin-bottom: 2.5rem;
}

#featured-project h2, #contact h2 {
  display: block;
}

#featured-project h2::after, #contact h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.featured-project-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.view-all-projects-btn, .contact-btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--bg-white);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.view-all-projects-btn {
  padding: 0.75rem 1.5rem;
}

.view-all-projects-btn:hover, .contact-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* Projects Page */
.projects-page-main {
  padding-top: 6rem;
}

.projects-intro {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 700px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--dark-navy);
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.project-link {
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform 0.2s ease;
  display: inline-block;
}

.project-link:hover {
  transform: scale(1.2);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.projects-cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 8px;
}

.projects-cta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

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

.nav-brand a {
  color: inherit;
  text-decoration: none;
}

/* Contact Section */
#contact {
  margin-bottom: 2rem;
}

.contact-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.contact-btn {
  padding: 0.75rem 2rem;
}

.contact-btn-secondary {
  background: transparent;
  border: 2px solid var(--dark-navy);
  color: var(--dark-navy);
  box-shadow: none;
}

.contact-btn-secondary:hover {
  background: var(--dark-navy);
  color: var(--bg-white);
  box-shadow: none;
}

/* Footer */
footer {
  background: var(--dark-navy);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}

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

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

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

/* Animations */
.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.show {
  opacity: 1;
  transform: none;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--bg-white);
  position: relative;
  transition: background var(--transition);
}

.hamburger::before, .hamburger::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 3px;
  background: var(--bg-white);
  left: 0;
  transition: transform var(--transition);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
    order: 3;
  }

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

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem;
    font-size: 1rem;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

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

  section {
    padding: 3rem 1.5rem;
  }

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

  .portfolio-grid {
    padding: 1.5rem 0 1.5rem 1.5rem;
  }

  .portfolio-item {
    padding-left: 1.5rem;
  }

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

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .nav-brand {
    font-size: 1rem;
  }

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

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
