:root {
  --bg: #000503;
  --panel: rgba(2, 18, 10, 0.72);
  --panel-strong: rgba(3, 27, 14, 0.9);
  --line: rgba(0, 255, 90, 0.22);
  --line-soft: rgba(255, 255, 255, 0.1);
  --text: #f4fff7;
  --muted: #a6b8aa;
  --green: #00ff66;
  --green-soft: #43ff9a;
  --amber: #c7ff7a;
  --danger: #ff5c7a;
  --mono: "Consolas", "Courier New", monospace;
  color: var(--text);
  background: var(--bg);
  font-family: var(--mono);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
}

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

.terminal-grid {
  background:
    linear-gradient(rgba(0, 255, 90, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 90, 0.065) 1px, transparent 1px),
    radial-gradient(circle at 48% 24%, rgba(0, 255, 90, 0.18), transparent 34%),
    radial-gradient(circle at 78% 82%, rgba(0, 255, 90, 0.12), transparent 28%);
  background-size: 60px 60px, 60px 60px, auto, auto;
  inset: 0;
  position: fixed;
  z-index: -3;
}

.terminal-grid::after {
  background: linear-gradient(90deg, rgba(0, 5, 3, 0.94), rgba(0, 20, 8, 0.58), rgba(0, 5, 3, 0.9));
  content: "";
  inset: 0;
  position: absolute;
}

.scanline {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 2px,
    transparent 5px
  );
  inset: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  position: fixed;
  z-index: 50;
}

.shell-nav {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(0, 5, 3, 0.72);
  border: 1px solid var(--line);
  border-bottom-color: rgba(0, 255, 90, 0.14);
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  left: 50%;
  max-width: min(1240px, calc(100% - 42px));
  min-height: 68px;
  padding: 0 18px;
  position: fixed;
  top: 18px;
  transform: translateX(-50%);
  width: 100%;
  z-index: 40;
}

.shell-brand,
.shell-nav nav,
.nav-status,
.hero-actions {
  align-items: center;
  display: flex;
}

.shell-brand {
  color: var(--green);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 900;
  gap: 10px;
  white-space: nowrap;
}

.prompt {
  color: var(--green-soft);
  text-shadow: 0 0 18px rgba(0, 255, 102, 0.74);
}

.shell-nav nav {
  gap: clamp(8px, 1.35vw, 18px);
  justify-content: center;
  margin-left: 0;
  min-width: 0;
}

.shell-nav nav a {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 0.82rem;
  gap: 7px;
  opacity: 0.92;
  white-space: nowrap;
}

.brand-icon,
.shell-nav nav a::before {
  align-items: center;
  border: 1px solid rgba(0, 255, 102, 0.34);
  color: var(--green);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
  padding: 0 5px;
  text-shadow: 0 0 14px rgba(0, 255, 102, 0.4);
}

.brand-icon {
  font-size: 0.72rem;
  height: 24px;
  min-width: 34px;
}

.shell-nav nav a::before {
  content: attr(data-icon);
}

.shell-nav nav a:hover {
  color: var(--green);
}

.shell-nav nav a.active {
  color: var(--green);
  text-shadow: 0 0 18px rgba(0, 255, 102, 0.34);
}

.nav-status {
  color: var(--green);
  gap: 10px;
  justify-self: end;
  margin-left: 0;
  white-space: nowrap;
}

.nav-status strong {
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.language-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--green);
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 900;
  min-height: 34px;
  padding: 0 10px;
}

.menu-toggle {
  align-items: center;
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid rgba(0, 255, 102, 0.34);
  color: var(--green);
  cursor: pointer;
  display: none;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.menu-toggle span {
  background: var(--green);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.45);
  display: block;
  height: 2px;
  position: absolute;
  transition: transform 180ms ease, opacity 180ms ease;
  width: 18px;
}

.menu-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.shell-nav.menu-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg);
}

.shell-nav.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.shell-nav.menu-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg);
}

main {
  padding: 0 clamp(20px, 5vw, 72px) 72px;
}

.page-main {
  padding-top: 138px;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(38px, 6vw, 78px);
  grid-template-columns: 250px minmax(0, 1fr) minmax(270px, 0.56fr);
  min-height: 100vh;
  padding-top: 112px;
}

