/* RESET & GLOBALS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
}

:root {
  --bg-dark: #050505;
  --bg-surface: #0c0c0c;
  --bg-card: #111111;
  --accent-orange: #f97316;
  --accent-glow: rgba(249, 115, 22, 0.4);
  --text-primary: #fefefe;
  --text-secondary: #b0b0b0;
  --border-glow: 1px solid rgba(249, 115, 22, 0.2);
  --transition-smooth: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-orange);
  border-radius: 8px;
}

section {
  padding: 8rem 8%;
  min-height: 100vh;
}

.heading {
  font-size: 3.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4rem;
  letter-spacing: -0.02em;
}
.heading span {
  background: linear-gradient(135deg, #f97316, #ff4d2e);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 8%;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid rgba(249, 115, 22, 0.15);
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: white;
}
.logo span {
  background: linear-gradient(120deg, #f97316, #ff7a2f);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.navbar {
  display: flex;
  gap: 2.5rem;
}
.navbar a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition-smooth);
  position: relative;
}
.navbar a:hover {
  color: var(--accent-orange);
}
.navbar a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-orange);
  transition: 0.25s ease;
}
.navbar a:hover::after {
  width: 100%;
}
.gradient-btn {
  background: linear-gradient(95deg, #f97316, #ff5722);
  padding: 0.7rem 1.6rem;
  border-radius: 40px;
  font-weight: 600;
  color: white;
  transition: 0.25s;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}
.gradient-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}
#menu-icon {
  font-size: 2rem;
  color: var(--accent-orange);
  display: none;
  cursor: pointer;
}

/* HERO */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding-top: 10rem;
}
.home-content {
  flex: 1;
}
.home-content h1 {
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1.2;
}
.home-content h3 {
  font-size: 1.8rem;
  margin: 1rem 0;
  color: var(--text-secondary);
}
.home-content p {
  font-size: 1.05rem;
  color: #b5b5b5;
  max-width: 550px;
  margin-top: 1rem;
}
.social-icons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}
.social-icons a {
  background: #161616;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--accent-orange);
  transition: 0.2s;
  border: 1px solid rgba(249,115,22,0.3);
}
.social-icons a:hover {
  background: var(--accent-orange);
  color: #111;
  transform: translateY(-4px);
}
.btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.btn {
  padding: 0.8rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.2s;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  border: none;
}
.btn-primary {
  background: var(--accent-orange);
  color: #111;
  box-shadow: 0 6px 14px rgba(249,115,22,0.3);
}
.btn-primary:hover {
  background: #ff6a1a;
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent-orange);
  color: var(--accent-orange);
}
.btn-outline:hover {
  background: rgba(249,115,22,0.1);
  transform: translateY(-2px);
}
.home-img {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  padding-right: 40px;
}

.img-glow {
  width: 440px;
  height: 440px;
  border-radius: 30%;
  overflow: hidden;
  position: relative;
  transition: 0.4s ease;
}

.img-glow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30%;
  transition: 0.4s ease;
}

.img-glow::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 35%;
  background: radial-gradient(
    circle at center,
    rgba(249, 115, 22, 0.35),
    rgba(249, 115, 22, 0.15),
    transparent 75%
  );
  z-index: -1;
  filter: blur(28px);
  opacity: 0.85;
  transition: 0.4s ease;
}

.img-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30%;
  border: 1.8px solid rgba(249,115,22,0.3);
}

.img-glow:hover {
  transform: translateY(-8px) scale(1.03);
}

.img-glow:hover::before {
  opacity: 1;
  filter: blur(32px);
}

.img-glow:hover img {
  transform: scale(1.04);
}

