body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0a0f1c;
  color: white;
  overflow-x: hidden;
  padding: 0;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 15px 40px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  z-index: 9999;
}

.nav-links a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
}

/* HERO */
.hero {
  text-align: center;
  padding: 140px 20px;
  background: radial-gradient(circle at top, #1e293b, #0a0f1c);
}

.hero h1 {
  font-size: 40px;
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background: #3b82f6;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px #3b82f6;
}

/* SECTIONS */
section {
  padding: 90px 20px;
  max-width: 1000px;
  margin: auto;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

/* CARDS */
.card {
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 12px;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-8px) rotateX(5deg);
  background: rgba(255,255,255,0.1);
}

/* .project-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  margin: 15px 0;
  border-radius: 12px;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
} */

/* REVEAL ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* CURSOR GLOW */
.cursor-glow {
  position: fixed;
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
}

.unity-box {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.unity-box iframe {
  width: 100%;
  height: 100%;
}


/* =========================
   AI WIDGET BASE
========================= */

.ai-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;

    width: 320px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);

    border-radius: 16px;

    overflow: hidden;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);

    font-family: Arial, sans-serif;

    z-index: 9999;

    transition: all 0.3s ease;
}

/* =========================
   HEADER
========================= */

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 14px;

    background: linear-gradient(135deg, #3b82f6, #2563eb);

    color: white;

    font-weight: 600;
}

.toggle-btn {
    background: transparent;
    border: none;

    color: white;

    font-size: 18px;

    cursor: pointer;
}

/* =========================
   CHAT AREA
========================= */

.chat-box {
    height: 260px;

    overflow-y: auto;

    padding: 10px;

    display: flex;
    flex-direction: column;

    gap: 8px;

    font-size: 13px;
}

/* Scrollbar */
.chat-box::-webkit-scrollbar {
    width: 5px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

/* =========================
   MESSAGES
========================= */

.chat-box div {
    padding: 8px 10px;

    border-radius: 10px;

    max-width: 85%;

    word-wrap: break-word;
}

/* User message */
.chat-box div:nth-child(odd) {
    background: rgba(59,130,246,0.25);
    align-self: flex-end;
    color: #fff;
}

/* AI message */
.chat-box div:nth-child(even) {
    background: rgba(255,255,255,0.08);
    align-self: flex-start;
    color: #e5e7eb;
}

/* =========================
   INPUT AREA
========================= */

.chat-input {
    display: flex;

    padding: 10px;

    gap: 8px;

    border-top: 1px solid rgba(255,255,255,0.1);
}

.chat-input input {
    flex: 1;

    padding: 10px;

    border-radius: 10px;

    border: none;
    outline: none;

    background: rgba(255,255,255,0.1);

    color: white;
}

.chat-input input::placeholder {
    color: rgba(255,255,255,0.5);
}

.chat-input button {
    padding: 10px 12px;

    border: none;

    border-radius: 10px;

    background: #3b82f6;

    color: white;

    cursor: pointer;

    transition: 0.2s;
}

.chat-input button:hover {
    background: #2563eb;
}

/* =========================
   MINIMIZED STATE
========================= */

.ai-widget.minimized {
    width: 60px;
    height: 60px;

    border-radius: 50%;

    overflow: hidden;
}

/* hide chat when minimized */
.ai-widget.minimized .ai-content {
    display: none;
}

/* center icon when minimized */
.ai-widget.minimized .ai-header {
    height: 100%;
    justify-content: center;
    border-radius: 50%;
}

/* hide text when minimized */
.ai-widget.minimized .ai-header span {
    display: none;
}

/* =========================
   SMOOTH ANIMATION
========================= */

.ai-widget,
.chat-input button,
.chat-input input {
    transition: all 0.3s ease;
}

/* =========================
   MOBILE FIX
========================= */

@media (max-width: 768px) {
    .ai-widget {
        width: 90%;
        right: 5%;
    }

    .chat-box {
        height: 220px;
    }
}

.btn.secondary {
  background: transparent;
  border: 1px solid #3b82f6;
  margin-left: 10px;
}

.btn.secondary:hover {
  background: #3b82f6;
}

#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #0a0f1c;
}


.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 500px;
  margin: auto;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: white;
}