.identity-orb {
  justify-self: center;
  position: relative;
}

.orb-photo {
  align-items: center;
  background:
    radial-gradient(circle at 48% 34%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, #101a14, #061108 52%, #12351f);
  border: 2px solid var(--green);
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(0, 255, 102, 0.34), inset 0 0 40px rgba(0, 255, 102, 0.12);
  display: flex;
  height: 232px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 232px;
}

.orb-photo::before {
  background:
    linear-gradient(135deg, transparent 40%, rgba(0, 255, 102, 0.12) 41%, transparent 42%),
    linear-gradient(45deg, transparent 48%, rgba(0, 255, 102, 0.1) 49%, transparent 50%);
  content: "";
  inset: 0;
  position: absolute;
}

.orb-photo span {
  color: var(--green);
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(0, 255, 102, 0.55);
}

.photo-avatar {
  background: #030705;
}

.photo-avatar::before {
  background:
    radial-gradient(circle at 50% 29%, rgba(0, 255, 102, 0.12), transparent 29%),
    linear-gradient(135deg, transparent 40%, rgba(0, 255, 102, 0.13) 41%, transparent 42%),
    linear-gradient(45deg, transparent 48%, rgba(0, 255, 102, 0.1) 49%, transparent 50%);
  pointer-events: none;
  z-index: 2;
}

.photo-avatar img {
  filter: grayscale(1) contrast(1.1) brightness(0.9);
  height: 100%;
  object-fit: cover;
  object-position: 50% 26%;
  width: 100%;
}

.online-badge {
  align-items: center;
  background: #031109;
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 18px;
  color: var(--green);
  display: flex;
  font-size: 0.72rem;
  font-weight: 900;
  gap: 7px;
  padding: 8px 12px;
  position: absolute;
  right: -12px;
}

.online-badge i {
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 12px var(--green);
  height: 8px;
  width: 8px;
}

.terminal-path,
.command {
  color: var(--green);
  font-size: 0.95rem;
  margin: 0 0 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.2rem, 7vw, 6.7rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 20px;
}

h1 span {
  color: var(--text);
  display: block;
  font-weight: 800;
}

h1 strong {
  color: var(--green);
  display: block;
  text-shadow: 0 0 24px rgba(0, 255, 102, 0.28);
}

h2 {
  color: var(--text);
  font-size: clamp(2.1rem, 4.2vw, 4.6rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 18px;
}

h3 {
  color: var(--text);
  font-size: 1.22rem;
  line-height: 1.28;
  margin-bottom: 12px;
}

p {
  color: var(--muted);
  line-height: 1.76;
}

.role-line {
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  margin-bottom: 22px;
}

.role-line b,
.cursor {
  color: var(--green);
}

.cursor {
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-text {
  max-width: 680px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  border: 1px solid var(--line);
  display: inline-flex;
  font-family: var(--mono);
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #001508;
  box-shadow: 0 0 22px rgba(0, 255, 102, 0.22);
}

.button.ghost {
  background: rgba(0, 255, 102, 0.04);
  color: var(--text);
}

.terminal-panel,
.skill-matrix article,
.cert-wall article,
.project-console article,
.contact-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.32);
}

.terminal-panel {
  margin-bottom: 96px;
}

.panel-bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
}

.panel-bar span {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.panel-bar span:nth-child(1) { background: var(--danger); }
.panel-bar span:nth-child(2) { background: var(--amber); }
.panel-bar span:nth-child(3) { background: var(--green); }

.panel-bar p {
  color: var(--muted);
  margin: 0 0 0 10px;
}

.about-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 0.8fr;
  padding: clamp(26px, 5vw, 52px);
}

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

.stats-grid article {
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid var(--line);
  padding: 22px;
}

.stats-grid strong {
  color: var(--green);
  display: block;
  font-size: 2.1rem;
  margin-bottom: 8px;
}

.stats-grid span {
  color: var(--muted);
}

.section-head {
  margin: 0 auto 30px;
  max-width: 920px;
  text-align: center;
}

.skill-matrix,
.cert-wall,
.project-console {
  display: grid;
  gap: 18px;
  margin-bottom: 100px;
}

