:root {
  --bg: #07111f;
  --bg2: #0c1929;
  --card: rgba(18, 34, 52, 0.88);
  --line: rgba(255,255,255,0.12);
  --text: #eef6ff;
  --muted: #b7c5d4;
  --blue: #2d8cff;
  --green: #28d17c;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at top right, #123c77 0%, transparent 28%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container { width: min(92%, 1500px); margin: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(4, 12, 24, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(92%, 1500px);
  margin: auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand span {
  font-size: 28px;
  color: white;
  letter-spacing: -2px;
}

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a { color: white; opacity: 0.92; }
.nav-links a:hover { color: var(--blue); }

.download-top {
  background: var(--blue);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}

.menu-btn {
  display: none;
  background: transparent;
  color: white;
  border: 0;
  font-size: 24px;
}

.hero {
  min-height: 445px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(7,17,31,0.96) 0%, rgba(8,24,46,0.95) 42%, rgba(8,25,55,0.45) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(45,140,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(45,140,255,0.07) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.6;
}

.hero-content {
  width: min(92%, 1500px);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 42px 0;
}

.small-blue { color: var(--blue); font-weight: 800; font-size: 18px; }

.hero h1 {
  font-size: clamp(48px, 7vw, 72px);
  line-height: 1;
  margin: 8px 0;
  letter-spacing: -2px;
}

.hero h2 {
  color: var(--blue);
  font-size: 23px;
  margin-bottom: 8px;
}

.tech-line {
  color: white;
  font-weight: 700;
  margin-bottom: 18px;
}

.tech-line span { color: var(--muted); margin: 0 12px; }

.summary {
  max-width: 560px;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; margin: 18px 0 22px; }

.btn {
  min-width: 140px;
  text-align: center;
  padding: 12px 20px;
  border-radius: 7px;
  font-weight: 800;
  border: 1px solid var(--line);
}

.primary { background: var(--blue); border-color: var(--blue); }
.secondary { background: rgba(255,255,255,0.05); }

.badges {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: fit-content;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
}

.badges span { padding: 10px 14px; border-right: 1px solid var(--line); }
.badges span:last-child { border-right: 0; }

.hero-visual {
  height: 350px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.monitor {
  background: #0b1422;
  border: 8px solid #111927;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.55);
  position: absolute;
}

.monitor-one {
  width: 370px;
  height: 230px;
  left: 10%;
  top: 40px;
  padding: 18px;
  transform: perspective(900px) rotateY(7deg);
}

.monitor-two {
  width: 335px;
  height: 205px;
  right: 18%;
  top: 65px;
  background: #eaf1f7;
  color: #111;
  padding: 18px;
  transform: perspective(900px) rotateY(-5deg);
}

.tower {
  position: absolute;
  right: 2%;
  bottom: 42px;
  width: 145px;
  height: 260px;
  background: linear-gradient(90deg,#0b1220,#151d2a);
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.tower::before { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); right: 42px; top: 145px; box-shadow: 0 0 20px var(--blue); }

.screen-title { color: #8fc4ff; font-size: 13px; margin-bottom: 12px; }
.server-card { width: 80px; height: 92px; background: #f57c24; float: left; margin-right: 18px; }
.server-lines span { display: block; height: 8px; background: #315170; margin: 12px 0; border-radius: 3px; }

.window-bar { height: 14px; background: #d8dee7; margin-bottom: 15px; }
.ad-tree span { display: block; margin: 11px 0; font-size: 14px; }

.dashboard {
  margin-top: -5px;
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1.15fr;
  gap: 12px;
}

.card {
  background: linear-gradient(145deg, rgba(23, 42, 62, 0.92), rgba(13, 28, 45, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 16px 35px rgba(0,0,0,0.18);
}

.card h3 { font-size: 21px; margin-bottom: 18px; }

.card p { color: var(--muted); margin-bottom: 14px; }

.small-link {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 6px;
  color: white;
  font-size: 14px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.skill-grid span {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: 7px;
  font-weight: 700;
  color: white;
}

.status-list { list-style: none; }
.status-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 5px 0;
  font-size: 14px;
  color: var(--muted);
}
.status-list b {
  color: var(--green);
  border: 1px solid rgba(40,209,124,0.45);
  padding: 1px 9px;
  border-radius: 10px;
  font-size: 12px;
}

.grid-section, .gallery-section, .side-by-side, .stats, .contact {
  margin-top: 12px;
}

.section-title {
  text-align: left;
  margin: 52px 0 18px;
}
.section-title h2 { font-size: 34px; }
.section-title p { color: var(--muted); }

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

.project-card {
  background: linear-gradient(145deg, rgba(23, 42, 62, 0.92), rgba(13, 28, 45, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.project-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
  background: #0a1624;
  margin-bottom: 12px;
}

.project-card h3 { font-size: 16px; margin-bottom: 8px; }
.project-card p { color: var(--muted); font-size: 13px; min-height: 68px; }
.project-card a {
  display: inline-block;
  margin-top: 10px;
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  color: white;
}

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

.gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: #081320;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease;
}
.gallery img:hover { transform: scale(1.02); border-color: var(--blue); }

.side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cert-box {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  margin-bottom: 12px;
  padding: 12px;
}

.blue { color: var(--blue) !important; font-weight: 800; }
.cert-box div { margin: 8px 0; }
.cert-box b { display: block; }
.cert-box span { color: var(--muted); font-size: 13px; }

.timeline div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline span { color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  background: linear-gradient(145deg, rgba(23, 42, 62, 0.92), rgba(13, 28, 45, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
}
.stat b { color: var(--blue); font-size: 28px; display: block; }
.stat span { color: var(--muted); }

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.quote { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.quote p { color: white; font-size: 20px; }
.quote span { color: var(--muted); }

.contact-card p {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

footer {
  text-align: center;
  padding: 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.86);
  padding: 20px;
}
.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 1050px) {
  .hero-content, .dashboard, .side-by-side, .contact { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .project-grid, .gallery, .stats { grid-template-columns: repeat(2, 1fr); }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .download-top { display: none; }
  .menu-btn { display: block; }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 4%;
    right: 4%;
    background: rgba(4, 12, 24, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    display: none;
    flex-direction: column;
    gap: 14px;
  }
  .nav-links.active { display: flex; }
}

@media (max-width: 640px) {
  .project-grid, .gallery, .stats { grid-template-columns: 1fr; }
  .gallery img { height: 190px; }
  .badges { width: 100%; }
  .badges span { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
}

#about,
#skills,
#projects,
#homelab,
#certifications,
#timeline,
#contact {
    scroll-margin-top: 100px;
}