:root {
  --primary-color: #6c63ff;
  --secondary-color: #4f46e5;
  --accent-color: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --background-light: #f8fafc;
  --background-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --transition-fast: 0.15s ease-in-out;
  --transition-medium: 0.3s ease-in-out;
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-white);
  overflow-x: hidden;
}

/* Container and utility classes */
.container {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
}

/* Modern Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 2.4rem;
  font-size: 1.6rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  transition: var(--transition-medium);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  transition: var(--transition-medium);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.navbar-list {
  display: flex;
  list-style: none;
  gap: 3rem;
}

.navbar-link {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-medium);
  position: relative;
}

.navbar-link:hover {
  color: var(--primary-color);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-medium);
}

.navbar-link:hover::after {
  width: 100%;
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2.4rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* Hero Section Styles */
.hero {
  padding: 12rem 0 8rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.hero-content {
  order: 1;
}

.hero-banner {
  order: 2;
  position: relative;
  text-align: center;
}

.hero-image {
  width: 100%;
  max-width: 50rem;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-title {
  font-size: clamp(3.2rem, 5vw, 6.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.greeting {
  color: var(--text-secondary);
  font-weight: 400;
  display: block;
  font-size: 0.7em;
}

.name-highlight {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin: 0.5rem 0;
}

.role-text {
  color: var(--text-primary);
  display: block;
  font-size: 0.8em;
}

.hero-text {
  font-size: 1.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 3rem;
}

.btn-group {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stats-container {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 12rem;
}

.stat-number {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.stat-label {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.floating-badge {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--accent-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: 5rem;
  font-size: 1.4rem;
  font-weight: 500;
  animation: float 3s ease-in-out infinite;
}

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

/* About Section */
.about {
  background: var(--background-white);
}

.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-banner {
  position: relative;
  text-align: center;
}

.about-banner .img-cover {
  width: 100%;
  max-width: 40rem;
  height: 50rem;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.abs-img {
  position: absolute;
  bottom: -5rem;
  right: -3rem;
  width: 20rem;
  height: 15rem;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  border: 5px solid white;
}

.abs-icon {
  position: absolute;
  width: 6rem;
  height: 6rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: var(--shadow-md);
  animation: float 3s ease-in-out infinite;
}

.abs-icon-1 {
  top: 2rem;
  left: 2rem;
  animation-delay: 0s;
}

.abs-icon-2 {
  top: 10rem;
  right: 1rem;
  background: var(--accent-color);
  animation-delay: 1s;
}

.abs-icon-3 {
  bottom: 8rem;
  left: -1rem;
  background: var(--secondary-color);
  animation-delay: 2s;
}

.about-content {
  padding: 2rem;
}

.h2 {
  font-size: clamp(2.8rem, 4vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
}

/* Portfolio Section Styles */
.portfolio {
  background: var(--background-light);
  padding: 8rem 0;
}

.portfolio-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-subtitle {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(3.2rem, 4vw, 4.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.section-text {
  font-size: 1.8rem;
  color: var(--text-secondary);
  max-width: 60rem;
  margin: 0 auto;
  line-height: 1.6;
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 1rem 2rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-medium);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
  gap: 3rem;
  margin-bottom: 6rem;
}

.portfolio-item {
  opacity: 1;
  transform: scale(1);
  transition: var(--transition-medium);
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.modern-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-medium);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  height: 25rem;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(108, 99, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-medium);
}

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

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

.card-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: white;
  color: var(--primary-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-medium);
}

.action-btn:hover {
  transform: scale(1.1);
  background: var(--primary-color);
  color: white;
}

.card-content {
  padding: 2.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tags {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--background-light);
  color: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 1.2rem;
  font-weight: 500;
}

.card-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-description {
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1.5;
  margin-bottom: 2rem;
  flex: 1;
}

.card-stats {
  display: flex;
  gap: 2rem;
  margin-top: auto;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  color: var(--text-secondary);
}

.stat ion-icon {
  font-size: 1.6rem;
}

.portfolio-cta {
  text-align: center;
  padding: 4rem;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.portfolio-cta p {
  font-size: 1.8rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Skills Section */
.skills {
  background: var(--background-light);
}

.skills-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 3rem;
}

.skills-item {
  background: white;
  padding: 2.4rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-medium);
}

.skills-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.skills-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skills-data {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 600;
}

.skills-progress-box {
  background: var(--background-light);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.skills-progress {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 5px;
  transition: width 2s ease-in-out;
  position: relative;
}

.skills-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Contact Section */
.contact {
  background: var(--background-light);
}

.contact-card {
  background: white;
  padding: 6rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 80rem;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  gap: 2rem;
  margin-bottom: 4rem;
}

.contact-input {
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 1.6rem;
  font-family: inherit;
  transition: var(--transition-medium);
  width: 100%;
}

.contact-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

textarea.contact-input {
  min-height: 12rem;
  resize: vertical;
  font-family: inherit;
}

.wrapper {
  width: 100%;
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1.5rem 3rem;
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-medium);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.contact-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.contact-icon {
  width: 5rem;
  height: 5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.contact-item-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-item-link {
  font-size: 1.4rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.contact-item-link:hover {
  color: var(--primary-color);
}

/* Footer */
.footer {
  background-color: var(--text-primary);
  color: white;
  text-align: center;
  padding: 4rem 0;
  font-size: 1.4rem;
}

.back-to-top {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  background: var(--primary-color);
  color: white;
  padding: 1.2rem;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-medium);
  z-index: 100;
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--secondary-color);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  display: block;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--border-radius-lg);
  margin-top: 5%;
}

.close {
  position: absolute;
  top: 2rem;
  right: 4rem;
  color: white;
  font-size: 4rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close:hover {
  opacity: 0.7;
}

/* Animation keyframes */
#clock {
  animation: clockHand 5s infinite linear;
  transform-box: fill-box;
  transform-origin: bottom;
}

#leftTree, #righTree {
  animation: tree 2s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: bottom;
}

#man {
  animation: manBody 1s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: bottom;
}

#pc-circle {
  fill: #6ace66;
  stroke-width: 4;
  animation: change-light 4s linear infinite alternate;
}

@keyframes clockHand {
  from { transform: rotateZ(0deg); }
  to { transform: rotateZ(-360deg); }
}

@keyframes manBody {
  from { transform: rotateX(0deg); }
  to { transform: rotateX(10deg); }
}

@keyframes tree {
  from { transform: rotateZ(10deg); }
  to { transform: rotateZ(-20deg); }
}

@keyframes change-light {
  0% { stroke: #cd61f8; }
  25% { stroke: #6ace66; }
  75% { stroke: #2995c0; }
  100% { stroke: #e92949; }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero {
    padding: 10rem 0 6rem;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .hero-content {
    order: 2;
    text-align: center;
  }

  .hero-banner {
    order: 1;
  }

  .stats-container {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about .container {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }

  .about-banner {
    order: 1;
  }

  .about-content {
    order: 2;
  }

  .abs-img {
    position: static;
    margin-top: 2rem;
    width: 100%;
    max-width: 25rem;
    height: auto;
  }

  .abs-icon {
    position: static;
    display: inline-flex;
    margin: 1rem;
    width: 5rem;
    height: 5rem;
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    padding: 8rem 2rem 2rem;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition-medium);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar.active {
    left: 0;
    visibility: visible;
    opacity: 1;
  }

  .navbar-list {
    flex-direction: column;
    gap: 3rem;
    text-align: center;
  }

  .navbar-link {
    font-size: 2.4rem;
    padding: 1rem 0;
    font-weight: 600;
  }

  .nav-toggle-btn {
    display: block;
    z-index: 300;
    position: relative;
  }

  .close-icon {
    display: none;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portfolio-filter {
    gap: 1rem;
  }

  .filter-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.3rem;
  }

  .stats-container {
    gap: 1.5rem;
  }

  .stat-item {
    min-width: 10rem;
    padding: 1.5rem;
  }

  .btn-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .card-content {
    padding: 2rem;
  }

  .card-stats {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .contact-card {
    padding: 3rem;
  }

  .contact-list {
    flex-direction: column;
    gap: 2rem;
  }

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.8rem;
  }

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

  .portfolio-filter {
    flex-direction: column;
    align-items: center;
  }

  .floating-badge {
    top: 1rem;
    right: 1rem;
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
  }

  .container {
    padding: 0 1.5rem;
  }

  .section {
    padding: 6rem 0;
  }

  .hero-banner {
    text-align: center;
  }

  .hero-image {
    max-width: 30rem;
  }

  .floating-badge {
    position: static;
    display: inline-block;
    margin: 2rem auto;
    transform: none;
    animation: none;
  }
}

/* Smooth animations */
@media (prefers-reduced-motion: no-preference) {
  .portfolio-item {
    animation: fadeInUp 0.6s ease-out;
  }

  .portfolio-item:nth-child(2) { animation-delay: 0.1s; }
  .portfolio-item:nth-child(3) { animation-delay: 0.2s; }
}

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