/* ============================================
   ILING CHEN // PORTFOLIO
   ============================================ */

:root {
  --neon-pink: #ff2d78;
  --neon-cyan: #00f5ff;
  --neon-yellow: #f5e642;
  --dark-bg: #050810;
  --dark-card: #0a0f1e;
  --dark-border: #1a2a4a;
  --text-primary: #e0eeff;
  --text-muted: #5a7aaa;
  --font-mono: 'Share Tech Mono', monospace;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCANLINES ── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.07) 0px,
    rgba(0,0,0,0.07) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ── GRID BG ── */
.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,245,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(5,8,16,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dark-border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  letter-spacing: 2px;
}

.nav-links { display: flex; gap: 2rem; }

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

/* ── HERO ── */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 8rem 8% 4rem;
}

.hero-content { max-width: 560px; }

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-pink);
  letter-spacing: 3px;
  margin-bottom: 1rem;
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

h1.glitch {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  position: relative;
  text-shadow: 0 0 20px rgba(0,245,255,0.4);
  line-height: 1.1;
}

h1.glitch::before,
h1.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}

h1.glitch::before {
  color: var(--neon-cyan);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-3px, 0);
  opacity: 0;
}

h1.glitch::after {
  color: var(--neon-pink);
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(3px, 0);
  opacity: 0;
}

h1.glitch.glitch-active::before { opacity: 1; animation: glitch-top 0.15s linear; }
h1.glitch.glitch-active::after  { opacity: 1; animation: glitch-bot 0.15s linear; }

@keyframes glitch-top {
  0%   { transform: translate(-3px, 0); }
  50%  { transform: translate(3px, 0); }
  100% { transform: translate(-3px, 0); }
}
@keyframes glitch-bot {
  0%   { transform: translate(3px, 0); }
  50%  { transform: translate(-3px, 0); }
  100% { transform: translate(3px, 0); }
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--neon-cyan);
  margin: 1rem 0 0.5rem;
  letter-spacing: 1px;
  min-height: 1.6rem;
}

.typed-text::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-primary {
  background: var(--neon-pink);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(255,45,120,0.5);
}

.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 30px rgba(255,45,120,0.9);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0,245,255,0.2), inset 0 0 12px rgba(0,245,255,0.05);
}

.btn-outline:hover {
  background: rgba(0,245,255,0.1);
  box-shadow: 0 0 25px rgba(0,245,255,0.5);
  transform: translateY(-2px);
}

/* Hero decoration */
.hero-decor {
  position: relative;
  flex-shrink: 0;
}

.profile-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  box-shadow:
    0 0 20px rgba(0,245,255,0.4),
    0 0 60px rgba(0,245,255,0.15),
    inset 0 0 20px rgba(0,245,255,0.05);
  position: relative;
  z-index: 2;
  display: block;
}

.hex-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 270px;
  height: 270px;
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 50%;
  animation: spin 12s linear infinite;
  z-index: 1;
}

.hex-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255,45,120,0.2);
  border-radius: 50%;
  animation: spin 8s linear infinite reverse;
}

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ── SECTIONS ── */
.section {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto 3rem;
  padding: 2rem 2.5rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-left: 3px solid var(--neon-pink);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-pink);
  letter-spacing: 3px;
  margin-bottom: 0.75rem;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--dark-border);
}

.accent { color: var(--neon-cyan); }

/* ── ABOUT ── */
.about-text {
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.status-bar {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--neon-cyan);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px; height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── SKILL BARS ── */
.skill-bars { display: flex; flex-direction: column; gap: 1rem; }

.skill-bar-item {}

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
}

