/* ==========================================================================
   1. DESIGN TOKENS & CORE SETTINGS (Reset & Global)
   ========================================================================== */
:root {
  --bg: #0b0b0d;
  --ink: #f4f4f2;
  --dim: #9b9ba4;
  --lime: #d4ff3f;
  --line: rgba(212, 255, 63, 0.22);
  --line-solid: #222912;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Custom Pro Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0b0b0d;
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 255, 63, 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lime);
}

/* Bulletproof Anchor Reset */
a,
a:link,
a:visited,
a:active {
  color: inherit !important;
  text-decoration: none !important;
  cursor: pointer;
}

a:hover {
  color: var(--lime) !important;
}

/* Accessibility & Selection */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--lime);
  color: #0b0b0d;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Keyboard Navigation Skip Link */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--lime);
  color: #0b0b0d;
  padding: 10px 18px;
  z-index: 200;
  font-weight: 700;
}

.skip:focus {
  left: 12px;
  top: 12px;
}


/* ==========================================================================
   2. LAYOUT STRUCT & NAVIGATION (Spine, Marker, Top Nav)
   ========================================================================== */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 0 90px;
}

/* Scroll Spine Indicator */
#spine {
  position: fixed;
  left: 38px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  z-index: 5;
}

#spine .fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

#spine .packet {
  position: absolute;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 16px var(--lime);
  top: 0;
}

/* Numeric Progress Marker */
.marker {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 40;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--dim);
  text-align: right;
}

.marker b {
  color: var(--lime);
  font-size: 15px;
  display: block;
}

/* Glassmorphism Header Navigation Bar */
nav.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px 10px 70px;
  background: rgba(11, 11, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  mix-blend-mode: normal;
}

nav.top .logo {
  font-weight: 700;
  font-size: 16px;
}

nav.top .logo span {
  color: var(--lime);
}

nav.top .links {
  display: flex;
  gap: 24px;
  font-size: 13.5px;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, .35);
  color: inherit;
  border-radius: 8px;
  padding: 7px 13px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}


/* ==========================================================================
   3. HERO SECTION (3D Canvas Layout & Text Animations)
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 60px;
  position: relative;
}

#net3d {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 38% 50%, rgba(11, 11, 13, .82), rgba(11, 11, 13, .25) 60%, transparent);
}

.hero .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--lime);
  letter-spacing: .16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero .tag .name {
  font-size: 1.4em;
  font-family: Arial, sans-serif;
}

.hero .tag .bar {
  font-family: Arial, sans-serif;
}

/* Typography & Reveals */
.hero h1 {
  font-size: clamp(40px, 7.5vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 18px 0;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
}

.hero h1 .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) forwards;
}

.hero h1 .line:nth-child(2) span {
  animation-delay: .12s;
}

.hero h1 .line:nth-child(3) span {
  animation-delay: .24s;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--lime);
}

@keyframes rise {
  to {
    transform: none;
  }
}

.hero p {
  max-width: 540px;
  color: var(--dim);
  font-size: 17px;
}

.hero .btns {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* General Buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 15px;
  transition: .2s;
}

.btn.solid {
  background: var(--lime);
  color: #0b0b0d !important;
}

.btn.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 255, 63, .35);
}

.btn.line {
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.btn.line:hover {
  border-color: var(--lime);
  color: var(--lime) !important;
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .2em;
  animation: bob 2s infinite;
}

@keyframes bob {
  50% {
    transform: translate(-50%, 8px);
  }
}


/* ==========================================================================
   4. SECTIONS & COMPONENTS (Marquee, About, Skills, Experience)
   ========================================================================== */
section {
  padding: 64px 0;
}

.sec-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--lime);
  letter-spacing: .16em;
  text-transform: uppercase;
}

h2.big {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin: 12px 0 36px;
}

/* Infinite Marquee Loop */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  margin: 20px 0 0;
}

.marquee .track {
  display: flex;
  width: max-content;
  gap: 48px;
  white-space: nowrap;
  animation: scrollx 24s linear infinite;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--dim);
}

.marquee .track b {
  color: var(--lime);
}

@keyframes scrollx {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* About Section & Counter Grid / Profile Card with 1:1 Image Layout */
.about p.lede {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
  letter-spacing: -.01em;
  max-width: 860px;
}

.about p.lede em {
  font-style: normal;
  color: var(--lime);
}

/* About Section Grid Layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 36px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 0;
}

.profile-card {
  background: linear-gradient(160deg, #131318 0%, #0d0d10 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all .3s cubic-bezier(.2, .8, .2, 1);
}

.profile-card:hover {
  border-color: rgba(212, 255, 63, 0.5);
  box-shadow: 0 15px 40px rgba(212, 255, 63, 0.1);
  transform: translateY(-4px);
}

/* Profile Image 1:1 Aspect Ratio Styles */
.profile-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: #18181c;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.profile-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--lime);
  margin-bottom: 10px;
}

.profile-status .dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 6px var(--lime);
  }

  50% {
    box-shadow: 0 0 14px var(--lime);
  }
}

.profile-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.profile-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--dim);
  margin-bottom: 4px;
}

.profile-desc {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.5;
}

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

.stat {
  background: rgba(17, 17, 20, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  transition: all .25s ease;
}

.stat:hover {
  border-color: var(--lime);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(212, 255, 63, 0.08);
}

.stat b {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--lime);
  letter-spacing: -.03em;
  display: block;
}

