/* =============================================
   PORTFOLIO — style.css  v3.0
   ============================================= */

:root {
  --bg:         #04070f;
  --bg-2:       #070c1a;
  --surface:    #0a1020;
  --surface-2:  #101828;
  --border:     #182035;
  --border-hi:  #2a3860;
  --text:       #dde6f5;
  --muted:      #566070;
  --accent:     #00d4ff;
  --accent-2:   #7c5cff;
  --accent-3:   #00ff88;
  --accent-dim: #001e30;
  --radius:     8px;
  --max-width:  900px;
  --mono:       'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 8% 22%,  rgba(0,212,255,0.06)  0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 92% 68%,  rgba(124,92,255,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 45% 40% at 52% 88%,  rgba(0,255,136,0.035) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-drift 22s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  0%   { transform: translate(0,    0)     scale(1);    }
  100% { transform: translate(28px, -20px) scale(1.05); }
}


a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Custom cursor ── */
* { cursor: none !important; }

.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--accent), 0 0 20px rgba(0,212,255,0.4);
  transition: width 0.15s, height 0.15s;
}


.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 99999;
  background: var(--accent);
  color: #020609;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* ── Scanlines — static, no animation ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.05) 3px,
    rgba(0,0,0,0.05) 4px
  );
  pointer-events: none;
  z-index: 9990;
  /* no animation — avoids full-page repaint every frame */
}


/* ── Boot screen ── */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #020408;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#boot-screen.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-inner {
  width: min(540px, 90vw);
  font-family: var(--mono);
}

.boot-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
  text-shadow: 0 0 24px var(--accent), 0 0 60px rgba(0,212,255,0.2);
  letter-spacing: 2px;
}

.boot-lines {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
}

.boot-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-8px);
  animation: boot-in 0.18s ease forwards;
}
.boot-line .prompt { color: var(--accent-3); flex-shrink: 0; }
.boot-line .label  { flex: 1; }
.boot-line .ok     { color: var(--accent-3); font-size: 0.72rem; margin-left: auto; }

@keyframes boot-in {
  to { opacity: 1; transform: translateX(0); }
}

.boot-progress-wrap {
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 2px;
  height: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}
.boot-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  transition: width 0.35s ease;
  box-shadow: 0 0 8px var(--accent);
}

.boot-status-text {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.72rem;
  text-align: right;
  min-height: 1.2em;
  text-shadow: 0 0 10px var(--accent);
  letter-spacing: 1px;
}

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section { padding: 88px 0; position: relative; }
section + section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,212,255,0.25) 25%,
    rgba(124,92,255,0.2) 50%,
    rgba(0,212,255,0.15) 75%,
    transparent 100%
  );
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4,7,15,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,212,255,0.1);
}
nav::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.4), transparent);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent);
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(0,212,255,0.6);
}
.nav-logo::before { content: '> '; opacity: 0.5; }

.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(0,212,255,0.6);
}
.nav-links a.nav-active {
  color: var(--accent) !important;
  text-shadow: 0 0 14px rgba(0,212,255,0.7);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.25s cubic-bezier(0.23,1,0.32,1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #020609;
  box-shadow: 0 0 24px rgba(0,212,255,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  box-shadow: 0 0 50px rgba(0,212,255,0.7), 0 0 100px rgba(0,212,255,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-3px);
}

.btn-outline {
  background: rgba(0,212,255,0.04);
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,212,255,0.06);
  box-shadow: 0 0 24px rgba(0,212,255,0.15), inset 0 0 24px rgba(0,212,255,0.04);
  transform: translateY(-3px);
}

/* ── Stats ── */
#stats { padding: 48px 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--surface);
}

.stats-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.04) 0%, transparent 50%, rgba(124,92,255,0.04) 100%);
  pointer-events: none;
  z-index: 0;
}

.stat-item {
  background: transparent;
  padding: 34px 20px;
  text-align: center;
  transition: background 0.25s;
  position: relative;
  z-index: 1;
}
.stat-item + .stat-item { border-left: 1px solid rgba(0,212,255,0.08); }
.stat-item:hover { background: rgba(0,212,255,0.04); }
.stat-item:hover .stat-number { text-shadow: 0 0 30px rgba(0,212,255,0.7); }

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(0,212,255,0.4);
  transition: text-shadow 0.25s;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 9px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* ── Section headings ── */
.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 10px rgba(0,255,136,0.4);
}
.section-label::before { content: '//'; opacity: 0.45; font-weight: 400; }

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 50px;
  font-size: 0.9rem;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p { color: var(--muted); }
