@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #0f0f1f;
  --bg-card: #141428;
  --bg-card-hover: #1a1a35;
  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.12);
  --accent-glow: rgba(100, 255, 218, 0.25);
  --text-primary: #e6f1ff;
  --text-secondary: #8892b0;
  --text-muted: #4a5568;
  --border: rgba(100, 255, 218, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --nav-height: 70px;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 0 20px rgba(100, 255, 218, 0.15);
  --transition: 0.3s ease;
}

/* ── Preloader ── */
#preloader {
  position: fixed;
  inset: 0;
  background: #0a0a14;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Courier New', monospace;
}

#preloader.fade-out { opacity: 0; pointer-events: none; }

.preloader-inner {
  width: min(580px, 88vw);
  padding: 0 12px;
}

.preloader-logo {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -1px;
}
.preloader-logo span { color: var(--accent); }

.boot-line {
  font-size: 0.88rem;
  line-height: 1.9;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.boot-line.show { opacity: 1; transform: none; }

.boot-tag-boot   { color: var(--accent); }
.boot-tag-sys    { color: #79c0ff; }
.boot-tag-ok     { color: #28ca42; }
.boot-tag-warn   { color: #ffbd2e; }
.boot-tag-start  { color: var(--text-primary); font-weight: 700; font-size: 0.95rem; }

.boot-progress-wrap {
  height: 3px;
  background: rgba(100, 255, 218, 0.12);
  border-radius: 2px;
  margin: 6px 0 10px 0;
  overflow: hidden;
}
.boot-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a8fff0);
  border-radius: 2px;
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.boot-cursor-line {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.boot-cursor-line.show { opacity: 1; }

.preloader-prompt {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

.boot-cursor {
  display: inline-block;
  width: 10px;
  height: 16px;
  background: var(--accent);
  border-radius: 1px;
  animation: cur-blink 0.6s step-end infinite;
  box-shadow: 0 0 6px var(--accent);
}

/* Custom cursor — matches terminal block cursor */
#custom-cursor {
  position: fixed;
  width: 10px;
  height: 18px;
  background: var(--accent);
  border-radius: 1px;
  pointer-events: none;
  z-index: 99999;
  transform: translate(6px, -2px);
  animation: cur-blink 0.6s step-end infinite;
  will-change: left, top;
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(100, 255, 218, 0.35);
}

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

/* Scroll-to-top button */
#scrollTopBtn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--transition);
  z-index: 999;
}

#scrollTopBtn.show { opacity: 1; transform: none; }
#scrollTopBtn:hover { background: var(--accent-dim); box-shadow: var(--shadow-accent); }
#scrollTopBtn svg { color: var(--accent); }

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

#app {
  width: 100%;
}

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

a:hover {
  color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

section {
  padding: 100px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--accent);
}

.section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

/* Shooting star */
.section-line::after {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  width: 28px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), var(--accent));
  border-radius: 2px;
  animation: shoot-star 2.8s ease-in-out infinite;
  animation-delay: 0.6s;
}

@keyframes shoot-star {
  0%   { left: -28px; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 68px;  opacity: 0; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
  box-shadow: var(--shadow-accent);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-body);
}

/* Fade-in-up animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s;  opacity: 1; transform: none; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s;  opacity: 1; transform: none; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.3s;  opacity: 1; transform: none; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.4s;  opacity: 1; transform: none; }

/* SVG icon helpers */
.info-icon,
.skill-cat-icon,
.contact-item-icon,
.edu-icon,
.achievement-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon svg,
.edu-icon svg {
  color: var(--accent);
  flex-shrink: 0;
}

.skill-cat-icon svg {
  color: var(--accent);
}

.contact-item-icon svg {
  color: var(--accent);
}

.achievement-icon svg {
  color: var(--accent);
  stroke-width: 1.5;
}

.project-folder svg {
  color: var(--accent);
  opacity: 0.85;
}

.project-links a svg {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.project-links a:hover svg {
  color: var(--accent);
}

.contact-socials a svg,
.footer-socials a svg {
  color: currentColor;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  max-width: 320px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: #0d2b22;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.toast.error {
  background: #2b0d0d;
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand h3 span {
  color: var(--accent);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 260px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-accent);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  section { padding: 70px 0; }
  .container { padding: 0 20px; }
  .section-header { margin-bottom: 50px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  section { padding: 60px 0; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
