:root {
  --bg: #0b1020;
  --bg-soft: #121a2e;
  --panel: rgba(17, 24, 39, 0.65);
  --panel-strong: rgba(15, 23, 42, 0.9);
  --card: rgba(19, 28, 46, 0.8);
  --card-alt: rgba(23, 33, 56, 0.75);
  --text: #f5f7ff;
  --text-soft: #b7c1d9;
  --text-dim: #93a1bf;
  --border: rgba(148, 163, 184, 0.18);
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --pink: #f472b6;
  --success: #34d399;
  --warning: #fbbf24;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  --radius: 22px;
  --container: 1180px;
}

body.light {
  --bg: #f4f7fb;
  --bg-soft: #eaf0fb;
  --panel: rgba(255, 255, 255, 0.7);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --card: rgba(255, 255, 255, 0.8);
  --card-alt: rgba(233, 242, 255, 0.9);
  --text: #0f172a;
  --text-soft: #475569;
  --text-dim: #64748b;
  --border: rgba(148, 163, 184, 0.25);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light {
  background: linear-gradient(180deg, #edf6ff 0%, #f7f5ff 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.28);
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 6rem 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-2);
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

p {
  margin: 0 0 1.1rem;
  color: var(--text-soft);
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.34;
  pointer-events: none;
}

.orb-1 {
  width: 24rem;
  height: 24rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(6, 182, 212, 0.35));
  top: 8rem;
  left: -6rem;
}

.orb-2 {
  width: 30rem;
  height: 30rem;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.5), rgba(59, 130, 246, 0.28));
  right: -8rem;
  top: 12rem;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(11, 16, 32, 0.45);
  border-bottom: 1px solid var(--border);
}

body.light .site-header.scrolled {
  background: rgba(255, 255, 255, 0.45);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: rgba(11, 16, 32, 0.18);
  border: 1px solid var(--border);
  border-radius: 18px;
}

body.light .navbar {
  background: rgba(255, 255, 255, 0.45);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--text-soft);
  font-size: 0.96rem;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 18px 30px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}

.btn-small {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--accent-2);
  padding: 0;
  font-weight: 700;
}

.hero {
  position: relative;
  padding-top: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.type-wrap {
  position: relative;
  display: inline-block;
  min-width: 12ch;
  color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--pink));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmerGradient 4s ease infinite;
}

.typed-text {
  display: inline-block;
  color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--pink));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmerGradient 4s ease infinite;
}

.lead {
  max-width: 38rem;
  font-size: 1.08rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-row a:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.7);
}

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

.profile-card {
  position: relative;
  width: min(100%, 420px);
  padding: 1.5rem;
  border-radius: 28px;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.38), transparent 62%);
}

.profile-topline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.status-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.8);
}

.avatar-wrap {
  display: flex;
  justify-content: center;
  padding: 1.8rem 0 1.3rem;
}

.avatar-shape {
  position: relative;
  display: grid;
  place-items: center;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(6, 182, 212, 0.16));
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: inset 0 0 30px rgba(255,255,255,0.08), 0 25px 50px rgba(139, 92, 246, 0.18);
}

.avatar-ring {
  position: absolute;
  inset: 0.65rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
}

.avatar-core {
  display: grid;
  place-items: center;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  box-shadow: 0 18px 35px rgba(6, 182, 212, 0.25);
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.mini-metrics div {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.mini-metrics strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.mini-metrics span {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.tech-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.tech-pill-list span,
.chip-row span,
.skill-chips span {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8rem;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2rem;
}

.services-grid,
.skills-layout,
.timeline {
  display: grid;
  gap: 1.3rem;
}

.services-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card {
  padding: 1.4rem;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.42);
  box-shadow: 0 22px 42px rgba(139, 92, 246, 0.18);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 16px;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(6, 182, 212, 0.2));
  margin-bottom: 1rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.4);
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.project-body {
  padding: 1.1rem;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-badge {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: #f9a8d4;
  font-size: 0.72rem;
  font-weight: 700;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.project-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.project-actions button,
.project-actions a {
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.skill-panel {
  padding: 1.3rem;
  border-radius: 22px;
}

.skills-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 2rem;
}

.about-photo {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.about-photo::before {
  content: '';
  position: absolute;
  inset: 10% 12%;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.12));
}

.photo-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  width: 72%;
  height: 72%;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.16));
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.stat-box {
  padding: 1rem;
  border-radius: 18px;
  text-align: center;
}

.count {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline-item {
  position: relative;
  padding: 1.3rem;
  border-radius: 22px;
}

.step-number {
  display: inline-flex;
  margin-bottom: 0.8rem;
  font-weight: 800;
  color: var(--accent-2);
}

.contact-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 28px;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.service-form {
  display: grid;
  gap: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text-soft);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: rgba(15, 23, 42, 0.28);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.light input,
body.light select,
body.light textarea {
  background: rgba(255, 255, 255, 0.7);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(6, 182, 212, 0.7);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.error-text {
  min-height: 1.1rem;
  color: #fca5a5;
  font-size: 0.76rem;
}

.submit-btn {
  width: fit-content;
  min-width: 180px;
}

.site-footer {
  position: relative;
  padding: 2rem 0 4rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  color: var(--text-soft);
}

.footer-socials {
  margin-top: 0;
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.4rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 20px 36px rgba(139, 92, 246, 0.35);
  z-index: 40;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
}

.modal.is-open {
  display: grid;
}

.modal-content {
  position: relative;
  width: min(760px, calc(100% - 2rem));
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 1.5rem;
}

.modal-badge {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.22);
  color: var(--text);
  z-index: 2;
}

.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.75rem;
  z-index: 120;
}