.stat span {
  font-size: 13px;
  color: var(--dim);
}

/* Skills Technical Matrix */
.skillrows .row {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}

.skillrows .row:last-child {
  border-bottom: 1px solid var(--line);
}

.skillrows h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}

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

.tag {
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 14px;
  color: var(--dim);
  transition: .18s;
}

.tag:hover {
  border-color: var(--lime);
  color: var(--lime) !important;
  transform: translateY(-2px);
}

/* Experience Block */
.xp {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 28px 0;
  transition: .2s;
}

.xp:hover {
  padding-left: 12px;
}

.xp:last-child {
  border-bottom: 1px solid var(--line);
}

.xp .yrs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--lime);
}

.xp h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.xp .org {
  color: var(--dim);
  font-size: 14.5px;
}

.xp p {
  color: var(--dim);
  font-size: 14.5px;
  margin-top: 6px;
  max-width: 640px;
}


/* ==========================================================================
   5. WORK STACK & CONTACT (Sticky Cards, Contact Forms)
   ========================================================================== */
/* Case Studies - Sticky Interaction Grid */
.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  position: sticky;
  top: 100px;
  background: linear-gradient(160deg, #121216 0%, #0e0e11 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  min-height: 280px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  transition: all .3s cubic-bezier(.2, .8, .2, 1);
}

.card:hover {
  border-color: rgba(212, 255, 63, 0.45);
  box-shadow: 0 20px 45px rgba(212, 255, 63, 0.1);
}

.card .id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--lime);
}

.card h3 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 10px 0 14px;
  max-width: 100%;
}

.card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--dim);
  max-width: 100%;
  text-align: justify;
}

.card .win {
  color: var(--ink);
  font-weight: 700;
  margin-top: 16px;
}

.card .win::before {
  content: "→ ";
  color: var(--lime);
}

.card .n {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  line-height: 1;
}

.project-btn {
  margin-top: 22px;
  padding: 10px 24px;
  font-size: 13px;
}

.card .project-btn:hover {
  border-color: var(--lime);
  color: var(--lime) !important;
}

/* Contact Module & Forms */
.contact {
  text-align: left;
  padding-bottom: 70px;
}

.mail {
  display: inline-block;
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  border-bottom: 3px solid var(--lime);
  margin: 16px 0 35px;
  transition: .2s;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mail:hover {
  color: var(--lime) !important;
}

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

.meta span,
.meta a {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--dim);
  transition: .18s;
}

.meta a:hover {
  border-color: var(--lime);
  color: var(--lime) !important;
}

.cform {
  max-width: 560px;
  margin-top: 44px;
}

.cform-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cform label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}

.cform input,
.cform textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: rgba(19, 19, 22, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15.5px;
  padding: 12px 14px;
  transition: all .25s ease;
}

.cform input:focus,
.cform textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 20px rgba(212, 255, 63, 0.18);
}

.cform .btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.cform-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--lime);
}


/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
  padding: 30px 28px 30px 90px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--dim);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}


/* ==========================================================================
   7. RESPONSIVE QUERIES & BREAKPOINTS
   ========================================================================== */
@media(max-width: 1000px) {
  .mobilegap {
    display: block;
    height: 25px;
  }
}

@media(max-width: 900px) {
  .mail {
    font-size: 30px;
  }
}

@media(max-width: 850px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media(max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .skillrows .row {
    grid-template-columns: 1fr;
  }

  .card {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

@media(max-width: 720px) {
  #spine {
    left: 16px;
  }

  .wrap {
    padding-left: 48px;
  }

  footer {
    padding-left: 48px;
  }

  /* Mobile Menu System Override */
  nav.top {
    padding: 10px 20px 10px 44px;
    mix-blend-mode: normal;
    background: rgba(11, 11, 13, .9);
    backdrop-filter: blur(10px);
  }

  .menu-btn {
    display: block;
  }

  nav.top .links {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 14px;
    flex-direction: column;
    gap: 0;
    background: #141418;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    min-width: 190px;
  }

  nav.top .links.open {
    display: flex;
  }

  nav.top .links a {
    padding: 12px 16px;
    font-size: 15px;
  }

  /* Hero Content adjustments for viewport scale */
  .hero .tag {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.1;
  }

  .hero .tag .title {
    padding-top: 0;
    margin-top: -2px;
  }

  .bar {
    display: none;
  }

  /* Mobile — all section text justify */
  .hero-content p,
  .about p.lede,
  .xp p,
  .card p,
  .card .win,
  .contact p,
  .cform label,
  section p {
    text-align: justify;
  }

  /* Section headings centered on mobile */
  .sec-tag,
  h2.big {
    text-align: left;
  }
}

@media(max-width: 640px) {
  .xp {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 560px) {
  .mail {
    font-size: 20px;
    letter-spacing: -0.02em;
    border-bottom-width: 2px;
  }

  .cform-row {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 480px) {
  #spine {
    left: 12px;
  }

  .wrap,
  footer {
    padding-left: 32px;
    padding-right: 16px;
  }

  nav.top {
    padding: 8px 16px 8px 28px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 56px);
  }

  .card {
    padding: 22px 18px;
    top: 75px;
  }

  .marker {
    right: 14px;
    bottom: 16px;
  }
}