/* ─── Tokens ─────────────────────────────── */
:root {
  --bg:        #0B1E33;
  --panel:     #102843;
  --panel-soft:#14304F;
  --text:      #EAF4FB;
  --muted:     #7E9BB5;
  --blue:      #3DA9FC;
  --green:     #2BD9A0;
  --hairline:  #1C3A56;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
}

/* ─── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { 
  display: block; 
  max-width: 100%; 
  image-rendering: high-quality; 
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
}
::selection { background: var(--blue); color: var(--bg); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}

/* ─── Utilities ──────────────────────────── */
.wrap     { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
.mono     { font-family: var(--font-mono); }
.display  { font-family: var(--font-display); }
.kicker   {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 10px;
  display: block;
}
.kicker.green { color: var(--green); }
.divider  { border: none; border-top: 1px solid var(--hairline); margin: 0; }
.section-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text);
  padding-bottom: 10px; border-bottom: 1px solid var(--hairline);
  margin-bottom: 22px;
}
.chip {
  display: inline-block; border: 1px solid var(--hairline);
  color: var(--muted); font-family: var(--font-mono); font-size: 10.5px;
  padding: 3px 10px; border-radius: 20px;
  transition: all 0.3s ease;
}
.chip:hover {
  border-color: var(--blue);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61,169,252,0.15);
}
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: 12px;
  padding: 9px 18px; border-radius: 3px; border: 1px solid var(--blue);
  background: var(--blue); color: var(--bg); cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(61,169,252,0.45); background: #4ab4ff; color: var(--bg); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(61,169,252,0.2); }
.btn.ghost {
  background: none; color: var(--muted); border-color: var(--hairline);
}
.btn.ghost:hover { border-color: var(--blue); color: var(--text); background: rgba(61,169,252,0.05); }
.btn.outline-green {
  background: none; color: var(--green); border-color: var(--green);
}
.btn.outline-green:hover { background: var(--green); color: var(--bg); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(43,217,160,0.2); }
.btn.outline-blue {
  background: none; color: var(--blue); border-color: var(--blue);
}
.btn.outline-blue:hover { background: var(--blue); color: var(--bg); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(61,169,252,0.25); }

/* ─── Nav ────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--hairline);
  background: rgba(11,30,51,.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; max-width: 1020px; margin: 0 auto; gap: 16px;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: -.01em; white-space: nowrap; color: #FFFFFF;
}
.nav-logo span { color: inherit; }
.nav-links {
  display: flex; align-items: center; gap: 26px; list-style: none;
}
.nav-links a {
  font-size: 14.5px; color: var(--muted);
  padding-bottom: 4px;
  transition: color .2s ease;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 0%; height: 2px; background: var(--blue);
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }
.nav-resume {
  font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--blue);
  color: var(--blue); padding: 6px 12px; border-radius: 3px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-resume:hover { background: var(--blue); color: var(--bg); }
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text); }
.mobile-menu {
  display: flex; flex-direction: column; padding: 0 24px;
  max-height: 0; opacity: 0; overflow: hidden;
  border-top: 1px solid transparent; gap: 2px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  visibility: hidden;
}
.mobile-menu.open { 
  max-height: 500px; opacity: 1; padding: 10px 24px 16px;
  border-top-color: var(--hairline); visibility: visible;
}
.mobile-menu a {
  padding: 10px 0; font-size: 14px; color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  transform: translateX(-10px); opacity: 0;
  transition: all 0.3s ease;
}
.mobile-menu.open a {
  transform: translateX(0); opacity: 1;
}
.mobile-menu.open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.4s; }
.mobile-menu.open a:nth-child(8) { transition-delay: 0.45s; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text); }

/* ─── Footer ─────────────────────────────── */
footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 24px;
}
.footer-inner {
  max-width: 1020px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.footer-copy {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* ─── Hero ───────────────────────────────── */
.hero {
  display: flex; align-items: center; gap: 40px;
  padding: 72px 0 80px; flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 260px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4.5vw, 42px); line-height: 1.15;
  letter-spacing: -.02em; margin-bottom: 18px;
}
.hero p { color: var(--muted); max-width: 440px; margin-bottom: 26px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.phone-mockup {
  width: 170px; height: 330px; border-radius: 22px; flex-shrink: 0;
  border: 2px solid var(--hairline); overflow: hidden;
  background: var(--panel-soft);
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}
#hero-slider { position: relative; }
#hero-slider img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transition: opacity 1s ease-in-out;
}
#hero-slider img.active { opacity: 1; }

/* ─── About section ──────────────────────── */
.about { padding-bottom: 72px; }
.about p { color: var(--muted); max-width: 680px; margin-bottom: 18px; line-height: 1.8; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Project grid ───────────────────────── */
.projects-section { padding-bottom: 80px; scroll-margin-top: 80px; }
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}
.proj-card {
  position: relative; display: block;
  background: var(--panel); border: 1px solid var(--hairline);
  transition: all .3s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer;
}
.proj-card:hover { 
  border-color: transparent; 
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  z-index: 2;
}
/* inspector corners */
.proj-card .c {
  position: absolute; width: 0px; height: 0px;
  border: 2px solid var(--blue); opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); pointer-events: none;
}
.proj-card.green-accent .c { border-color: var(--green); }
.proj-card:hover .c { opacity: 1; width: 14px; height: 14px; }
.c.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.c.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.proj-card.green-accent:hover { border-color: rgba(43,217,160,0.3); }

