:root {
  --primary: #181c2f;
  --secondary: #ffb86b;
  --accent: #00e6d0;
  --bg-gradient: linear-gradient(120deg, #181c2f 0%, #232a4d 40%, #2e3a5c 100%);
  --bg-gradient-animated: linear-gradient(270deg, #181c2f, #232a4d, #2e3a5c, #181c2f);
  --glass-bg: rgba(255,255,255,0.10);
  --glass-bg-2: rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.18);
  --text-main: #f4f4f4;
  --text-dark: #232a4d;
  --card-bg: rgba(24,28,47,0.85);
  --card-glow: 0 8px 32px 0 rgba(0,230,208,0.10);
  --shadow: 0 8px 32px 0 rgba(24,28,47,0.25);
  --divider: linear-gradient(90deg, transparent, #00e6d0 50%, transparent);
  --footer-gradient: linear-gradient(90deg, #232a4d 0%, #181c2f 100%);
  --footer-icon: #00e6d0;
  --footer-icon-hover: #ffb86b;
}
.light-mode {
  --primary: #f4f4f4;
  --secondary: #232a4d;
  --accent: #00bfae;
  --bg-gradient: linear-gradient(120deg, #f4f4f4 0%, #e6f0f7 100%);
  --bg-gradient-animated: linear-gradient(270deg, #f4f4f4, #e6f0f7, #f4f4f4);
  --glass-bg: rgba(255,255,255,0.7);
  --glass-bg-2: rgba(255,255,255,0.5);
  --glass-border: rgba(30,42,120,0.10);
  --text-main: #232a4d;
  --text-dark: #f4f4f4;
  --card-bg: rgba(255,255,255,0.95);
  --card-glow: 0 8px 32px 0 rgba(0,191,174,0.10);
  --shadow: 0 8px 32px 0 rgba(0,191,174,0.10);
  --divider: linear-gradient(90deg, transparent, #00bfae 50%, transparent);
  --footer-gradient: linear-gradient(90deg, #e6f0f7 0%, #f4f4f4 100%);
  --footer-icon: #00bfae;
  --footer-icon-hover: #232a4d;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: var(--bg-gradient);
  background-size: 400% 400%;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  animation: bgMove 18s ease-in-out infinite;
}
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

nav#navbar, .navbar-glass {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4vw;
  background: var(--glass-bg-2);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
nav .logo {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  position: relative;
}
.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.2s;
  padding: 0.2rem 0.5rem;
}
.nav-link.active, .nav-link:hover {
  color: var(--secondary);
}
.nav-underline {
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 3px;
  width: 60px;
  background: var(--divider);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
  pointer-events: none;
}

.split-hero {
  display: flex;
  align-items: stretch;
  min-height: 90vh;
  background: none;
  gap: 0;
}
.hero-3d-col {
  flex: 1.2;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  position: relative;
}
#hero-3d-bg {
  width: 100%;
  height: 100%;
  min-height: 400px;
  min-width: 320px;
  z-index: 1;
  position: relative;
}
.hero-content-col {
  flex: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  position: relative;
}
.hero-content {
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
  border-radius: 32px;
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(12px);
  min-width: 320px;
  max-width: 420px;
}
.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 24px 0 rgba(0,230,208,0.18);
}
.hero-title {
  font-size: 2.8rem;
  margin: 0.2rem 0 0.5rem 0;
  color: var(--accent);
  font-family: 'Montserrat', 'Poppins', sans-serif;
  font-weight: 900;
  letter-spacing: 2px;
}
.hero-animated-text {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.2rem 0;
  color: var(--secondary);
  min-height: 2.2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,230,208,0.10);
}
.hero-summary {
  font-size: 1.13rem;
  margin-bottom: 1.2rem;
  text-align: center;
  color: var(--text-main);
  opacity: 0.92;
}
.hero-contact a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.5rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.hero-contact a:hover {
  color: var(--secondary);
}
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.scroll-indicator span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  border-bottom: none;
  border-right: none;
  animation: scrollBounce 1.5s infinite;
  margin: 0 auto;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(-45deg) translateY(0); opacity: 0.7; }
  50% { transform: rotate(-45deg) translateY(12px); opacity: 1; }
}

.animated-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.25,.8,.25,1), transform 0.8s cubic-bezier(.25,.8,.25,1);
}
.animated-section.visible {
  opacity: 1;
  transform: none;
}
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: 2.4rem;
  color: var(--accent);
  font-family: 'Montserrat', 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}
