:root {
  --bg: #e5e7f3;
  --bg-subtle: #f5f6fc;
  --bg-elevated: #ffffff;
  --text: #1b1f2a;
  --text-muted: #6c7280;
  --accent: #ff9f1c;
  --accent-soft: #ffe3b8;
  --border-subtle: #e2e5f0;
  --nav-bg: rgba(246, 247, 251, 0.9);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-xl: 28px;
}

body.dark-theme {
  --bg: #050816;
  --bg-subtle: #0b1020;
  --bg-elevated: #111827;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #f97316;
  --accent-soft: #7c2d12;
  --border-subtle: #1f2937;
  --nav-bg: rgba(5, 8, 22, 0.9);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.navbar-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--nav-bg);
  backdrop-filter: blur(18px);
}

.navbar {
  padding-inline: 1rem;
}

.navbar-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #111827;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding-inline: 0.35rem;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:hover {
  color: var(--text);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background-color: var(--accent);
  transition: width 0.18s ease-out;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.btn-dark {
  background-color: #111827;
  border-color: #111827;
}

body.dark-theme .btn-dark {
  background-color: #f9fafb;
  color: #111827;
  border-color: #f9fafb;
}

#themeToggle {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

body.dark-theme #themeToggle {
  color: var(--text);
}

.navbar-toggler {
  border-color: var(--border-subtle);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(31, 41, 55, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.dark-theme .navbar-toggler {
  border-color: rgba(249, 250, 251, 0.7);
}

body.dark-theme .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(249, 250, 251, 0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.hero-section {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
      circle at top left,
      rgba(255, 159, 28, 0.08),
      transparent 55%
    ),
    radial-gradient(
      circle at center right,
      rgba(59, 130, 246, 0.08),
      transparent 60%
    );
}

.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  filter: blur(40px);
  opacity: 0.8;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: morph-float 18s infinite ease-in-out;
}

.hero-section::before {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 159, 28, 0.8), transparent);
  top: -60px;
  right: -40px;
}

.hero-section::after {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.85), transparent);
  bottom: -80px;
  left: -40px;
  animation-delay: 1.5s;
}

.py-lg-6 {
  padding-block: 4.5rem;
}

.hero-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2.4rem, 3vw + 1.4rem, 3.5rem);
  line-height: 1.1;
}

.hero-name {
  color: var(--accent);
}

.wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 2s infinite ease-in-out;
}

@keyframes wave {
  0%,
  60%,
  100% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(16deg);
  }
  20% {
    transform: rotate(-10deg);
  }
  30% {
    transform: rotate(12deg);
  }
  40% {
    transform: rotate(-6deg);
  }
}

.hero-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--bg-subtle);
  color: var(--text);
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.hero-role-label {
  font-weight: 600;
  font-size: 24px;
}

.hero-role-cursor {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

.hero-text {
  max-width: 32rem;
  color: var(--text-muted);
}

.hero-cta {
  padding-inline: 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  background: linear-gradient(135deg, #ff9f1c, #ffbf69);
  border: none;
  box-shadow: var(--shadow-soft);
}

.hero-cta:hover {
  filter: brightness(0.96);
}

.social-links .social-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all 0.15s ease-out;
}

.social-links .social-icon:hover {
  color: var(--text);
  background-color: var(--bg-subtle);
}

.hero-visual-wrapper {
  display: flex;
  justify-content: center;
}

.hero-card {
  position: relative;
  max-width: 380px;
  width: 100%;
  border-radius: 42% 58% 55% 45% / 48% 52% 48% 52%;
  background-color: var(--accent);
  padding: 0.6rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  animation: morph-card 12s ease-in-out infinite;
}

.hero-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(255, 255, 255, 0.6),
    transparent 55%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-photo {
  position: relative;
  border-radius: 38% 62% 52% 48% / 46% 54% 46% 54%;
  overflow: hidden;
  background: #f9fafb;
  animation: morph-inner 12s ease-in-out infinite;
}

body.dark-theme .hero-photo {
  background: #020617;
}

.hero-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-cta-secondary {
  border-radius: 999px;
  font-weight: 500;
}

.hero-cta-secondary:hover {
  background-color: var(--bg-subtle);
}

@keyframes float-orbit {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -16px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-12px, 10px, 0) scale(0.97);
  }
}

