@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple2); border-radius: 3px; }

/* ── SELECTION ── */
::selection { background: rgba(168,85,247,0.3); color: var(--text); }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }

/* ── GRADIENT TEXT ── */
.grad {
  background: linear-gradient(135deg, var(--purple), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SECTION LABEL ── */
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 12px;
  display: block;
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 48px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.5); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }

/* ── CANVAS (stars background) ── */
#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* ════════════════════════════════
   NAVBAR
════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 40px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 100%;
  height: 1.5px;
  background: var(--purple);
  transition: right var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { right: 0; }
.nav-cta { margin-left: 8px; padding: 9px 20px; font-size: 14px; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; margin-left: auto; }

/* ════════════════════════════════
   HERO
════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  z-index: 1;
}
.hero-content { max-width: 720px; }
.hero-greeting {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}
.hero-role {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--muted);
  margin-bottom: 28px;
  min-height: 36px;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}
.cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--purple); margin-left: 2px; vertical-align: middle; animation: blink 1s step-end infinite; }
.hero-bio {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}
.hero-bio strong { color: var(--text); }
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 1s forwards;
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  z-index: 1;
}
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--purple), transparent); }

/* ════════════════════════════════
   ABOUT
════════════════════════════════ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 16px;
}
.about-text p strong { color: var(--text); }
.about-text p a { color: var(--purple); border-bottom: 1px solid rgba(168,85,247,0.3); transition: border-color var(--transition); }
.about-text p a:hover { border-color: var(--purple); }

.fun-facts { display: flex; flex-direction: column; gap: 12px; }
.fun-fact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: default;
}
.fun-fact:hover { border-color: var(--purple); transform: translateX(4px); }
.fun-fact-icon { font-size: 24px; flex-shrink: 0; line-height: 1.4; }
.fun-fact-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.fun-fact-text span  { font-size: 13px; color: var(--muted); }

/* powerlifting special */
.fun-fact.powerlifting { border-color: rgba(245,158,11,0.3); }
.fun-fact.powerlifting:hover { border-color: var(--gold); box-shadow: var(--glow-gold); }

/* ════════════════════════════════
   SKILLS
════════════════════════════════ */
.skills-section { background: var(--bg2); }
.skills-groups { display: flex; flex-direction: column; gap: 32px; }
.skills-group h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.skills-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  transition: all var(--transition);
  cursor: default;
}
.skill-tag:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); box-shadow: var(--glow-purple); }

/* ════════════════════════════════
   PROJECTS
════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168,85,247,0.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover { border-color: var(--purple); transform: translateY(-4px); box-shadow: var(--shadow), var(--glow-purple); }
.project-card:hover::before { opacity: 1; }
.project-card.featured { border-color: rgba(168,85,247,0.3); }
.project-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.project-arrow { color: var(--muted); font-size: 18px; transition: transform var(--transition); flex-shrink: 0; }
.project-card:hover .project-arrow { transform: translate(3px, -3px); color: var(--purple); }
.project-desc { font-size: 14px; color: var(--muted); line-height: 1.65; flex: 1; }
.project-footer { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.lang-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.lang-dot { width: 10px; height: 10px; border-radius: 50%; }
.lang-dot.java { background: #b07219; }
.lang-dot.html { background: #e34c26; }
.lang-dot.js   { background: #f1e05a; }
.lang-dot.ts   { background: #2b7489; }
.lang-dot.go   { background: #00add8; }
.lang-dot.vue  { background: #41b883; }
.star-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.projects-more { text-align: center; }

/* ════════════════════════════════
   WRITING
════════════════════════════════ */
.writing-section { background: var(--bg2); }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition);
  position: relative;
}
.article-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  transition: right 0.4s ease;
}
.article-card:hover { border-color: rgba(168,85,247,0.4); transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card:hover::after { right: 0; }
.article-meta { display: flex; align-items: center; gap: 12px; }
.article-date { font-family: var(--font-mono); font-size: 11px; color: var(--purple); letter-spacing: 1px; }
.article-read { font-size: 11px; color: var(--subtle); }
.article-title { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.4; }
.article-desc { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; }
.article-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  margin-top: 4px;
  transition: gap var(--transition);
}
.article-link:hover { gap: 9px; }
.writing-more { text-align: center; }

/* ════════════════════════════════
   CONTACT
════════════════════════════════ */
.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact-inner .section-title { margin-bottom: 16px; }
.contact-sub { color: var(--muted); font-size: 17px; margin-bottom: 40px; }
.contact-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.contact-link:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-3px); box-shadow: var(--glow-purple); }
.contact-link .icon { font-size: 18px; }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-copy { color: var(--subtle); font-size: 13px; margin-left: auto; }
.footer-credit { color: var(--subtle); font-size: 12px; font-family: var(--font-mono); }
/* secret: click the ⚡ to activate harry potter mode */
.footer-secret {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.3;
  transition: opacity var(--transition);
  user-select: none;
}
.footer-secret:hover { opacity: 1; }

/* ════════════════════════════════
   SCROLL REVEAL
════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ════════════════════════════════
   EASTER EGG OVERLAYS
════════════════════════════════ */

/* Harry Potter mode */
#hp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at center, #1a0a2e 0%, #08020f 100%);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 40px;
}
#hp-overlay.active { display: flex; }
.hp-quote {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 36px);
  color: var(--gold);
  max-width: 600px;
  line-height: 1.5;
  margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(245,158,11,0.5);
}
.hp-author {
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(245,158,11,0.5);
  margin-bottom: 40px;
}
.hp-close { color: var(--muted); font-size: 14px; cursor: pointer; }
.hp-close:hover { color: var(--gold); }
.hp-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.spark {
  position: absolute;
  font-size: 20px;
  animation: sparkFloat linear infinite;
  opacity: 0;
}

/* Dexter mode */
body.dexter-mode .navbar { border-bottom-color: rgba(239,68,68,0.4); }
body.dexter-mode .nav-links a::after { background: var(--red); }
body.dexter-mode .label, body.dexter-mode .nav-links a:hover { color: var(--red); }
body.dexter-mode ::-webkit-scrollbar-thumb { background: #991b1b; }
.dexter-toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 5000;
  background: #1a0505;
  border: 1px solid rgba(239,68,68,0.5);
  border-radius: 8px;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--red);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.dexter-toast.show { transform: translateX(-50%) translateY(0); }

/* GTA Wanted stars */
#gta-wanted {
  position: fixed;
  top: 80px; right: 16px;
  z-index: 5000;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
#gta-wanted.show { opacity: 1; }
.wanted-star {
  width: 28px; height: 28px;
  background: var(--gold);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  opacity: 0.2;
  transition: opacity 0.3s;
}
.wanted-star.lit { opacity: 1; box-shadow: 0 0 12px var(--gold); }

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9998;
  animation: confettiFall linear forwards;
}

/* ════════════════════════════════
   ANIMATIONS
════════════════════════════════ */
@keyframes fadeUp  { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes bounce  { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-8px)} }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes sparkFloat {
  0%   { opacity:0; transform: translateY(0) scale(0.5); }
  20%  { opacity:1; }
  80%  { opacity:1; }
  100% { opacity:0; transform: translateY(-120vh) scale(1.2) rotate(360deg); }
}
@keyframes confettiFall {
  0%   { opacity:1; transform: translateY(-20px) rotate(0deg); }
  100% { opacity:0; transform: translateY(100vh) rotate(720deg); }
}
@keyframes drip { 0%{height:0;opacity:1} 100%{height:60px;opacity:0} }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: block; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .contact-links { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy { margin-left: 0; }
}
