/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 20px 0;
}

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

.logo h2 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.logo span {
  color: #00d4ff;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  letter-spacing: 0.3px;
}

.nav-link:hover,
.nav-link.active {
  color: #00d4ff;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #00d4ff;
  transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: center;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.code-square {
  width: 200px;
  height: 200px;
  border: 2px solid #00d4ff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.code-square i {
  font-size: 24px;
  color: #00d4ff;
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(26, 26, 26, 0.8);
  padding: 8px;
  border-radius: 50%;
  backdrop-filter: blur(5px);
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.hero-text h1 span {
  color: #00d4ff;
}

.hero-text h2 {
  font-size: 1.5rem;
  color: #cccccc;
  margin-bottom: 30px;
  font-weight: 300;
  letter-spacing: 1px;
}

.tech-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.tech-icons i {
  font-size: 2rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

.tech-icons i:hover {
  color: #00d4ff;
}

.tech-tags {
  color: #888888;
  font-size: 0.9rem;
  line-height: 1.8;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.tech-tags span {
  color: #ffffff;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 50px;
}

.section-visual {
  position: relative;
}

h2 {
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -1px;
}

.accent-dot {
  color: #00d4ff;
}

/* About Section */
.about {
  padding: 100px 0;
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  margin-bottom: 60px;
}

.about-text p {
  font-size: 1.1rem;
  color: #cccccc;
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-video {
  margin-top: 40px;
}

.about-video h3 {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 30px;
  font-weight: 600;
}

.video-container {
  position: relative;
  width: 400px;
  height: 350px;
  margin: 0 auto 20px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
  border: 2px solid #333333;
  transition: all 0.3s ease;
}

.video-container:hover {
  border-color: #00d4ff;
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 212, 255, 0.2);
}

.intro-video {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #1a1a1a;
}

.video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay {
  opacity: 1;
}

.video-overlay i {
  font-size: 4rem;
  color: #00d4ff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Formation Section */
.formation {
  padding: 100px 0;
}

.formation-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formation-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: #222222;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formation-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

.formation-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
}

.formation-icon.ui-ux {
  background-color: #8b5cf6;
}

.formation-icon.html-css {
  background-color: #f97316;
}

.formation-icon.css-grid {
  background-color: #3b82f6;
}

.formation-icon.javascript {
  background-color: #fbbf24;
}

.formation-icon.full-stack {
  background: linear-gradient(135deg, #f97316, #fbbf24);
}

.formation-content h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.formation-meta {
  display: flex;
  gap: 20px;
  color: #888888;
  font-size: 0.9rem;
}

/* Projects Section */
.projects {
  padding: 100px 0;
  background-color: #1a1a1a;
}

.projects-subtitle {
  color: #cccccc;
  font-size: 1.1rem;
  margin-bottom: 50px;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.project-card {
  background-color: #222222;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
  border-color: #00d4ff;
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-placeholder {
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.project-placeholder i {
  font-size: 2rem;
  color: #ffffff;
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.project-content p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tech span,
.project-tech .tech-tag {
  background-color: #333333;
  color: #00d4ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: "JetBrains Mono", "Courier New", monospace;
  letter-spacing: 0.3px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.project-tech .tech-tag:hover {
  background-color: #00d4ff;
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
  border-color: #00d4ff;
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: #00d4ff;
}

.project-link i {
  font-size: 0.8rem;
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background-color: #222222;
}

/* keep single contact-subtitle definition (merged) */
.contact-subtitle {
  text-align: center;
  color: #9fb8c9;
  margin-top: 8px;
  font-size: 14px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background-color: #1a1a1a;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.contact-item:hover {
  border-color: #00d4ff;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: #333333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
}

.contact-item span {
  flex: 1;
  font-weight: 500;
}

.contact-item i:last-child {
  color: #00d4ff;
  transition: transform 0.3s ease;
}

.contact-item:hover i:last-child {
  transform: translateX(5px);
}

/* Contact form improvements */
.contact form {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.02)
  );
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(3, 12, 24, 0.28);
  max-width: 780px;
  margin: 0 auto 20px;
  display: grid;
  gap: 12px;
}
.contact .form-group {
  display: grid;
  gap: 6px;
}
.contact label {
  font-size: 13px;
  color: #dbeaf5;
  font-weight: 600;
}
.contact input[type="text"],
.contact input[type="email"],
.contact textarea {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    transform 0.08s ease;
}
.contact input::placeholder,
.contact textarea::placeholder {
  color: rgba(230, 246, 255, 0.55);
  font-weight: 400;
}
.contact input:focus,
.contact textarea:focus {
  border-color: #5cc8ff;
  box-shadow: 0 10px 30px rgba(92, 200, 255, 0.1);
  transform: translateY(-1px);
}
.contact textarea {
  min-height: 140px;
  resize: vertical;
}
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #2db7ff, #5cc8ff);
  border: none;
  color: #06202a;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(45, 183, 255, 0.14);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
}
.btn-submit i {
  margin-left: 0;
  color: rgba(6, 32, 42, 0.85);
}
.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(45, 183, 255, 0.18);
}
.btn-submit:active {
  transform: translateY(-1px);
}

/* Skills section — improved styling */
.skills {
  padding: 48px 0;
}
.skills h2 {
  margin-bottom: 6px;
  font-size: 28px;
}
.skills-subtitle {
  color: #9fb8c9;
  margin-bottom: 18px;
  font-size: 14px;
}

/* Grid layout */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}

/* Skill card */
.skill-item {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(3, 12, 24, 0.18);
  display: grid;
  gap: 10px;
}

/* Header row: name + percent */
.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.skill-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #e6f6ff;
  font-size: 15px;
}
.skill-name i {
  color: #5cc8ff;
  font-size: 16px;
}

/* Percentage label */
.skill-level {
  background: rgba(92, 200, 255, 0.08);
  color: #cbeefc;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
}

/* Progress bar */
.skill-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2db7ff, #5cc8ff);
  width: 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(45, 183, 255, 0.12) inset;
  transition: width 1s cubic-bezier(0.22, 0.9, 0.3, 1);
}

/* Animate on load (only if JS adds .animate) */
.skill-bar-fill.animate {
  animation: fillWidth 1s ease forwards;
}
@keyframes fillWidth {
  from {
    width: 0;
  }
  to {
    width: var(--target, 80%);
  }
}

/* Accessibility focus */
.skill-item:focus-within {
  outline: 3px solid rgba(92, 200, 255, 0.12);
  transform: translateY(-2px);
}

/* Responsive: two columns on wider screens */
@media (min-width: 860px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

/* Small screens tweaks */
@media (max-width: 420px) {
  .skill-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .skill-level {
    align-self: flex-end;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  .hero-content {
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 3.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }

  .project-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .project-tech {
    gap: 6px;
  }
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 35px;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

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

  .project-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-tech {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }

  .hero-text h2 {
    font-size: 1.3rem;
  }

  .section-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  h2 {
    font-size: 2.2rem;
  }

  .about-content {
    max-width: 100%;
  }

  .about-text p {
    font-size: 1rem;
    padding: 0 10px;
  }

  .contact-links {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .tech-icons {
    justify-content: center;
    gap: 15px;
  }

  .tech-tags {
    text-align: center;
    font-size: 0.85rem;
  }

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

  .project-links {
    flex-direction: column;
    gap: 12px;
  }

  .project-tech {
    justify-content: center;
    gap: 8px;
  }

  .video-container {
    max-width: 100%;
    margin: 0 10px 20px;
  }

  .video-overlay i {
    font-size: 3rem;
  }

  .about-video h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .header {
    padding: 15px 0;
  }

  .nav ul {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .hero {
    padding-top: 70px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
  }

  .hero-text h2 {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
  }

  .code-square {
    width: 160px;
    height: 160px;
  }

  .code-square i {
    font-size: 20px;
    bottom: 15px;
    right: 15px;
  }

  .tech-icons {
    gap: 12px;
  }

  .tech-icons i {
    font-size: 1.5rem;
  }

  .tech-tags {
    font-size: 0.8rem;
    line-height: 1.6;
  }

  h2 {
    font-size: 1.8rem;
  }

  .about-text p {
    font-size: 0.95rem;
    padding: 0 5px;
  }

  .about-video h3 {
    font-size: 1.1rem;
  }

  .video-container {
    margin: 0 5px 15px;
  }

  .video-overlay i {
    font-size: 2.2rem;
  }

  .video-description {
    font-size: 0.85rem;
    padding: 0 10px;
  }

  .project-content {
    padding: 20px;
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .project-content p {
    font-size: 0.9rem;
  }

  .project-tech .tech-tag {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  .project-links {
    gap: 8px;
  }

  .project-link {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .contact-item {
    padding: 15px;
    gap: 12px;
  }

  .contact-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .contact-item span {
    font-size: 0.9rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #00d4ff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0099cc;
}

/* Small theme variables + compact tweaks */
:root {
  --accent: #00d4ff;
  --bg: #1a1a1a;
  --card: #222222;
  --muted: #9fb8c9;
}

/* Ensure skill bars use CSS custom property for target width */
.skill-bar-fill {
  /* fallback handled earlier; prefer explicit target via inline style or --target */
  width: var(--target, 0%);
  transition: width 1s cubic-bezier(0.22, 0.9, 0.3, 1);
}

/* Footer styles — improved */
.footer {
  padding: 28px 0;
  background: linear-gradient(
    180deg,
    rgba(6, 32, 42, 0.6),
    rgba(10, 10, 10, 0.85)
  );
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: #cfeffb;
  font-size: 0.95rem;
  backdrop-filter: blur(6px);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  opacity: 0.95;
  font-weight: 500;
}

.footer .footer-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted, #9fb8c9);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent, #00d4ff);
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.footer a:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

/* Compact layout on small screens */
@media (max-width: 520px) {
  .footer .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .footer .footer-meta {
    justify-content: center;
  }
  .footer {
    padding: 18px 0;
    font-size: 0.9rem;
  }
}
