/* ════════════════════════════════════════════════════════════
   CYBERPUNK 2077 PORTFOLIO — MAX VEGERCHUK
   Fonts  : Orbitron 900 · JetBrains Mono · Inter
   Palette: neon yellow #FFE500 · hot pink #FF2060
   ════════════════════════════════════════════════════════════ */

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --y:        #FFE500;          /* neon yellow  — primary  */
  --p:        #FF2060;          /* hot pink     — secondary */
  --bg:       #08060e;          /* deep purple-black       */
  --surface:  #0e0b16;          /* slightly lighter        */
  --surface2: #160e20;          /* card/hover surface      */
  --text:     #e8d8c0;          /* warm off-white          */
  --muted:    #8c7aaa;          /* muted purple-gray — 5.25:1 on bg */
  --border-y: rgba(255,229,0,0.14);
  --border-p: rgba(255,32,96,0.14);
  --pad:      clamp(20px, 4.5vw, 56px);
  --mono:     'JetBrains Mono', monospace;
  --display:  'Orbitron', sans-serif;
  --body:     'Inter', sans-serif;
  --cut:      16px;             /* angular corner cut size */
  --cut-lg:   28px;             /* larger cut for cards    */
}


/* ── BASE ───────────────────────────────────────────────────── */
body {
  font-family: var(--body);
  background-color: var(--bg);
  color: var(--text);
  /* subtle purple-yellow grid */
  background-image:
    linear-gradient(rgba(255,229,0,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,229,0,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  background-attachment: fixed;
}


/* ── GLITCH TEXT ────────────────────────────────────────────── */
.glitch { position: relative; }
span.glitch { display: inline-block; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  font: inherit;
  line-height: inherit;
  pointer-events: none;
  opacity: 0;
}
.glitch::before { color: var(--y); animation: gx-a 7s infinite; }
.glitch::after  { color: var(--p); animation: gx-b 7s infinite; animation-delay: 0.4s; }

@keyframes gx-a {
  0%,87%,100% { opacity:0; clip-path:inset(50% 0 50% 0); transform:translate(0); }
  88% { opacity:.9; clip-path:inset(13% 0 58% 0); transform:translate(-5px, 1px); }
  89% { opacity:.9; clip-path:inset(63% 0  8% 0); transform:translate( 5px,-2px); }
  90% { opacity:.9; clip-path:inset(28% 0 43% 0); transform:translate(-4px,  0); }
  91% { opacity:.9; clip-path:inset(77% 0  3% 0); transform:translate( 6px, 1px); }
  92% { opacity:0;  clip-path:inset(50% 0 50% 0); transform:translate(0); }
}
@keyframes gx-b {
  0%,83%,100% { opacity:0; clip-path:inset(50% 0 50% 0); transform:translate(0); }
  84% { opacity:.8; clip-path:inset(70% 0  5% 0); transform:translate( 6px,-1px); }
  85% { opacity:.8; clip-path:inset(10% 0 64% 0); transform:translate(-6px, 2px); }
  86% { opacity:.8; clip-path:inset(38% 0 38% 0); transform:translate( 4px,-1px); }
  87% { opacity:.8; clip-path:inset(52% 0 17% 0); transform:translate(-5px,  0); }
  88% { opacity:0;  clip-path:inset(50% 0 50% 0); transform:translate(0); }
}

/* stagger */
.hero-name-b.glitch::before               { animation-delay: 0.9s; }
.hero-name-b.glitch::after                { animation-delay: 1.3s; }
.section:nth-child(2) .glitch::before     { animation-delay: 1.8s; }
.section:nth-child(2) .glitch::after      { animation-delay: 2.2s; }
.section:nth-child(3) .glitch::before     { animation-delay: 3.4s; }
.section:nth-child(3) .glitch::after      { animation-delay: 3.8s; }
.footer-big-name.glitch::before           { animation-delay: 1.1s; }
.footer-big-name.glitch::after            { animation-delay: 1.5s; }

/* ── STATUS DOT ─────────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--y);
  box-shadow: 0 0 6px var(--y);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── SCROLL REVEAL ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }

/* ════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px var(--pad);
  transition: background 0.3s, border-color 0.3s;
}
.header.scrolled {
  background: rgba(8,6,14,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-y);
}

.logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  transition: color 0.2s;
}
.logo:hover { color: var(--y); }
.logo-first { color: var(--y); }
.logo-dot   { color: var(--p); margin: 0 1px; }

.nav { display: flex; gap: 36px; margin-left: auto; }
.nav-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-link:hover {
  color: var(--y);
  text-shadow: 0 0 10px rgba(255,229,0,0.6);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px; height: 17px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--muted);
  transition: background 0.2s;
}
.nav-toggle:hover span { background: var(--y); }

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 130px var(--pad) 80px;
  overflow: hidden;
}

/* Left yellow accent bar */
.hero::before {
  content: '';
  position: absolute;
  left: calc(var(--pad) - 18px);
  top: 16%; bottom: 16%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--y) 35%, var(--y) 65%, transparent);
  opacity: 0.45;
}