.skill-matrix {
  grid-template-columns: repeat(4, 1fr);
}

.skill-matrix article,
.cert-wall article {
  min-height: 330px;
  padding: 26px;
}

.card-icon,
.cert-wall span,
.project-type {
  color: var(--green);
  display: block;
  font-weight: 900;
  margin-bottom: 70px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag-row span {
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.2);
  color: var(--green-soft);
  font-size: 0.78rem;
  padding: 7px 9px;
}

.cert-wall {
  grid-template-columns: repeat(4, 1fr);
}

.project-console {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.project-console article {
  min-height: 300px;
  padding: 26px;
}

.featured-project {
  display: grid;
  gap: 24px;
  grid-template-columns: 0.9fr 1fr;
}

.project-screen {
  background: #000;
  border: 1px solid rgba(0, 255, 102, 0.32);
  min-height: 220px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.screen-line {
  background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.42), transparent);
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 32%;
}

pre {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

.contact-panel {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
  padding: clamp(28px, 5vw, 54px);
}

.page-title {
  font-size: clamp(2.7rem, 6vw, 6.1rem);
}

.quick-grid,
.timeline-panel,
.blog-grid,
.home-columns {
  display: grid;
  gap: 18px;
  margin-bottom: 100px;
}

.quick-grid {
  grid-template-columns: repeat(4, 1fr);
}

.quick-grid a,
.timeline-panel article,
.blog-grid article,
.home-columns article,
.cert-mini-list a,
.tools-band {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 26px;
}

.quick-grid a,
.timeline-panel article,
.blog-grid article,
.home-columns article {
  min-height: 260px;
}

.quick-grid span,
.timeline-panel span,
.blog-grid span,
.cert-mini-list span {
  color: var(--green);
  display: block;
  font-weight: 900;
  margin-bottom: 60px;
  text-transform: uppercase;
}

.quick-grid h2,
.timeline-panel h2,
.blog-grid h2 {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
}

.timeline-panel {
  grid-template-columns: repeat(2, 1fr);
}

.blog-grid {
  grid-template-columns: repeat(3, 1fr);
}

.home-terminal {
  margin-bottom: 100px;
}

.home-columns {
  grid-template-columns: repeat(3, 1fr);
}

.cert-preview {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 0.75fr 1fr;
  margin-bottom: 100px;
}

.cert-mini-list {
  display: grid;
  gap: 12px;
}

.cert-mini-list a {
  display: grid;
  gap: 6px;
  min-height: 92px;
}

.cert-mini-list span {
  margin-bottom: 0;
}

.cert-mini-list strong {
  color: var(--text);
}

.tools-band {
  margin-bottom: 100px;
}

.tool-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-cloud span {
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.22);
  color: var(--green-soft);
  font-weight: 800;
  padding: 10px 12px;
}

.home-preview {
  margin-bottom: 100px;
}

.home-contact {
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .shell-nav {
    gap: 12px;
    max-width: calc(100% - 28px);
    padding-left: 14px;
    padding-right: 14px;
  }

  .shell-nav nav {
    gap: 8px;
  }

  .shell-nav nav a {
    font-size: 0.74rem;
  }

  .shell-nav nav a::before {
    font-size: 0.58rem;
    height: 18px;
    min-width: 20px;
    padding: 0 4px;
  }

  .nav-status {
    font-size: 0.78rem;
    gap: 8px;
  }

  .hero,
  .about-grid,
  .featured-project,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .skill-matrix,
  .cert-wall,
  .project-console,
  .quick-grid,
  .blog-grid,
  .home-columns,
  .cert-preview {
    grid-template-columns: repeat(2, 1fr);
  }

  .cert-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell-nav {
    align-items: center;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 0;
    padding: 12px;
  }

  .shell-brand {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    position: relative;
  }

  .nav-status {
    grid-column: 2;
    grid-row: 1;
  }

  .nav-status #clock {
    display: none;
  }

  .shell-nav nav {
    border-top: 1px solid rgba(0, 255, 102, 0.18);
    display: grid;
    gap: 10px;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    pointer-events: none;
    transition: max-height 220ms ease, opacity 180ms ease, padding-top 180ms ease;
  }

  .shell-nav.menu-open nav {
    max-height: 420px;
    opacity: 1;
    padding-top: 12px;
    pointer-events: auto;
  }

  .shell-nav nav a {
    background: rgba(0, 255, 102, 0.045);
    border: 1px solid rgba(0, 255, 102, 0.16);
    font-size: 0.82rem;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 10px;
  }
}

