:root {
  --bg-main: #07090f;
  --bg-deep: #03050a;
  --panel: rgba(13, 18, 30, 0.78);
  --panel-solid: #101827;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text-main: #f5f7fb;
  --text-muted: #a8b3c7;
  --cyan: #22e6ff;
  --amber: #ffb648;
  --rose: #ff5f8f;
  --lime: #9dff7a;
  --violet: #8f7cff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  --glow-cyan: 0 0 28px rgba(34, 230, 255, 0.24);
  --radius: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(34, 230, 255, 0.05), transparent 28%),
    linear-gradient(315deg, rgba(255, 182, 72, 0.06), transparent 24%),
    var(--bg-main);
  color: var(--text-main);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -6;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.22));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.032) 0,
    rgba(255, 255, 255, 0.032) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.18;
}

::selection {
  background: var(--cyan);
  color: #061018;
}

img,
embed {
  max-width: 100%;
}

img[data-src] {
  background:
    linear-gradient(135deg, rgba(34, 230, 255, 0.12), rgba(255, 95, 143, 0.08)),
    rgba(255, 255, 255, 0.04);
}

a {
  color: inherit;
}

.web3-scene {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-grid,
.bg-glow,
.binary-rain,
.cursor-code {
  position: fixed;
  pointer-events: none;
}

.bg-grid {
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(34, 230, 255, 0.08) 42% 42.4%, transparent 42.4%),
    linear-gradient(245deg, transparent 0 58%, rgba(255, 182, 72, 0.08) 58% 58.35%, transparent 58.35%);
}

.bg-glow {
  top: 12vh;
  right: -8vw;
  z-index: -4;
  width: 36vw;
  height: 42vw;
  max-width: 520px;
  max-height: 620px;
  opacity: 0.5;
  background:
    linear-gradient(135deg, rgba(34, 230, 255, 0.18), transparent 52%),
    linear-gradient(45deg, transparent 36%, rgba(255, 95, 143, 0.16) 37% 56%, transparent 57%);
  filter: blur(6px);
  transform: skewY(-10deg);
}

.bg-glow::before,
.bg-glow::after {
  display: none;
}

.bg-glow::before {
  width: 240px;
  height: 240px;
  right: 14%;
  top: 8%;
  transform: perspective(800px) rotateX(58deg) rotateZ(28deg);
  animation: prismFloat 8s ease-in-out infinite;
}

.bg-glow::after {
  width: 150px;
  height: 150px;
  right: 48%;
  top: 52%;
  transform: perspective(700px) rotateX(45deg) rotateY(-32deg) rotateZ(18deg);
  animation: prismFloat 6.5s ease-in-out infinite reverse;
}

body.web3-fallback .bg-glow {
  opacity: 0.86;
}

.binary-rain {
  left: 4vw;
  bottom: 9vh;
  z-index: -3;
  width: 260px;
  height: 260px;
  opacity: 0.38;
  background:
    linear-gradient(var(--cyan), var(--cyan)) 0 0 / 52px 52px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 52px 0 / 52px 52px no-repeat,
    linear-gradient(var(--rose), var(--rose)) 104px 0 / 52px 52px no-repeat,
    linear-gradient(var(--violet), var(--violet)) 104px 52px / 52px 52px no-repeat,
    linear-gradient(var(--lime), var(--lime)) 156px 52px / 52px 52px no-repeat;
  filter: saturate(1.1) drop-shadow(0 0 28px rgba(34, 230, 255, 0.18));
  transform: rotate(-14deg);
}

.cursor-code {
  display: none;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 22px 72px;
  position: relative;
  isolation: isolate;
}

.hero-content {
  width: min(1180px, 100%);
  animation: heroIn 0.9s ease both;
}

.profile-split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
}

.profile-info {
  position: relative;
}

.profile-info::before {
  content: "";
  display: block;
  width: 138px;
  height: 42px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--amber) 42%, var(--rose));
  box-shadow:
    0 0 34px rgba(34, 230, 255, 0.28),
    0 0 42px rgba(255, 95, 143, 0.16);
  clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%, 18% 50%);
}

