/* ============================================================
   DESIGN SYSTEM — arifhakim.com
   Dark professional theme with teal accent
   ============================================================ */

:root {
  --bg-primary:   #0f172a;
  --bg-secondary: #1e293b;
  --bg-card:      #1e293b;
  --accent:       #06b6d4;
  --accent-light: #67e8f9;
  --accent-dim:   rgba(6, 182, 212, 0.12);
  --accent-border:rgba(6, 182, 212, 0.25);
  --purple:       #a78bfa;
  --green:        #4ade80;
  --orange:       #fb923c;
  --blue:         #60a5fa;
  --text-primary: #f8fafc;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --border:       rgba(148, 163, 184, 0.1);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 40px rgba(6,182,212,0.15);
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --font-mono:    'JetBrains Mono', monospace;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

#navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin: 0 auto;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.lang-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.lang-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 4px;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(6,182,212,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 2rem 4rem;
  overflow: hidden;
}

/* Subtle dot grid */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(6,182,212,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Radial glow top-right */
.hero-bg-glow {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(6,182,212,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: center;
}

/* --- Hero Text --- */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-location-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  width: fit-content;
}

.hero-name {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-name-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  min-height: 1.75rem;
}

.typed-text {
  color: var(--accent);
  font-weight: 600;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 560px;
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* CTA buttons */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Credential badges */
.hero-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.credential-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  color: var(--purple);
}

/* --- Hero Photo --- */
.hero-photo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 32%;
  background: conic-gradient(from 180deg, var(--accent), var(--purple), var(--accent));
  z-index: 0;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 280px;
  height: 280px;
  border-radius: 30%;
  object-fit: cover;
  object-position: center top;
  border: 5px solid var(--bg-primary);
}

/* Fallback if photo fails */
.photo-fallback .hero-photo {
  background: var(--bg-secondary);
}

/* Floating role tags */
.photo-floating-tag {
  position: absolute;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid;
  backdrop-filter: blur(8px);
  animation: float 4s ease-in-out infinite;
}

.tag-pm {
  top: 8%;
  right: -10%;
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.3);
  color: #c084fc;
  animation-delay: 0s;
}

.tag-ea {
  bottom: 18%;
  right: -15%;
  background: rgba(251,146,60,0.12);
  border-color: rgba(251,146,60,0.25);
  color: var(--orange);
  animation-delay: 1.3s;
}

.tag-lecturer {
  bottom: 2%;
  left: -5%;
  background: rgba(6,182,212,0.12);
  border-color: var(--accent-border);
  color: var(--accent);
  animation-delay: 2.6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ============================================================
   PLACEHOLDER SECTIONS (Fase 2 & 3 — to be replaced)
   ============================================================ */
.section-placeholder {
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
}

.ph-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.ph-inner p {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-roles {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--accent);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-photo-wrap {
    order: -1;
    width: fit-content;
    margin: 0 auto;
  }

  .hero-photo {
    width: 200px;
    height: 200px;
  }

  .hero-location-tag,
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stats {
    margin: 0 auto;
  }

  .hero-ctas,
  .hero-credentials {
    justify-content: center;
  }

  .tag-pm     { right: 0; top: 2%; }
  .tag-ea     { right: -5%; bottom: 10%; }
  .tag-lecturer { left: 0; bottom: -5%; }
}

@media (max-width: 768px) {
  #navbar { padding: 0 1.25rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    z-index: 199;
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.95rem; padding: 0.65rem 0.75rem; }
  .menu-btn { display: flex; }

  #hero { padding: 80px 1.25rem 3rem; }

  .hero-stats {
    gap: 1rem;
    padding: 1rem 1.25rem;
  }
  .stat-num { font-size: 1.6rem; }

  .photo-floating-tag { display: none; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   SCROLL REVEAL UTILITY (used in later phases)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Active nav link on scroll */
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ============================================================
   FASE 2 — SECTION COMMON
   ============================================================ */
section:not(#hero) {
  padding: 5rem 2rem;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.75rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 580px;
  line-height: 1.75;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.about-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.about-card:hover {
  border-color: var(--accent-border);
}

.about-card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.about-card h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.about-degree {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.about-gpa {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.about-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.skill-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.skill-icon {
  font-size: 1.75rem;
  margin-bottom: 0.65rem;
}

.skill-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

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

.tag {
  font-size: 0.72rem;
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--text-secondary);
}

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(6,182,212,0) 95%);
}

.tl-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-border);
}

