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

:root {
  --bg: #0a0a10;
  --surface: rgba(20,20,30,0.75);
  --surface-solid: #14141e;
  --border: #222233;
  --accent: #7c6af7;
  --accent-glow: rgba(124,106,247,0.35);
  --accent2: #4fc3f7;
  --text: #e8e8f0;
  --muted: #8888a0;
  --tag-bg: rgba(30,30,46,0.7);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* ─── PARTICLE CANVAS ─── */
#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Everything else sits above canvas */
nav, .hero, .skills-strip, section, .boards-banner, hr,
.page-header, .project-detail, .proj-section-label, .simple-grid, footer,
.divider { position: relative; z-index: 1; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10,10,16,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-decoration: none;
  text-shadow: 0 0 20px var(--accent-glow);
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s, text-shadow 0.25s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-shadow: 0 0 12px rgba(124,106,247,0.3);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #6a59e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124,106,247,0.15);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.hero-text { flex: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
}

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

.hero-photo-wrap {
  flex-shrink: 0;
  width: 280px;
  height: 340px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 0 40px rgba(124,106,247,0.12),
    0 0 0 1px rgba(124,106,247,0.15);
  transition: box-shadow 0.4s;
}

.hero-photo-wrap:hover {
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 0 60px rgba(124,106,247,0.2),
    0 0 0 1px rgba(124,106,247,0.3);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ─── SKILLS STRIP ─── */
.skills-strip {
  background: rgba(20,20,30,0.6);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.skills-scroll {
  display: flex;
  gap: 2.5rem;
  animation: scroll 35s linear infinite;
  width: max-content;
}

.skills-scroll:hover { animation-play-state: paused; }

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.skill-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.skill-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  flex-shrink: 0;
}

/* ─── SECTIONS ─── */
section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 14px var(--accent-glow);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

.divider { border: none; border-top: 1px solid var(--border); position: relative; z-index: 1; }

/* ─── HIGHLIGHT CARDS (home page) ─── */
.highlights-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
}

.highlight-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(124,106,247,0.15);
}

.highlight-img-wrap {
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--bg);
}

.highlight-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.highlight-card:hover .highlight-img-wrap img { transform: scale(1.08); }

.highlight-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ─── BOARDS BANNER ─── */
.boards-banner {
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.boards-inner {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.board-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.board-item img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.board-item:hover img {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(124,106,247,0.2);
  transform: translateY(-3px);
}

.board-item span { font-size: 0.8rem; color: var(--muted); }

/* ─── SHARED CARD PARTS ─── */
.card-category {
  font-size: 0.72rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(79,195,247,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  align-self: flex-start;
}

.card-badge {
  font-size: 0.72rem;
  color: #f7c948;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(247,201,72,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(247,201,72,0.2);
  align-self: flex-start;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
}

.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
  font-size: 0.75rem;
  background: var(--tag-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* ─── EXPERIENCE ─── */
.experience-list { display: flex; flex-direction: column; }

.exp-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.exp-item:last-child { border-bottom: none; }
.exp-role { font-size: 1rem; font-weight: 700; }
.exp-org { font-size: 0.9rem; color: var(--accent); margin-bottom: 0.6rem; }
.exp-date { font-size: 0.8rem; color: var(--muted); white-space: nowrap; text-align: right; margin-top: 0.15rem; }

.exp-bullets {
  list-style: none;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.exp-bullets li {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
}

.exp-bullets li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─── ABOUT ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  border-color: rgba(124,106,247,0.4);
  box-shadow: 0 4px 20px rgba(124,106,247,0.1);
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
}

.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* ─── CONTACT ─── */
#contact { text-align: center; }
#contact h2 { margin-bottom: 1rem; }

.contact-desc { color: var(--muted); margin-bottom: 2rem; font-size: 0.95rem; }

.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ══════════════════════════════════════
   PROJECTS PAGE
   ══════════════════════════════════════ */

.page-header {
  padding: 8rem 2rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--muted); font-size: 1.05rem; }

/* PROJECT DETAIL CARDS */
.project-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.project-detail + .project-detail { padding-top: 2rem; }

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;
}

.detail-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.detail-card.featured-card {
  border-color: rgba(124,106,247,0.4);
  box-shadow: 0 0 40px rgba(124,106,247,0.08);
}

.detail-card.featured-card:hover {
  box-shadow: 0 0 60px rgba(124,106,247,0.15);
}

.detail-header {
  padding: 2rem 2rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.detail-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.detail-body {
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.detail-body p {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.7;
}

.detail-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.detail-highlights li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.55;
}

.detail-highlights li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

/* IMAGE GALLERY */
.gallery {
  display: grid;
  gap: 0.8rem;
  padding: 0 2rem 2rem;
}

.gallery-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-5 { grid-template-columns: repeat(3, 1fr); }

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.gallery img:hover {
  border-color: var(--accent);
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(124,106,247,0.2);
}

.gallery-caption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.2rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* No-image project cards */
.detail-card-simple {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  backdrop-filter: blur(8px);
}

.detail-card-simple:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(124,106,247,0.12);
  transform: translateY(-3px);
}

.simple-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.simple-icon { font-size: 1.6rem; line-height: 1; }

.simple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Section dividers on projects page */
.proj-section-label {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-top: 1px solid var(--border);
  text-shadow: 0 0 14px var(--accent-glow);
}

/* ─── LIGHTBOX ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 60px rgba(0,0,0,0.7);
}

/* ─── GLOW ORBS (ambient bg accents) ─── */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(100px);
  opacity: 0.08;
}

.glow-orb-1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -150px;
  animation: orbFloat1 20s ease-in-out infinite;
}

.glow-orb-2 {
  width: 500px; height: 500px;
  background: var(--accent2);
  bottom: -200px; right: -150px;
  animation: orbFloat2 25s ease-in-out infinite;
}

.glow-orb-3 {
  width: 400px; height: 400px;
  background: #a855f7;
  top: 40%; left: 50%;
  transform: translateX(-50%);
  animation: orbFloat3 22s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(80px, 60px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-60px, -80px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -50px); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 800px) {
  .hero-content { flex-direction: column-reverse; gap: 2rem; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-photo-wrap { width: 200px; height: 250px; }
  .highlights-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  nav { padding: 1rem; }
  .nav-links { gap: 1rem; }
  .exp-item { grid-template-columns: 1fr; }
  .exp-date { text-align: left; }
  .gallery-4, .gallery-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-5 { grid-template-columns: repeat(2, 1fr); }
  .simple-grid { grid-template-columns: 1fr; }
  .boards-inner { gap: 1.5rem; }
  .board-item img { width: 120px; height: 120px; }
}

@media (max-width: 500px) {
  .gallery-4, .gallery-3, .gallery-2 { grid-template-columns: 1fr; }
  .gallery img { height: 200px; }
}