.hero-title {
  max-width: 780px;
  color: var(--text-main);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(2.7rem, 8vw, 6.3rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow:
    0 0 36px rgba(34, 230, 255, 0.2),
    0 24px 60px rgba(0, 0, 0, 0.48);
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 10px;
  margin: 24px 0 20px;
  color: transparent;
  font: 600 clamp(0.78rem, 1.4vw, 0.9rem)/1.4 "Fira Code", monospace;
  text-transform: uppercase;
}

.hero-role span {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-role span:nth-child(1) {
  color: var(--cyan);
}

.hero-role span:nth-child(2) {
  color: var(--amber);
}

.hero-role span:nth-child(3) {
  color: var(--rose);
}

.hero-desc {
  max-width: 660px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.1rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 12px 20px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  backdrop-filter: blur(14px);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 230, 255, 0.5);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(34, 230, 255, 0.16);
}

.btn.primary {
  border-color: rgba(34, 230, 255, 0.52);
  background: linear-gradient(135deg, rgba(34, 230, 255, 0.96), rgba(157, 255, 122, 0.88));
  color: #061018;
}

.btn.ghost {
  border-color: rgba(255, 182, 72, 0.34);
}

.code-window-bg {
  position: relative;
  min-height: clamp(340px, 44vw, 510px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045)),
    rgba(12, 18, 30, 0.74);
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.58),
    0 0 44px rgba(34, 230, 255, 0.18);
  transform: perspective(900px) rotateY(-8deg) rotateX(5deg);
  transform-style: preserve-3d;
  isolation: isolate;
}

.code-window-bg::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  pointer-events: none;
}

.code-window-bg::after {
  content: "SYSTEM NODE";
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  padding: 8px 11px;
  border: 1px solid rgba(34, 230, 255, 0.42);
  border-radius: 999px;
  background: rgba(5, 8, 14, 0.72);
  color: var(--cyan);
  font: 700 0.68rem/1 "Fira Code", monospace;
  letter-spacing: 0.12em;
  backdrop-filter: blur(14px);
}

.profile-bg-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.08) brightness(0.82);
  transform: scale(1.04);
  backface-visibility: hidden;
}

.code-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(to top, rgba(5, 8, 14, 0.86), transparent 50%),
    linear-gradient(135deg, rgba(34, 230, 255, 0.16), transparent 38%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 7px);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 8, 14, 0.7);
  backdrop-filter: blur(12px);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  box-shadow: 0 0 18px currentColor;
}

.dot.red {
  background: var(--rose);
  color: var(--rose);
}

.dot.yellow {
  background: var(--amber);
  color: var(--amber);
}

.dot.green {
  background: var(--lime);
  color: var(--lime);
}

.file-name {
  margin-left: auto;
  color: var(--text-muted);
  font: 700 0.72rem/1 "Fira Code", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  width: min(1120px, calc(100% - 42px));
  margin: 0 auto;
  padding: 82px 0;
  position: relative;
  transform-style: preserve-3d;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  color: var(--text-main);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section h2::before {
  content: "";
  flex: 0 0 44px;
  height: 44px;
  border-radius: 15px;
  background:
    linear-gradient(135deg, var(--cyan), transparent 56%),
    linear-gradient(315deg, var(--amber), transparent 54%),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 28px rgba(34, 230, 255, 0.24);
  transform: rotate(12deg);
}

.section h2::after {
  content: "";
  height: 1px;
  flex: 1;
  min-width: 36px;
  background: linear-gradient(90deg, rgba(34, 230, 255, 0.62), transparent);
}

.section p {
  max-width: 900px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.section strong {
  color: var(--text-main);
}

.timeline,
.tech-stack {
  display: grid;
  gap: 18px;
}

.timeline-item,
.skill-card,
.tech-category,
.project-card,
.cert-card,
.contact p {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.timeline-item {
  position: relative;
  padding: 24px 24px 24px 68px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 27px;
  width: 18px;
  height: 18px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  box-shadow: 0 0 24px rgba(34, 230, 255, 0.34);
  transform: rotate(12deg);
}

.timeline-item[data-modal] {
  cursor: pointer;
}

.timeline-item:hover,
.skill-card:hover,
.tech-category:hover,
.project-card:hover,
.cert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 230, 255, 0.38);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.44),
    0 0 20px rgba(34, 230, 255, 0.12);
}

.timeline-item h3 {
  margin-bottom: 8px;
  color: var(--text-main);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.2rem;
  line-height: 1.25;
}

.timeline-item > span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 182, 72, 0.34);
  border-radius: 999px;
  background: rgba(255, 182, 72, 0.1);
  color: var(--amber);
  font-family: "Fira Code", monospace;
  font-size: 0.74rem;
  font-weight: 700;
}