.section-divider {
  width: 120px;
  height: 4px;
  margin: 0 auto;
  background: var(--divider);
  border-radius: 2px;
  animation: dividerGlow 2.5s infinite alternate;
}
@keyframes dividerGlow {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  100% { box-shadow: 0 0 16px 4px var(--accent); }
}

.about-section {
  padding: 5rem 0 2.5rem 0;
  background: var(--glass-bg-2);
}
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}
.about-bio {
  flex: 1 1 280px;
  min-width: 260px;
  background: var(--glass-bg);
  border-radius: 22px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 24px 0 rgba(0,230,208,0.10);
  margin-bottom: 1rem;
}
.about-details {
  flex: 2 1 480px;
  min-width: 320px;
  background: var(--glass-bg);
  border-radius: 22px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 24px 0 rgba(0,230,208,0.10);
}
.about-details h3 {
  margin-top: 1.5rem;
  color: var(--secondary);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.skills-bars {
  margin: 1rem 0 1.5rem 0;
}
.skill-bar {
  display: flex;
  align-items: center;
  margin-bottom: 0.7rem;
}
.skill-bar span {
  flex: 0 0 90px;
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
}
.skill-bar .bar {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  margin-left: 1rem;
  box-shadow: 0 2px 8px 0 var(--accent);
  opacity: 0.7;
  animation: barGrow 1.2s cubic-bezier(.25,.8,.25,1);
}
@keyframes barGrow {
  from { width: 0; }
  to { }
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}
.timeline li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7rem;
  color: var(--text-main);
  font-size: 1.05rem;
}
.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px 2px var(--accent);
}
.cert-list, .lang-list {
  margin: 0 0 1.2rem 0;
  padding: 0 0 0 1.2rem;
  color: var(--text-main);
  font-size: 1.05rem;
}

.projects-section {
  padding: 5rem 0 2.5rem 0;
  background: var(--glass-bg-2);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}