/* ABOUT SECTION */
.about {
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

.about-container {
  max-width: 1400px;
  margin: 0 auto;
}

.about-header {
  text-align: center;
  margin-bottom: 4rem;
}

.about-header .heading {
  margin-bottom: 0;
  font-size: 3.8rem;
  line-height: 1.2;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.about-main {
  padding-right: 2rem;
}

.lead-text {
  font-size: 1.3rem;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.stats-row {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 1.8rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  transition: 0.2s;
}

.stat-item:hover {
  border-color: var(--accent-orange);
  background: rgba(249, 115, 22, 0.05);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.deep-dive h3 {
  font-size: 1.3rem;
  margin: 1.8rem 0 1rem 0;
  color: var(--accent-orange);
  font-weight: 600;
}

.deep-dive p {
  color: #c0c0c0;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.timeline-modern {
  margin-top: 1.5rem;
}

.timeline-item-modern {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  position: relative;
  padding-left: 0;
}

.timeline-year {
  min-width: 100px;
  font-weight: 700;
  color: var(--accent-orange);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.timeline-content-modern {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  border-left: 2px solid var(--accent-orange);
}

.timeline-content-modern h4 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.timeline-content-modern p {
  font-size: 0.85rem;
  color: #aaa;
  margin: 0;
}

.about-quote-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(0, 0, 0, 0.3));
  border-radius: 2rem;
  padding: 2.5rem;
  border: 1px solid rgba(249, 115, 22, 0.3);
  position: relative;
  backdrop-filter: blur(10px);
  height: fit-content;
}

.quote-icon {
  font-size: 5rem;
  color: var(--accent-orange);
  opacity: 0.5;
  font-family: serif;
  line-height: 1;
  margin-bottom: 1rem;
}

.quote-text {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #f0f0f0;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.author-line {
  width: 40px;
  height: 2px;
  background: var(--accent-orange);
}

.quote-author span {
  font-weight: 600;
  color: #ddd;
  letter-spacing: 0.5px;
}

.tech-stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.tech-stack-tags span {
  background: rgba(249, 115, 22, 0.12);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.hidden-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease-out;
}

.hidden-content.show {
  max-height: 800px;
}

.read-more-btn {
  margin-top: 1.5rem;
  cursor: pointer;
}

/* SKILLS SECTION */
.skills {
  background: var(--bg-dark);
}
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.skills-card {
  background: #0e0e0e;
  border-radius: 1.8rem;
  padding: 2rem 1.8rem;
  text-align: center;
  transition: var(--transition-smooth);
  border: 1px solid #1e1e1e;
}
.skills-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-6px);
  background: #111;
  box-shadow: 0 15px 25px -12px rgba(249,115,22,0.2);
}
.skill-icon i,
.skill-icon .devicon-python-plain,
.skill-icon .devicon-scikitlearn-plain {
  font-size: 3.2rem;
  color: var(--accent-orange);
  margin-bottom: 1rem;
  display: inline-block;
}
.skills-card h4 {
  font-size: 1.5rem;
  margin: 0.8rem 0;
}
.skills-card p {
  font-size: 0.9rem;
  color: #a0a0a0;
}

/* CERTIFICATES SECTION */
.certificates {
  background: var(--bg-surface);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.cert-item {
  background: #0e0e0e;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: var(--transition-smooth);
  border: 1px solid #2a2a2a;
  cursor: pointer;
}

.cert-front {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.cert-item:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent-orange);
  box-shadow: 0 12px 25px rgba(249,115,22,0.15);
}

.cert-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.cert-item:hover .cert-front img {
  transform: scale(1.08);
}
.cert-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--accent-orange);
  border-radius: 30px;
  padding: 5px 8px;
  font-size: 1rem;
  color: #111;
}
.cert-info {
  padding: 1.2rem;
}
.cert-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.cert-info p {
  font-size: 0.8rem;
  color: #bcbcbc;
}

/* PROJECTS SECTION */
.projects {
  background: var(--bg-dark);
}
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: #0b0b0b;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid #222;
  transition: 0.2s;
}
.project-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-5px);
}
.project-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.project-info {
  padding: 1.5rem;
}
.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.project-info p {
  font-size: 0.9rem;
  color: #b5b5b5;
  margin-bottom: 1.2rem;
}
.project-btn {
  color: var(--accent-orange);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}
.project-btn:hover {
  gap: 10px;
}

/* CONTACT SECTION */
.contact {
  background: var(--bg-surface);
}

.contact-container {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  background: #0a0a0a;
  border-radius: 2rem;
  padding: 3rem;
  border: 1px solid #252525;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-left {
  flex: 1;
  min-width: 280px;
}

.contact-left .heading {
  text-align: left;
  margin-bottom: 1rem;
  font-size: 2.8rem;
}

