@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;600;800&display=swap');

:root {
  --bg: #060a12;
  --bg2: #0b1120;
  --card-bg: rgba(17, 25, 45, 0.85);
  --card-border: rgba(100, 255, 218, 0.08);
  --text: #e2e8f0;
  --text-muted: #7a8fa8;
  --accent-cyan: #64ffda;
  --accent-blue: #3b82f6;
  --accent-purple: #a78bfa;
  --glow-cyan: rgba(100, 255, 218, 0.15);
  --glow-blue: rgba(59, 130, 246, 0.15);
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --sidebar-w: 220px;
  --radius: 14px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(100,255,218,0.08) 0%, transparent 60%);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(100,255,218,0.2); border-radius: 3px; }

/* ── Layout ── */
.page-wrapper { display: flex; flex: 1; }
.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; width: 100%; }
main.container { padding-top: 2rem; padding-bottom: 4rem; }

/* ── Navigation ── */
nav {
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(6, 10, 18, 0.8);
  border-bottom: 1px solid rgba(100,255,218,0.06);
  padding: 1rem 0;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-family: var(--font-mono); font-weight: 700;
  color: var(--accent-cyan); text-decoration: none; font-size: 1.15rem;
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(100,255,218,0.4);
}
.nav-links { display: flex; gap: 0.5rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-weight: 500;
  font-size: 0.875rem; padding: 0.4rem 1rem; border-radius: 999px;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
  background: rgba(100,255,218,0.07);
  border-color: rgba(100,255,218,0.2);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
  padding: 2rem 0 2rem 1.5rem;
  transition: width var(--transition), opacity var(--transition);
}
.sidebar.collapsed { width: 48px; }
.sidebar.collapsed .sidebar-content { opacity: 0; pointer-events: none; }
.sidebar-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 0.8rem;
  font-family: var(--font-mono); padding: 0.3rem 0;
  margin-bottom: 1.2rem; transition: color var(--transition);
  white-space: nowrap;
}
.sidebar-toggle:hover { color: var(--accent-cyan); }
.sidebar-toggle i { font-size: 0.9rem; flex-shrink: 0; transition: transform var(--transition); }
.sidebar.collapsed .sidebar-toggle i { transform: rotate(180deg); }
.sidebar-content { transition: opacity var(--transition); }
.sidebar-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--accent-cyan); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 0.8rem;
  opacity: 0.7;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.sidebar-nav a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 0.82rem; padding: 0.4rem 0.8rem; border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap; overflow: hidden;
}
.sidebar-nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); border-left-color: var(--accent-cyan); }
.sidebar-nav a.active { color: var(--accent-cyan); border-left-color: var(--accent-cyan); background: var(--glow-cyan); }

/* ── Main content area ── */
.content-area { flex: 1; min-width: 0; }

/* ── Section anchors ── */
.section-anchor { scroll-margin-top: 80px; }

/* ── About Hero ── */
.about-hero {
  display: flex; gap: 3rem; align-items: center;
  padding: 3rem 0 2rem;
}
@media (max-width: 768px) { .about-hero { flex-direction: column; text-align: center; } }

.profile-frame {
  flex-shrink: 0; width: 200px; height: 200px; border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(100,255,218,0.2), 0 0 40px rgba(100,255,218,0.1);
}
.profile-img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent-cyan); font-family: var(--font-mono);
  font-size: 0.8rem; margin-bottom: 0.8rem;
  background: rgba(100,255,218,0.06); padding: 0.3rem 0.8rem;
  border-radius: 999px; border: 1px solid rgba(100,255,218,0.15);
}
.status-dot {
  width: 7px; height: 7px; background: var(--accent-cyan);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(100,255,218,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(100,255,218,0); }
}

.about-bio h1 { font-size: 2.6rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 60%, var(--accent-purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-bio p { color: var(--text-muted); font-size: 1rem; }

/* ── Skills ── */
.skills-section { padding: 2.5rem 0; }
.section-title {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(100,255,218,0.2), transparent);
}
.skills-flex { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.skill-pill {
  background: var(--card-bg); padding: 0.5rem 1.1rem;
  border-radius: 999px; font-size: 0.85rem; color: var(--text);
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--card-border);
  transition: all var(--transition);
}
.skill-pill:hover { border-color: rgba(100,255,218,0.3); color: var(--accent-cyan); transform: translateY(-2px); }
.skill-pill i { color: var(--accent-cyan); }

/* ── Portfolio Header ── */
.portfolio-header { padding: 2.5rem 0 1rem; }
.portfolio-header p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.95rem; }

/* ── Project Cards (summary) ── */
.portfolio-list { display: flex; flex-direction: column; gap: 1.8rem; padding: 1.5rem 0 4rem; }

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; gap: 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: inherit;
}
.project-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--glow-cyan), transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(100,255,218,0.25); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(100,255,218,0.1); }
.project-card:hover::before { opacity: 1; }

.project-media {
  width: 260px; flex-shrink: 0; overflow: hidden; background: #000;
  position: relative;
}
.project-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--card-bg));
  pointer-events: none;
}
.project-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.project-card:hover .project-img { transform: scale(1.05); }