.toast {
  min-width: 260px;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.4);
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.5);
}

@keyframes shimmerGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .services-grid,
  .work-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .about-grid,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .navbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-menu {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
  }

  .nav-toggle span {
    width: 1.2rem;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    display: block;
    margin: 0 auto;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1rem;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-links,
  .nav-actions,
  .field-row,
  .services-grid,
  .work-grid,
  .timeline,
  .stats-row,
  .skills-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section {
    padding: 4.5rem 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-content {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Public portfolio visual refresh */
:root {
  --container: 1240px;
  --accent: #9b7bff;
  --accent-2: #22d3ee;
  --pink: #fb7185;
}

body {
  background:
    radial-gradient(ellipse at 82% 8%, rgba(87, 66, 174, 0.18), transparent 35%),
    radial-gradient(ellipse at 4% 42%, rgba(8, 145, 178, 0.1), transparent 28%),
    var(--bg);
}

.page-shell {
  isolation: isolate;
}

.bg-grid {
  opacity: 0.6;
}

.site-header {
  padding-top: 1.15rem;
}

.navbar {
  background: rgba(11, 16, 32, 0.62);
  border-color: rgba(165, 180, 252, 0.17);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(20px);
}

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 14px;
  font-size: 1.05rem;
}

.brand-name {
  font-size: 1.15rem;
}

.accent-text {
  color: var(--accent-2);
}

.hero.section {
  min-height: min(800px, calc(100vh - 82px));
  display: grid;
  align-items: center;
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

.hero-copy {
  max-width: 720px;
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.07);
  letter-spacing: 0.11em;
}

.hero-copy .eyebrow::before {
  content: '';
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.7);
}

.hero h1 {
  max-width: 760px;
  margin: 1.25rem 0;
  font-size: clamp(3.2rem, 6.4vw, 6rem);
  line-height: 0.99;
  letter-spacing: -0.075em;
}

.type-wrap,
.typed-text {
  background-image: linear-gradient(110deg, #a78bfa 3%, #22d3ee 50%, #fb7185 95%);
}

.type-wrap {
  min-width: 0;
  white-space: nowrap;
}

.lead {
  max-width: 630px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.85;
}

.cta-group {
  margin-top: 2rem;
}

.cta-group .btn {
  min-height: 3.35rem;
  padding-inline: 1.5rem;
}

.hero-note {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.hero-visual {
  position: relative;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  z-index: -1;
  inset: 9% -8% 2% 2%;
  border-radius: 42% 58% 55% 45%;
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.28), rgba(6, 182, 212, 0.13), rgba(244, 114, 182, 0.17));
  filter: blur(42px);
  content: '';
  animation: floatGlow 8s ease-in-out infinite alternate;
}

.profile-card {
  width: min(100%, 500px);
  padding: 1rem;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(26, 34, 61, 0.88), rgba(12, 19, 38, 0.82));
  border-color: rgba(196, 181, 253, 0.24);
  transform: rotate(1deg);
  animation: cardFloat 7s ease-in-out infinite;
}

.profile-topline {
  padding: 0.45rem 0.55rem 0.2rem;
  font-size: 0.8rem;
}

.avatar-wrap {
  position: relative;
  padding: 0.8rem 0 1rem;
}

.hero-portrait {
  width: 100%;
  height: clamp(270px, 34vw, 410px);
  border: 1px solid rgba(165, 180, 252, 0.22);
  border-radius: 24px;
  object-fit: cover;
  object-position: 55% 40%;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
}

.profile-card > h2,
.profile-card > p,
.profile-card > .mini-metrics,
.profile-card > .tech-pill-list {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.profile-title {
  margin-top: 0.2rem;
  font-size: 1.45rem;
}

.profile-card > p {
  font-size: 0.88rem;
}

.mini-metrics div {
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.section {
  padding-top: clamp(5rem, 9vw, 8rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.section-head {
  max-width: 700px;
  margin-bottom: 2.6rem;
}

.section-head h2 {
  max-width: 660px;
  font-size: clamp(2.3rem, 4vw, 3.65rem);
}

.section-head > p:last-child {
  max-width: 600px;
  font-size: 1.02rem;
  line-height: 1.8;
}

#services {
  position: relative;
}

.services-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  min-height: 275px;
  padding: 1.5rem;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(25, 34, 59, 0.78), rgba(14, 21, 39, 0.68));
}

.service-icon {
  width: 3.3rem;
  height: 3.3rem;
  color: #d7ceff;
}

.service-card h3 {
  font-size: 1.18rem;
}

.service-card p {
  min-height: 6rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.btn-link {
  text-align: left;
}

#projects {
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(74, 54, 145, 0.08) 45%, transparent);
}

