* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  cursor: none !important;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --primary: #ef4444;
  --primary-light: #fb7185;
  --gray: #666666;
  --card-bg: #ffffff;
  --skill-bg: #f9fafb;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  scroll-behavior: smooth;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}

.cursor-inner {
  position: relative;
  width: 10px;
  height: 10px;
  transition: width 0.15s ease, height 0.15s ease;
}

.cursor-inner .circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-light);
  transition: opacity 0.15s ease;
  opacity: 1;
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 2;
}

.cursor-inner .star {
  width: 18px;
  height: 18px;
  background: #ffd700;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;

  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.9))
    drop-shadow(0 0 14px rgba(255, 215, 0, 0.7))
    drop-shadow(0 0 28px rgba(255, 215, 0, 0.5))
    drop-shadow(0 0 40px rgba(255, 215, 0, 0.3));
}

.cursor-inner.hover {
  width: 18px;
  height: 18px;
}
.cursor-inner.hover .circle {
  opacity: 0;
}
.cursor-inner.hover .star {
  opacity: 1;
  animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(5deg);
  }
}

body.dark {
  --bg: #111111;
  --text: #eeeeee;
  --gray: #bbbbbb;
  --card-bg: #1a1a1a;
  --skill-bg: #222222;
}

body.dark .social-links a {
  background: rgba(85, 85, 85, 0.7);
  color: #ddd;
}

body.dark .social-links a:hover {
  background: #3a3a3a;
  color: var(--primary);
}

section {
  scroll-margin-top: 100px;
}

#language-toggle {
  width: 2.5rem;
  height: 1.7rem;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
}

#language-toggle img {
  width: 100%;
  height: 1.5rem;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(235, 221, 221, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
  z-index: 999;
}

.navbar .nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

body.dark .navbar {
  background: rgba(35, 34, 34, 0.7);
  border-color: #333;
}

.navbar a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

#darkToggle {
  width: 54px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: var(--gray);
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

#darkToggle::after {
  content: "☀️";
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: transform 0.3s ease, content 0.3s ease;
}

body.dark #darkToggle {
  background: var(--primary);
  border-color: var(--primary);
}

body.dark #darkToggle::after {
  content: "🌙";
  transform: translate(26px, -50%);
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #666;
  font-size: 22px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #eaeaea;
}

.welcome {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
}

.typing-wrapper {
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5rem);
  background: linear-gradient(90deg, #f87171, #ef4444, #fb7185);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  letter-spacing: -1px;
  animation: fadeIn 1.5s ease-in-out;
}

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

.about-me-title,
.projects-title,
.skills-title,
.contact-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--text);
  position: relative;
  margin-top: 25px;
}

.about-me-title::after,
.projects-title::after,
.skills-title::after,
.contact-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  margin: 0.5rem auto 0;
  border-radius: 999px;
}

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin: 25px 0 75px;
}

.about .avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.about .avatar:hover {
  transform: scale(1.05);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about h2 {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text);
}

.about h2 + p {
  font-weight: bold;
}

.about .info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.label {
  font-weight: 700;
  color: var(--text);
}

.about .info a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.about .info a:hover {
  color: var(--primary-light);
}

.projects .grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;
  margin: 25px 0 75px;
}

.projects .card {
  border: 1px solid #e5e5e5;
  padding: 1.5rem;
  width: 20rem;
  border-radius: 16px;
  background: var(--card-bg);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.projects .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
  border-color: var(--primary);
}

.projects .card h3 {
  font-weight: 600;
  color: var(--text);
}

.projects .card p {
  color: var(--gray);
  margin-top: 10px;
}

.card-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.card-links a {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  transition: background 0.3s ease;
}

.card-links a:hover {
  background: var(--primary-light);
}

.skills .some-skill {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 25px 0 75px;
}

.skills .some-skill span {
  border-radius: 30px;
  font-size: 1rem;
  background: var(--skill-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  transition: all 0.3s ease;
  color: var(--text);
}

.skills .some-skill span:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.contact {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin: 25px 0 75px;
}

.contact-info p {
  color: var(--text);
  text-align: center;
  word-break: break-word;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
}

.contact-form button {
  padding: 0.8rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: var(--primary-light);
}

footer {
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fafafa;
  border-top: 1px solid #eee;
}

body.dark footer {
  background: #1a1a1a;
  border-color: #333;
}

footer p {
  color: #888;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.divider {
  border-bottom: 1px solid #e5e5e5;
  width: 60%;
  margin: 1rem auto;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.3, 1);
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.8rem;
    justify-content: center;
  }

  .navbar .nav {
    order: 1;
    width: 100%;
    gap: 1.5rem;
    font-size: 0.9rem;
    justify-content: center;
  }

  #language-toggle,
  #darkToggle {
    order: 2;
  }

  .about {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .about .avatar {
    width: 150px;
    height: 150px;
  }
  .projects .card {
    width: 90%;
  }
  .typing-wrapper {
    font-size: clamp(2rem, 10vw, 3rem);
    text-align: center;
  }

  .social-links {
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
  }

  .social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .social-links i {
    line-height: 1;
    font-size: 22px;
  }

  .cursor {
    display: none !important;
  }
  * {
    cursor: auto !important;
  }
}