/* Moving scan line */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--y) 50%, transparent 100%);
  opacity: 0.1;
  animation: scan 6s linear infinite;
}
@keyframes scan { from{top:0%} to{top:100%} }

/* Eyebrow */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 36px;
  position: relative;
  z-index: 2;
}
.hero-eyebrow::after {
  content: '█';
  color: var(--y);
  animation: cursor-blink 1.1s step-end infinite;
  margin-left: 2px;
}
@keyframes cursor-blink { 0%,100%{opacity:1} 50%{opacity:0} }
.eyebrow-sep { color: rgba(255,229,0,0.2); }

/* Hero content area */
.hero-main { position: relative; z-index: 2; }

/* Bottom bar — stats left, CTA right, same baseline */
.hero-bottom {
  position: absolute;
  bottom: 64px;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  z-index: 2;
}

.hero-name {
  font-family: var(--display);
  font-weight: 900;
  /* Orbitron is wide — conservative max to prevent overflow at 1280px */
  font-size: clamp(36px, 7.2vw, 104px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  flex-direction: column;
  margin-bottom: 32px;
}

.hero-desc {
  font-family: var(--body);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 36px;
}

/* ── STATS ───────────────────────────────────────────────────── */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

/* ── ANGULAR BUTTONS ─────────────────────────────────────────── */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--bg);
  background: var(--y);
  padding: 15px 32px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: filter 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover {
  filter: drop-shadow(0 0 12px rgba(255,229,0,0.6));
  transform: translateY(-2px);
}

/* Ghost button: 1px wrapper = border trick */
.btn-ghost-wrap {
  display: inline-block;
  padding: 1px;
  background: rgba(255,229,0,0.3);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background 0.2s, filter 0.2s;
}
.btn-ghost-wrap:hover {
  background: rgba(255,229,0,0.65);
  filter: drop-shadow(0 0 10px rgba(255,229,0,0.4));
}
.btn-ghost {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--y);
  background: var(--bg);
  padding: 14px 31px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

/* Stat items */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-val {
  font-family: var(--display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--y);
}
.stat-plus { font-size: 15px; vertical-align: super; }
.stat-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* Ghost watermark — smaller for Orbitron (wide font) */
.hero-ghost {
  position: absolute;
  right: -2%; bottom: -6%;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(60px, 11vw, 150px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,229,0,0.05);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}

/* ── HAZARD STRIPE ───────────────────────────────────────────── */
/* CP2077-signature yellow/black diagonal stripes */
.hazard-stripe {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-y) 20%, var(--border-y) 80%, transparent);
  z-index: 3;
}


/* ════════════════════════════════════════════════════════════
   SECTION (shared)
   ════════════════════════════════════════════════════════════ */
.section { padding: 120px var(--pad); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-y);
  margin-bottom: 64px;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--p);
}
.section-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(32px, 5vw, 72px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   PROJECT CARDS — 3-column vertical grid
   ════════════════════════════════════════════════════════════ */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

/* Card wrapper: handles the angular cut + glow border on hover */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  clip-path: polygon(
    0 0, 100% 0,
    100% calc(100% - var(--cut-lg)),
    calc(100% - var(--cut-lg)) 100%,
    0 100%
  );
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    background 0.25s;
  color: var(--text);
}
.project-card:hover {
  background: var(--surface2);
  filter: drop-shadow(0 0 18px rgba(255,229,0,0.28));
}

