:root {
  --primary: #0d9488;
  --primary-dark: #0c766e;
  --accent: #f472b6;
  --background: #f5f5f5;
  --background-dark: #1f2937;
  --text: #334155;
  --text-light: #e2e8f0;
  --placeholder: #64748b;
  --neon-glow: rgba(244, 114, 182, 0.5);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: min(92%, 1280px);
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}

.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.logo a {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.logo a:hover {
  color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--text);
  margin: 4px 0;
  transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.nav-link {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 500;
  color: var(--text);
  padding: 0.5rem;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.hero {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--text-light);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
  padding-top: 60px;
}

.hero-title {
  font-size: clamp(2.2rem, 9vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
  animation: slideIn 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
  animation: slideIn 1s ease-out 0.2s;
}

.hero-text {
  font-size: clamp(1rem, 3vw, 1.3rem);
  margin-bottom: 1.5rem;
  animation: slideIn 1s ease-out 0.4s;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--text-light);
  padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1.5rem, 4vw, 2rem);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  transition: var(--transition);
  box-shadow: 0 0 0 0 var(--neon-glow);
  position: relative;
  overflow: hidden;
  animation: pulse 1.5s infinite ease-in-out;
}

.btn:hover,
.btn:focus {
  background: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--neon-glow);
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:hover::after {
  width: 200px;
  height: 200px;
}

.contact-btn {
  display: block;
  margin: 0 auto;
  text-align: center;
}

.section {
  padding: clamp(2.5rem, 12vh, 5rem) 0;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
  animation: slideIn 1s ease-out 0.2s;
}

.section-text {
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  color: var(--text);
  margin: 1.5rem auto;
  animation: slideIn 1s ease-out 0.4s;
}

.about-content {
  display: flex;
  align-items: flex-start;
  gap: clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
}

.profile-img {
  width: clamp(160px, 15vw, 200px);
  height: clamp(160px, 15vw, 200px);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  flex-shrink: 0;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--neon-glow);
}

.about-text {
  flex: 1;
  max-width: 600px;
  text-align: left;
}

.contact .section-text {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--accent);
  font-weight: 500;
}

.link:hover,
.link:focus {
  color: var(--accent);
}

.link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.skills {
  background: var(--background-dark);
  color: var(--text-light);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(180px, 28vw, 240px), 1fr)
  );
  gap: clamp(1rem, 3vw, 1.5rem);
  margin-top: 2rem;
}

