:root {
      --bg: #07111f;
      --bg-alt: #0c1b31;
      --surface: rgba(10, 24, 44, 0.72);
      --surface-strong: rgba(13, 29, 52, 0.92);
      --text: #ecf4ff;
      --muted: #9eb5d4;
      --line: rgba(158, 181, 212, 0.16);
      --brand: #3ddcff;
      --brand-2: #2b7cff;
      --brand-3: #7f9cff;
      --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
      --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.18);
      --radius: 22px;
    }

    html[data-theme="light"] {
      --bg: #f7fbff;
      --bg-alt: #eef5ff;
      --surface: rgba(255, 255, 255, 0.72);
      --surface-strong: rgba(255, 255, 255, 0.94);
      --text: #0b1a2f;
      --muted: #51647f;
      --line: rgba(11, 26, 47, 0.08);
      --shadow: 0 18px 50px rgba(28, 57, 92, 0.12);
      --shadow-soft: 0 10px 25px rgba(28, 57, 92, 0.1);
    }

    html {
      scroll-behavior: smooth;
      scroll-padding-top: 92px;
    }

    body {
      margin: 0;
      padding-top: 80px;
      font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at 10% 10%, rgba(61, 220, 255, 0.14), transparent 24%),
        radial-gradient(circle at 90% 20%, rgba(43, 124, 255, 0.14), transparent 24%),
        linear-gradient(180deg, var(--bg), var(--bg-alt));
      overflow-x: hidden;
    }

    body::selection {
      background: rgba(61, 220, 255, 0.25);
      color: var(--text);
    }

    .container {
      position: relative;
      z-index: 1;
    }

    .section-space {
      padding: 96px 0;
    }

    .section-kicker {
      color: var(--brand);
      text-transform: uppercase;
      letter-spacing: 0.24em;
      font-size: 0.82rem;
      font-weight: 700;
      margin-bottom: 0.85rem;
    }

    .section-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(2rem, 4vw, 3.4rem);
      line-height: 1.05;
      margin-bottom: 1rem;
    }

    .section-subtitle {
      max-width: 760px;
      color: var(--muted);
      font-size: 1.05rem;
      line-height: 1.8;
    }

    .glass-nav {
      background: rgba(7, 17, 31, 0.76);
      border-bottom: 1px solid var(--line);
      backdrop-filter: blur(18px);
      transition: all 0.35s ease;
    }

    html[data-theme="light"] .glass-nav {
      background: rgba(247, 251, 255, 0.76);
    }

    .navbar.scrolled {
      box-shadow: var(--shadow-soft);
      background: var(--surface-strong);
    }

    .navbar-brand {
      font-weight: 800;
      letter-spacing: 0.04em;
      color: var(--text) !important;
    }

    .brand-mark {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      color: #fff;
      box-shadow: 0 12px 24px rgba(61, 220, 255, 0.25);
      flex: 0 0 auto;
    }

    .nav-link {
      color: var(--muted) !important;
      font-weight: 600;
      position: relative;
    }

    .nav-link::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0.35rem;
      width: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--brand), var(--brand-2));
      transition: width 0.25s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
      width: 100%;
    }

    .icon-btn {
      width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      background: var(--surface);
      color: var(--text);
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    }

    .icon-btn:hover {
      transform: translateY(-2px);
      border-color: rgba(61, 220, 255, 0.35);
    }

    .btn-brand {
      border: 0;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      color: #fff;
      box-shadow: 0 18px 30px rgba(61, 220, 255, 0.18);
    }

    .btn-brand:hover {
      color: #fff;
      transform: translateY(-2px);
      box-shadow: 0 20px 34px rgba(61, 220, 255, 0.24);
    }

    .btn-outline-brand {
      border: 1px solid rgba(61, 220, 255, 0.35);
      color: var(--text);
      background: transparent;
    }

    .btn-outline-brand:hover {
      background: rgba(61, 220, 255, 0.08);
      color: var(--text);
    }

    .hero-section {
      position: relative;
      min-height: calc(100vh - 80px);
      display: flex;
      align-items: center;
      overflow: hidden;
      padding: 30px 0 80px;
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 75% 25%, rgba(61, 220, 255, 0.26), transparent 18%),
        radial-gradient(circle at 15% 20%, rgba(43, 124, 255, 0.18), transparent 20%),
        radial-gradient(circle at 50% 85%, rgba(127, 156, 255, 0.12), transparent 22%);
      pointer-events: none;
    }

    .hero-bg::before,
    .hero-bg::after {
      content: '';
      position: absolute;
      border-radius: 999px;
      filter: blur(50px);
      opacity: 0.9;
      animation: drift 10s ease-in-out infinite;
    }

    .hero-bg::before {
      width: 240px;
      height: 240px;
      background: rgba(61, 220, 255, 0.18);
      right: 10%;
      top: 12%;
    }

    .hero-bg::after {
      width: 180px;
      height: 180px;
      background: rgba(43, 124, 255, 0.18);
      left: 8%;
      bottom: 10%;
      animation-delay: -4s;
    }

    @keyframes drift {
      0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
      50% { transform: translate3d(14px, -18px, 0) scale(1.08); }
    }

    .hero-copy {
      position: relative;
      z-index: 2;
    }

    .hero-brandline {
      display: inline-flex;
      align-items: center;
      gap: 0.65rem;
      padding: 0.6rem 1rem;
      border: 1px solid var(--line);
      background: var(--surface);
      border-radius: 999px;
      backdrop-filter: blur(16px);
      color: var(--muted);
      margin-bottom: 1.15rem;
      box-shadow: var(--shadow-soft);
    }

    .hero-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(3rem, 6vw, 5.6rem);
      line-height: 0.95;
      margin-bottom: 1rem;
    }

    .hero-title span {
      display: inline-block;
      background: linear-gradient(135deg, #ffffff 0%, #9feeff 45%, #7f9cff 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    html[data-theme="light"] .hero-title span {
      background: linear-gradient(135deg, #0b1a2f 0%, #185cff 60%, #3ddcff 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .hero-role {
      font-size: clamp(1.1rem, 2vw, 1.45rem);
      color: var(--muted);
      min-height: 2.3rem;
      margin-bottom: 1.1rem;
    }

    .hero-role strong {
      color: var(--text);
    }

    .hero-text {
      max-width: 640px;
      color: var(--muted);
      font-size: 1.05rem;
      line-height: 1.9;
    }

    .hero-actions .btn {
      padding: 0.9rem 1.25rem;
      border-radius: 16px;
      font-weight: 700;
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .hero-actions .btn:hover {
      transform: translateY(-2px);
    }

    .hero-art {
      position: relative;
      z-index: 2;
      display: flex;
      justify-content: center;
    }

    .portrait-frame {
      position: relative;
      width: min(100%, 470px);
      aspect-ratio: 0.9;
      border-radius: 34px;
      padding: 18px;
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
      border: 1px solid var(--line);
      backdrop-filter: blur(14px);
      box-shadow: var(--shadow);
      overflow: hidden;
      animation: floatY 7s ease-in-out infinite;
    }

    @keyframes floatY {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }

    .portrait-frame::before {
      content: '';
      position: absolute;
      inset: -30%;
      background: radial-gradient(circle, rgba(61, 220, 255, 0.24), transparent 52%);
      pointer-events: none;
    }

    .portrait-frame img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 26px;
      position: relative;
      z-index: 1;
      filter: saturate(1.05) contrast(1.02);
    }

    .glow-ring {
      position: absolute;
      inset: 12px;
      border-radius: 28px;
      border: 1px solid rgba(61, 220, 255, 0.18);
      pointer-events: none;
    }

    .soft-panel {
      background: var(--surface);
      border: 1px solid var(--line);
      backdrop-filter: blur(16px);
      border-radius: var(--radius);
      box-shadow: var(--shadow-soft);
    }

    .about-box,
    .skills-box,
    .contact-box,
    .timeline-box {
      padding: 1.45rem;
    }

    .mini-feature {
      height: 100%;
      padding: 1.3rem;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--line);
    }

    .metric-number {
      font-size: 2.2rem;
      font-weight: 800;
      line-height: 1;
      color: var(--text);
    }

    .metric-label {
      color: var(--muted);
      margin-top: 0.35rem;
      font-size: 0.96rem;
    }

    .progress-track {
      height: 11px;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 999px;
      overflow: hidden;
      border: 1px solid var(--line);
    }

    .progress-bar-brand {
      height: 100%;
      width: 0;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
      transition: width 1.45s ease;
    }

    .skill-row + .skill-row {
      margin-top: 1rem;
    }

    .skill-topline {
      display: flex;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 0.55rem;
      font-weight: 600;
    }

    .service-card,
    .project-card,
    .tech-card,
    .timeline-item {
      position: relative;
      overflow: hidden;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 24px;
      box-shadow: var(--shadow-soft);
      transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .service-card:hover,
    .project-card:hover,
    .tech-card:hover {
      transform: translateY(-8px);
      border-color: rgba(61, 220, 255, 0.22);
      box-shadow: var(--shadow);
    }

    .service-icon,
    .tech-icon {
      width: 58px;
      height: 58px;
      border-radius: 18px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, rgba(61, 220, 255, 0.15), rgba(43, 124, 255, 0.14));
      color: var(--brand);
      font-size: 1.35rem;
    }

    .service-card .card-body,
    .tech-card .card-body,
    .project-card .card-body {
      padding: 1.3rem;
    }

    .project-media {
      position: relative;
      overflow: hidden;
      aspect-ratio: 1.35;
    }

    .project-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s ease;
    }

    .project-card:hover .project-media img {
      transform: scale(1.06);
    }

    .project-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, transparent 20%, rgba(7, 17, 31, 0.86) 100%);
      display: flex;
      align-items: end;
      padding: 1rem;
      opacity: 0;
      transition: opacity 0.35s ease;
    }

    .project-card:hover .project-overlay {
      opacity: 1;
    }

    .filter-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.7rem;
      margin-bottom: 1.5rem;
    }

    .filter-btn {
      border: 1px solid var(--line);
      background: var(--surface);
      color: var(--muted);
      border-radius: 999px;
      padding: 0.7rem 1.05rem;
      font-weight: 700;
      transition: all 0.25s ease;
    }

    .filter-btn.active,
    .filter-btn:hover {
      color: #fff;
      border-color: transparent;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      box-shadow: 0 10px 22px rgba(61, 220, 255, 0.18);
    }

    .timeline-item {
      padding: 1.35rem 1.35rem 1.35rem 2.2rem;
    }

    .timeline-item::before {
      content: '';
      position: absolute;
      left: 0.95rem;
      top: 1.65rem;
      width: 12px;
      height: 12px;
      border-radius: 999px;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      box-shadow: 0 0 0 8px rgba(61, 220, 255, 0.08);
    }

    .timeline-line {
      position: absolute;
      left: 1.5rem;
      top: 0;
      bottom: 0;
      width: 1px;
      background: linear-gradient(180deg, rgba(61, 220, 255, 0.7), transparent);
    }

    .achievement-card {
      text-align: center;
      padding: 1.6rem 1.2rem;
      height: 100%;
      border-radius: 24px;
      border: 1px solid var(--line);
      background: var(--surface);
      backdrop-filter: blur(14px);
      box-shadow: var(--shadow-soft);
    }

    .achievement-card .metric-number {
      font-size: clamp(2.2rem, 4vw, 3rem);
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
      background-size: 52% 52%;
      border-radius: 999px;
      padding: 0.95rem;
      background-color: rgba(61, 220, 255, 0.18);
    }

    .testimonial-card {
      padding: 2rem;
      border-radius: 28px;
      background: var(--surface);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-soft);
      min-height: 260px;
    }

    .quote-mark {
      color: rgba(61, 220, 255, 0.25);
      font-size: 2.3rem;
      line-height: 1;
    }

    .tech-card {
      text-align: center;
      min-height: 100%;
    }

    .contact-list li {
      display: flex;
      align-items: flex-start;
      gap: 0.9rem;
      color: var(--muted);
    }

    .contact-list li + li {
      margin-top: 1rem;
    }

    .contact-list i {
      width: 36px;
      height: 36px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(61, 220, 255, 0.1);
      color: var(--brand);
      flex: 0 0 auto;
    }

    .form-control,
    .form-select {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--line);
      color: var(--text);
      border-radius: 16px;
      padding: 0.95rem 1rem;
    }

    html[data-theme="light"] .form-control,
    html[data-theme="light"] .form-select {
      background: rgba(255, 255, 255, 0.82);
    }

    .form-control:focus,
    .form-select:focus {
      border-color: rgba(61, 220, 255, 0.6);
      box-shadow: 0 0 0 0.2rem rgba(61, 220, 255, 0.15);
    }

    .form-control::placeholder {
      color: var(--muted);
    }

    textarea.form-control {
      min-height: 150px;
      resize: vertical;
    }

    .social-strip {
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.02);
    }

    .social-link {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--text);
      background: var(--surface);
      border: 1px solid var(--line);
      transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
    }

    .social-link:hover {
      transform: translateY(-3px);
      color: #fff;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
    }

    .scroll-progress {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 4px;
      z-index: 1055;
      background: transparent;
    }

    .scroll-progress span {
      display: block;
      height: 100%;
      width: 0;
      background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
      box-shadow: 0 0 18px rgba(61, 220, 255, 0.4);
    }

    .site-loader {
      position: fixed;
      inset: 0;
      display: grid;
      place-items: center;
      background: linear-gradient(180deg, #06101c, #0c1a30);
      z-index: 2000;
      transition: opacity 0.45s ease, visibility 0.45s ease;
    }

    html[data-theme="light"] .site-loader {
      background: linear-gradient(180deg, #f7fbff, #eaf2ff);
    }

    .site-loader.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .loader-badge {
      width: 72px;
      height: 72px;
      border-radius: 22px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      color: #fff;
      font-size: 1.8rem;
      box-shadow: var(--shadow);
      animation: pulse 1.4s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.08); }
    }

    .back-to-top {
      position: fixed;
      right: 22px;
      bottom: 22px;
      width: 48px;
      height: 48px;
      border: 0;
      border-radius: 16px;
      background: linear-gradient(135deg, var(--brand), var(--brand-2));
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      opacity: 0;
      visibility: hidden;
      transform: translateY(12px);
      transition: all 0.3s ease;
      z-index: 1020;
    }

    .back-to-top.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    footer {
      border-top: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.02);
    }

    .footer-link {
      color: var(--muted);
      text-decoration: none;
    }

    .footer-link:hover {
      color: var(--brand);
    }

    .fade-edge {
      position: relative;
    }

    .fade-edge::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      padding: 1px;
      background: linear-gradient(135deg, rgba(61, 220, 255, 0.42), rgba(43, 124, 255, 0.08));
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      pointer-events: none;
    }

    .text-muted-custom {
      color: var(--muted) !important;
    }

    .typed-cursor {
      color: var(--brand);
      font-size: 1.1em;
    }

    @media (max-width: 991.98px) {
      .hero-section {
        min-height: auto;
        padding-top: 30px;
      }

      .hero-art {
        margin-top: 2.25rem;
      }

      .navbar .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 22px;
        background: var(--surface);
        border: 1px solid var(--line);
      }
    }

    @media (max-width: 575.98px) {
      body {
        padding-top: 74px;
      }

      .section-space {
        padding: 72px 0;
      }

      .hero-actions .btn {
        width: 100%;
        justify-content: center;
      }

      .hero-brandline {
        font-size: 0.88rem;
      }
    }