/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --blue:         #2563EB;
  --blue-hover:   #1D4ED8;
  --blue-light:   #EFF6FF;
  --blue-mid:     #BFDBFE;
  --orange:       #F97316;
  --orange-hover: #EA6C0A;
  --orange-light: #FFF7ED;
  --orange-mid:   #FED7AA;
  --wa-green:     #25D366;
  --wa-hover:     #1DAA53;
  --text:         #111827;
  --text-mid:     #374151;
  --text-light:   #6B7280;
  --text-xlight:  #9CA3AF;
  --border:       #E5E7EB;
  --border-mid:   #D1D5DB;
  --bg:           #FFFFFF;
  --bg-alt:       #F9FAFB;
  --bg-blue:      #EFF6FF;
  --bg-orange:    #FFF7ED;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:    0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ─── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── TOP HEADER ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow 0.3s ease;
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blue);
  letter-spacing: -0.3px;
}
.logo span {
  color: var(--orange);
}
.nav-ctas {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-cv:hover {
  background: var(--blue-light);
}
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--wa-green);
  color: #fff;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-wa:hover {
  background: var(--wa-hover);
  transform: translateY(-1px);
}

/* ─── HERO ────────────────────────────────────────────────── */
.hero {
  padding: 140px 24px 100px;
  text-align: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 400px;
  background: radial-gradient(ellipse at 50% 0%, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-blue);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid var(--blue-mid);
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.hero-title .highlight-blue { color: var(--blue); }
.hero-title .highlight-orange { color: var(--orange); }
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.btn-hero-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.35);
}
.btn-hero-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--wa-green);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37,211,102,0.25);
}
.btn-hero-wa:hover {
  background: var(--wa-hover);
  transform: translateY(-2px);
}
.btn-hero-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: transparent;
  color: var(--blue);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--blue);
  transition: all 0.2s ease;
}
.btn-hero-linkedin:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 56px;
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
}
.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-num span { color: var(--orange); }
.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  background: var(--border);
  height: 40px;
  margin-top: auto;
  margin-bottom: auto;
}

/* ─── SECTION COMMONS ─────────────────────────────────────── */
.main-content { animation: fadeIn 0.5s ease; }
.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}
.section-header h2 .dot { color: var(--orange); }
.section-header p {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

/* ─── CAREER GRAPH SECTION ────────────────────────────────── */
.career-graph-section {
  padding: 80px 24px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.graph-horizontal-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.graph-horizontal-line {
  position: absolute;
  top: 24px;
  left: 80px;
  right: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-mid), var(--orange-mid));
  z-index: 0;
}
.graph-horizontal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
  align-items: start;
}
.graph-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%;
}
.graph-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--blue);
  background: var(--bg);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--bg-blue);
  transition: transform 0.2s ease;
}
.graph-col:last-child .graph-dot {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-light);
}
.graph-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: left;
  width: 100%;
  flex: 1;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}
.graph-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-mid);
}
.graph-col:last-child .graph-card { border-color: var(--orange-mid); }
.graph-col:last-child .graph-card:hover { border-color: var(--orange); }
.node-year {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-blue);
  color: var(--blue);
  margin-bottom: 10px;
}
.graph-col:last-child .node-year {
  background: var(--orange-light);
  color: var(--orange);
}
.node-company {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.node-product {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 12px;
}
.node-wow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.5;
  border: 1px solid var(--border);
}
.wow-icon { font-size: 1rem; line-height: 1.5; flex-shrink: 0; }