/* Spotlight effect */
.proj-card::before, .feature-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(61,169,252,0.08), transparent 40%);
  opacity: 0; transition: opacity 0.5s; pointer-events: none; z-index: 0;
}
.proj-card.green-accent::before {
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(43,217,160,0.08), transparent 40%);
}
.proj-card:hover::before, .feature-card:hover::before { opacity: 1; }

.proj-thumb {
  height: 180px; overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: var(--panel-soft); position: relative; z-index: 1;
}
.proj-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.proj-card:hover .proj-thumb img {
  transform: scale(1.05) translateZ(0);
}
.proj-body { padding: 16px 18px 20px; position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }
.proj-body h3 {
  font-family: var(--font-display); font-size: 16px;
  font-weight: 600; margin-bottom: 6px;
}
.proj-body p { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; flex: 1; }
.view-link { font-family: var(--font-mono); font-size: 11px; color: var(--blue); }
.proj-card.green-accent .view-link { color: var(--green); }

/* ─── Project detail page ────────────────── */
.detail-wrap { padding: 36px 0 80px; }
.back-link {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); margin-bottom: 22px; transition: color .15s;
}
.back-link:hover { color: var(--blue); }
.detail-wrap h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin-bottom: 10px;
}
.detail-wrap .lead { color: var(--muted); max-width: 520px; margin-bottom: 40px; }
.detail-hero {
  display: flex; gap: 32px; align-items: flex-start;
  flex-wrap: wrap; margin-bottom: 52px;
}
.detail-phone {
  width: 220px; height: 400px; flex-shrink: 0;
  border: 1px solid var(--hairline); overflow: hidden;
  background: var(--panel-soft);
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.detail-phone img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.detail-side { flex: 1; min-width: 240px; }
.meta-row {
  display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 18px;
}
.meta-item strong {
  display: block; font-family: var(--font-display);
  font-size: 14px; font-weight: 600; margin-bottom: 2px;
}
.meta-item span {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; color: var(--muted);
}
.role-text {
  font-size: 13px; color: var(--muted); margin-bottom: 6px;
  font-family: var(--font-mono);
}
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.detail-section { margin-bottom: 48px; }
.overview-text {
  color: var(--muted); max-width: 760px; line-height: 1.85;
}
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature-card {
  background: rgba(16, 40, 67, 0.6); border: 1px solid var(--hairline); padding: 22px;
  position: relative; overflow: hidden; border-radius: 8px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(61,169,252,0.3); }
.feature-card h4 {
  font-family: var(--font-display); font-size: 14px;
  font-weight: 600; margin-bottom: 8px; position: relative; z-index: 1;
}
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.6; position: relative; z-index: 1; }
.stack-table { width: 100%; border-collapse: collapse; max-width: 760px; }
.stack-table tr { border-bottom: 1px solid var(--hairline); }
.stack-table td { padding: 9px 0; font-size: 12.5px; }
.stack-table td:first-child {
  font-family: var(--font-mono); text-transform: uppercase;
  color: var(--muted); width: 40%; font-size: 11px;
}
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.shot-grid .shot {
  aspect-ratio: 9/19; overflow: hidden;
  border: 1px solid var(--hairline); background: var(--panel-soft);
  cursor: zoom-in; position: relative;
}
.shot-grid .shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.shot-grid .shot:hover img { transform: scale(1.05); }
.shot-grid .shot::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.shot-grid .shot:hover::after { opacity: 1; }

