/* ========== GOOGLE FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
  --header-height: 4rem;
  
  /* Colors */
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f4c75;
  --highlight-color: #e94560;
  --text-color: #333;
  --text-light: #666;
  --white-color: #fff;
  --light-gray: #f8f9fa;
  --border-color: #e9ecef;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--highlight-color) 100%);
  
  /* Typography */
  --body-font: 'Inter', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.5rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.8125rem;
  
  /* Font Weight */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;
  
  /* Margins */
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;
  
  /* Z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--white-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  color: var(--text-color);
  font-weight: var(--font-semi-bold);
  line-height: 1.2;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/* ========== REUSABLE CSS CLASSES ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 6rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: var(--mb-0-5);
  font-weight: var(--font-bold);
}

.section__subtitle {
  display: block;
  font-size: var(--normal-font-size);
  color: var(--text-light);
  text-align: center;
  margin-bottom: var(--mb-2-5);
}

.section__header {
  margin-bottom: var(--mb-3);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-accent);
  color: var(--white-color);
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
  font-size: var(--normal-font-size);
  transition: var(--transition);
  box-shadow: 0 4px 8px rgba(15, 76, 117, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 76, 117, 0.4);
}

.btn i {
  font-size: 1.1rem;
}

/* ========== HEADER & NAVIGATION ========== */
.header {
  width: 100%;
  background-color: var(--white-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: flex;
  flex-direction: column;
  color: var(--primary-color);
  font-weight: var(--font-bold);
  font-size: 1.1rem;
}

.nav__logo small {
  font-size: var(--smaller-font-size);
  color: var(--text-light);
  font-weight: var(--font-regular);
}

.nav__toggle {
  display: none;
}

.nav__list {
  display: flex;
  column-gap: 2rem;
}

.nav__link {
  display: flex;
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: var(--transition-fast);
  padding: 0.5rem 0;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: var(--transition-fast);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--accent-color);
}

/* ========== HERO SECTION ========== */
.hero {
  background: var(--gradient-primary);
  background-image: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTqwfZq8vXKv--Zo-j63AxNR7ty1EJNZKsJjg&s');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.8);
  z-index: 1;
}

.hero__container {
  position: relative;
  z-index: 2;
}

.hero__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
  text-align: center;
}

.hero__profile {
  display: flex;
  justify-content: center;
}

.hero__img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(250, 247, 247, 0.3);
  animation: float 6s ease-in-out infinite;
}

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

.hero__info {
  max-width: 500px;
  margin: 0 auto;
}

.hero__title {
  font-size: var(--h1-font-size);
  margin-bottom: var(--mb-1);
  font-weight: var(--font-bold);
}

.hero__name {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1-5);
  color: rgba(255, 255, 255, 0.9);
  font-weight: var(--font-medium);
}

.hero__description {
  margin-bottom: var(--mb-2-5);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.hero__button {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  animation: bounce 2s infinite;
}

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

.hero__scroll-text {
  font-size: var(--small-font-size);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero__scroll-arrow {
  font-size: 1.2rem;
}

/* ========== ABOUT SECTION ========== */
.about {
  background-color: var(--light-gray);
}

.about__content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--primary-color);
}

.about__text {
  margin-bottom: var(--mb-2);
  line-height: 1.7;
  color: var(--text-light);
}

.about__details {
  display: grid;
  gap: 2rem;
  margin-bottom: var(--mb-2-5);
}

.about__detail-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  margin-bottom: var(--mb-0-75);
  color: var(--primary-color);
}

.about__detail-title i {
  color: var(--accent-color);
  font-size: 1.2rem;
}

.about__detail-text {
  color: var(--text-light);
  line-height: 1.6;
}

.about__list {
  padding-left: 1rem;
}

.about__list li {
  position: relative;
  margin-bottom: var(--mb-0-5);
  color: var(--text-light);
}

.about__list li::before {
  content: '▶';
  position: absolute;
  left: -1rem;
  color: var(--highlight-color);
  font-size: 0.8rem;
}

.about__stats {
  display: grid;
  gap: 1.5rem;
}

.about__stat {
  background: var(--white-color);
  padding: 2rem 1rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.about__stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.about__stat-number {
  font-size: 2.5rem;
  font-weight: var(--font-bold);
  color: var(--primary-color);
  margin-bottom: var(--mb-0-5);
}

.about__stat-text {
  color: var(--text-light);
  font-size: var(--small-font-size);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========== SKILLS SECTION ========== */
.skills__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-bottom: var(--mb-3);
}

.skills__group {
  background: var(--white-color);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.skills__group-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-2);
  color: var(--primary-color);
  text-align: center;
}

.skills__list {
  display: grid;
  gap: 1.5rem;
}

.skill {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.skill__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mb-1);
}

.skill__name {
  font-weight: var(--font-medium);
  color: var(--text-color);
}

.skill__percentage {
  font-weight: var(--font-semi-bold);
  color: var(--accent-color);
}

.skill__bar {
  height: 8px;
  border-radius: 4px;
  background-color: var(--border-color);
  overflow: hidden;
}

.skill__progress {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
  width: 0;
  transition: width 2s ease-out;
}

.skills__action {
  text-align: center;
}

