/* =============================================
   NARUTO PIXEL THEME — THANH-BINH NGUYEN
   Hidden Leaf Village — Uchiha Clan Archives
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Share+Tech+Mono&display=swap');

:root {
  --orange:      #FF6A00;
  --orange-dim:  #c45200;
  --red:         #CC0000;
  --red-glow:    rgba(204, 0, 0, 0.5);
  --gold:        #FFD000;
  --gold-dim:    rgba(255, 208, 0, 0.15);
  --dark-bg:     #0a0a12;
  --dark-card:   #10101e;
  --dark-card2:  #14142a;
  --text:        #f0e6d3;
  --text-dim:    #7a6a55;
  --border:      rgba(255, 106, 0, 0.3);
  --font-pixel:  'Press Start 2P', monospace;
  --font-vt:     'VT323', monospace;
  --font-mono:   'Share Tech Mono', monospace;
}

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

body {
  background: var(--dark-bg);
  color: var(--text);
  font-family: var(--font-vt);
  font-size: 22px;
  line-height: 1.8;
  overflow-x: hidden;
  image-rendering: pixelated;
  letter-spacing: 0.03em;
}

/* ── PIXEL BACKGROUND ── */
.pixel-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,106,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,106,0,0.025) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ── PIXEL BORDER UTIL ── */
.pixel-border {
  box-shadow:
    0 -4px 0 var(--orange),
    0  4px 0 var(--orange),
   -4px 0 0 var(--orange),
    4px 0 0 var(--orange);
}

/* ══════════════════════════════
   SHARINGAN CSS ART
══════════════════════════════ */
.sharingan-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.sharingan {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1a0000 30%, #CC0000 100%);
  position: relative;
  box-shadow: 0 0 0 3px #111, 0 0 0 6px #CC0000, 0 0 30px var(--red-glow), 0 0 60px rgba(204,0,0,0.2);
  animation: sharingan-spin 12s linear infinite;
}

/* pupil */
.sharingan::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #0a0000;
  box-shadow: 0 0 6px #CC0000;
  z-index: 2;
}

/* 3 tomoe using drop-shadows */
.sharingan::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #0a0000;
  margin-top: -26px;
  margin-left: -4px;
  box-shadow:
    0 0 0 2px #CC0000,
    /* tomoe 1 - top */
    0px -2px 0 2px #0a0000,
    /* tomoe 2 - bottom left */
    22px 16px 0 0 #0a0000,
    22px 16px 0 2px #CC0000,
    22px 16px -2px 2px #0a0000,
    /* tomoe 3 - bottom right */
    -22px 16px 0 0 #0a0000,
    -22px 16px 0 2px #CC0000,
    -22px 16px -2px 2px #0a0000;
  z-index: 3;
}

@keyframes sharingan-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 10;
  padding: 64px 20px 52px;
  text-align: center;
  border-bottom: 4px solid var(--orange);
  background:
    radial-gradient(ellipse at center top, rgba(204,0,0,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at center bottom, rgba(255,106,0,0.04) 0%, transparent 60%);
}

/* pixel top border animation */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--orange) 0px, var(--orange) 8px,
    transparent 8px, transparent 16px
  );
  animation: pixel-march 0.8s steps(1) infinite;
}

@keyframes pixel-march {
  0%   { background-position: 0 0; }
  100% { background-position: 16px 0; }
}

.hero-clan {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--red);
  letter-spacing: 0.3em;
  text-shadow: 0 0 8px var(--red-glow);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 3.5vw, 2rem);
  color: var(--orange);
  text-shadow:
    4px 4px 0 var(--orange-dim),
    0 0 20px rgba(255,106,0,0.5);
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin-bottom: 12px;
  /* pixel shadow offset */
  image-rendering: pixelated;
}

.subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  color: var(--gold);
  letter-spacing: 0.2em;
  text-shadow: 0 0 8px rgba(255,208,0,0.5);
  margin-bottom: 24px;
}

.contact-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.contact-bar .accent { color: var(--orange); margin-right: 4px; }
.contact-bar a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, text-shadow 0.2s;
}
.contact-bar a:hover {
  border-color: var(--orange);
  text-shadow: 0 0 8px var(--orange);
}

/* ── MAIN ── */
main {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* ── SECTIONS ── */
.section { margin-top: 52px; }

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  color: var(--orange);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  text-shadow: 2px 2px 0 var(--orange-dim), 0 0 12px rgba(255,106,0,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--orange) 0, var(--orange) 4px,
    transparent 4px, transparent 8px
  );
}

/* ── EASTER EGG STYLES ── */
#jutsu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}
#jutsu-overlay.active { display: block; }
.jutsu-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 4vw, 2.5rem);
  color: var(--red);
  text-shadow: 0 0 30px var(--red-glow), 4px 4px 0 #330000;
  text-align: center;
  line-height: 2;
  animation: jutsu-flash 0.1s steps(1) infinite;
}
@keyframes jutsu-flash {
  0%,100% { opacity:1; } 50% { opacity:0.7; }
}
.crow {
  position: fixed;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 9998;
  animation: crow-fly linear forwards;
}
@keyframes crow-fly {
  from { transform: translateX(0) rotate(0deg); opacity: 1; }
  to   { transform: translateX(110vw) rotate(20deg); opacity: 0; }
}

