/* ============ RESET & BASE ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Inter, Arial, sans-serif;
  background: #01030a;
  color: #f5f5f5;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============ LAYER 1 — SPACE SKY ============ */
.space-bg {
  position: fixed; inset: 0; z-index: -4;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 30%, #061420 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, #0a1018 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, #020610 0%, #01030a 100%);
  pointer-events: none;
}

.stars { position: absolute; inset: -50%; background-repeat: repeat; }

.stars.far {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1px 1px at 80px 90px, rgba(200,220,255,.45), transparent 100%),
    radial-gradient(1px 1px at 150px 60px, rgba(255,255,255,.4), transparent 100%),
    radial-gradient(1px 1px at 210px 150px, rgba(180,210,255,.5), transparent 100%),
    radial-gradient(1px 1px at 300px 40px, rgba(255,255,255,.35), transparent 100%),
    radial-gradient(1px 1px at 60px 200px, rgba(200,220,255,.4), transparent 100%),
    radial-gradient(1px 1px at 260px 250px, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 340px 180px, rgba(200,220,255,.35), transparent 100%);
  background-size: 380px 380px;
  opacity: .65;
}

.stars.mid {
  background-image:
    radial-gradient(1.4px 1.4px at 120px 60px,  rgba(255,255,255,.9), transparent 100%),
    radial-gradient(1.4px 1.4px at 400px 220px, rgba(200,230,255,.85), transparent 100%),
    radial-gradient(1.4px 1.4px at 250px 350px, rgba(255,255,255,.75), transparent 100%),
    radial-gradient(1.4px 1.4px at 520px 120px, rgba(170,220,240,.85), transparent 100%),
    radial-gradient(1.4px 1.4px at 60px 420px,  rgba(255,255,255,.8), transparent 100%),
    radial-gradient(1.4px 1.4px at 620px 400px, rgba(220,240,255,.7), transparent 100%);
  background-size: 700px 700px;
  opacity: .8;
}

.stars.near {
  background-image:
    radial-gradient(2px 2px at 180px 140px, rgba(255,255,255,1), transparent 100%),
    radial-gradient(2px 2px at 640px 380px, rgba(220,240,255,1), transparent 100%),
    radial-gradient(2.2px 2.2px at 900px 200px, rgba(255,255,255,.95), transparent 100%),
    radial-gradient(2px 2px at 400px 620px, rgba(190,230,245,.9), transparent 100%);
  background-size: 1100px 1100px;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.6));
}

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

.nebula.cyan {
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  top: -15%; left: -10%;
  background: radial-gradient(circle, rgba(40, 140, 180, .18), transparent 70%);
}

.nebula.warm {
  width: 45vw; height: 45vw; max-width: 700px; max-height: 700px;
  bottom: -10%; right: -8%;
  background: radial-gradient(circle, rgba(220, 130, 60, .10), transparent 70%);
}

/* ============ LAYER 2 — DRIFTING NETWORK ============ */
#bgCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -3;
  display: block;
  pointer-events: none;
  opacity: .45;
}

/* ============ LAYER 3 — NOC TOPOLOGY ============ */
#netCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  display: block;
  pointer-events: none;
}

/* ============ LAYER 4 — SOFT VIGNETTE ============ */
.vignette {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .35) 100%),
    linear-gradient(180deg, rgba(1, 3, 10, .35) 0%, transparent 20%, transparent 80%, rgba(1, 3, 10, .4) 100%);
}