/* ─── Lightbox ───────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(11,30,51,0.95); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content {
  position: relative; max-width: 90vw; max-height: 90vh;
  transform: scale(0.95); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.lightbox.active .lightbox-content { transform: scale(1); }
.lightbox img {
  max-width: 100%; max-height: 90vh; border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute; top: -40px; right: 0; background: none; border: none;
  color: var(--text); font-size: 36px; line-height: 1; cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--blue); }

/* ─── Contact page ───────────────────────── */
.contact-wrap { padding: 72px 0 80px; }
.contact-wrap h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; margin-bottom: 14px;
}
.contact-wrap .lead { color: var(--muted); max-width: 420px; margin-bottom: 40px; }
.contact-links { max-width: 540px; }
.contact-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--hairline);
  font-size: 14px; color: var(--text); transition: color .15s;
}
.contact-link:hover { color: var(--blue); }
.contact-link:hover .ci { color: var(--blue); transform: scale(1.15) rotate(5deg); }
.contact-link:last-child:hover { color: var(--green); }
.contact-link:last-child:hover .ci { color: var(--green); transform: scale(1.15) rotate(5deg); }
.ci { color: var(--muted); flex-shrink: 0; transition: color .15s, transform .3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.ci svg { display: block; }

/* ─── Contact Form ───────────────────────── */
.contact-form-container { max-width: 540px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form label {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text);
}
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 14.5px; color: var(--text);
  background: rgba(16, 40, 67, 0.4); border: 1px solid var(--hairline);
  padding: 12px 16px; border-radius: 6px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%; resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
  color: var(--muted); opacity: 0.6;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61,169,252,0.15);
}
.contact-form .btn { align-self: flex-start; padding: 12px 24px; font-size: 14px; margin-top: 8px; }

/* ─── Experience page ────────────────────── */
.exp-wrap { padding: 72px 0 80px; }
.exp-wrap h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(32px, 5vw, 44px); margin-bottom: 14px;
}
.exp-wrap .lead { color: var(--muted); max-width: 520px; margin-bottom: 48px; }
.exp-section { margin-bottom: 48px; }
.exp-subhead {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 18px 0 10px;
}
.exp-subhead:first-of-type { margin-top: 0; }