.work-grid {
  gap: 1.35rem;
}

.project-card {
  border-radius: 25px;
  background: linear-gradient(155deg, rgba(25, 34, 59, 0.96), rgba(13, 20, 38, 0.92));
}

.project-card img {
  height: 240px;
  background: linear-gradient(135deg, #172554, #164e63);
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.045);
  filter: saturate(1.12);
}

.project-body {
  padding: 1.3rem;
}

.project-header h3 {
  font-size: 1.15rem;
}

.project-body > p {
  min-height: 4.3rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.project-actions {
  flex-wrap: wrap;
}

.project-actions button,
.project-actions a {
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.project-actions button:hover,
.project-actions a:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.1);
}

.projects-footnote {
  margin: 1.5rem 0 0;
  color: var(--text-dim);
  font-size: 0.83rem;
}

.about-grid {
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
}

.about-photo {
  min-height: 510px;
  border-radius: 32px;
  background: linear-gradient(145deg, #312e81, #164e63);
  box-shadow: 0 30px 75px rgba(2, 6, 23, 0.35);
}

.about-photo::before {
  z-index: 1;
  inset: 45% 0 0;
  border-radius: 0;
  background: linear-gradient(180deg, transparent, rgba(5, 10, 25, 0.58));
  pointer-events: none;
}

.about-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 40%;
}

.photo-placeholder {
  align-self: end;
  justify-self: start;
  z-index: 2;
  width: auto;
  height: auto;
  margin: 0 0 1.2rem 1.2rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(9, 15, 32, 0.72);
  backdrop-filter: blur(12px);
  letter-spacing: 0.04em;
  text-transform: none;
}

.about-copy > p:not(.eyebrow) {
  line-height: 1.85;
}

.skill-panel {
  margin-top: 1.6rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.035);
}

.timeline-item {
  min-height: 230px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(25, 34, 59, 0.74), rgba(14, 21, 39, 0.68));
}

.timeline-item h3 {
  margin-top: 0.4rem;
  font-size: 1.2rem;
}

.timeline-item p {
  font-size: 0.9rem;
  line-height: 1.75;
}

.contact-shell {
  padding: clamp(1.25rem, 4vw, 2.6rem);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(25, 34, 59, 0.85), rgba(14, 21, 39, 0.82));
}

.contact-copy h3 {
  font-size: 1.5rem;
}

.contact-copy > p {
  max-width: 400px;
  line-height: 1.8;
}

.contact-meta span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.service-form label {
  font-size: 0.9rem;
}

.optional-text {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 400;
}

.service-form input,
.service-form select,
.service-form textarea {
  border-radius: 13px;
  background-color: rgba(5, 10, 25, 0.32);
}

.submit-btn {
  min-height: 3.2rem;
}

.site-footer {
  padding-top: 1rem;
}

.footer-caption {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
}

.footer-inner > p:last-child {
  font-size: 0.82rem;
}

.back-to-top {
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top:hover {
  transform: translateY(-4px);
}

.modal-content {
  background: rgba(13, 20, 39, 0.96);
  border-color: rgba(165, 180, 252, 0.24);
}

.toast {
  backdrop-filter: blur(18px);
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50% { transform: translateY(-11px) rotate(-0.5deg); }
}

@keyframes floatGlow {
  from { transform: translate3d(-8px, 8px, 0) scale(0.96); }
  to { transform: translate3d(12px, -10px, 0) scale(1.04); }
}

body.light {
  background:
    radial-gradient(ellipse at 82% 8%, rgba(139, 92, 246, 0.12), transparent 36%),
    radial-gradient(ellipse at 4% 42%, rgba(6, 182, 212, 0.08), transparent 28%),
    linear-gradient(180deg, #edf6ff 0%, #f7f5ff 100%);
}

body.light .navbar,
body.light .profile-card,
body.light .service-card,
body.light .project-card,
body.light .timeline-item,
body.light .contact-shell {
  background: rgba(255, 255, 255, 0.78);
}

body.light .project-body > p,
body.light .service-card p,
body.light .timeline-item p {
  color: var(--text-soft);
}

@media (max-width: 980px) {
  .hero.section {
    min-height: unset;
  }

  .hero-grid {
    grid-template-columns: 1fr 0.85fr;
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero.section {
    padding-top: 2rem;
  }

  .hero-grid,
  .about-grid,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .hero-visual {
    width: min(100%, 470px);
    margin: 0 auto;
  }

  .hero-portrait {
    height: min(96vw, 380px);
  }

  .profile-card {
    transform: none;
    animation: none;
  }

  .services-grid,
  .work-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .service-card p,
  .project-body > p {
    min-height: 0;
  }

  .about-photo {
    min-height: 390px;
  }

  .timeline-item {
    min-height: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
}

.footer-contact {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.footer-contact a {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-contact a:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.07);
}

.footer-contact svg {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--text);
  fill: currentColor;
}

.footer-copyright {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0;
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .footer-contact {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .footer-contact {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card,
  .hero-visual::before {
    animation: none;
  }
}