.tl-dot-alt {
  background: var(--purple);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.25);
}

.tl-period {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tl-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.3);
  color: var(--purple);
}

.tl-role {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.tl-role-alt {
  color: var(--purple);
}

.tl-company {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.tl-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.tl-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tl-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1.1rem;
  position: relative;
}

.tl-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.2em;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.port-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.port-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(6,182,212,0.1);
}

.port-card.filtered-out {
  display: none;
}

.port-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.port-card-head .port-icon {
  margin-right: auto;
}

.port-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.role-badge {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.badge-pm         { background: rgba(168,85,247,0.15);  color: #c084fc; }
.badge-ba         { background: rgba(34,197,94,0.12);   color: #4ade80; }
.badge-ea         { background: rgba(251,146,60,0.12);  color: #fb923c; }
.badge-sa         { background: rgba(96,165,250,0.12);  color: #60a5fa; }
.badge-konsultan  { background: rgba(6,182,212,0.12);   color: #22d3ee; }
.badge-trainer    { background: rgba(74,222,128,0.12);  color: #4ade80; }

.port-icon i, .about-card-icon i, .cert-icon i, .contact-icon i { color: var(--accent); }
.pub-book-icon i  { color: var(--orange); }
.skill-icon i     { color: inherit; }

.port-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.port-company {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.port-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.port-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.tag-highlight {
  font-size: 0.69rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

.tag-tech {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(148,163,184,0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.port-links {
  margin-top: 0.5rem;
}

.port-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  transition: all 0.2s;
}

.port-link:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ============================================================
   FASE 2 RESPONSIVE ADDITIONS
   ============================================================ */
/* ============================================================
   FASE 3 — TEACHING
   ============================================================ */
.teach-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.teach-courses-h {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.course-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.course-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.845rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.35;
  transition: border-color 0.2s;
}

.course-list li:hover {
  border-color: var(--accent-border);
  color: var(--text-primary);
}

.course-list li::before {
  content: '▸';
  color: var(--accent);
  font-size: 0.65rem;
  flex-shrink: 0;
  margin-top: 0.15em;
}

.teach-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.teach-info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.teach-info-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.teach-info-val {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.teach-info-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.15rem;
}

.teach-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--accent);
  transition: color 0.2s;
}

.teach-link:hover { color: var(--accent-light); }

.teach-info-body {
  font-size: 0.835rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   FASE 3 — PUBLICATIONS
   ============================================================ */
.scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.scholar-link:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.pub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.pub-tab {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.pub-tab:hover { color: var(--text-primary); }

.pub-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pub-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  transition: transform 0.2s, border-left-color 0.2s;
}

.pub-item:hover {
  transform: translateX(4px);
  border-left-color: var(--accent-light);
}

.pub-item-book {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-left-color: var(--purple);
}

.pub-item-book:hover { border-left-color: #c084fc; }

.pub-book-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.pub-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.pub-authors {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.pub-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.pub-journal {
  font-size: 0.77rem;
  color: var(--accent);
  font-style: italic;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.pub-cite {
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 700;
}

.hidden { display: none !important; }

/* ============================================================
   FASE 3 — CERTIFICATIONS
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.cert-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.cert-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.cert-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.cert-body { flex: 1; }

.cert-title-text {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.cert-issuer {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.cert-period {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
}

.cert-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ============================================================
   RESPONSIVE (Fase 2 + 3 combined)
   ============================================================ */
@media (max-width: 768px) {
  section:not(#hero) { padding: 3.5rem 1.25rem; }

  .about-cards    { grid-template-columns: 1fr; }
  .skills-grid    { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .cert-grid      { grid-template-columns: 1fr; }

  .timeline { padding-left: 1.75rem; }
  .tl-dot   { left: -1.75rem; }

  .filter-btn { font-size: 0.75rem; padding: 0.35rem 0.8rem; }

  .teach-grid { grid-template-columns: 1fr; }
  .course-list { grid-template-columns: 1fr; }

  .pub-tab { font-size: 0.78rem; padding: 0.55rem 0.9rem; }
}

/* ============================================================
   FASE 4 — CONTACT
   ============================================================ */
.contact-wrap {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.contact-desc {
  margin-left: auto;
  margin-right: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  text-align: left;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.contact-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.contact-detail { flex: 1; }

.contact-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

/* ============================================================
   FASE 4 — BACK TO TOP
   ============================================================ */
.back-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  box-shadow: 0 4px 16px rgba(6,182,212,0.4);
  pointer-events: none;
}

.back-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-top:hover {
  background: var(--accent-light);
}

/* ============================================================
   FASE 4 — HAMBURGER ANIMATION
   ============================================================ */
.menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}

/* ============================================================
   RESPONSIVE ADDITIONS (Fase 4)
   ============================================================ */
@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr; }
  .back-top { bottom: 1.25rem; right: 1.25rem; width: 38px; height: 38px; }
}

/* ============================================================
   CAREER LADDER (inside concurrent Binawan block)
   ============================================================ */
.tl-ladder {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.65rem 0 0.7rem;
  padding: 0.55rem 0.8rem;
  background: rgba(167, 139, 250, 0.06);
  border-left: 2px solid rgba(167, 139, 250, 0.35);
  border-radius: 0 4px 4px 0;
}

.tl-ladder-step {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 0.8rem;
}

.tl-ladder-year {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 76px;
}

.tl-ladder-title {
  color: var(--text-secondary);
  font-weight: 500;
}

.tl-ladder-step:first-child .tl-ladder-title {
  color: var(--purple);
  font-weight: 600;
}

/* Secondary role label (e.g. academic title) */
.tl-role-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
  text-transform: uppercase;
}

/* Blue ladder variant for Asyst career progression */
.tl-ladder-alt {
  background: rgba(96,165,250,0.06);
  border-left-color: rgba(96,165,250,0.35);
}
.tl-ladder-alt .tl-ladder-step:first-child .tl-ladder-title {
  color: var(--blue);
}

/* ============================================================
   MOBILE — RESPONSIVE REFINEMENTS
   ============================================================ */

/* Prevent horizontal scroll bleed */
body { overflow-x: hidden; }

/* Medium mobile (≤ 768px) — already handled above, extend here */
@media (max-width: 768px) {
  /* Section headings */
  .section-title { font-size: 1.5rem; }

  /* Timeline improvements */
  .tl-role     { font-size: 0.875rem; }
  .tl-company  { font-size: 0.78rem; }
  .tl-period   { font-size: 0.75rem; }
  .tl-desc     { font-size: 0.82rem; }
  .tl-ladder   { padding: 0.45rem 0.65rem; }
  .tl-ladder-year { min-width: 64px; }

  /* Port card badges wrap cleanly */
  .port-card   { padding: 1.25rem; }
  .port-title  { font-size: 0.9rem; }

  /* Teaching grid */
  .teach-stat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Publications tabs scroll on mobile */
  .pub-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 0.25rem; }
  .pub-tab  { white-space: nowrap; }

  /* Cert note text size */
  .cert-note { font-size: 0.75rem; }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
  /* Tighter section padding */
  section:not(#hero) { padding: 2.75rem 1rem; }

  /* Hero */
  .hero-name     { font-size: 1.75rem; }
  .hero-tagline  { font-size: 0.9rem; }
  .hero-stats    { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 0.75rem 1rem; }
  .stat-num      { font-size: 1.4rem; }
  .stat-label    { font-size: 0.62rem; }

  /* Section labels & headings */
  .section-label { font-size: 0.7rem; }
  .section-title { font-size: 1.35rem; }
  .section-desc  { font-size: 0.85rem; }

  /* Smaller timeline line indent */
  .timeline  { padding-left: 1.25rem; }
  .tl-dot    { left: -1.25rem; width: 10px; height: 10px; }
  .tl-ladder-year { min-width: 54px; font-size: 0.62rem; }
  .tl-ladder-step { gap: 0.45rem; font-size: 0.78rem; }

  /* Port card */
  .port-card-head { gap: 0.35rem; }
  .port-icon   { font-size: 1.4rem; }
  .role-badge  { font-size: 0.62rem; padding: 0.15rem 0.45rem; }
  .port-tags   { gap: 0.3rem; }

  /* Filter buttons */
  .portfolio-filter { gap: 0.35rem; }
  .filter-btn  { font-size: 0.72rem; padding: 0.3rem 0.7rem; }

  /* Contact cards — single column already, just tighten */
  .contact-card    { padding: 1rem; gap: 0.75rem; }
  .contact-icon    { font-size: 1.35rem; }
  .contact-value   { font-size: 0.8rem; word-break: break-word; }

  /* About cards tighter */
  .about-card      { padding: 1.25rem 1rem; }
  .about-card-icon { font-size: 1.5rem; }
}