.timeline-item p {
  margin-bottom: 10px;
  font-size: 0.96rem;
}

.timeline-item p:last-child {
  margin-bottom: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.skill-card {
  display: flex;
  min-height: 118px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.skill-card:nth-child(3n + 1) {
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(34, 230, 255, 0.12);
}

.skill-card:nth-child(3n + 2) {
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 182, 72, 0.12);
}

.skill-card:nth-child(3n + 3) {
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 95, 143, 0.12);
}

.tech-category {
  padding: 20px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.tech-category-title {
  margin-bottom: 15px;
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tech-category-title::before {
  content: "chain://";
  color: var(--cyan);
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-badge,
.tech-badge-icon,
.modal-tech span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.2;
}

.tech-badge-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: saturate(1.08) brightness(1.12);
}

.tech-badge:hover,
.tech-badge-icon:hover,
.modal-tech span:hover {
  border-color: rgba(34, 230, 255, 0.38);
  color: var(--cyan);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.lang-card img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.lang-card span {
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.project-card::before {
  content: "OPEN NODE";
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(5, 8, 14, 0.68);
  color: var(--cyan);
  font: 700 0.62rem/1 "Fira Code", monospace;
  letter-spacing: 0.1em;
  backdrop-filter: blur(14px);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(5, 8, 14, 0.92), transparent);
  pointer-events: none;
}

.project-card img {
  display: block;
  width: 100%;
  height: 205px;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.06) brightness(0.86);
  transition: filter 0.2s ease;
}

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

.project-card:hover img {
  filter: saturate(1.12) contrast(1.03) brightness(0.98);
}

.project-card-logo img {
  object-fit: contain;
  padding: 26px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    rgba(255, 255, 255, 0.05);
  background-size: 20px 20px;
}

.project-card h3,
.project-card p,
.project-card span {
  position: relative;
  z-index: 2;
}

.project-card h3 {
  margin: 18px 18px 8px;
  color: var(--text-main);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.12rem;
  line-height: 1.24;
}

.project-card p {
  margin: 0 18px 13px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.project-card span {
  display: block;
  margin: 0 18px 20px;
  color: var(--amber);
  font-family: "Fira Code", monospace;
  font-size: 0.74rem;
  font-weight: 700;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 18px;
}

.cert-card {
  overflow: hidden;
  text-align: center;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.cert-card a {
  display: block;
}

.cert-card img,
.cert-card img.cert-img-thumb {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02) brightness(0.9);
}

.cert-card span {
  display: block;
  min-height: 74px;
  padding: 14px 12px;
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.contact {
  text-align: left;
}

.contact p {
  display: inline-block;
  padding: 18px 20px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.social-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.social-links a:hover {
  border-color: rgba(34, 230, 255, 0.46);
  color: var(--cyan);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

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

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes prismFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -18px;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: min(920px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(10, 15, 26, 0.94);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(34, 230, 255, 0.14);
  color: var(--text-main);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.24s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-img {
  display: block;
  width: 100%;
  height: 270px;
  object-fit: cover;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  filter: saturate(0.96) contrast(1.04) brightness(0.88);
}

.modal-logo-img {
  object-fit: contain;
  padding: 28px;
  background: rgba(255, 255, 255, 0.06);
}

.modal h3 {
  margin: 0 42px 12px 0;
  color: var(--text-main);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.modal p {
  margin-bottom: 18px;
  color: var(--text-muted);
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.modal-gallery img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  filter: saturate(0.92) contrast(1.03) brightness(0.86);
  transition: filter 0.22s ease, transform 0.22s ease;
}

.modal-gallery img:hover,
.cert-modal-img:hover {
  filter: saturate(1.12) contrast(1.02) brightness(0.98);
  transform: translateY(-4px);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-actions .btn {
  font-size: 0.8rem;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  background: rgba(34, 230, 255, 0.18);
  color: var(--cyan);
  transform: rotate(90deg);
}

.modal::-webkit-scrollbar {
  width: 10px;
}

.modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.modal::-webkit-scrollbar-thumb {
  border: 2px solid rgba(10, 15, 26, 0.94);
  border-radius: 999px;
  background: var(--cyan);
}

.modal-experience {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.modal-experience .exp-photo {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.modal-experience .exp-photo img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.04) brightness(0.88);
}

.modal-experience .exp-content {
  min-width: 0;
}

.modal-experience .exp-content h3 {
  margin-bottom: 10px;
}

.modal-experience .exp-period {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 182, 72, 0.34);
  border-radius: 999px;
  background: rgba(255, 182, 72, 0.1);
  color: var(--amber);
  font-family: "Fira Code", monospace;
  font-size: 0.76rem;
  font-weight: 700;
}

.modal-experience .exp-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.modal-experience .exp-gallery img {
  height: 86px;
}

.pdf-viewer {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.pdf-header span {
  color: var(--cyan);
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pdf-external-link {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.pdf-external-link:hover {
  color: var(--cyan);
}

.pdf-content {
  display: block;
  width: 100%;
  height: 500px;
  background:
    linear-gradient(135deg, rgba(34, 230, 255, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(255, 182, 72, 0.08), transparent 28%),
    #111827;
}

.pdf-content:not([src]) {
  display: grid;
  place-items: center;
}

.pdf-content:not([src])::before {
  content: "PDF READY ON OPEN";
  color: var(--cyan);
  font: 700 0.78rem/1 "Fira Code", monospace;
  letter-spacing: 0.12em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 10, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

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

.lightbox-content {
  display: flex;
  max-width: 88vw;
  max-height: 82vh;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 2001;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  cursor: pointer;
  font-family: "Fira Code", monospace;
  line-height: 1;
  backdrop-filter: blur(14px);
}

.lightbox-close {
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
}

.lightbox-nav {
  top: 50%;
  width: 52px;
  height: 60px;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

.lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: 24px;
  max-width: min(720px, calc(100% - 40px));
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  text-align: center;
  backdrop-filter: blur(14px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--amber), var(--rose));
  box-shadow: 0 0 22px rgba(34, 230, 255, 0.32);
}

.scroll-progress::after {
  content: var(--scroll-binary, "00000000");
  position: fixed;
  top: 12px;
  right: 16px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 9, 15, 0.72);
  color: var(--cyan);
  font: 700 0.7rem/1 "Fira Code", monospace;
  backdrop-filter: blur(14px);
}

@media (max-width: 900px) {
  .profile-split {
    grid-template-columns: 1fr;
  }

  .profile-info {
    order: 2;
  }

  .code-window-bg {
    order: 1;
    min-height: 390px;
    transform: perspective(900px) rotateY(0deg) rotateX(3deg);
  }

  .hero-title {
    font-size: clamp(2.45rem, 10vw, 4.6rem);
  }
}

@media (max-width: 768px) {
  .bg-grid,
  .bg-glow,
  .binary-rain,
  .cursor-code,
  .scroll-progress,
  .scroll-progress::after {
    display: none;
  }

  .web3-scene {
    opacity: 0.24;
  }

  .hero-title {
    color: #ffffff;
  }

  .hero-desc,
  .section p {
    color: #c8d3e6;
  }

  .hero {
    min-height: auto;
    padding-top: 96px;
  }

  .section {
    width: min(100% - 28px, 1120px);
    padding: 58px 0;
  }

  .section h2 {
    align-items: flex-start;
  }

  .section h2::after {
    display: none;
  }

  .hero-actions,
  .social-links,
  .modal-actions {
    width: 100%;
  }

  .btn {
    flex: 1 1 210px;
  }

  .reveal,
  .reveal.active {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .modal-experience {
    grid-template-columns: 1fr;
  }

  .modal-experience .exp-photo {
    width: min(100%, 320px);
  }

  .pdf-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox-nav {
    top: auto;
    bottom: 74px;
    transform: none;
  }
}

@media (max-width: 560px) {
  body::before {
    background-size: 42px 42px;
  }

  .hero::before {
    display: none;
  }

  .profile-info::before {
    margin-bottom: 20px;
  }

  .code-window-bg {
    min-height: 320px;
    border-radius: 22px;
  }

  .hero-role {
    display: flex;
  }

  .hero-role span {
    flex: 1 1 100%;
  }

  .timeline-item {
    padding: 20px 18px 20px 54px;
  }

  .timeline-item::before {
    left: 20px;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal {
    max-height: 92vh;
    padding: 20px;
    border-radius: 20px;
  }

  .modal-img {
    height: 210px;
  }

  .modal-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .modal-gallery img,
  .modal-experience .exp-gallery img {
    height: 92px;
  }

  .modal-experience .exp-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .pdf-content {
    height: 360px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-content {
    max-width: 96vw;
    max-height: 72vh;
  }

  .lightbox-content img {
    max-height: 72vh;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .lightbox-caption {
    bottom: 16px;
    border-radius: 18px;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