.project-card {
  background: var(--card-bg);
  border-radius: 22px;
  box-shadow: var(--card-glow);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.25,.8,.25,1), box-shadow 0.4s;
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--glass-border);
  will-change: transform;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-16px) scale(1.04) rotateY(8deg);
  box-shadow: 0 12px 64px 0 var(--accent), 0 2px 24px 0 var(--secondary);
  z-index: 2;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
}
.project-info {
  padding: 1.5rem 1.2rem 2rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-info h3 {
  margin: 0.2rem 0 0.7rem 0;
  color: var(--secondary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.project-info p {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: var(--text-main);
  opacity: 0.92;
}
.project-tech {
  font-size: 0.98rem;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.project-details-btn {
  background: var(--accent);
  color: var(--text-dark);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px 0 var(--accent);
}
.project-details-btn:hover {
  background: var(--secondary);
  color: var(--text-main);
}

.project-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(24,28,47,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(.25,.8,.25,1);
}
.project-modal.visible {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--glass-bg);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px 0 var(--accent);
  min-width: 320px;
  max-width: 540px;
  position: relative;
  animation: modalIn 0.5s cubic-bezier(.25,.8,.25,1);
}
@keyframes modalIn {
  from { transform: translateY(60px) scale(0.95); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.close-modal {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 2rem;
  color: var(--secondary);
  cursor: pointer;
  font-weight: 700;
  transition: color 0.2s;
}
.close-modal:hover {
  color: var(--accent);
}

.community-section {
  padding: 4rem 0 2.5rem 0;
  background: var(--glass-bg-2);
}
.community-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  list-style: disc inside;
  color: var(--text-main);
  font-size: 1.13rem;
  opacity: 0.93;
}

/* Contact Form Redesign */
.contact-section {
  padding: 4rem 0 2.5rem 0;
  background: var(--glass-bg-2);
}
.contact-form {
  max-width: 480px;
  margin: 0 auto 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--glass-bg);
  border-radius: 24px;
  padding: 2.7rem 2.2rem;
  box-shadow: 0 4px 32px 0 var(--accent), 0 2px 24px 0 rgba(0,230,208,0.10);
  border: 1.5px solid var(--glass-border);
  position: relative;
}
.contact-form input,
.contact-form textarea {
  border: none;
  border-radius: 12px;
  padding: 1.1rem;
  font-size: 1.08rem;
  background: rgba(255,255,255,0.18);
  color: var(--text-dark);
  outline: none;
  resize: none;
  font-family: inherit;
  box-shadow: 0 1px 6px 0 rgba(0,230,208,0.06);
  transition: box-shadow 0.2s, border 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 2px 12px 0 var(--accent);
  border: 1.5px solid var(--accent);
  background: rgba(255,255,255,0.28);
}
.contact-form button {
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.13rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px 0 var(--accent);
  margin-top: 0.5rem;
}
.contact-form button:hover {
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: var(--text-main);
  transform: translateY(-2px) scale(1.03);
}
.contact-form .form-message {
  margin-top: 0.7rem;
  font-size: 1.05rem;
  text-align: center;
  font-weight: 600;
  color: var(--secondary);
  background: var(--glass-bg-2);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  box-shadow: 0 1px 6px 0 var(--accent);
  display: none;
}
.contact-form .form-message.success {
  color: #00e6d0;
  background: rgba(0,230,208,0.08);
  display: block;
}
.contact-form .form-message.error {
  color: #ff6b6b;
  background: rgba(255,107,107,0.08);
  display: block;
}
.contact-info {
  text-align: center;
  color: var(--text-main);
  font-size: 1.13rem;
}
.contact-info a {
  color: var(--accent);
  text-decoration: none;
}
.contact-info a:hover {
  color: var(--secondary);
}

/* Footer Redesign */
footer {
  text-align: center;
  padding: 2.2rem 0 1.2rem 0;
  background: var(--footer-gradient);
  color: var(--text-main);
  font-size: 1.08rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 2rem;
  letter-spacing: 1px;
  box-shadow: 0 -2px 24px 0 var(--accent);
  position: relative;
}
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.1rem;
}
.footer-socials a {
  color: var(--footer-icon);
  font-size: 1.7rem;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.footer-socials a:hover {
  color: var(--footer-icon-hover);
  transform: scale(1.18) translateY(-2px);
}
.footer-credit {
  font-size: 1.02rem;
  opacity: 0.85;
  margin-top: 0.7rem;
}

/* Dark/Light Mode Toggle */
.mode-toggle {
  position: fixed;
  bottom: 2.2rem;
  right: 2.2rem;
  z-index: 2000;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px 0 var(--accent);
  cursor: pointer;
  transition: background 0.2s, border 0.2s, box-shadow 0.2s;
}
.mode-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 24px 0 var(--accent);
}
.mode-toggle svg {
  width: 28px;
  height: 28px;
  fill: var(--footer-icon);
  transition: fill 0.2s;
}
.mode-toggle.light svg {
  fill: var(--footer-icon-hover);
}

.hero-3d-caption {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 1.18rem;
  color: var(--secondary);
  font-family: 'Montserrat', 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,230,208,0.10);
  opacity: 0.92;
}

/* Responsive Design */
@media (max-width: 1100px) {
  .about-content {
    flex-direction: column;
    gap: 2rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .split-hero {
    flex-direction: column;
    min-height: 70vh;
  }
  .hero-3d-col, .hero-content-col {
    min-width: 0;
    max-width: 100vw;
  }
}
@media (max-width: 700px) {
  nav#navbar, .navbar-glass {
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.7rem 2vw;
  }
  .hero-content {
    padding: 1.2rem 0.5rem;
    min-width: 0;
    max-width: 98vw;
  }
  .about-section, .projects-section, .community-section, .contact-section {
    padding: 2rem 0 1rem 0;
  }
  .contact-form {
    padding: 1rem 0.5rem;
  }
}
