/* --- ROOT CSS VARIABLES --- */
:root {
  --bg-primary: #0B0F19;
  --bg-secondary: #111827;
  --bg-card: #1F2937;
  
  --accent-orange: #F97316;
  --accent-hover: #FB923C;
  --accent-glow: rgba(249, 115, 22, 0.2);
  --accent-glow-strong: rgba(249, 115, 22, 0.4);
  
  --text-primary: #F9FAFB;
  --text-secondary: #CBD5E1;
  
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 1rem; /* 16px */
  --border-radius-lg: 1.5rem; /* 24px */
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* offset for fixed header */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

.text-accent {
  color: var(--accent-orange);
}

.text-secondary {
  color: var(--text-secondary);
}

.opacity-70 {
  opacity: 0.7;
}

/* --- LAYOUT UTILS --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
  z-index: 2;
}

.bg-alt {
  background-color: var(--bg-secondary);
}

/* --- BACKGROUND GLOW --- */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(11, 15, 25, 0) 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  filter: blur(80px);
}
.bg-glow.top-left {
  top: -200px;
  left: -200px;
}
.bg-glow.bottom-right {
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.1) 0%, rgba(11, 15, 25, 0) 70%);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: #fff;
  box-shadow: 0 4px 14px 0 var(--accent-glow);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 20px 0 var(--accent-glow-strong);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background-color: rgba(249, 115, 22, 0.05);
}

.btn-block {
  width: 100%;
  padding: 1rem;
}

.circle-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.circle-btn:hover {
  background-color: var(--accent-orange);
  border-color: var(--accent-orange);
  box-shadow: 0 0 15px var(--accent-glow-strong);
  transform: scale(1.1);
}