/* ─── PORTFOLIO SECTION ───────────────────────────────────── */
.portfolio-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── TABS ────────────────────────────────────────────────── */
.tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  justify-content: center;
  background: var(--bg-alt);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.tab-btn {
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-light);
  transition: all 0.2s ease;
}
.tab-btn.active {
  background: var(--bg);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.tab-btn:not(.active):hover {
  color: var(--text);
  background: rgba(0,0,0,0.03);
}

/* ─── CARDS GRID ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}
.tab-content { display: none; }
.tab-content.active { display: grid; animation: fadeUp 0.3s ease; }

.project-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--blue-mid);
}
.project-card:hover::before { opacity: 1; }

.card-icon {
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--bg-blue);
  border-radius: 12px;
  border: 1px solid var(--blue-mid);
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.3px;
}
.card-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-blue);
  color: var(--blue);
  border: 1px solid var(--blue-mid);
  letter-spacing: 0.2px;
}
.card-meta span:last-child {
  font-size: 0.78rem;
  color: var(--text-xlight);
  font-weight: 500;
}
.card-arrow {
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.project-card:hover .card-arrow { opacity: 1; }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--bg);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: fadeUp 0.25s ease;
}
.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.modal-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.modal-close {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.modal-body {
  padding: 28px 32px 32px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-mid);
}
.modal-body h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue-light);
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 12px; color: var(--text-mid); }
.modal-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.modal-list li {
  padding: 10px 14px;
  background: var(--bg-alt);
  border-radius: 8px;
  border-left: 3px solid var(--blue);
  font-size: 0.875rem;
  line-height: 1.6;
}
.modal-list li strong { color: var(--text); }

/* Pipeline steps */
.pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 0;
  position: relative;
}
.pipeline-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 16px 0;
  position: relative;
}
.pipeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.pipeline-step:nth-child(2) .step-num { background: var(--orange); }
.pipeline-step:nth-child(3) .step-num { background: var(--blue); }
.pipeline-step strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  margin-top: 8px;
}
.pipeline-step p {
  font-size: 0.84rem;
  color: var(--text-light);
  margin: 0;
}

/* Diagram nodes */
.diagram-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.diagram-node {
  flex: 1;
  min-width: 120px;
  background: var(--bg-blue);
  border: 1.5px solid var(--blue-mid);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.diagram-node i { font-size: 1.25rem; font-style: normal; }
.diagram-node strong { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.diagram-node span { font-size: 0.72rem; color: var(--text-light); }
.diagram-arrow { font-size: 1.25rem; color: var(--blue-mid); flex-shrink: 0; font-weight: 300; }

/* Abstract table */
.abstract-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.8rem;
}
.abstract-table th {
  background: var(--bg-blue);
  color: var(--blue);
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--blue-mid);
}
.abstract-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}
.abstract-table tr:hover td { background: var(--bg-alt); }

/* Tech tag */
.tech-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--orange-light);
  color: var(--orange);
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--orange-mid);
}

/* Code block in modal */
.modal-code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-mid);
  margin: 12px 0;
  white-space: pre-wrap;
}

/* Callout box */
.modal-callout {
  background: var(--bg-orange);
  border: 1.5px solid var(--orange-mid);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 0.875rem;
  color: var(--text-mid);
  display: flex;
  gap: 10px;
}
.modal-callout-icon { font-size: 1rem; flex-shrink: 0; }

/* ─── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
}
.footer strong { color: var(--blue); }
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--blue); }

/* ─── SCROLL NAVBAR SHADOW ────────────────────────────────── */
/* added via JS */

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-ctas .btn-cv span { display: none; }
  .hero { padding: 120px 20px 80px; }
  .hero-title { font-size: 2.2rem; }
  .hero-stats { gap: 24px; }
  .stat-divider { display: none; }
  .graph-horizontal-grid { grid-template-columns: 1fr; }
  .graph-horizontal-line { display: none; }
  .graph-dot { display: none; }
  .diagram-container { flex-direction: column; }
  .diagram-arrow { transform: rotate(90deg); }
  .modal-body { padding: 20px; }
  .modal-header { padding: 20px 20px 16px; }
}

/* ─── PDF VIEWER PLACEHOLDER ──────────────────────────────── */
.pdf-viewer {
  width: 100%;
  height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
