/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fb923c;
  --dark: #1f1f1f;
  --text: #2b2b2b;
  --muted: #777777;
  --cream: #fff7ed;
  --soft: #fdfaf6;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--soft);
  overflow-x: hidden;
  perspective: 1200px;
}

/* 3D Tilt base */
.tilt-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.tilt-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.tilt-3d:hover::before {
  opacity: 1;
}

.tilt-3d > * {
  position: relative;
  z-index: 2;
  transform: translateZ(20px);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4 {
  font-family: 'Merriweather', serif;
  color: var(--dark);
  line-height: 1.3;
}

h1 { font-size: 3rem; font-weight: 900; }
h2 { font-size: 2.2rem; font-weight: 700; }
.orange { color: var(--primary); }
.highlight { color: var(--primary); }

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  font-family: inherit;
  transform-style: preserve-3d;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--dark);
}
.btn-outline:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-sm { padding: 10px 22px; font-size: 0.9rem; }

/* ========================================
   Navbar
   ======================================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
}
#navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Merriweather', serif;
  font-size: 1.4rem;
  font-weight: 700;
}
.logo-icon {
  color: var(--primary);
  font-size: 1.2rem;
}

.nav-menu {
  display: flex;
  gap: 32px;
}
.nav-link {
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--soft) 100%);
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-left h1 {
  margin-bottom: 20px;
  font-size: 3.2rem;
}

.hero-desc {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.stat-item strong {
  display: block;
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  color: var(--primary);
}
.stat-item span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Profile Photo */
.hero-right {
  display: flex;
  justify-content: center;
}
.profile-photo-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
}
.profile-photo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  animation: rotate 8s linear infinite;
}
.profile-photo {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7rem;
  color: var(--primary);
  box-shadow: var(--shadow-hover);
}
@keyframes rotate {
  to { transform: rotate(360deg); }
}

.floating-badge {
  position: absolute;
  width: 60px; height: 60px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  box-shadow: var(--shadow-hover);
  animation: float 3s ease-in-out infinite;
}
.badge-1 { top: 20px; left: -10px; animation-delay: 0s; }
.badge-2 { bottom: 30px; right: -10px; color: #ec4899; animation-delay: 0.5s; }
.badge-3 { bottom: 80px; left: -20px; color: #3b82f6; animation-delay: 1s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ========================================
   Section Base
   ======================================== */
.section {
  padding: 90px 0;
}
.section:nth-child(even) { background: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   About
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.about-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}
.about-card {
  transform-style: preserve-3d;
}
.about-card:hover {
  transform: translateY(-8px) rotateX(4deg) rotateY(-4deg);
  box-shadow: var(--shadow-hover), 0 20px 40px rgba(249, 115, 22, 0.15);
}
.about-icon { transform: translateZ(40px); }
.about-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
}
.about-card h3 { margin-bottom: 12px; font-size: 1.25rem; }
.about-card p { color: var(--muted); font-size: 0.95rem; }

/* ========================================
   Skills
   ======================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
}
.skill-card {
  transform-style: preserve-3d;
}
.skill-card:hover { transform: translateY(-6px) rotateX(3deg) rotateY(3deg); box-shadow: var(--shadow-hover); }
.skill-icon { transform: translateZ(30px); }
.skill-icon {
  width: 56px; height: 56px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 14px;
}
.skill-card h4 { margin-bottom: 14px; font-size: 1.1rem; }
.skill-bar {
  width: 100%;
  height: 8px;
  background: var(--cream);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 8px;
}
.skill-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 50px;
  transition: width 1.5s ease;
}
.skill-card.animate .skill-progress { width: var(--progress); }
.skill-percent {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ========================================
   Timeline (Experience)
   ======================================== */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--cream);
}
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-dot {
  position: absolute;
  left: -29px; top: 8px;
  width: 18px; height: 18px;
  background: var(--primary);
  border-radius: 50%;
  border: 4px solid var(--soft);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-content {
  background: var(--white);
  padding: 24px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.timeline-content {
  transform-style: preserve-3d;
}
.timeline-content:hover { transform: translateX(6px) rotateY(-3deg); box-shadow: var(--shadow-hover); }
.timeline-date {
  display: inline-block;
  padding: 4px 12px;
  background: var(--cream);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.timeline-content h3 { font-size: 1.2rem; margin-bottom: 4px; }
.timeline-content h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 10px;
}
.timeline-content p { color: var(--muted); font-size: 0.95rem; }

/* ========================================
   Education
   ======================================== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 800px;
  margin: 0 auto;
}
.education-card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}
.education-card {
  transform-style: preserve-3d;
}
.education-card:hover { transform: translateY(-8px) rotateX(4deg); box-shadow: var(--shadow-hover); }
.education-icon { transform: translateZ(35px); }
.education-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
}
.education-year {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.education-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.education-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}
.education-card p { color: var(--muted); font-size: 0.9rem; }

/* ========================================
   Contact
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.contact-icon {
  width: 50px; height: 50px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
}
.contact-item h4 { font-size: 1rem; margin-bottom: 2px; font-family: 'Inter', sans-serif; }
.contact-item p { color: var(--muted); font-size: 0.9rem; }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.social-links a {
  width: 44px; height: 44px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.05rem;
  transition: var(--transition);
}
.social-links a {
  transform-style: preserve-3d;
}
.social-links a:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-4px) rotateZ(8deg) scale(1.1);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
}

.contact-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 16px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cream);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--soft);
  transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}
.contact-form textarea { resize: vertical; }

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 30px 0;
  text-align: center;
  position: relative;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.footer .fa-heart { color: var(--primary); }

.back-to-top {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
}
.back-to-top {
  transform-style: preserve-3d;
}
.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-6px) rotateZ(45deg) scale(1.1);
}

/* ========================================
   Fade-in Animation
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}
.fade-in.delay-200 { transition-delay: 0.2s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 968px) {
  .hero-wrapper { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-btns, .hero-stats { justify-content: center; }
  .hero-left h1 { font-size: 2.4rem; }

  .about-grid,
  .skills-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .nav-menu {
    position: fixed;
    top: 70px; right: -100%;
    width: 70%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    padding: 30px;
    gap: 18px;
    transition: right 0.3s ease;
    box-shadow: var(--shadow);
  }
  .nav-menu.open { right: 0; }
  .hamburger { display: flex; }

  .about-grid,
  .skills-grid,
  .education-grid { grid-template-columns: 1fr; }

  .profile-photo-wrapper { width: 260px; height: 260px; }
  .profile-photo { font-size: 5rem; }
}