/* ── Image area ─────────────────────────────────────────────── */
.project-cover {
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
}
.project-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Info area ──────────────────────────────────────────────── */
.project-info {
  flex: 1;
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Corner bracket — top-right of info panel */
.project-info::before {
  content: '';
  position: absolute;
  top: 20px; right: 20px;
  width: 18px; height: 18px;
  border-top: 1px solid rgba(255,229,0,0.25);
  border-right: 1px solid rgba(255,229,0,0.25);
  transition: border-color 0.25s;
}
.project-card:hover .project-info::before {
  border-color: rgba(255,229,0,0.7);
}

.project-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--p);
  margin-bottom: 10px;
  display: block;
}

.project-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.project-card:hover .project-name { color: var(--y); }

.project-desc {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
  margin-bottom: 20px;
}

.project-cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--y);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}
.project-card:hover .project-cta { opacity: 1; transform: translateX(0); }
.arrow { display: inline-block; transition: transform 0.2s; }
.project-card:hover .arrow { transform: translateX(5px); }

/* ════════════════════════════════════════════════════════════
   TIMELINE — EXPERIENCE
   ════════════════════════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex;
  padding: 44px 0;
  border-bottom: 1px solid rgba(255,229,0,0.06);
}
.timeline-item:first-child { border-top: 1px solid rgba(255,229,0,0.06); }

.tl-year {
  width: 220px; flex-shrink: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--y);
  text-shadow: 0 0 10px rgba(255,229,0,0.3);
  padding-top: 4px;
}
.tl-body { flex: 1; }

.tl-company {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--p);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ext-link {
  color: var(--p);
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}
.ext-link:hover { opacity: 1; }

.tl-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}
.tl-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.78;
  color: var(--muted);
  max-width: 560px;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border-y);
  padding: 88px var(--pad) 44px;
}
.footer-name-block { margin-bottom: 64px; }

.footer-big-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(24px, 5.5vw, 78px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.92;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
  border-top: 1px solid var(--border-y);
  border-bottom: 1px solid var(--border-y);
  margin-bottom: 40px;
}
.footer-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 18px;
}
.footer-email {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13px, 1.3vw, 18px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--y);
  text-shadow: 0 0 10px rgba(255,229,0,0.28);
  transition: text-shadow 0.2s;
}
.footer-email:hover { text-shadow: 0 0 24px rgba(255,229,0,0.65); }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
  font-family: var(--body);
  font-size: 15px;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--y); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer-online { display: flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — tablet (≤ 1024px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .project-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
  }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — mobile (≤ 768px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .header-status { display: none; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(8,6,14,0.98);
    border-bottom: 1px solid var(--border-y);
    padding: 12px var(--pad) 24px;
  }
  .nav-link { font-size: 13px; padding: 16px 0; border-bottom: 1px solid rgba(255,229,0,0.05); }
  .header.nav-open .nav { display: flex; }

  .hero::before { display: none; }
  .hero-bottom { position: static; margin-top: 40px; flex-direction: column; align-items: flex-start; gap: 28px; }

  .projects { grid-template-columns: 1fr; }
  .project-card:last-child { grid-column: auto; max-width: 100%; }
  .project-cover { height: 260px; }

  .timeline-item { flex-direction: column; gap: 14px; }
  .tl-year { width: auto; }

  .footer-cols { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — small mobile (≤ 440px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 440px) {
  .section { padding: 72px var(--pad); }
  .hero { padding: 100px var(--pad) 60px; }
  .section-head { margin-bottom: 40px; }
  .hero-ghost { display: none; }
  .hero-stats { gap: 22px; }
  .stat-val { font-size: 26px; }
  .timeline-item { padding: 30px 0; }
  .glitch::before, .glitch::after { display: none; }
}
