:root {
    --bg: #0b1020;
    --bg-secondary: #121a2f;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-strong: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.12);
    --text: #f5f7ff;
    --muted: #a8b2c9;
    --primary: #7c3aed;
    --primary-2: #22d3ee;
    --accent: #c084fc;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --container: 1180px;
  }
  
  body.light-mode {
    --bg: #f6f8fc;
    --bg-secondary: #ffffff;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --muted: #5b6477;
    --primary: #7c3aed;
    --primary-2: #0891b2;
    --accent: #a855f7;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: "Inter", sans-serif;
    background:
      radial-gradient(circle at top left, rgba(124, 58, 237, 0.18), transparent 30%),
      radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.12), transparent 28%),
      var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.35s ease, color 0.35s ease;
  }
  
  img {
    width: 100%;
    display: block;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  button,
  input,
  textarea {
    font: inherit;
  }
  
  ul {
    list-style: none;
  }
  
  .container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
  }
  
  .section {
    padding: 100px 0;
    position: relative;
  }
  
  .page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.05), transparent 35%),
      linear-gradient(225deg, rgba(34, 211, 238, 0.05), transparent 35%);
    z-index: -2;
  }
  
  .section-tag,
  .hero-badge,
  .pill,
  .modern-project-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.14);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: #d8b4fe;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
  }
  
  body.light-mode .section-tag,
  body.light-mode .hero-badge,
  body.light-mode .pill,
  body.light-mode .modern-project-type {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.16);
  }
  
  .section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 54px;
  }
  
  .section-heading h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
    margin-top: 14px;
    margin-bottom: 12px;
  }
  
  .section-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.85;
    font-size: 1rem;
  }
  
  /* HEADER */
  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: rgba(8, 12, 24, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  body.light-mode .header {
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }
  
  .nav {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  
  .logo {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
  }
  
  .logo span {
    color: var(--primary-2);
  }
  
  .nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
  }
  
  .nav-link {
    color: var(--muted);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
  }
  
  .nav-link:hover,
  .nav-link.active {
    color: var(--text);
  }
  
  .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -9px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
  }
  
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .theme-toggle,
  .menu-toggle {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: 0.3s ease;
  }
  
  .theme-toggle:hover,
  .menu-toggle:hover {
    transform: translateY(-2px);
    background: var(--surface-strong);
  }
  
  .menu-toggle {
    display: none;
  }
  
  /* HERO */
  .hero {
    min-height: calc(100vh - 78px);
    display: flex;
    align-items: center;
  }
  
  .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 54px;
  }
  
  .hero-text h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1.05;
    margin: 18px 0;
    letter-spacing: -0.03em;
  }
  
  .hero-text h1 span {
    background: linear-gradient(135deg, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .hero-text h2 {
    min-height: 34px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 20px;
  }
  
  .hero-description {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--muted);
    max-width: 600px;
  }
  
  .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
  }
  
  .btn i {
    margin-right: 8px;
  }
  
  .btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 16px 35px rgba(124, 58, 237, 0.28);
  }
  
  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.34);
  }
  
  .btn-secondary {
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--surface);
  }
  
  .btn-secondary:hover {
    background: var(--surface-strong);
    transform: translateY(-2px);
  }
  
  .full-width {
    width: 100%;
  }
  
  .hero-socials {
    display: flex;
    gap: 14px;
    margin-top: 28px;
  }
  
  .hero-socials a {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    transition: 0.3s ease;
  }
  
  .hero-socials a:hover {
    transform: translateY(-4px);
    color: var(--primary-2);
    background: var(--surface-strong);
  }
  
  .hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .premium-avatar-wrap {
    position: relative;
    width: 420px;
    height: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .avatar-bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
  }
  
  .avatar-bg-1 {
    width: 220px;
    height: 220px;
    background: rgba(124, 58, 237, 0.35);
    top: 20px;
    left: 30px;
  }
  
  .avatar-bg-2 {
    width: 180px;
    height: 180px;
    background: rgba(34, 211, 238, 0.28);
    bottom: 30px;
    right: 20px;
  }
  
  .avatar-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
      0 0 0 14px rgba(255, 255, 255, 0.03),
      0 0 0 28px rgba(255, 255, 255, 0.015);
    animation: ringFloat 6s ease-in-out infinite;
    z-index: 1;
  }
  
  .premium-avatar-card {
    position: relative;
    width: 280px;
    height: 340px;
    padding: 10px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05));
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
    z-index: 2;
    overflow: hidden;
  }
  
  .premium-avatar-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      135deg,
      rgba(124, 58, 237, 0.16),
      rgba(34, 211, 238, 0.08),
      transparent 60%
    );
    pointer-events: none;
    z-index: 1;
  }
  
  .premium-avatar-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    position: relative;
    z-index: 0;
  }
  
  .avatar-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 3;
  }
  
  .avatar-badge i {
    color: var(--primary-2);
  }
  
  .avatar-badge-1 {
    top: 60px;
    left: -10px;
    animation: badgeFloat 4s ease-in-out infinite;
  }
  
  .avatar-badge-2 {
    right: -5px;
    bottom: 70px;
    animation: badgeFloat 4s ease-in-out infinite 1.5s;
  }
  
  body.light-mode .premium-avatar-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  }
  
  body.light-mode .avatar-badge {
    background: rgba(255, 255, 255, 0.75);
  }
  
  @keyframes ringFloat {
    0%, 100% {
      transform: translateY(0px) rotate(0deg);
    }
    50% {
      transform: translateY(-8px) rotate(2deg);
    }
  }
  
  @keyframes badgeFloat {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-8px);
    }
  }
  
  /* COMMON CARDS */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
  }
  
  .card h3 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    line-height: 1.3;
  }
  
  .card p {
    color: var(--muted);
    line-height: 1.85;
  }
  
  .about-grid,
  .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }
  
  .timeline-item + .timeline-item {
    margin-top: 24px;
  }
  
  .timeline-year {
    display: inline-block;
    color: var(--primary-2);
    font-weight: 700;
    margin-bottom: 8px;
  }
  
  .timeline-item h4 {
    margin-bottom: 8px;
    font-size: 1.05rem;
  }
  
  /* EXPERIENCE */
  .experience-card {
    padding: 36px;
  }
  
  .experience-top {
    margin-bottom: 24px;
  }
  
  .company {
    color: var(--muted);
    font-weight: 600;
    margin-top: 6px;
  }
  
  .experience-points {
    display: grid;
    gap: 14px;
  }
  
  .point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }
  
  .point i {
    color: var(--primary-2);
    margin-top: 5px;
  }
  
  .point span {
    color: var(--muted);
    line-height: 1.75;
  }
  
  /* SKILLS */
  .skills-grid,
  .cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
  
  .chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .chip-group span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
  }
  
  body.light-mode .chip-group span {
    background: rgba(15, 23, 42, 0.04);
  }
  
  /* PROJECTS */
  .projects-section {
    position: relative;
  }
  
  .modern-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }
  
  .modern-project-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    backdrop-filter: blur(10px);
  }
  
  .modern-project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28);
    border-color: rgba(34, 211, 238, 0.35);
  }
  
  .featured-project {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 350px;
  }
  
  .modern-project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #0f172a;
  }
  
  .featured-project .modern-project-image {
    height: 100%;
  }
  
  .modern-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  
  .modern-project-card:hover .modern-project-image img {
    transform: scale(1.06);
  }
  
  .project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 10, 20, 0.48), rgba(7, 10, 20, 0.08));
  }
  
  .placeholder-modern {
    display: grid;
    place-items: center;
    min-height: 250px;
    background:
      radial-gradient(circle at top left, rgba(124, 58, 237, 0.2), transparent 35%),
      linear-gradient(135deg, rgba(124, 58, 237, 0.09), rgba(34, 211, 238, 0.06));
    color: #d8b4fe;
    font-size: 2.5rem;
  }
  
  .modern-project-content {
    padding: 26px;
  }
  
  .project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
  }
  
  .project-links {
    display: flex;
    gap: 10px;
  }
  
  .project-links a {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    transition: 0.3s ease;
  }
  
  .project-links a:hover {
    color: var(--primary-2);
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.35);
  }
  
  .modern-project-content h3 {
    font-size: 1.38rem;
    margin-bottom: 12px;
    line-height: 1.35;
  }
  
  .modern-project-content p {
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 20px;
  }
  
  .project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .project-tech-stack span {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
  }
  
  body.light-mode .modern-project-card {
    background: rgba(255, 255, 255, 0.92);
  }
  
  body.light-mode .project-links a,
  body.light-mode .project-tech-stack span {
    background: rgba(15, 23, 42, 0.04);
  }
  
  /* CERTIFICATIONS */
  .cert-grid .card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* CONTACT */
  .contact-card p {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .contact-card p + p {
    margin-top: 12px;
  }
  
  .form-row + .form-row {
    margin-top: 14px;
  }
  
  input,
  textarea {
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
  }
  
  input:focus,
  textarea:focus {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(255, 255, 255, 0.06);
  }
  
  body.light-mode input,
  body.light-mode textarea {
    background: rgba(15, 23, 42, 0.03);
  }
  
  input::placeholder,
  textarea::placeholder {
    color: var(--muted);
  }
  
  /* FOOTER */
  .footer {
    padding: 28px 0 36px;
    border-top: 1px solid var(--border);
  }
  
  .footer-content {
    text-align: center;
    color: var(--muted);
  }
  
  /* SCROLL TOP */
  .scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: 0.3s ease;
    z-index: 999;
  }
  
  .scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  /* ANIMATION */
  .reveal {
    opacity: 0;
    transform: translateY(42px);
    transition: all 0.8s ease;
  }
  
  .reveal.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  @keyframes floatBubble {
    0% {
      transform: translateY(0px) scale(1);
    }
    50% {
      transform: translateY(-20px) scale(1.1);
    }
    100% {
      transform: translateY(0px) scale(1);
    }
  }
  
  /* RESPONSIVE */
  @media (max-width: 1100px) {
    .hero-grid,
    .about-grid,
    .contact-grid,
    .skills-grid,
    .cert-grid {
      grid-template-columns: 1fr;
    }
  
    .hero-image {
      order: -1;
    }
  
    .avatar-wrapper {
      margin: 0 auto;
    }
  
    .modern-projects-grid {
      grid-template-columns: 1fr;
    }
  
    .featured-project {
      grid-column: span 1;
      grid-template-columns: 1fr;
      min-height: auto;
    }
  
    .featured-project .modern-project-image {
      height: 250px;
    }
  }
  
  @media (max-width: 860px) {
    .menu-toggle {
      display: grid;
    }
  
    .nav-links {
      position: absolute;
      top: 78px;
      left: 0;
      width: 100%;
      padding: 18px 1rem 24px;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border);
      display: none;
      flex-direction: column;
      gap: 18px;
    }
  
    .nav-links.open {
      display: flex;
    }
  
    .hero {
      padding-top: 24px;
    }
  
    .section {
      padding: 85px 0;
    }
  }
  
  @media (max-width: 640px) {
    .container {
      width: min(var(--container), calc(100% - 1.2rem));
    }
  
    .hero-text h1 {
      font-size: 2.35rem;
    }
  
    .hero-description {
      font-size: 0.98rem;
    }
  
    .avatar-wrapper {
      width: 300px;
      height: 300px;
    }
  
    .avatar-img {
      width: 220px;
      height: 220px;
    }
  
    .bubble-1 {
      width: 90px;
      height: 90px;
      top: -10px;
      left: 30px;
    }
  
    .bubble-2 {
      width: 65px;
      height: 65px;
      bottom: 28px;
      right: 8px;
    }
  
    .bubble-3 {
      width: 50px;
      height: 50px;
      left: 45px;
      bottom: 0;
    }
  
    .bubble-4 {
      width: 80px;
      height: 80px;
      top: 55px;
      right: -6px;
    }
  
    .card,
    .modern-project-content,
    .experience-card {
      padding: 22px;
    }
  
    .modern-project-content h3 {
      font-size: 1.18rem;
    }
  
    .modern-project-image,
    .featured-project .modern-project-image,
    .placeholder-modern {
      height: 220px;
      min-height: 220px;
    }
  
    .hero-buttons {
      flex-direction: column;
    }
  
    .btn {
      width: 100%;
    }
  
    .hero-socials {
      flex-wrap: wrap;
    }
  }

  @media (max-width: 1100px) {
    .premium-avatar-wrap {
      margin: 0 auto;
    }
  }
  
  @media (max-width: 640px) {
    .premium-avatar-wrap {
      width: 320px;
      height: 320px;
    }
  
    .avatar-ring {
      width: 250px;
      height: 250px;
      box-shadow:
        0 0 0 10px rgba(255, 255, 255, 0.03),
        0 0 0 20px rgba(255, 255, 255, 0.015);
    }
  
    .premium-avatar-card {
      width: 220px;
      height: 270px;
      border-radius: 24px;
    }
  
    .premium-avatar-card img {
      border-radius: 18px;
    }
  
    .avatar-badge {
      font-size: 0.76rem;
      padding: 8px 12px;
    }
  
    .avatar-badge-1 {
      top: 35px;
      left: -2px;
    }
  
    .avatar-badge-2 {
      right: -2px;
      bottom: 45px;
    }
  
    .avatar-bg-1 {
      width: 150px;
      height: 150px;
    }
  
    .avatar-bg-2 {
      width: 120px;
      height: 120px;
    }
  }