.skill-card {
  background: var(--background);
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-card:hover,
.skill-card:focus {
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.skill-title {
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.skill-text {
  font-size: clamp(0.9rem, 2.5vw, 0.95rem);
  color: var(--text);
}

.projects {
  background: var(--background);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(220px, 32vw, 300px), 1fr)
  );
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: 2rem;
}

.project-card {
  background: var(--background);
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover,
.project-card:focus {
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.project-content {
  flex-grow: 1;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-title {
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-text {
  font-size: clamp(0.9rem, 2.5vw, 0.95rem);
  color: var(--text);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.contact {
  background: var(--background-dark);
  color: var(--text-light);
}

.contact-form {
  max-width: min(90%, 640px);
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
}

.form-input,
.form-textarea {
  padding: clamp(0.8rem, 2.5vw, 1rem);
  border: 2px solid var(--text-light);
  border-radius: var(--border-radius);
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  font-weight: 400;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
  font-weight: 400;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--neon-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.resume {
  padding-bottom: clamp(3rem, 15vh, 6rem);
}

.footer {
  background: var(--primary);
  color: var(--text-light);
  padding: clamp(1.5rem, 5vh, 2.5rem) 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer .link {
  color: var(--text-light);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  padding: 0.5rem;
}

.footer .link:hover,
.footer .link:focus {
  color: var(--accent);
}

.chatbot-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-icon img {
  width: 24px;
  height: 24px;
  fill: var(--text-light);
}

.chatbot-icon:hover,
.chatbot-icon:focus {
  background: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--neon-glow);
}

.chatbot-window {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: clamp(280px, 90%, 320px);
  max-height: 400px;
  background: var(--background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: var(--primary);
  color: var(--text-light);
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem;
}

.chatbot-clear {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem;
}

.chatbot-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
}

.chatbot-message {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chatbot-message.user {
  text-align: right;
  color: var(--primary);
}

.chatbot-message.bot {
  text-align: left;
  color: var(--text);
}

.chatbot-loading {
  text-align: center;
  padding: 0.5rem;
  color: var(--primary);
  font-style: italic;
}

.chatbot-input {
  display: flex;
  padding: 0.8rem;
  background: var(--background);
  border-top: 1px solid var(--text-light);
}

.chatbot-input input {
  flex-grow: 1;
  padding: 0.5rem;
  border: 1px solid var(--text-light);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  color: var(--text);
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 5px var(--neon-glow);
}

.chatbot-input button {
  background: var(--accent);
  color: var(--text-light);
  border: none;
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.chatbot-input button:hover,
.chatbot-input button:focus {
  background: var(--primary);
}

.contact-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--primary);
  text-decoration: none;
}

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

@keyframes slideInMenu {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--neon-glow);
  }
  50% {
    box-shadow: 0 0 10px 5px var(--neon-glow);
  }
  100% {
    box-shadow: 0 0 0 0 var(--neon-glow);
  }
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  .hero-subtitle {
    font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  }
  .section-title {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
  }
  .section-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
  }
  .profile-img {
    width: 120px;
    height: 120px;
  }
  .about-content {
    flex-direction: column;
    align-items: center;
  }
  .about-text {
    text-align: center;
    max-width: 650px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: absolute;
    top: 60px;
    left: 0;
    box-shadow: var(--shadow-sm);
    z-index: 999;
  }
  .nav-links.active {
    display: flex;
    animation: slideInMenu 0.3s ease-out;
  }
  .nav-link {
    font-size: clamp(1rem, 3vw, 1.2rem);
    padding: 0.8rem;
  }
  .hero {
    min-height: calc(80vh - 60px);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  }
  .hero-title {
    font-size: clamp(1.8rem, 7vw, 3rem);
  }
  .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.4rem);
  }
  .hero-text {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  }
  .section-title {
    font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  }
  .section-subtitle {
    font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  }
  .contact .section-text {
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  }
  .project-image {
    aspect-ratio: 4 / 3;
  }
  .about-content {
    flex-direction: column;
  }
  .profile-img {
    margin-bottom: 1.5rem;
  }
  .about-text {
    text-align: center;
  }
  .chatbot-window {
    width: clamp(260px, 85%, 300px);
    max-height: 350px;
  }
}

@media (max-width: 640px) {
  .contact-form {
    max-width: 100%;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.8rem;
  }
  .hero-title {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
  }
  .hero-subtitle {
    font-size: clamp(0.9rem, 2.8vw, 1.2rem);
  }
  .hero-text {
    font-size: clamp(0.85rem, 2.3vw, 1rem);
  }
  .btn {
    padding: 0.5rem 1.2rem;
    font-size: clamp(0.85rem, 2.3vw, 0.95rem);
  }
  .section-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }
  .section-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  }
  .section-text {
    font-size: clamp(0.85rem, 2.3vw, 0.9rem);
  }
  .contact .section-text {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
  }
  .form-input,
  .form-textarea {
    padding: clamp(0.7rem, 2vw, 0.9rem);
    font-size: clamp(0.9rem, 2.3vw, 0.95rem);
  }
  .project-image {
    aspect-ratio: 3 / 2;
  }
  .profile-img {
    width: 100px;
    height: 100px;
  }
  .chatbot-icon {
    width: 40px;
    height: 40px;
  }
  .chatbot-icon img {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 1024px) {
  .about-content {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
  }
  .profile-img {
    margin-right: clamp(1.5rem, 3vw, 2rem);
  }
  .about-text {
    max-width: 650px;
    padding-top: 0.5rem;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1320px;
  }
  .hero-title {
    font-size: clamp(3rem, 7vw, 4.5rem);
  }
  .hero-subtitle {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
  }
  .section-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .section-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
  .about-content {
    max-width: 1100px;
  }
}
