:root {
  --dark: #1b1b1b;
  --light: #f5f5f5;
  --primary: #58E6D9;
  --font: 'Montserrat', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--light); color: var(--dark); transition: background 0.3s, color 0.3s; min-height: 100vh; overflow-x: hidden; }
body.dark { background: var(--dark); color: var(--light); }

/* ── PAGE TRANSITION OVERLAY ── */
.page-transition-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--dark);
  z-index: 9999;
  transform: translateX(-100%);
  pointer-events: none;
}
body.dark .page-transition-overlay {
  background: var(--light);
}

.page { display: none; min-height: 100vh; flex-direction: column; }
.page.active { display: flex; }

header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 2.2rem 8rem; font-weight: 500; position: relative; z-index: 10;
}
.logo-wrap { position: absolute; left: 50%; top: 0.5rem; transform: translateX(-50%); }
.logo {
  width: 4rem; height: 4rem; background: var(--dark); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--light); font-weight: 900; font-size: 1.1rem;
  text-decoration: none; overflow: hidden; cursor: pointer; transition: 0.3s;
}
body.dark .logo { background: var(--light); color: var(--dark); }
.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

nav.main-nav a {
  text-decoration: none; color: inherit; margin: 0 1rem;
  position: relative; padding-bottom: 2px; cursor: pointer; font-size: 0.95rem;
}
nav.main-nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  height: 1px; background: var(--dark); width: 0; transition: width 0.3s ease;
}
body.dark nav.main-nav a::after { background: var(--light); }
nav.main-nav a.active::after, nav.main-nav a:hover::after { width: 100%; }

nav.social-nav { display: flex; align-items: center; gap: 0.6rem; }
.social-icon { width: 1.75rem; height: 1.75rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.social-icon svg { width: 100%; height: 100%; }
.theme-btn {
  width: 1.75rem; height: 1.75rem; background: var(--dark); color: var(--light);
  border: none; border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center; margin-left: 0.5rem; transition: 0.3s;
}
body.dark .theme-btn { background: var(--light); color: var(--dark); }

.hire-me {
  position: fixed; left: 1rem; bottom: 1rem;
  width: 9rem; height: 9rem; display: flex; align-items: center; justify-content: center; z-index: 100;
}
.hire-ring-text { position: absolute; width: 100%; height: 100%; animation: spin 8s linear infinite; }
.hire-ring-text text { font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: 3px; fill: var(--dark); }
body.dark .hire-ring-text text { fill: var(--light); }
.hire-btn {
  position: absolute; width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--dark); color: var(--light); border: 1px solid var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: 0.3s;
}
.hire-btn:hover { background: var(--light); color: var(--dark); }
body.dark .hire-btn { background: var(--light); color: var(--dark); }
body.dark .hire-btn:hover { background: var(--dark); color: var(--light); }
@keyframes spin { to { transform: rotate(360deg); } }

.page-body { padding: 2rem 8rem 4rem; flex: 1; }