/* ========== PROJECTS SECTION ========== */
.projects {
  background: var(--light-gray);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project {
  background: var(--white-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.project:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.project__image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

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

.project:hover .project__image img {
  transform: scale(1.1);
}

.project__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(134, 134, 224, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project:hover .project__overlay {
  opacity: 1;
}

.project__links {
  display: flex;
  gap: 1rem;
}

.project__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white-color);
  color: var(--primary-color);
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
  transition: var(--transition);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.project__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.project__content {
  padding: 2rem;
}

.project__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--primary-color);
}

.project__description {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--mb-1-5);
}

.project__technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project__tech {
  background: var(--light-gray);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  border: 1px solid var(--border-color);
}

/* ========== CONTACT SECTION ========== */
.contact__content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact__info-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--primary-color);
}

.contact__info-text {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: var(--mb-2);
}

.contact__social-title {
  font-size: 1.1rem;
  margin-bottom: var(--mb-1);
  color: var(--primary-color);
}

.contact__social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.contact__social-link:hover {
  color: var(--accent-color);
  background: var(--light-gray);
}

.contact__social-link i {
  font-size: 1.5rem;
  width: 24px;
  text-align: center;
}

/* Contact Form */
.contact__form {
  background: var(--white-color);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.contact__form-group {
  margin-bottom: var(--mb-1-5);
}

.contact__form-label {
  display: block;
  margin-bottom: var(--mb-0-5);
  font-weight: var(--font-medium);
  color: var(--text-color);
}

.contact__form-input,
.contact__form-textarea {
  width: 100%;
  padding: 0.875rem;
  background: var(--light-gray);
  color: var(--text-color);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  transition: var(--transition);
  resize: vertical;
}

.contact__form-input:focus,
.contact__form-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.1);
}

.contact__form-textarea {
  min-height: 120px;
}

.contact__form-button {
  width: 100%;
  font-size: 1.1rem;
  padding: 1rem;
  justify-content: center;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--primary-color);
  color: var(--white-color);
  padding: 3rem 0 2rem;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mb-2);
}

.footer__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-25);
}

.footer__subtitle {
  font-size: var(--normal-font-size);
  color: rgba(255, 255, 255, 0.7);
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white-color);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: var(--transition);
}

.footer__social-link:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

.footer__copy {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--small-font-size);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  background: var(--gradient-accent);
  color: var(--white-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(15, 76, 117, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: var(--z-tooltip);
}

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

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 76, 117, 0.4);
}

/* ========== BREAKPOINTS ========== */

/* Large devices (desktops, 992px and up) */
@media screen and (max-width: 1200px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero__content {
    gap: 2rem;
  }
  
  .about__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about__stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Medium devices (tablets, 768px and up) */
@media screen and (max-width: 992px) {
  :root {
    --h1-font-size: 2rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
  }
  
  .section {
    padding: 4rem 0 2rem;
  }
  
  .hero__img {
    width: 220px;
    height: 220px;
  }
  
  .skills__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .projects__grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  
  .contact__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer__content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media screen and (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  /* Navigation */
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
  }
  
  .nav__burger {
    display: block;
  }
  
  .nav__close {
    display: none;
  }
  
  .nav__menu {
    position: fixed;
    background-color: var(--white-color);
    width: 90%;
    height: 100vh;
    top: 0;
    right: -100%;
    padding: 6rem 2rem 2rem;
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
  }
  
  .nav__menu.show-menu {
    right: 0;
  }
  
  .nav__list {
    display: flex;
    flex-direction: column;
    row-gap: 2.5rem;
  }
  
  .nav__link {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }
  
  .nav__menu.show-menu .nav__burger {
    display: none;
  }
  
  .nav__menu.show-menu .nav__close {
    display: block;
  }
  
  /* Hero */
  .hero {
    background-attachment: scroll;
  }
  
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero__img {
    width: 180px;
    height: 180px;
  }
  
  /* About */
  .about__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .about__stat {
    padding: 1.5rem 1rem;
  }
  
  .about__stat-number {
    font-size: 2rem;
  }
  
  /* Skills */
  .skills__content {
    grid-template-columns: 1fr;
  }
  
  .skills__group {
    padding: 1.5rem;
  }
  
  /* Projects */
  .projects__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project__links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .project__content {
    padding: 1.5rem;
  }
  
  /* Contact */
  .contact__form {
    padding: 2rem;
  }
  
  .contact__social-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  /* Back to top */
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 45px;
    height: 45px;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media screen and (max-width: 576px) {
  :root {
    --h1-font-size: 1.8rem;
    --h2-font-size: 1.4rem;
    --h3-font-size: 1.1rem;
  }
  
  .section {
    padding: 3rem 0 2rem;
  }
  
  .hero__img {
    width: 150px;
    height: 150px;
  }
  
  .hero__button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .about__stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .skills__group {
    padding: 1rem;
  }
  
  .skill {
    padding: 1rem;
  }
  
  .project__image {
    height: 200px;
  }
  
  .project__content {
    padding: 1rem;
  }
  
  .contact__form {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skill progress animation */
.skill__progress.animate {
  animation: progressBar 2s ease-out forwards;
}

@keyframes progressBar {
  from {
    width: 0;
  }
  to {
    width: var(--progress-width);
  }
}