/* ============================================================
  Jonathan Chang - UTS Professional Experience Review Portfolio
   Dark Futuristic Theme | Glassmorphism | Cyan/Purple Accents
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #0d1117;
  --bg-card:       rgba(13, 20, 40, 0.70);
  --cyan:          #00d4ff;
  --cyan-dim:      #0099cc;
  --purple:        #7c3aed;
  --purple-light:  #a855f7;
  --text-primary:  #e2e8f0;
  --text-muted:    #8892a4;
  --border-glow:   rgba(0, 212, 255, 0.25);
  --sidebar-w:     72px;
  --transition:    0.3s ease;
}

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 3px; }

/* ── Canvas (particles) ───────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Left Sidebar Navigation ──────────────────────────────── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  z-index: 100;
  gap: 0.5rem;
}

.sidebar-logo {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 52px;
  height: 52px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  justify-content: center;
}

.nav-btn:hover,
.nav-btn.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.10);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.30);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--cyan);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--cyan);
}

.nav-btn span.label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ── Main Content ─────────────────────────────────────────── */
#main {
  margin-left: var(--sidebar-w);
  position: relative;
  z-index: 1;
}

/* ── Section Base ─────────────────────────────────────────── */
.section {
  min-height: 100vh;
  padding: 5rem 4rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 2px;
  margin-bottom: 2.5rem;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ── Glass Card ───────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  padding: 2rem;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.12);
}

/* ── Fade-in scroll animation ─────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* ──────────────────────────────────────────────────────────
   SECTION 1: HOME
   ────────────────────────────────────────────────────────── */
#home {
  padding: 0 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.home-inner {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

/* Avatar */
.avatar-wrapper {
  flex-shrink: 0;
  position: relative;
}

.avatar-ring {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 5px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.50),
              0 0 60px rgba(124, 58, 237, 0.30);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.50), 0 0 60px rgba(124, 58, 237, 0.30); }
  50%       { box-shadow: 0 0 50px rgba(0, 212, 255, 0.80), 0 0 90px rgba(124, 58, 237, 0.55); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  background: linear-gradient(135deg, #1a2040, #2a1060);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: scale(1.14);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #131b35, #1d1040);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--cyan);
}

/* Home text */
.home-text {
  min-width: 0;
  max-width: 760px;
}

.greeting {
  font-size: 0.9rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.home-name {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 50%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}

.typewriter-wrap {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  min-height: 1.6em;
}

.typewriter-prefix { color: var(--text-primary); font-weight: 500; }

#typewriter-text {
  color: var(--cyan);
  font-weight: 600;
  border-right: 2px solid var(--cyan);
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  0%, 100% { border-color: var(--cyan); }
  50%       { border-color: transparent; }
}

.home-bio {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 0.97rem;
  max-width: none;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.04em;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: #0a0e1a;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(0, 212, 255, 0.60);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  box-shadow: inset 0 0 0 0 rgba(0, 212, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.10);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────
   SECTION 2: RESUME
   ────────────────────────────────────────────────────────── */
#resume { padding-top: 5rem; }

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.resume-col { display: flex; flex-direction: column; gap: 2rem; }

.resume-block-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.resume-block-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glow);
}

/* Timeline entries */
.timeline-entry { margin-bottom: 1.5rem; }
.timeline-entry:last-child { margin-bottom: 0; }

.tl-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; flex-wrap: wrap; }

.tl-title { font-weight: 700; font-size: 0.97rem; color: var(--text-primary); }
.tl-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
  white-space: nowrap;
}
.tl-sub { color: var(--text-muted); font-size: 0.87rem; margin: 0.2rem 0; }
.tl-body { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; margin-top: 0.5rem; }
.tl-body ul { padding-left: 1.2rem; }
.tl-body li { margin-bottom: 0.3rem; }

/* Skills progress bars */
.skill-item { margin-bottom: 1.1rem; }

.skill-header { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.skill-name { font-size: 0.88rem; color: var(--text-primary); font-weight: 500; }
.skill-pct { font-size: 0.8rem; color: var(--cyan); font-weight: 600; }

.skill-bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple-light));
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ──────────────────────────────────────────────────────────
   SECTION 3: REFLECTIONS
   ────────────────────────────────────────────────────────── */
/* ──────────────────────────────────────────────────────────
   SECTION 3: PROJECT SHOWCASES
   ────────────────────────────────────────────────────────── */
#projects { background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.04), transparent); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 1.8rem;
  width: 100%;
  max-width: none;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.6rem 1.7rem 1.5rem 1.9rem;
  min-height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.project-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.project-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding-top: 0.1rem;
}

.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.25);
  width: fit-content;
}

.project-badge--complete {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.project-stack {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.89rem;
  line-height: 1.75;
  margin: 0;
}

.project-card .project-highlights {
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.project-card .project-highlights li {
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.project-card .project-highlights li::marker {
  content: '';
}

.project-card .project-highlights li i {
  color: var(--cyan);
  font-size: 0.75rem;
  margin-top: 0.22rem;
  flex-shrink: 0;
}

.project-links {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}

.project-link:hover { opacity: 0.75; }

.project-link-muted {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ──────────────────────────────────────────────────────────
   MOBILE NAVIGATION
   ────────────────────────────────────────────────────────── */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glow);
  z-index: 100;
  padding: 0.5rem 0;
  justify-content: space-around;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border-radius: 8px;
}

.mobile-nav-btn span.label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-nav-btn.active,
.mobile-nav-btn:hover {
  color: var(--cyan);
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .resume-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  #sidebar { display: none; }
  #mobile-nav { display: flex; }
  #main { margin-left: 0; }

  .section { padding: 4rem 1.5rem 6rem; }
  #home { padding: 3rem 1.5rem 4rem; }
  .home-inner { grid-template-columns: 1fr; gap: 2rem; justify-items: center; text-align: center; }
  .home-bio { margin: 0 auto 2rem; }
  .cta-buttons { justify-content: center; }
  .avatar-ring { width: 170px; height: 170px; }
  .avatar-img { object-position: center 18%; transform: scale(1.14); }
  .home-name { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .section { padding: 3rem 1rem 6rem; }
  #home { padding: 2.5rem 1rem 3.5rem; }
  .glass-card { padding: 1.4rem; }
  .project-card { padding: 1.35rem 1.35rem 1.25rem 1.45rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-cyan { color: var(--cyan); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
