:root {
  --cyan:   #00D9FF;
  --violet: #7C3AED;
  --bg:     #0A0E27;
  --bg2:    #151B3B;
  --card:   #1A2046;
  --text:   #FFFFFF;
  --muted:  #94A3B8;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
}

::-webkit-scrollbar          { width: 5px; }
::-webkit-scrollbar-track    { background: var(--bg); }
::-webkit-scrollbar-thumb    { background: var(--violet); border-radius: 3px; }

.grad-text {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sep-line {
  flex: 1;
  height: 1px;
  background: rgba(0,217,255,.12);
}

.sec-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: .825rem;
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .10;
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 640px; height: 640px; background: var(--cyan);   top: -220px; left: -220px; animation: blobDrift 10s ease-in-out infinite; }
.blob-2 { width: 560px; height: 560px; background: var(--violet); bottom: -180px; right: -180px; animation: blobDrift 12s ease-in-out infinite reverse; }
.blob-3 { width: 320px; height: 320px; background: var(--cyan);   top: 45%; left: 55%; animation: blobDrift 9s ease-in-out infinite 3s; }

@keyframes blobDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(35px,-35px) scale(1.06); }
  66%      { transform: translate(-25px,25px) scale(.95); }
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,217,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,217,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
}

.layer { position: relative; z-index: 1; }

#navbar {
  transition: background .35s, backdrop-filter .35s, box-shadow .35s;
}
#navbar.scrolled {
  background: rgba(10,14,39,.88);
  backdrop-filter: blur(22px);
  box-shadow: 0 1px 0 rgba(0,217,255,.10);
}

.nav-link {
  position: relative;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  transition: color .25s;
}
.nav-link:hover { color: var(--cyan); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width .25s;
}
.nav-link:hover::after { width: 100%; }

.cv-btn {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 7px 14px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  transition: background .25s;
  display: inline-flex; align-items: center; gap: 6px;
}
.cv-btn:hover { background: rgba(0,217,255,.10); }

.hb-line {
  display: block;
  width: 22px; height: 2px;
  background: var(--muted);
  margin: 5px 0;
  transition: transform .3s, opacity .3s;
}
#hamburger.open .hb-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger.open .hb-line:nth-child(2) { opacity: 0; }
#hamburger.open .hb-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

.status-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  50%      { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.cursor {
  display: inline-block;
  width: 3px; height: .9em;
  background: var(--cyan);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

.tech-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  font-weight: 500;
  color: var(--cyan);
  background: rgba(0,217,255,.07);
  border: 1px solid rgba(0,217,255,.18);
  padding: 4px 12px;
  border-radius: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: opacity .25s, transform .2s, box-shadow .25s;
}
.btn-primary:hover {
  opacity: .88;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,217,255,.22);
}

.btn-outline {
  border: 1px solid rgba(0,217,255,.38);
  color: var(--cyan);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s;
}
.btn-outline:hover {
  background: rgba(0,217,255,.09);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.glass {
  background: rgba(26,32,70,.58);
  border: 1px solid rgba(0,217,255,.08);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.glass:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(0,217,255,.11);
  border-color: rgba(0,217,255,.28);
}

.about-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted);
  font-size: .875rem;
}
.about-item::before { content: '▹'; color: var(--cyan); flex-shrink: 0; }

.profile-wrap {
  width: 100%; max-width: 320px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--card) 60%, var(--bg2) 100%);
  border: 2px solid rgba(0,217,255,.2);
  border-radius: 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.profile-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 38%, rgba(0,217,255,.07) 0%, transparent 70%);
}

.proj-img {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg2), var(--card));
}
.proj-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(0,217,255,.06) 50%,
    transparent 70%
  );
  animation: shimmer 2.8s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.proj-showcase {
  background: rgba(26,32,70,.52);
  border: 1px solid rgba(0,217,255,.08);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.showcase-inner {
  position: relative;
  height: 460px;
}

@media (max-width: 767px) {
  .showcase-inner { height: 480px; }
}

.showcase-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
  display: flex;
  flex-direction: column-reverse;
}

.showcase-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Bottom: text strip */
.showcase-left {
  flex: 0 0 auto;
  padding: 20px 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 3;
  background: rgba(10,14,39,.82);
  border-top: 1px solid rgba(0,217,255,.09);
}

@media (max-width: 767px) {
  .showcase-left {
    padding: 16px 22px;
    gap: 16px;
    flex-wrap: wrap;
  }
}

.showcase-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0;
  white-space: nowrap;
}

.showcase-desc {
  display: none;
}