/* Gentle morphing blob: rounded shapes that slowly shift and move */
@keyframes morph-float {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translate3d(0, 0, 0) scale(1);
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: translate3d(12px, -10px, 0) scale(1.03);
  }
  50% {
    border-radius: 50% 50% 50% 50% / 45% 55% 45% 55%;
    transform: translate3d(-8px, 14px, 0) scale(0.98);
  }
  75% {
    border-radius: 40% 60% 40% 60% / 70% 30% 70% 30%;
    transform: translate3d(6px, 6px, 0) scale(1.02);
  }
}

@keyframes morph-card {
  0%, 100% {
    border-radius: 42% 58% 55% 45% / 48% 52% 48% 52%;
    transform: translateY(0) rotate(0deg);
  }
  33% {
    border-radius: 55% 45% 42% 58% / 52% 48% 52% 48%;
    transform: translateY(-6px) rotate(1deg);
  }
  66% {
    border-radius: 48% 52% 58% 42% / 45% 55% 45% 55%;
    transform: translateY(4px) rotate(-0.5deg);
  }
}

@keyframes morph-inner {
  0%, 100% {
    border-radius: 38% 62% 52% 48% / 46% 54% 46% 54%;
  }
  33% {
    border-radius: 52% 48% 38% 62% / 54% 46% 54% 46%;
  }
  66% {
    border-radius: 46% 54% 54% 46% / 62% 38% 62% 38%;
  }
}

@keyframes float-card {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.section-padding {
  padding-block: 4rem;
}

.bg-subtle {
  background-color: var(--bg-subtle);
}

.section-animated {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.section-animated::before,
.section-animated::after {
  content: '';
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: soft-light;
  animation: morph-float 22s infinite ease-in-out;
  z-index: -1;
}

.section-animated::before {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.9), transparent);
  top: -80px;
  left: -60px;
}

.section-animated::after {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.9), transparent);
  bottom: -80px;
  right: -50px;
  animation-delay: 2.5s;
}

.section-header {
  max-width: 38rem;
  margin-inline: auto;
}

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.3rem);
  margin-top: 0.3rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Improve contrast in dark mode for section headings/text */
body.dark-theme .section-title {
  color: var(--text);
}

body.dark-theme .section-subtitle {
  color: #e5e7eb;
}

body.dark-theme .skill-card {
  color: var(--text);
}

.skill-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-soft);
  color: #7c2d12;
}

body.dark-theme .icon-badge {
  color: #fed7aa;
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-thumb {
  position: relative;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  min-height: 160px;
  overflow: hidden;
}

.project-thumb::after {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.project-body {
  padding: 1.2rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.project-title {
  font-size: 1.05rem;
}

.project-description {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.22);
  color: var(--text);
}

body.dark-theme .project-tag {
  background-color: rgba(148, 163, 184, 0.28);
}

.project-links {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: auto;
}

.project-link {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--text);
}

.project-link i {
  font-size: 1rem;
}

.project-link:hover {
  color: var(--accent);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0),
    rgba(148, 163, 184, 0.7),
    rgba(148, 163, 184, 0)
  );
}

.timeline-item {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 1.6rem;
}

.timeline-badge {
  position: absolute;
  left: -0.05rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background-color: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-form .form-control {
  border-radius: 12px;
  border-color: var(--border-subtle);
  background-color: var(--bg-elevated);
  color: var(--text);
}

.contact-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.15rem rgba(249, 115, 22, 0.25);
}

.contact-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  color: var(--text);
}

body.dark-theme .contact-card .text-muted {
  color: #fff !important;
}

.contact-list .contact-icon {
  font-size: 1.25rem;
  margin-right: 0.8rem;
  color: var(--accent);
}

.footer {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.footer a {
  color: inherit;
}

.footer a:hover {
  color: var(--accent);
}

@media (max-width: 991.98px) {
  .navbar {
    padding-inline: 0.5rem;
  }

  .hero-section {
    padding-top: 3.5rem;
  }

  .hero-card {
    max-width: 320px;
  }
}

@media (max-width: 767.98px) {
  .section-padding {
    padding-block: 3rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}