/* --- SECTION HEADER --- */
.section-header {
  margin-bottom: 4rem;
  text-align: center;
}
.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.title-line {
  height: 4px;
  width: 60px;
  background-color: var(--accent-orange);
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* --- 1. NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.navbar.menu-active {
  background: var(--bg-card) !important;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links li {
  position: relative;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.8;
  position: relative;
  padding: 0.5rem 0;
}
.nav-link:hover, .nav-link.active {
  opacity: 1;
  color: var(--text-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-orange);
  transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
}

/* --- 2. HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.greeting {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.5rem;
}
.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  background: linear-gradient(to right, #fff, #9ca3af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-role {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero-desc {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.hero-cta {
  display: flex;
  gap: 1rem;
}
.hero-visual {
  position: relative;
}
.image-wrapper {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.hero-img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.image-wrapper:hover .hero-img {
  transform: scale(1.05);
}
.img-glow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  box-shadow: inset 0 0 40px rgba(249, 115, 22, 0.2);
  pointer-events: none;
}
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--text-secondary);
  animation: bounce 2s infinite;
  opacity: 0.7;
}

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

/* --- 3. ABOUT ME --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-desc {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.stat-card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.stat-icon {
  font-size: 2rem;
  color: var(--accent-orange);
  margin-bottom: 0.5rem;
}
.stat-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}
.stat-card p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* --- 4. SKILLS SECTION --- */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.skill-category {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}
.skill-category:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(249, 115, 22, 0.05);
}
.category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.category-title i {
  color: var(--accent-orange);
  font-size: 1.5rem;
}
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.9rem;
  text-align: center;
  transition: var(--transition);
}
.skill-item:hover {
  border-color: rgba(249, 115, 22, 0.4);
  background-color: rgba(249, 115, 22, 0.05);
  color: var(--accent-orange);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.skill-item i {
  font-size: 2.5rem;
}

/* --- 5. FEATURED PROJECTS --- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.project-card {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}
.project-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}
.project-img-wrapper {
  position: relative;
  overflow: hidden;
}
.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(11, 15, 25, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.project-card:hover .project-img {
  transform: scale(1.05);
}
.project-links {
  display: flex;
  gap: 1rem;
  transform: translateY(20px);
  transition: var(--transition);
}
.project-card:hover .project-links {
  transform: translateY(0);
}
.project-info {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.project-desc {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-badge {
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--accent-orange);
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* --- 6. EXPERIENCE --- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background-color: rgba(255, 255, 255, 0.1);
}
.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--accent-orange);
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-glow-strong);
}
.timeline-content {
  background-color: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}
.timeline-content:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateX(5px);
}
.timeline-date {
  color: var(--accent-orange);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.timeline-company {
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- 7. CERTIFICATIONS --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.cert-card {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: var(--transition);
}
.cert-card:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transform: translateY(-5px);
}
.cert-icon {
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--accent-orange);
  width: 50px;
  height: 50px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.cert-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.cert-org {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.cert-date {
  font-size: 0.8rem;
  color: var(--accent-orange);
  font-weight: 500;
}

/* --- 8. SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.service-card {
  background-color: var(--bg-card);
  padding: 2.5rem 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: var(--transition);
}
.service-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  transform: translateY(-8px);
}
.service-icon {
  font-size: 3rem;
  color: var(--accent-orange);
  margin-bottom: 1.5rem;
}
.service-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.service-desc {
  font-size: 0.95rem;
}

/* --- 9. CONTACT --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact-heading {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.contact-text {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.method-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-orange);
}
.method-details span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.method-details a {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
}
.method-details a:hover {
  color: var(--accent-orange);
}
.social-links {
  display: flex;
  gap: 1rem;
}
.social-links a {
  width: 45px;
  height: 45px;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}
.social-links a:hover {
  background-color: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--accent-glow-strong);
}

.contact-form-container {
  background-color: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* --- 10. FOOTER --- */
.footer {
  background-color: var(--bg-primary);
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.copyright {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--accent-orange);
}
.footer-social {
  display: flex;
  gap: 1rem;
}
.footer-social a {
  font-size: 1.5rem;
  color: var(--text-secondary);
}
.footer-social a:hover {
  color: var(--accent-orange);
}

/* --- ANIMATIONS & REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay {
  transition-delay: 0.2s;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 968px) {
  .hero-container,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid .project-card {
    grid-template-columns: 1fr;
  }
  
  .hero-content {
    order: 2;
    text-align: center;
  }
  .hero-visual {
    order: 1;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    clip-path: circle(0% at top right);
    transition: clip-path 0.4s ease-in-out;
  }
  .nav-links.active {
    clip-path: circle(150% at top right);
  }
  .nav-links li {
    padding: 1rem 0;
  }
  .nav-links.active li {
    animation: fadeInSlideUp 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
  }
  .nav-links li:nth-child(1) { animation-delay: 0.1s; }
  .nav-links li:nth-child(2) { animation-delay: 0.15s; }
  .nav-links li:nth-child(3) { animation-delay: 0.2s; }
  .nav-links li:nth-child(4) { animation-delay: 0.25s; }
  .nav-links li:nth-child(5) { animation-delay: 0.3s; }
  .nav-links li:nth-child(6) { animation-delay: 0.35s; }

  .nav-right .btn-primary {
    display: none;
  }
  
  @keyframes fadeInSlideUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
  position: fixed;
  bottom: -50px;
  right: 2rem;
  width: 45px;
  height: 45px;
  background-color: var(--accent-orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 999;
  box-shadow: 0 4px 15px var(--accent-glow-strong);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}
.back-to-top.active {
  bottom: 2rem;
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background-color: var(--accent-hover);
  transform: translateY(-5px);
}

/* --- CUSTOM CURSOR --- */
@media (min-width: 968px) {
  body {
    cursor: none;
  }
  a, button, input, textarea {
    cursor: none;
  }
  .cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-orange);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
  }
  .cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(249, 115, 22, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
  }
}
@media (max-width: 967px) {
  .cursor-dot, .cursor-outline {
    display: none;
  }
}