.contact-form button {
  padding: 12px;
  background: #3b82f6;
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.contact-form button:hover {
  box-shadow: 0 0 20px #3b82f6;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 60px 20px;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 25px;
  width: 200px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-card h3 {
  font-size: 32px;
  color: #3b82f6;
  margin: 0;
}

.stat-card p {
  margin: 5px 0 0;
  opacity: 0.8;
}

.stat-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.hero-3d {
  text-align: center;
  padding: 140px 20px;
  perspective: 1000px;
}

.hero-3d h1 {
  font-size: 40px;
  transform-style: preserve-3d;
  animation: float3d 5s ease-in-out infinite;
}

.hero-3d p {
  opacity: 0.8;
}

@keyframes float3d {
  0% {
    transform: rotateY(0deg) rotateX(2deg) translateY(2px);
  }
  50% {
    transform: rotateY(1deg) rotateX(-2deg) translateY(0px);
  }
  100% {
    transform: rotateY(0deg) rotateX(2deg) translateY(2px);
  }
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
}

.modal-content {
  background: #111827;
  width: 60%;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
}

.close {
  float: right;
  cursor: pointer;
  font-size: 24px;
}

.about {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 100px 20px;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
}

.about-image img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(59,130,246,0.5);
  box-shadow:
      0 0 30px rgba(59,130,246,0.4),
      0 0 60px rgba(59,130,246,0.2);
  transition: 0.4s;
}

.about-content {
  max-width: 600px;
}

.about-content p {
  line-height: 1.8;
  opacity: 0.9;
}


/* ABOUT IMAGE CONTAINER */
.about-image {
    width: 380px;
    height: 380px;
    position: relative;
    margin: 0 auto;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* FLOATING GROUP */
.float-wrapper {
    width: 380px;
    height: 380px;

    position: relative;

    animation: floatGroup 5s ease-in-out infinite;
}

/* COMMON RING SETTINGS */
.ring {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);
    transform-origin: center center;

    border-radius: 50%;
    box-sizing: border-box;
}

/* PROFILE IMAGE */
.float-wrapper img {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 280px;
    height: 280px;

    transform: translate(-50%, -50%);

    object-fit: cover;
    border-radius: 50%;

    border: 4px solid rgba(59,130,246,0.5);

    box-shadow:
        0 0 25px rgba(59,130,246,0.4),
        0 0 60px rgba(59,130,246,0.2);

    z-index: 3;
}

/* INNER RING */
.ring-1 {
    width: 320px;
    height: 320px;

    border: 3px dashed #3b82f6;

    animation: spin 18s linear infinite;

    z-index: 1;
}

/* OUTER RING */
.ring-2 {
    width: 360px;
    height: 360px;

    border: 2px solid rgba(59,130,246,0.25);

    animation: spinReverse 28s linear infinite;

    z-index: 0;
}

/* GLOW EFFECT */
.about-image::before {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 220px;
    height: 220px;

    transform: translate(-50%, -50%);

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(59,130,246,0.35),
        transparent 70%
    );

    filter: blur(40px);

    animation: pulseGlow 4s ease-in-out infinite;

    z-index: -1;
}

/* FLOAT WHOLE SYSTEM */
@keyframes floatGroup {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ROTATE CLOCKWISE */
@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ROTATE COUNTER-CLOCKWISE */
@keyframes spinReverse {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* PULSE GLOW */
@keyframes pulseGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
    }
}

/* MOBILE */
@media (max-width: 768px) {

    .about-image,
    .float-wrapper {
        width: 300px;
        height: 300px;
    }

    .float-wrapper img {
        width: 220px;
        height: 220px;
    }

    .ring-1 {
        width: 250px;
        height: 250px;
    }

    .ring-2 {
        width: 290px;
        height: 290px;
    }
}


// projects
.projects {
    padding: 100px 20px;
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 25px;
}

.project-card {
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(12px);

    border-radius: 16px;
    padding: 25px;

    cursor: pointer;

    transition: .3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card h3 {
    margin-bottom: 12px;
    color: #3b82f6;
}

.modal {
    display: none;

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,.8);

    z-index: 10000;
}

.modal-content {
    width: 90%;
    max-width: 900px;

    margin: 60px auto;

    background: #111827;

    border-radius: 20px;

    padding: 30px;

    position: relative;

    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;

    right: 20px;
    top: 10px;

    font-size: 35px;

    cursor: pointer;
}

.tech-badge {
    display: inline-block;

    margin: 5px;
    padding: 8px 14px;

    border-radius: 999px;

    background: rgba(59,130,246,.15);

    color: #60a5fa;
}

.project-links {
    margin-top: 20px;
}

.project-links a {
    display: inline-block;

    padding: 10px 20px;

    border-radius: 10px;

    background: #3b82f6;

    color: white;

    text-decoration: none;

    margin-right: 10px;
}

/* Portfolio guide: suggested questions and links */
.ai-suggestions { display:flex; flex-wrap:wrap; gap:6px; padding:8px 10px 12px; max-height:116px; overflow:auto; }
.ai-suggestions button { font:inherit; font-size:11px; line-height:1.3; padding:7px 9px; border-radius:999px; border:1px solid rgba(100,160,255,.32); background:rgba(59,130,246,.12); color:#dbeafe; cursor:pointer; text-align:left; }
.ai-suggestions button:hover, .ai-suggestions button:focus-visible { background:rgba(59,130,246,.28); outline:1px solid #60a5fa; }
.chat-box .msg { white-space:pre-wrap; }
.chat-box .msg.user { align-self:flex-end; background:rgba(59,130,246,.25); }
.chat-box .msg.ai { align-self:flex-start; background:rgba(255,255,255,.08); }
.ai-project-link { display:block; margin-top:7px; color:#93c5fd; text-decoration:underline; }
