:root {
  --primary: #e26b6b;
  --dark: #2f3a3f;
  --muted: #9b9b9b;
  --bg: #f3f3f3;
}

/* main colours for site */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #333;
  scroll-behavior: smooth;
}

body {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%232f3a3f;stop-opacity:1" /><stop offset="100%" style="stop-color:%23485963;stop-opacity:1" /></linearGradient></defs><rect fill="url(%23g1)" width="1200" height="800"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  z-index: -1;
}

/* Particle sphere canvas */
#particleSphere {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.topbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 40;
  transition: background-color 0.28s, box-shadow 0.28s, padding 0.2s;
  background: transparent;
  padding: 18px 0;
}

.topbar.scrolled {
  background: #fff;
  box-shadow: 0 6px 18px rgba(10, 10, 10, 0.06);
  padding: 20px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  color: #ef6e6e;
}

.logo .light {
  color: #9aa0a6;
  font-weight: 600;
  margin-left: 6px;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav a {
  color: #617a88;      /* 475963  lighter bg blue           5d717c*/
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.6px;
  padding: 6px 0;
  position: relative;
  transition: color 0.3s;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav a:hover::after {
  width: 100%;
}

.topbar.scrolled .nav a {
  color: #444;
}

.hamburger {
  display: none;
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

.topbar.scrolled .hamburger {
  color: #444;
}




/* Hero area */
.hero {
  height: 280px;
  position: relative;
  background: linear-gradient(135deg, #2f3a3f 0%, #475963 100%);
  margin-top: 64px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

/* Floating particles */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 15s infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}


.main-area {
  padding: 36px 0 80px;
  background: var(--bg);
}

/* Profile card */
.profile-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -120px;
}

.profile-card {
  width: 100%;
  max-width: 820px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.12);
  display: flex;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.8s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-left {
  width: 34%;
  min-width: 240px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.profile-img {
  width: 220px;       
  height: 280px;     
  object-fit: cover; 
  border-radius: 8px;
  transition: transform 0.4s ease; 
}

.profile-photo :hover {
  transform: scale(1.08); 
}

.profile-right {
  flex: 1;
  padding: 32px 40px;
  border-left: 1px solid #efefef;
}

.tag {
  display: inline-block;
  background: #f3b2b2;
  color: #7a2b2b;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

h1 {
  margin: 10px 0 0;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
}

h1 strong {
  font-weight: 800;
}

.subtitle {
  color: var(--muted);
  margin: 10px 0 20px;
  font-size: 14px;
}

.info-grid::before {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 24px;
  font-size: 13px;
  color: #444;
  margin-top: 8px;
}


.info-label {
  color: #9ea4a7;
  font-weight: 700;
  letter-spacing: 0.8px;
  font-size: 11px;
}

.info-val {
  color: #5f6668;
  margin: 8px;
}

.badge {
  background: #fff0f0;
  color: #c24b4b;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.card-footer {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0 0 8px 8px;
}

.socials {
  display: flex;
  gap: 45px;
}

.socials a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s;
  transition: transform 0.5s ease; 
}

.socials a:hover {
  color: #fff;
  transform: scale(1.4);
}


/* download button */
.download-wrap {
  margin-top: 40px;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.6px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 14px;
}

.btn-outline {
  border: 2px solid #ddd;
  background: #fff;
  color: #333;
}

.btn-outline:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(226, 107, 107, 0.3);
}




/* content sections */
.content-section {
  max-width: 820px;
  margin: 48px auto;
  background: #fff;
  border-radius: 8px;
  padding: 48px;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.08);
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 32px;
  text-align: center;
  position: relative;
  color: var(--dark);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #f39c9c);
  border-radius: 2px;
}

/* about me  */
.about-text {
  text-align: center;
  color: #5f6668;
  line-height: 1.9;
  font-size: 16px;
  margin-bottom: 24px;
}

.shiny-text {
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  background: linear-gradient(90deg, #3a3a3a, #6a6a6a, #bfbfbf, #6a6a6a, #3a3a3a);
  background-size: 250%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: metallic-shine 5s ease-in-out infinite;
  display: inline-block;
}

@keyframes metallic-shine {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* skills area */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.skill-card {
  background: linear-gradient(135deg, #f9f9f9 0%, #fff 100%);
  padding: 28px;
  border-radius: 8px;
  border: 2px solid #f0f0f0;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(226, 107, 107, 0.05), transparent);
  transition: left 0.5s;
}

.skill-card:hover::before {
  left: 100%;
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(226, 107, 107, 0.15);
}

.skill-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--primary);
  font-weight: 700;
}

.skill-card p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: #fff0f0;
  color: #c24b4b;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* timeline */
.timeline-item {
  background: linear-gradient(135deg, #f9f9f9 0%, #fff 100%);
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 24px;
  border-left: 4px solid var(--primary);
  transition: all 0.3s;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  border: 4px solid #fff;
}

.timeline-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(226, 107, 107, 0.15);
}

.timeline-item h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
}

.timeline-date {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  font-weight: 600;
}

.timeline-item p {
  color: #5f6668;
  line-height: 1.8;
  font-size: 15px;
}

.grade-highlight {
  margin-top: 16px;
  padding: 12px;
  background: #fff0f0;
  border-radius: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.project-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #f0f0f0;
  transition: all 0.3s;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(226, 107, 107, 0.15);
  border-color: var(--primary);
}

.project-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary);
}

.project-content {
  padding: 24px;
}

.project-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--dark);
  font-weight: 700;
}

.project-content p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  background: #f9f9f9;
  color: #666;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

/* Footer */
.page-footer {
  text-align: center;
  margin-top: 48px;
  padding: 36px 0;
  color: #9aa0a6;
  background: rgba(255, 255, 255, 0.5);
}

/* multi-device compatbility */
@media (max-width: 900px) {
  .profile-card {
    flex-direction: column;
  }

  .profile-left {
    width: 100%;
    padding: 24px;
  }

  .profile-right {
    padding: 24px;
    border-left: 0;
  }

  .content-section {
    padding: 32px 24px;
  }

  .hero {
    height: 220px;
  }

  .hamburger {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    display: flex;
  }

  .topbar.scrolled .nav a {
    color: #444;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  h1 {
    font-size: 22px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero {
    height: 180px;
  }

  .section-title {
    font-size: 24px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* new features*/

/* Interactive background canvas */
#interactiveBackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}

/* Cursor follower */
#cursorFollower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid #e26b6b80;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px rgba(226, 107, 107, 0.3);
}

#cursorFollower.active {
  opacity: 1;
}

#cursorFollower.hover {
  width: 60px;
  height: 60px;
  border-color: rgba(226, 107, 107, 0.8);
  box-shadow: 0 0 25px rgba(226, 107, 107, 0.5);
}

.cursor-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(226, 107, 107, 0.7), rgba(226, 107, 107, 0));
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  animation: fadeOutParticle 0.8s ease-out forwards;
}

@keyframes fadeOutParticle {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}


#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(226, 107, 107, 0.4);
  transition: all 0.3s;
}

#backToTop.visible {
  display: flex;
}

#backToTop:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(226, 107, 107, 0.6);
}