@media (max-width: 768px) {
  .project-card { flex-direction: column; }
  .project-media { width: 100%; height: 200px; }
  .project-media::after { background: linear-gradient(to bottom, transparent 60%, var(--card-bg)); }
}

.project-content {
  flex: 1; display: flex; flex-direction: column;
  justify-content: space-between; padding: 1.6rem 1.8rem;
  position: relative; z-index: 1;
}
.project-meta { margin-bottom: 0.8rem; }
.project-meta h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.3rem; }
.project-summary { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.project-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--accent-cyan); background: rgba(100,255,218,0.07);
  padding: 0.2rem 0.55rem; border-radius: 4px;
  border: 1px solid rgba(100,255,218,0.12);
}
.card-cta {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem;
  transition: color var(--transition); flex-shrink: 0;
}
.project-card:hover .card-cta { color: var(--accent-cyan); }

/* ── Project Detail Page ── */
.project-detail { padding: 1rem 0 4rem; max-width: 760px; }

.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); text-decoration: none; font-family: var(--font-mono);
  font-size: 0.85rem; margin-bottom: 1.5rem; transition: color var(--transition);
}
.back-link:hover { color: var(--accent-cyan); }

.detail-hero {
  width: 100%; border-radius: var(--radius); overflow: hidden;
  background: #000; margin-bottom: 2rem;
}
.detail-hero img { width: 100%; height: auto; display: block; }

.detail-title { font-size: 2rem; font-weight: 800; line-height: 1.25; margin-bottom: 1.5rem; }

.modal-actions { display: flex; gap: 0.8rem; margin-bottom: 2rem; flex-wrap: wrap; }
.modal-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.2rem; border-radius: 8px; font-size: 0.85rem;
  font-family: var(--font-mono); text-decoration: none; font-weight: 500;
  transition: all var(--transition);
}
.modal-btn-primary {
  background: rgba(100,255,218,0.1); color: var(--accent-cyan);
  border: 1px solid rgba(100,255,218,0.25);
}
.modal-btn-primary:hover { background: rgba(100,255,218,0.18); transform: translateY(-1px); }
.modal-btn-secondary {
  background: rgba(59,130,246,0.1); color: var(--accent-blue);
  border: 1px solid rgba(59,130,246,0.25);
}
.modal-btn-secondary:hover { background: rgba(59,130,246,0.18); transform: translateY(-1px); }

.modal-section { margin-bottom: 1.8rem; }
.modal-section-title {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-cyan); opacity: 0.7;
  margin-bottom: 0.8rem;
}
.modal-section p { color: var(--text-muted); font-size: 1rem; line-height: 1.85; margin-bottom: 0.9rem; }
.modal-section p:last-child { margin-bottom: 0; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.modal-tag {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent-cyan); background: rgba(100,255,218,0.07);
  padding: 0.3rem 0.7rem; border-radius: 6px;
  border: 1px solid rgba(100,255,218,0.15);
}

.modal-highlights { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.modal-highlights li {
  display: flex; align-items: flex-start; gap: 0.7rem;
  color: var(--text-muted); font-size: 0.9rem;
}
.modal-highlights li::before {
  content: '▸'; color: var(--accent-cyan); flex-shrink: 0; margin-top: 0.05rem;
}

/* ── Contact ── */
.contact-section { padding: 3rem 0; text-align: center; }
.contact-section > p { color: var(--text-muted); max-width: 560px; margin: 0.5rem auto 3rem; font-size: 0.95rem; }
.contact-links-list { display: flex; flex-direction: column; gap: 1rem; max-width: 480px; margin: 0 auto; }
.contact-card {
  background: var(--card-bg); padding: 1.2rem 1.8rem; border-radius: var(--radius);
  text-decoration: none; color: var(--text); display: flex; align-items: center;
  gap: 1.5rem; text-align: left; border: 1px solid var(--card-border);
  transition: all var(--transition);
}
.contact-card:hover { transform: translateY(-3px); border-color: rgba(100,255,218,0.25); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.contact-icon { font-size: 1.6rem; color: var(--accent-cyan); }
.contact-card h3 { font-size: 1rem; margin-bottom: 0.1rem; }
.contact-card p { color: var(--text-muted); margin: 0; font-size: 0.85rem; }

/* ── Footer ── */
footer {
  padding: 2.5rem 0; text-align: center; color: var(--text-muted);
  font-size: 0.82rem; border-top: 1px solid rgba(255,255,255,0.04);
}
.social-links { display: flex; justify-content: center; gap: 1.2rem; margin-bottom: 1rem; }
.social-links a {
  color: var(--text-muted); font-size: 1.1rem;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all var(--transition);
}
.social-links a:hover { color: var(--accent-cyan); border-color: rgba(100,255,218,0.3); background: var(--glow-cyan); }

/* ── Divider ── */
.section-divider { height: 1px; background: linear-gradient(to right, transparent, rgba(100,255,218,0.15), transparent); margin: 1rem 0; }

/* ── Responsive sidebar hide ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
}
.project-period,
.detail-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
.status-ongoing {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
}
.status-ongoing .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #facc15;
  display: inline-block;
}

.detail-section-heading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin: 1.5rem 0 0.5rem;
}
.detail-section-heading:first-child {
  margin-top: 0;
}