.showcase-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  font-weight: 500;
  transition: all .2s;
  width: fit-content;
  white-space: nowrap;
  flex-shrink: 0;
}
.showcase-link:hover { gap: 13px; color: #fff; }

.showcase-left .badge-cyan,
.showcase-left .badge-violet { margin-bottom: 0 !important; flex-shrink: 0; }
.showcase-left > div { margin-bottom: 0 !important; }
.showcase-left-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.showcase-pills { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }

/* Right: visual panel */
.showcase-right {
  flex: 1;
  position: relative;
  overflow: hidden;
}

@media (max-width: 767px) {
  .showcase-right { flex: 1; }
}

.showcase-right::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  background: linear-gradient(to top, rgba(10,14,39,.85) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.showcase-icon-bg {
  background: linear-gradient(135deg, rgba(8,12,35,.5) 0%, rgba(26,32,70,.25) 100%);
}

.showcase-icon-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s-ring {
  position: absolute;
  width: var(--sz);
  height: var(--sz);
  border-radius: 50%;
  border: 1px solid var(--c);
  background: radial-gradient(circle, var(--c) 0%, transparent 65%);
}

.s-icon {
  font-size: 6.5rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .s-icon { font-size: 4.5rem; }
}

/* Image reel (multi-image per project) */
.img-reel {
  position: absolute;
  inset: 0;
  background: #080c23;
}

.reel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity .65s ease;
}

.reel-img.active { opacity: 1; }

.reel-dots {
  position: absolute;
  bottom: 14px;
  right: 18px;
  z-index: 5;
  display: flex;
  gap: 6px;
  align-items: center;
}

.reel-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .3s;
}

.reel-dot.active {
  background: #fff;
  width: 18px;
}

.showcase-img-fade {
  display: none;
}

.showcase-footer {
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0,217,255,.07);
}

@media (max-width: 767px) {
  .showcase-footer { padding: 16px 24px; }
}

.s-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.s-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.18);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .32s;
}

.s-dot.active {
  background: var(--cyan);
  width: 26px;
  box-shadow: 0 0 10px rgba(0,217,255,.45);
}

.s-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0,217,255,.22);
  background: rgba(10,14,39,.5);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  cursor: pointer;
  transition: all .25s;
}

.s-arrow:hover {
  background: rgba(0,217,255,.12);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,217,255,.22);
}

.proj-carousel::after { display: none; }

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}

.carousel-slide.active { opacity: 1; }

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10,14,39,.72);
  border: 1px solid rgba(0,217,255,.25);
  color: var(--cyan);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  cursor: pointer;
  transition: all .25s;
  z-index: 10;
  opacity: 0;
  backdrop-filter: blur(6px);
}
.proj-carousel:hover .carousel-btn { opacity: 1; }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-btn:hover {
  background: rgba(0,217,255,.2);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0,217,255,.25);
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.3);
  border: none;
  cursor: pointer;
  transition: all .3s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--cyan);
  width: 18px;
  box-shadow: 0 0 8px rgba(0,217,255,.5);
}

.proj-card {
  transition: opacity .3s, transform .3s;
}
.proj-card.hidden { display: none; }

.f-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 7px;
  border: 1px solid rgba(0,217,255,.2);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all .25s;
}
.f-btn:hover, .f-btn.active {
  background: rgba(0,217,255,.11);
  border-color: var(--cyan);
  color: var(--cyan);
}

.skill-card {
  background: rgba(26,32,70,.5);
  border: 1px solid rgba(0,217,255,.07);
  border-radius: 14px;
  padding: 22px;
  transition: all .3s;
}
.skill-card:hover {
  border-color: rgba(0,217,255,.22);
  background: rgba(26,32,70,.8);
  transform: translateY(-4px);
}

.soc-icon {
  width: 48px; height: 48px;
  border: 1px solid rgba(0,217,255,.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 1.2rem;
  transition: all .25s;
}
.soc-icon:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,217,255,.08);
  transform: translateY(-3px);
}

.badge-cyan   { font-family: 'JetBrains Mono', monospace; font-size: .65rem; padding: 2px 9px; border-radius: 4px; background: rgba(0,217,255,.1);   color: var(--cyan); }
.badge-violet { font-family: 'JetBrains Mono', monospace; font-size: .65rem; padding: 2px 9px; border-radius: 4px; background: rgba(124,58,237,.15); color: #a78bfa; }

.stack-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: .63rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(0,217,255,.07);
  border: 1px solid rgba(0,217,255,.15);
  color: var(--cyan);
}

.contact-bar {
  width: 72px; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: 2px;
  margin: 0 auto 24px;
}

.bg-alt { background: rgba(21,27,59,.32); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 8, 20, 0.78);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  padding: 36px 32px;
  position: relative;
  transform: translateY(24px);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  color: var(--muted);
  font-size: 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s;
  line-height: 1;
}
.modal-close:hover { color: var(--cyan); }

.form-label {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .04em;
}

.form-input {
  width: 100%;
  background: rgba(10, 14, 39, 0.65);
  border: 1px solid rgba(0, 217, 255, 0.14);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: .9rem;
  font-family: 'Space Grotesk', sans-serif;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.09);
}
.form-input::placeholder { color: rgba(148, 163, 184, 0.4); }