/* HOME */
.hero { display: flex; align-items: center; gap: 4rem; padding-top: 3rem; padding-bottom: 4rem; }
.hero-text { flex: 1; }
.hero-img { flex: 1; display: flex; justify-content: center; }
.avatar-placeholder {
  width: 320px; height: 320px; border-radius: 12px;
  background: linear-gradient(135deg, #ddd 0%, #bbb 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 7rem; border: 3px solid #ccc;
}
body.dark .avatar-placeholder { background: linear-gradient(135deg, #2a2a2a, #3a3a3a); border-color: #444; }
.hero h1 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.5rem; }
.hero-subtitle {
  font-size: 2.4rem; font-weight: 600;
  background: linear-gradient(90deg, var(--primary), #3dd6c8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 1rem;
}
.hero p { font-size: 0.95rem; font-weight: 500; line-height: 1.7; margin-bottom: 1.5rem; max-width: 480px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── SCROLL REVEAL ANIMATIONS ── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ── ORBITAL SKILLS WEB ── */
.section-title { font-size: 5rem; font-weight: 800; text-align: center; margin-top: 5rem; margin-bottom: 4rem; }

.skills-orbital {
  width: 100%;
  max-width: 900px;
  height: 100vh;
  max-height: 900px;
  margin: 0 auto 5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Start collapsed — will open on scroll */
  transform: scale(0.3);
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease;
}
.skills-orbital.web-open {
  transform: scale(1);
  opacity: 1;
}

/* Concentric orbit rings */
.orbit-ring {
  position: absolute;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
body.dark .orbit-ring {
  border-color: rgba(255,255,255,0.08);
}

/* Center hub */
.skill-center {
  background: var(--dark); color: var(--light);
  padding: 1.4rem 1.8rem; border-radius: 50%; font-weight: 700;
  font-size: 0.95rem; z-index: 2; box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  position: relative;
}
body.dark .skill-center { background: var(--light); color: var(--dark); }

/* Skill pill tags on orbits */
.skill-tag {
  position: absolute;
  background: var(--dark); color: var(--light);
  padding: 0.55rem 1.2rem; border-radius: 999px; font-weight: 600;
  font-size: 0.82rem; white-space: nowrap; cursor: default;
  transition: transform 0.3s, box-shadow 0.3s;
  z-index: 3;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.skill-tag:hover {
  transform: translate(-50%, -50%) scale(1.15) !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}
body.dark .skill-tag { background: var(--light); color: var(--dark); }

/* EXPERIENCE */
.exp-section { margin: 0 auto 5rem; max-width: 1000px; }
.timeline { position: relative; width: 75%; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 2.25rem; top: 0; bottom: 0; width: 4px; background: var(--primary); border-radius: 2px; }
.timeline-item { position: relative; margin: 2.5rem 0; padding-left: 6rem; }
.timeline-dot { position: absolute; left: 0.5rem; top: 0.2rem; width: 3.5rem; height: 3.5rem; }
.timeline-dot svg { transform: rotate(-90deg); }
.timeline-content h3 { font-size: 1.2rem; font-weight: 700; text-transform: capitalize; margin-bottom: 0.25rem; }
.timeline-content h3 a { color: var(--primary); text-decoration: none; }
.timeline-content .period { font-size: 0.82rem; font-weight: 500; opacity: 0.6; margin-bottom: 0.5rem; }
.timeline-content p { font-size: 0.9rem; font-weight: 500; line-height: 1.7; }

/* ABOUT */
.about-title { font-size: 5rem; font-weight: 800; text-align: center; margin-bottom: 3rem; line-height: 1.15; }
.about-grid { display: grid; grid-template-columns: 3fr 3fr 2fr; gap: 3rem; align-items: start; }
.about-bio h2 { font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; opacity: 0.55; margin-bottom: 1rem; }
.about-bio p { font-size: 0.95rem; font-weight: 500; line-height: 1.75; margin-bottom: 1rem; }
.about-photo { position: relative; border: 2px solid var(--dark); border-radius: 1rem; padding: 1.5rem; background: var(--light); }
body.dark .about-photo { border-color: var(--light); background: var(--dark); }
.about-photo::after { content: ''; position: absolute; top: 0; right: -10px; z-index: -1; width: 102%; height: 103%; background: var(--dark); border-radius: 1rem; border-bottom-right-radius: 0.5rem; }
body.dark .about-photo::after { background: var(--light); }
.about-photo-inner { width: 100%; aspect-ratio: 1; border-radius: 0.75rem; border: 2px solid var(--dark); background: linear-gradient(135deg, #ddd, #bbb); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
body.dark .about-photo-inner { background: linear-gradient(135deg, #2a2a2a, #3a3a3a); border-color: var(--light); }
.about-stats { display: flex; flex-direction: column; gap: 2rem; align-items: flex-end; }
.stat-item { text-align: right; }
.stat-num { font-size: 4.5rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 1rem; font-weight: 500; opacity: 0.6; margin-top: 0.25rem; text-transform: capitalize; }

/* PROJECTS */
.projects-title { font-size: 5rem; font-weight: 800; text-align: center; margin-bottom: 3.5rem; line-height: 1.15; }
.project-featured { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 3rem; border: 1px solid var(--dark); border-radius: 1.5rem; border-bottom-right-radius: 0.75rem; padding: 3rem; box-shadow: 0 20px 60px rgba(0,0,0,0.12); margin-bottom: 3rem; background: var(--light); }
body.dark .project-featured { border-color: var(--light); background: var(--dark); }
.project-featured::after { content: ''; position: absolute; top: 0; right: -10px; z-index: -1; width: 101%; height: 103%; background: var(--dark); border-radius: 2rem; border-bottom-right-radius: 0.75rem; }
body.dark .project-featured::after { background: var(--light); }
.project-featured-img { width: 50%; border-radius: 0.5rem; overflow: hidden; cursor: pointer; }
.project-featured-img .img-placeholder { width: 100%; height: 220px; background: linear-gradient(135deg, #c8e6e3, #a0d4cf); display: flex; align-items: center; justify-content: center; font-size: 3rem; border-radius: 0.5rem; transition: transform 0.3s; }
.project-featured-img .img-placeholder:hover { transform: scale(1.02); }
body.dark .project-featured-img .img-placeholder { background: linear-gradient(135deg, #1a3a38, #234f4c); }
.project-featured-info { width: 50%; }
.proj-type { font-size: 1rem; font-weight: 500; margin-bottom: 0.15rem; }
.proj-stack { font-size: 1rem; font-weight: 500; color: var(--primary); margin-bottom: 0.5rem; }
.proj-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; text-decoration: none; color: inherit; display: block; }
.proj-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.proj-desc { font-size: 0.9rem; font-weight: 500; line-height: 1.65; margin-bottom: 1rem; opacity: 0.85; }
.proj-actions { display: flex; align-items: center; gap: 1rem; }

.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.project-card { position: relative; border: 1px solid var(--dark); border-radius: 1rem; border-bottom-right-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 15px 40px rgba(0,0,0,0.1); background: var(--light); }
body.dark .project-card { border-color: var(--light); background: var(--dark); }
.project-card::after { content: ''; position: absolute; top: 0; right: -8px; z-index: -1; width: 102%; height: 103%; background: var(--dark); border-radius: 1.5rem; border-bottom-right-radius: 0.75rem; }
body.dark .project-card::after { background: var(--light); }
.card-img-placeholder { width: 100%; height: 160px; border-radius: 0.5rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: linear-gradient(135deg, #ddd, #c8e0de); cursor: pointer; transition: transform 0.3s; }
.card-img-placeholder:hover { transform: scale(1.02); }
body.dark .card-img-placeholder { background: linear-gradient(135deg, #2a2a2a, #1a3a38); }
.card-type { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.1rem; }
.card-stack { font-size: 0.9rem; font-weight: 500; color: var(--primary); margin-bottom: 0.4rem; }
.card-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; text-decoration: none; color: inherit; display: block; }
.card-title:hover { text-decoration: underline; }

.more-projects { border: 1px solid var(--dark); border-right-width: 4px; border-bottom-width: 4px; border-radius: 0.75rem; padding: 1.5rem; margin-bottom: 1.5rem; }
body.dark .more-projects { border-color: var(--light); }
.more-projects a { font-size: 1.1rem; font-weight: 600; text-decoration: none; color: inherit; }
.more-projects a:hover { text-decoration: underline; }
.projects-bottom-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* CONTACT - Card Style */
.contact-wrap { max-width: 700px; margin: 0 auto; padding-top: 2rem; }
.contact-title { font-size: 5rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.1; text-align: center; }
.contact-sub { font-size: 1rem; font-weight: 500; opacity: 0.6; margin-bottom: 2.5rem; text-align: center; }
.contact-card { position: relative; border: 1px solid var(--dark); border-radius: 1rem; border-bottom-right-radius: 0.75rem; padding: 2.5rem; box-shadow: 0 15px 40px rgba(0,0,0,0.1); background: var(--light); }
body.dark .contact-card { border-color: var(--light); background: var(--dark); }
.contact-card::after { content: ''; position: absolute; top: 0; right: -8px; z-index: -1; width: 102%; height: 103%; background: var(--dark); border-radius: 1.5rem; border-bottom-right-radius: 0.75rem; }
body.dark .contact-card::after { background: var(--light); }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-form label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.5; display: block; margin-bottom: 0.4rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.9rem 1.2rem; border: 1px solid rgba(0,0,0,0.25); border-radius: 8px; font-family: var(--font); font-size: 0.95rem; font-weight: 500; background: transparent; color: inherit; outline: none; transition: border 0.2s; resize: none; }
body.dark .contact-form input, body.dark .contact-form textarea { border-color: rgba(255,255,255,0.2); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { height: 160px; }
.contact-success { display: none; color: var(--primary); font-weight: 600; font-size: 1rem; margin-top: 0.5rem; }
.contact-reach-card { position: relative; border: 1px solid var(--dark); border-radius: 1rem; border-bottom-right-radius: 0.75rem; padding: 2rem 2.5rem; box-shadow: 0 15px 40px rgba(0,0,0,0.1); background: var(--light); margin-top: 2rem; }
body.dark .contact-reach-card { border-color: var(--light); background: var(--dark); }
.contact-reach-card::after { content: ''; position: absolute; top: 0; right: -8px; z-index: -1; width: 102%; height: 103%; background: var(--dark); border-radius: 1.5rem; border-bottom-right-radius: 0.75rem; }
body.dark .contact-reach-card::after { background: var(--light); }
.contact-reach-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.contact-reach-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* BUTTONS */
.btn-dark { display: inline-flex; align-items: center; padding: 0.6rem 1.4rem; font-size: 0.95rem; font-weight: 600; border: 2px solid var(--dark); background: var(--dark); color: var(--light); border-radius: 8px; text-decoration: none; cursor: pointer; font-family: var(--font); transition: 0.3s; }
.btn-dark:hover { background: transparent; color: var(--dark); }
body.dark .btn-dark { background: var(--light); color: var(--dark); border-color: var(--light); }
body.dark .btn-dark:hover { background: var(--dark); color: var(--light); border-color: var(--light); }
.btn-light { display: inline-flex; align-items: center; padding: 0.6rem 1.4rem; font-size: 0.95rem; font-weight: 600; border: 2px solid var(--dark); background: transparent; color: var(--dark); border-radius: 8px; text-decoration: none; cursor: pointer; font-family: var(--font); transition: 0.3s; }
.btn-light:hover { background: var(--dark); color: var(--light); }
body.dark .btn-light { border-color: var(--light); color: var(--light); }
body.dark .btn-light:hover { background: var(--light); color: var(--dark); }

footer { padding: 1.5rem 8rem; display: flex; align-items: center; gap: 0.4rem; font-size: 1rem; margin-top: auto; }
footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  header, .page-body, footer { padding-left: 4rem; padding-right: 4rem; }
  .hero h1 { font-size: 3.2rem; }
  .hero-subtitle { font-size: 1.8rem; }
  .section-title, .about-title, .projects-title, .contact-title { font-size: 3.5rem; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-stats { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .stat-item { text-align: left; }
  .about-stats { grid-column: span 2; }
}
@media (max-width: 768px) {
  header { padding: 1.5rem 2rem; }
  nav.main-nav { display: none; }
  .page-body, footer { padding: 1.5rem 2rem; }
  .hero { flex-direction: column-reverse; text-align: center; }
  .hero p, .hero-btns { margin-left: auto; margin-right: auto; justify-content: center; }
  .hero h1 { font-size: 2.4rem; }
  .hero-subtitle { font-size: 1.4rem; }
  .section-title, .about-title, .projects-title, .contact-title { font-size: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; flex-wrap: wrap; }
  .stat-item { text-align: left; }
  .project-featured { flex-direction: column; }
  .project-featured-img, .project-featured-info { width: 100%; }
  .projects-grid { grid-template-columns: 1fr; }
  .timeline { width: 100%; }
  .hire-me { display: none; }
  .contact-card { padding: 1.5rem; }
  .contact-reach-card { padding: 1.5rem; }
  .skills-orbital { height: 70vh; }
}