/* ── PIXEL SCROLL (terminal box) ── */
.scroll-box {
  background: var(--dark-card);
  border: 4px solid var(--orange);
  padding: 28px;
  position: relative;
  /* pixel corner dots */
  box-shadow:
    inset 0 0 0 2px var(--dark-card),
    0 0 20px rgba(255,106,0,0.1);
}

.scroll-box::before,
.scroll-box::after {
  content: '◆';
  position: absolute;
  color: var(--gold);
  font-size: 1rem;
  line-height: 1;
}
.scroll-box::before { top: 6px; right: 10px; }
.scroll-box::after  { bottom: 6px; left: 10px; }

.terminal-line {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.prompt { color: var(--red); margin-right: 8px; }

.body-text {
  font-family: var(--font-vt);
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.highlight { color: var(--gold); font-weight: bold; }

/* ── TAGS ── */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding: 4px 8px;
  background: rgba(255,106,0,0.07);
  cursor: default;
  transition: background 0.15s, box-shadow 0.15s;
  image-rendering: pixelated;
}

.tag:hover {
  background: rgba(255,106,0,0.18);
  box-shadow: 2px 2px 0 var(--orange-dim);
}

.tag.small { font-size: 0.38rem; padding: 3px 6px; }

/* ── EXPERIENCE CARDS ── */
.card {
  background: var(--dark-card);
  border: 3px solid rgba(255,106,0,0.2);
  border-left: 4px solid var(--text-dim);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-left-color: var(--orange);
  box-shadow: 4px 4px 0 rgba(255,106,0,0.15);
}

.card.active {
  border-left-color: var(--red);
  background: linear-gradient(135deg, var(--dark-card), rgba(204,0,0,0.04));
}

.card.active::after {
  content: '▶ ACTIVE MISSION';
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--red);
  text-shadow: 0 0 6px var(--red-glow);
  animation: blink-text 1.5s step-end infinite;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.company {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--orange);
  text-shadow: 2px 2px 0 var(--orange-dim);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.role {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--gold);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.date-badge {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--gold);
  border: 2px solid rgba(255,208,0,0.4);
  padding: 4px 8px;
  background: var(--gold-dim);
  white-space: nowrap;
}

.card-list { list-style: none; padding: 0; margin-bottom: 16px; }

.card-list li {
  font-family: var(--font-vt);
  font-size: 1.2rem;
  color: var(--text);
  padding-left: 22px;
  position: relative;
  margin-bottom: 12px;
  line-height: 1.85;
  letter-spacing: 0.03em;
}

/* Kunai bullet */
.card-list li::before {
  content: '⟩';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: bold;
}

.card-list a.inline-link { color: var(--gold); text-decoration: underline; }

.project-chip {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--text-dim);
  margin-top: 12px;
}
.project-chip .chip-label { color: var(--gold); margin-right: 6px; }
.project-chip a { color: var(--orange); border-bottom: 1px dashed; }

/* ── PROJECTS GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--dark-card2);
  border: 3px solid rgba(204,0,0,0.3);
  padding: 20px;
  position: relative;
  transition: transform 0.1s steps(1), box-shadow 0.1s steps(1);
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--red);
}

.project-card:hover::before { transform: scaleX(1); }

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.project-name {
  font-family: var(--font-pixel);
  font-size: 0.48rem;
  color: var(--red);
  text-shadow: 1px 1px 0 #660000;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

.project-stack {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.project-card p {
  font-family: var(--font-vt);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.project-link {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--orange);
  text-decoration: none;
  transition: text-shadow 0.2s;
}
.project-link:hover { text-shadow: 0 0 8px var(--orange); }

.store-links { display: flex; gap: 6px; }
.store-badge {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--gold);
  border: 2px solid rgba(255,208,0,0.35);
  padding: 2px 6px;
}

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

.skill-group {
  background: var(--dark-card);
  border: 2px solid rgba(255,106,0,0.2);
  padding: 18px;
  position: relative;
}

.skill-group::before {
  content: '▪';
  position: absolute;
  top: 6px; left: 8px;
  color: var(--orange);
  font-size: 0.6rem;
}

.skill-group-title {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  padding-left: 14px;
}

.skill-group p {
  font-family: var(--font-vt);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 2;
  letter-spacing: 0.03em;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 32px 20px;
  border-top: 4px solid var(--orange);
  background: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 15px,
    rgba(255,106,0,0.03) 15px, rgba(255,106,0,0.03) 16px
  );
}

.footer-text {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  line-height: 2;
}

.blink { animation: blink-text 1s step-end infinite; color: var(--orange); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb {
  background: var(--orange);
  border-radius: 0;
  image-rendering: pixelated;
}

/* ── LINKS ── */
a { color: var(--orange); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .card-header { flex-direction: column; }
  .card.active::after { display: none; }
  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 0.9rem; }
  .section-title { font-size: 0.5rem; }
}