.about-text p + p { margin-top: 18px; }

.about-details { display: flex; flex-direction: column; gap: 12px; }

.detail-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.detail-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  border-radius: 2px 0 0 2px;
  opacity: 0;
  transition: opacity 0.25s;
}
.detail-item:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: 0 0 20px rgba(0,212,255,0.06);
}
.detail-item:hover::before { opacity: 1; }

.detail-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
  opacity: 0.7;
}
.detail-value { font-weight: 500; font-size: 0.88rem; }

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}

/* HUD corner brackets */
.skill-card::before,  .skill-card::after,
.project-card::before, .project-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
}
.skill-card::before,   .project-card::before { top: 6px;    left: 6px;    border-width: 1.5px 0 0 1.5px; }
.skill-card::after,    .project-card::after  { bottom: 6px; right: 6px;   border-width: 0 1.5px 1.5px 0; }
.skill-card:hover::before,  .skill-card:hover::after,
.project-card:hover::before, .project-card:hover::after { opacity: 0.9; }

.skill-card:hover {
  border-color: rgba(0,212,255,0.35);
  box-shadow: 0 0 35px rgba(0,212,255,0.1), inset 0 0 35px rgba(0,212,255,0.03);
  background: var(--surface-2);
}

.skill-icon { font-size: 1.6rem; margin-bottom: 12px; }
.skill-name { font-weight: 700; font-size: 0.88rem; margin-bottom: 5px; }
.skill-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.55; }

/* ── Projects ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: rgba(0,212,255,0.35);
  box-shadow: 0 0 50px rgba(0,212,255,0.1), inset 0 0 50px rgba(0,212,255,0.02);
  background: var(--surface-2);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-name { font-size: 1rem; font-weight: 700; }

.project-links { display: flex; gap: 8px; flex-shrink: 0; }
.project-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.project-links a:hover {
  color: var(--accent-3);
  border-color: var(--accent-3);
  box-shadow: 0 0 10px rgba(0,255,136,0.2);
  text-decoration: none;
}

.project-desc { font-size: 0.86rem; color: var(--muted); line-height: 1.7; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  background: rgba(0,212,255,0.06);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0,212,255,0.15);
}

/* ── Experience ── */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 28px;
  border-left: 1px solid rgba(0,212,255,0.15);
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 34px;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(0,212,255,0.3);
}

.timeline-date {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.75rem;
  padding-top: 4px;
}

.timeline-role { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }

.timeline-company {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.82rem;
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(0,212,255,0.3);
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.timeline-bullets li {
  font-size: 0.86rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}
.timeline-bullets li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* ── Contact ── */
.contact-grid { display: flex; gap: 14px; flex-wrap: wrap; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 28px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, color 0.2s;
}
.contact-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0,212,255,0.14);
  color: var(--accent);
  text-decoration: none;
}
.contact-link .icon { font-size: 1.1rem; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

/* ── Scroll progress bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.1s linear;
}

/* ── Typewriter cursor ── */
.tw-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: tw-blink 1s step-end infinite;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes tw-blink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0; }
}

/* ── Scroll reveal ── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

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

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  z-index: 101;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Cursor: disable on touch devices ── */
@media (hover: none) {
  * { cursor: auto !important; }
  .cursor-dot { display: none !important; }
}

/* ── Responsive — tablet ── */
@media (max-width: 768px) {
  .section-title { font-size: 1.75rem; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ── Responsive — mobile ── */
@media (max-width: 640px) {
  section { padding: 64px 0; }

  /* Nav: hamburger */
  .nav-hamburger { display: flex; }
  nav { position: sticky; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(4,7,15,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,212,255,0.15);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    list-style: none;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(0,212,255,0.05); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  /* Layout */
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-top: 1px solid rgba(0,212,255,0.08); }
  .stat-item:nth-child(3) { border-left: none; }
  .stat-number { font-size: 2.2rem; letter-spacing: -1px; }
  .stat-label { font-size: 0.58rem; }

  /* Hero */
  .hero-name { font-size: 2.8rem; letter-spacing: -1.5px; }
  .hero-title { font-size: 1rem; margin-bottom: 36px; }

  /* Timeline */
  .timeline { padding-left: 20px; }
  .timeline-item::before { left: -26px; }
  .timeline-date { font-size: 0.7rem; }

  /* Hide heavy gear decorations on small screens */
  .hero-gear { display: none !important; }

  /* Section title */
  .section-title { font-size: 1.65rem; }

  /* Contact */
  .contact-grid { flex-direction: column; }
  .contact-link { justify-content: center; }
}