.contact-left p {
  color: #bcbcbc;
  margin: 1rem 0 1.5rem 0;
  line-height: 1.6;
}

.contact-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ddd;
  font-size: 0.95rem;
  transition: 0.2s;
  padding: 0.5rem 0;
}

.contact-item i {
  font-size: 1.3rem;
  color: var(--accent-orange);
  width: 32px;
}

.contact-item:hover {
  color: white;
  transform: translateX(5px);
}

.contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 280px;
}

.contact-form input,
.contact-form textarea {
  background: #111;
  border: 1px solid #2a2a2a;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  color: white;
  font-size: 0.9rem;
  transition: 0.2s;
  font-family: 'Inter', sans-serif;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-orange);
  outline: none;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.contact-form button {
  background: var(--accent-orange);
  color: black;
  font-weight: 700;
  border: none;
  cursor: pointer;
  width: fit-content;
  padding: 0.9rem 2rem;
  margin-top: 0.5rem;
  border-radius: 40px;
  transition: 0.2s;
}

.contact-form button:hover {
  background: #ff6a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.3);
}

/* FOOTER */
.footer {
  background: #030303;
  padding: 3rem 8% 1.5rem;
  border-top: 1px solid #1e1e1e;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  gap: 2rem;
}
.footer-logo .logo {
  font-size: 1.6rem;
}
.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #bbb;
  transition: 0.2s;
  font-size: 0.9rem;
}
.footer-nav a:hover {
  color: var(--accent-orange);
}
.footer-social a {
  color: #bbb;
  font-size: 1.5rem;
  margin-left: 1rem;
  transition: 0.2s;
}
.footer-social a:hover {
  color: var(--accent-orange);
  transform: translateY(-3px);
}
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #1e1e1e;
  font-size: 0.8rem;
  color: #6f6f6f;
}
.footer-bottom i {
  color: #f97316;
}

/* ANIMATIONS */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

.btn:active,
.gradient-btn:active {
  transform: scale(0.96);
}

.navbar {
  transition: all 0.35s ease;
}

.navbar.active {
  animation: slideDown 0.35s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skills-card:active,
.project-card:active,
.cert-item:active {
  transform: scale(0.97);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  section {
    padding: 6rem 5%;
  }
  .home {
    flex-direction: column-reverse;
    text-align: center;
  }
  .home-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .social-icons, .btn-group {
    justify-content: center;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-main {
    padding-right: 0;
  }
  .about-quote-card {
    max-width: 500px;
    margin: 0 auto;
  }
  .contact-container {
    flex-direction: column;
    padding: 2rem;
  }
  .contact-left .heading {
    text-align: center;
  }
  .contact-left p {
    text-align: center;
  }
  .contact-details {
    align-items: center;
  }
  .contact-form button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0a0a0ae6;
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 1.5rem;
    display: none;
    border-bottom: 1px solid var(--accent-orange);
  }
  .navbar.active {
    display: flex;
  }
  .gradient-btn {
    display: none;
  }
  .home-content h1 {
    font-size: 3rem;
  }
  .heading {
    font-size: 2.5rem;
  }
  .about-header .heading {
    font-size: 2.5rem;
  }
  .stats-row {
    justify-content: center;
  }
  .timeline-item-modern {
    flex-direction: column;
    gap: 0.5rem;
  }
  .timeline-year {
    min-width: auto;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .img-glow {
    width: 260px;
    height: 260px;
    margin: 0 auto;
  }
  .home-img {
    justify-content: center;
    padding-right: 0;
  }
  section {
    padding: 5rem 6%;
  }
  .home {
    text-align: center;
  }
  .home-content h1 {
    font-size: 2.2rem;
  }
  .home-content h3 {
    font-size: 1.2rem;
  }
  .home-content p {
    font-size: 0.9rem;
  }
  .btn-group {
    flex-direction: column;
    gap: 0.8rem;
  }
  .btn {
    width: 100%;
  }
  .skills-container,
  .projects-container,
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .cert-front {
    height: 180px;
  }
  .contact-container {
    padding: 1.5rem;
  }
  .contact-left .heading {
    font-size: 2rem;
  }
  .footer {
    padding: 2rem 6%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