@media (max-width: 680px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .shell-nav {
    max-width: calc(100% - 24px);
    top: 12px;
  }

  .shell-brand {
    font-size: 0.92rem;
    width: auto;
  }

  .nav-status {
    margin-left: 0;
  }

  .hero {
    align-items: start;
    padding-top: 132px;
  }

  .orb-photo {
    height: 190px;
    width: 190px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.3rem);
  }

  .skill-matrix,
  .cert-wall,
  .project-console,
  .stats-grid,
  .quick-grid,
  .timeline-panel,
  .blog-grid,
  .home-columns,
  .cert-preview {
    grid-template-columns: 1fr;
  }

  .card-icon,
  .cert-wall span,
  .project-type {
    margin-bottom: 38px;
  }
}

.loader {
  align-items: center;
  background:
    radial-gradient(circle at 50% 36%, rgba(0, 255, 102, 0.16), transparent 32%),
    #000503;
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  transition: opacity 520ms ease, visibility 520ms ease;
  z-index: 100;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-box {
  background: rgba(2, 18, 10, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 0 80px rgba(0, 255, 102, 0.22);
  min-width: min(440px, calc(100vw - 36px));
  padding: 28px;
}

.loader-box strong {
  color: var(--green);
  display: block;
  font-size: 1.15rem;
  margin: 12px 0 18px;
}

.loader-box p {
  margin: 14px 0 0;
}

.loader-bar {
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid var(--line);
  height: 12px;
  overflow: hidden;
}

.loader-bar i {
  animation: loadBar 1200ms ease-in-out infinite;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  display: block;
  height: 100%;
  width: 48%;
}

@keyframes loadBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(230%); }
}

.orb-photo {
  animation: orbPulse 4.6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 35px rgba(0, 255, 102, 0.34), inset 0 0 40px rgba(0, 255, 102, 0.12); }
  50% { box-shadow: 0 0 58px rgba(0, 255, 102, 0.54), inset 0 0 52px rgba(0, 255, 102, 0.18); }
}

.button,
.quick-grid a,
.home-columns article,
.skill-matrix article,
.cert-wall article,
.project-console article,
.blog-grid article,
.cert-mini-list a {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button:hover,
.quick-grid a:hover,
.home-columns article:hover,
.skill-matrix article:hover,
.cert-wall article:hover,
.project-console article:hover,
.blog-grid article:hover,
.cert-mini-list a:hover {
  border-color: rgba(0, 255, 102, 0.52);
  box-shadow: 0 20px 90px rgba(0, 255, 102, 0.12);
  transform: translateY(-4px);
}

.hero-visual-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.hero-visual-panel img,
.card-image,
.project-screen img {
  filter: saturate(0.9) contrast(1.08) brightness(0.72);
  width: 100%;
}

.hero-visual-panel img {
  height: 100%;
  object-fit: cover;
  position: absolute;
}

.hero-visual-panel::after,
.project-screen::after {
  background: linear-gradient(180deg, rgba(0, 5, 3, 0.06), rgba(0, 5, 3, 0.78));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.threat-monitor {
  background: rgba(0, 5, 3, 0.72);
  border: 1px solid var(--line);
  bottom: 20px;
  left: 20px;
  padding: 18px;
  position: absolute;
  right: 20px;
  z-index: 2;
}

.threat-monitor span {
  color: var(--green);
  display: block;
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.threat-monitor strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.card-image {
  aspect-ratio: 16 / 9;
  margin: -26px -26px 24px;
  max-width: calc(100% + 52px);
  object-fit: cover;
}

.project-screen img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
}

.project-screen pre,
.project-screen .screen-line {
  position: relative;
  z-index: 2;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms ease;
}

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

@media (max-width: 1100px) {
  .hero-visual-panel {
    min-height: 360px;
  }
}