.timeline { position: relative; }
.tl-item { position: relative; padding-left: 28px; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: -32px;
  width: 1px; background: var(--hairline);
}
.tl-item:last-child::before { display: none; }
.tl-marker {
  position: absolute; left: 0; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 3px rgba(61,169,252,.18);
}
.tl-marker.green { background: var(--green); box-shadow: 0 0 0 3px rgba(43,217,160,.18); }
.tl-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 6px 16px; margin-bottom: 4px;
}
.tl-head h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tl-type {
  font-size: 10px; color: var(--muted); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 2px 8px; text-transform: uppercase;
  letter-spacing: .04em;
}
.tl-date { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tl-org { color: var(--blue); font-size: 13.5px; margin-bottom: 10px; }
.tl-list { padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.tl-list li { margin-bottom: 2px; }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 680px) {
  .hero { padding: 48px 0 60px; }
  .hero h1 { font-size: clamp(24px, 7vw, 32px); }
  .hero p { font-size: 14px; }
  .hero { flex-direction: column; text-align: center; gap: 32px; }
  .hero-btns { justify-content: center; }
  .phone-mockup { display: block; margin: 0 auto; width: 200px; height: 380px; }
  .nav-links { display: none; }
  .nav-resume { display: none; }
  .hamburger { display: flex; }
  .detail-phone { width: 220px; height: 420px; margin: 0 auto; }
  .detail-hero { gap: 22px; }
  .footer-links { gap: 12px; }
  .exp-wrap { padding: 48px 0 60px; }
  .tl-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .lightbox-content { max-width: 95vw; max-height: 80vh; }
  .lightbox img { max-height: 80vh; }
}

/* ─── Scroll to Top ──────────────────────── */
.scroll-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: var(--bg); font-family: var(--font-display); font-weight: 700; font-size: 20px;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(61,169,252,0.3);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: #4ab4ff; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(61,169,252,0.4); }
@media (max-width: 680px) { .scroll-top { bottom: 20px; right: 20px; width: 40px; height: 40px; } }

/* ─── Ambient Background ──────────────────────── */
.ambient-bg {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(61, 169, 252, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(61, 169, 252, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.ambient-orb {
  position: absolute; border-radius: 50%; filter: blur(140px); opacity: 0.15;
  animation: drift 20s infinite alternate ease-in-out;
}
.ambient-orb.orb-1 { width: 45vw; height: 45vw; background: var(--blue); top: -10vw; left: -10vw; }
.ambient-orb.orb-2 { width: 35vw; height: 35vw; background: var(--green); bottom: 0vw; right: -5vw; animation-duration: 25s; animation-direction: alternate-reverse; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 6vw) scale(1.1); }
  100% { transform: translate(-4vw, 8vw) scale(0.9); }
}

/* ─── Scroll Reveal Animations ───────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.3, 1), transform 1s cubic-bezier(0.25, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }


/* --- Custom Scrollbar --------------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-soft); border: 2px solid var(--bg); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* --- Preloader ---------------------------- */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.loader-logo {
  font-family: var(--font-display); font-size: 28px; font-weight: 700; color: #FFFFFF;
  letter-spacing: -0.5px; animation: loaderPulse 1.5s infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(255,255,255,0.6); transform: scale(1); }
  50% { opacity: 0.6; text-shadow: 0 0 5px rgba(255,255,255,0.2); transform: scale(0.98); }
}

/* ─── Console Window ──────────────────────── */
.console-window {
  background: rgba(16, 40, 67, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(61, 169, 252, 0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 26px;
  max-width: 580px;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.console-window:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(61, 169, 252, 0.4);
}
.console-header {
  background: rgba(11, 30, 51, 0.8);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(61, 169, 252, 0.1);
}
.console-buttons {
  display: flex;
  gap: 6px;
}
.console-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}
.console-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}
.console-btn.close { background: #FF5F56; }
.console-btn.minimize { background: #FFBD2E; }
.console-btn.maximize { background: #27C93F; }
.console-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
  margin-right: 48px; /* Offset buttons width for centering */
}
.console-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.6;
}
.console-prompt {
  color: var(--green);
  margin-right: 8px;
  font-weight: 500;
}
.console-text {
  color: var(--text);
  margin: 0;
  display: inline-block;
}

/* --- Typing Cursor ------------------------ */
.type-cursor {
  display: inline-block; width: 2px; background: var(--blue);
  margin-left: 4px; vertical-align: text-bottom; height: 1em;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink { 50% { opacity: 0; } }

/* --- Custom Cursor ------------------------ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999;
  border-radius: 50%;
}
.cursor-dot {
  width: 6px; height: 6px; background: var(--blue);
}
.cursor-ring {
  width: 32px; height: 32px; border: 1.5px solid var(--green);
}
@media (max-width: 680px) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* --- Custom Cursor ------------------------ */
.bg-cursor {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: -1;
  width: 600px; height: 600px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(61,169,252,0.08) 0%, rgba(61,169,252,0) 60%);
  border-radius: 50%; mix-blend-mode: screen;
}
/* --- Floating Particles ------------------------ */
.particle {
  position: fixed; pointer-events: none; z-index: -2;
  color: var(--blue); font-family: var(--font-mono); font-size: 14px;
  opacity: 0;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  20% { opacity: 0.15; }
  80% { opacity: 0.15; }
  100% { transform: translateY(-100px) rotate(180deg); opacity: 0; }
}

/* --- Infinite Marquee ------------------------ */
.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  user-select: none;
  background: rgba(61, 169, 252, 0.03);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
  margin-bottom: 72px;
}
.marquee-inner {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  min-width: 100%;
  animation: marquee-scroll 25s linear infinite;
}
.marquee-inner span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 24px;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (max-width: 680px) {
  .marquee { margin-bottom: 48px; }
  .marquee-inner span { font-size: 11px; padding: 0 16px; }
}