.skill-bar-track {
  height: 6px;
  background: #111a2e;
  border: 1px solid var(--dark-border);
  position: relative;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--neon-pink), #ff6ba8);
  box-shadow: 0 0 10px var(--neon-pink);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-bar-fill.cyan {
  background: linear-gradient(90deg, var(--neon-cyan), #80faff);
  box-shadow: 0 0 10px var(--neon-cyan);
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 3px; height: 100%;
  background: #fff;
  box-shadow: 0 0 6px #fff;
}

/* ── SKILL TAGS ── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0,245,255,0.05);
  border: 1px solid rgba(0,245,255,0.2);
  color: var(--neon-cyan);
  letter-spacing: 1px;
  transition: all 0.25s;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

.skill-tag:hover {
  background: rgba(0,245,255,0.15);
  box-shadow: 0 0 12px rgba(0,245,255,0.3);
  transform: translateY(-2px);
}

.skill-tag.learning {
  border-color: rgba(245,230,66,0.4);
  color: var(--neon-yellow);
  background: rgba(245,230,66,0.05);
}

.learning-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  letter-spacing: 1px;
}

/* ── EXPERIENCE CARDS ── */
.exp-card {
  border: 1px solid var(--dark-border);
  border-left: 3px solid var(--neon-cyan);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.4rem;
  background: rgba(0,245,255,0.02);
  transition: box-shadow 0.3s;
}

.exp-card:hover {
  box-shadow: 0 0 20px rgba(0,245,255,0.08);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.exp-company {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--neon-cyan);
  margin-top: 0.2rem;
  letter-spacing: 1px;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-pink);
  letter-spacing: 2px;
  white-space: nowrap;
}

.exp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.exp-list li {
  font-size: 0.92rem;
  color: #9ab;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}

.exp-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--neon-pink);
  font-size: 0.75rem;
  top: 0.15rem;
}

/* ── TIMELINE ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--dark-border);
}

.tl-item {
  display: flex;
  gap: 1.2rem;
  padding-bottom: 1.8rem;
  position: relative;
}

.tl-dot {
  position: absolute;
  left: -1.48rem;
  top: 0.3rem;
  width: 12px; height: 12px;
  background: var(--neon-pink);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-pink);
  flex-shrink: 0;
}

.tl-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-pink);
  letter-spacing: 2px;
  margin-bottom: 0.2rem;
}

.tl-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.tl-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.tl-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.tl-dot.pink {
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
}

/* ── PROJECT BULLETS ── */
.project-bullets {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-bullets li {
  font-size: 0.9rem;
  color: #9ab;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}

.project-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--neon-cyan);
  font-size: 0.75rem;
  top: 0.15rem;
}

/* ── PROJECTS ── */
.project-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--dark-border);
  border-top: 2px solid var(--neon-cyan);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s;
}

.project-card:hover {
  box-shadow: 0 0 30px rgba(0,245,255,0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.project-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-pink);
  letter-spacing: 3px;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(0,245,255,0.3);
  padding: 0.3rem 0.75rem;
  transition: all 0.2s;
}

.project-link:hover {
  background: rgba(0,245,255,0.1);
  box-shadow: 0 0 10px rgba(0,245,255,0.3);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.project-media {
  width: 100%;
  border: 1px solid var(--dark-border);
  margin-bottom: 1rem;
  filter: saturate(1.1) contrast(1.05);
}

.project-card p {
  color: #9ab;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255,45,120,0.08);
  border: 1px solid rgba(255,45,120,0.25);
  color: var(--neon-pink);
  letter-spacing: 1px;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: rgba(0,245,255,0.04);
  border: 1px solid var(--dark-border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.25s;
}

.contact-item:hover {
  border-color: var(--neon-cyan);
  background: rgba(0,245,255,0.08);
  color: var(--neon-cyan);
}

.contact-item i {
  color: var(--neon-cyan);
  width: 16px;
  text-align: center;
}

.lang-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.lang-box span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  background: rgba(245,230,66,0.05);
  border: 1px solid rgba(245,230,66,0.2);
  color: var(--neon-yellow);
  letter-spacing: 1px;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem 3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-cyan), transparent);
  margin-bottom: 1.5rem;
  opacity: 0.4;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  #hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 7rem 1.5rem 3rem;
  }
  .hero-btns { justify-content: center; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.58rem; }
  .section { padding: 1.5rem; margin: 0 1rem 2rem; }
  .profile-image { width: 160px; height: 160px; }
  .hex-ring { width: 210px; height: 210px; }
}