/* ============ NAVBAR (slimmer) ============ */
.navbar {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 64px;
  background: rgba(1, 3, 10, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(6vw, 30px);
  z-index: 20; transition: .3s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(1, 3, 10, .88);
  box-shadow: 0 5px 25px rgba(0, 0, 0, .6);
  border-bottom: 1px solid rgba(85, 230, 242, .12);
}

.brand {
  font-size: 26px; font-weight: 800;
  color: #55e6f2; text-decoration: none;
  letter-spacing: -1px;
  text-shadow: 0 0 20px rgba(85, 230, 242, .45);
}

.navbar nav { display: flex; gap: 26px; }

.navbar nav a {
  position: relative;
  color: #c5d0d6; text-decoration: none;
  font-size: 14px; font-weight: 600; transition: .25s;
}

.navbar nav a:hover { color: #55e6f2; text-shadow: 0 0 12px rgba(85, 230, 242, .6); }

.navbar nav a::after {
  content: ""; position: absolute;
  left: 0; bottom: -6px; width: 0; height: 2px;
  background: #55e6f2; box-shadow: 0 0 10px #55e6f2;
  transition: width .25s ease;
}

.navbar nav a:hover::after { width: 100%; }

.menu {
  display: none; background: none; border: 0;
  color: #fff; font-size: 24px; cursor: pointer;
}

/* ============ SECTIONS ============ */
.section { min-height: 100vh; padding: 100px max(7vw, 30px); position: relative; }
.container { max-width: 1320px; margin: auto; }
.section-title { text-align: center; margin-bottom: 70px; }
.section-title h2 { font-size: 50px; line-height: 1.2; letter-spacing: -.03em; }

.section-title span {
  display: block; width: 92px; height: 5px;
  background: #55e6f2; margin: 16px auto 0;
  border-radius: 4px;
  box-shadow: 0 0 22px rgba(85, 230, 242, .65);
}

/* ============ HERO ============ */
.hero {
  height: 100vh; min-height: 720px; padding-top: 64px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; text-align: center; }

.profile-ring {
  width: 250px; height: 250px;
  border: 6px solid #55e6f2; border-radius: 50%;
  background: #0a131c;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin: 0 auto 35px;
  box-shadow:
    0 0 0 5px rgba(85, 230, 242, .1),
    0 0 60px rgba(85, 230, 242, .3),
    inset 0 0 30px rgba(85, 230, 242, .12);
}

.profile-ring img { width: 100%; height: 100%; object-fit: cover; }

.initials { display: none; color: #55e6f2; font-size: 80px; font-weight: 800; }
.photo-placeholder .initials { display: block; }

.hero h1 {
  font-size: 76px; line-height: 1.1; font-weight: 800;
  margin-bottom: 22px; letter-spacing: -.03em;
}

.hero h1 span { color: #f6f6f6; text-shadow: 0 0 30px rgba(255, 255, 255, .15); }
.hero h1 strong { color: #55e6f2; text-shadow: 0 0 35px rgba(85, 230, 242, .55); }

.hero p {
  font-size: 27px; color: #b0c0c8; margin-bottom: 45px;
  text-shadow: 0 0 15px rgba(0, 0, 0, .9);
}

.hero-buttons { display: flex; gap: 18px; justify-content: center; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 205px; height: 64px; border-radius: 34px;
  text-decoration: none; font-weight: 800; font-size: 18px;
  letter-spacing: .3px; transition: .25s;
  cursor: pointer;
  border: 2px solid transparent;
  font-family: inherit;
}

.btn.primary {
  background: #55e6f2; color: #01030a;
  border: 2px solid #55e6f2;
  box-shadow: 0 0 30px rgba(85, 230, 242, .4);
}

.btn.outline {
  background: rgba(1, 3, 10, .4); color: #fff;
  border: 2px solid #55e6f2;
  backdrop-filter: blur(6px);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(85, 230, 242, .45), 0 0 60px rgba(85, 230, 242, .25);
}

.btn:disabled {
  opacity: .75;
  cursor: default;
  transform: none;
}

/* ============ ABOUT ============ */
.about-section {
  background: rgba(3, 8, 16, .6);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(85, 230, 242, .08);
  border-bottom: 1px solid rgba(85, 230, 242, .08);
}

.about-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 80px; align-items: center;
}

.about-text p { font-size: 20px; color: #b8c5cc; margin-bottom: 28px; }
.about-text b { color: #fff; }

.bar-item { margin: 0 0 35px; }
.bar-item > div:first-child {
  display: flex; justify-content: space-between;
  font-size: 20px; margin-bottom: 8px;
}
.bar-item span { color: #8fa2ac; }

.track { height: 10px; background: #101a24; border-radius: 10px; overflow: hidden; }

.track i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #55e6f2, #72f3a6);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(85, 230, 242, .6);
}

/* ============ SKILLS ============ */
.skills-section { background: rgba(3, 8, 16, .35); backdrop-filter: blur(8px); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.card {
  min-height: 285px;
  background: rgba(6, 12, 20, .75);
  border: 1px solid #1a2632; border-radius: 13px;
  padding: 48px 40px; text-align: center;
  transition: .3s; backdrop-filter: blur(6px);
}

.card:hover {
  transform: translateY(-8px); border-color: #55e6f2;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .55), 0 0 40px rgba(85, 230, 242, .2);
}

.icon {
  font-size: 48px; color: #55e6f2; margin-bottom: 20px;
  text-shadow: 0 0 25px rgba(85, 230, 242, .7);
}

.card h3 { font-size: 24px; margin-bottom: 18px; }
.card p { font-size: 17px; color: #b0c0c8; }

/* ============ PORTFOLIO ============ */
.portfolio-section {
  background: rgba(3, 8, 16, .6);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(85, 230, 242, .08);
  border-bottom: 1px solid rgba(85, 230, 242, .08);
}

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.project {
  background: rgba(6, 12, 20, .75);
  border: 1px solid #1a2632; border-radius: 14px;
  padding: 38px; min-height: 280px;
  transition: .3s; backdrop-filter: blur(6px);
}

.project:hover {
  transform: translateY(-7px); border-color: #55e6f2;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .55), 0 0 40px rgba(85, 230, 242, .2);
}

.project-top {
  color: #55e6f2; font-size: 42px; font-weight: 800;
  text-shadow: 0 0 25px rgba(85, 230, 242, .7);
}

.project h3 { font-size: 27px; margin: 12px 0; }
.project p { color: #8fa2ac; margin-bottom: 25px; }
.project span { font-size: 13px; font-weight: 800; color: #55e6f2; letter-spacing: 1px; }

/* ============ CONTACT / GET IN TOUCH ============ */
.contact-section {
  min-height: 70vh; display: flex; align-items: center;
  background: rgba(3, 8, 16, .35); backdrop-filter: blur(8px);
}

.contact-box {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(6, 12, 20, .85);
  border: 1px solid #1a2632; border-radius: 16px;
  padding: 55px 45px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 60px rgba(85, 230, 242, .08);
  text-align: center;
}

.contact-box h3 { font-size: 36px; margin-bottom: 10px; }
.contact-box > p { color: #8fa2ac; font-size: 17px; margin-bottom: 32px; }

/* ---- form ---- */
.contact-form {
  display: grid;
  gap: 18px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: #8fa2ac;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(3, 8, 16, .7);
  border: 1px solid #1a2632;
  border-radius: 10px;
  padding: 13px 15px;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #566a75;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #55e6f2;
  background: rgba(3, 8, 16, .9);
  box-shadow: 0 0 0 3px rgba(85, 230, 242, .15);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.send-btn {
  justify-self: start;
  margin-top: 6px;
  min-width: 180px;
  height: 58px;
  font-size: 16px;
  letter-spacing: 1.2px;
}

.send-btn.is-sent {
  background: #72f3a6;
  border-color: #72f3a6;
  color: #01130a;
}

/* ============ FOOTER ============ */
footer {
  padding: 30px; text-align: center;
  background: rgba(1, 3, 10, .9); color: #5a6b75;
  border-top: 1px solid rgba(85, 230, 242, .1);
}

/* ============ REVEAL ============ */
.reveal {
  opacity: 0; transform: translateY(35px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .navbar { height: 56px; }
  .brand { font-size: 22px; }
  .navbar nav {
    display: none; position: absolute;
    top: 56px; left: 0; right: 0;
    background: rgba(1, 3, 10, .97);
    backdrop-filter: blur(14px);
    padding: 25px; flex-direction: column;
    gap: 18px; text-align: center;
    border-bottom: 1px solid rgba(85, 230, 242, .15);
  }
  .navbar nav.open { display: flex; }
  .menu { display: block; }
  .hero { min-height: 650px; padding-top: 56px; }
  .profile-ring { width: 190px; height: 190px; }
  .hero h1 { font-size: 52px; }
  .hero p { font-size: 22px; }
  .about-grid, .cards, .project-grid { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 40px; }
  .section { padding-left: 25px; padding-right: 25px; padding-top: 80px; }
  .about-grid { gap: 45px; }
  .card { min-height: 230px; }
  .contact-box { padding: 40px 25px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 39px; }
  .hero p { font-size: 18px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 210px; height: 56px; font-size: 16px; }
  .profile-ring { width: 155px; height: 155px; }
  .about-text p { font-size: 17px; }
  .section-title { margin-bottom: 45px; }
  .section-title h2 { font-size: 34px; }
  .contact-box h3 { font-size: 28px; }
  .send-btn { width: 100%; justify-self: stretch; }
}