/* =================================================================
   Portfolio — Muhamad Asad Nugraha
   Mobile-first, professional, ATS-friendly aesthetic
   ================================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --bg-dark: #0a1628;
  --text: #0a1628;
  --text-soft: #475569;
  --text-mute: #64748b;
  --border: #e2e8f0;
  --primary: #1a3556;       /* Deeper navy — match foto profile */
  --primary-dark: #0f2440;
  --primary-hover: #102843;
  --accent: #38bdf8;         /* Brighter sky blue — pops on navy */
  --accent-strong: #0284c7;
  --accent-soft: #e0f2fe;
  --gold: #fbbf24;           /* Warm accent for highlights */
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.06);
  --shadow: 0 4px 16px rgba(10, 22, 40, 0.10);
  --shadow-lg: 0 12px 32px rgba(10, 22, 40, 0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --container: 1100px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.nav-logo-text { color: var(--text); }

.nav-links {
  display: none;
  gap: 1.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
}
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }
.lang-current { color: var(--primary); font-weight: 700; }
.lang-divider { margin: 0 0.2rem; color: var(--text-mute); }
.lang-other { color: var(--text-mute); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.82rem; }
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(14, 165, 233, 0.10), transparent),
    radial-gradient(ellipse 50% 60% at 20% 80%, rgba(31, 58, 95, 0.08), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  z-index: -1;
}
.hero-content { max-width: 780px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 3rem; }
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  order: -1; /* photo on top in mobile */
}
@media (min-width: 900px) {
  .hero-photo-wrap { order: 0; }
}

.hero-photo-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(56, 189, 248, 0.25);
  box-shadow:
    0 20px 60px rgba(10, 22, 40, 0.18),
    0 0 0 8px rgba(255, 255, 255, 0.5);
  background: var(--primary);
}
@media (min-width: 900px) {
  .hero-photo-frame { max-width: 360px; }
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}
.hero-photo-frame:hover .hero-photo { transform: scale(1.03); }

.hero-photo-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, transparent 60%);
  z-index: -1;
  filter: blur(40px);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  color: var(--primary);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-name {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-soft);
  margin-bottom: 2rem;
  max-width: 640px;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 540px;
}
@media (min-width: 540px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-mute);
  font-weight: 500;
}

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

/* ============ SECTIONS ============ */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 2.5rem; max-width: 720px; }
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-label-light { color: rgba(255, 255, 255, 0.85); }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
}

.about-text p { color: var(--text-soft); margin-bottom: 1rem; font-size: 1.02rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.tag {
  background: white;
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}

.about-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.about-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-image: url('assets/profile_medium.jpg');
  background-size: cover;
  background-position: center top;
  flex-shrink: 0;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 12px rgba(10, 22, 40, 0.15);
}
.about-card-name { font-weight: 700; font-size: 1.02rem; }
.about-card-role { font-size: 0.88rem; color: var(--text-mute); margin-top: 0.15rem; }

.about-list { list-style: none; }
.about-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.about-list li svg { color: var(--accent); flex-shrink: 0; }
.about-list a { color: var(--text-soft); transition: color 0.2s; }
.about-list a:hover { color: var(--primary); }

/* ============ ACHIEVEMENTS ============ */
.achievement-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.achievement-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 0;
}
.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.achievement-card:hover::before { opacity: 1; }
.achievement-card:hover .achievement-num,
.achievement-card:hover .achievement-label { color: white; }
.achievement-card > * { position: relative; z-index: 1; }

.achievement-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.achievement-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: color 0.25s;
}
.achievement-label {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.45;
  transition: color 0.25s;
}

/* ============ TIMELINE ============ */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}
.timeline-marker {
  position: absolute;
  left: -1.55rem;
  top: 1.1rem;
  width: 14px;
  height: 14px;
  background: white;
  border: 3px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
}
.timeline-marker-highlight { border-color: var(--primary); background: var(--primary); }

.timeline-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.timeline-card:hover { box-shadow: var(--shadow); transform: translateX(2px); }
.timeline-card-highlight {
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, rgba(31, 58, 95, 0.03) 0%, white 50%);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.timeline-role { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.timeline-company { font-size: 0.92rem; color: var(--text-mute); margin-top: 0.15rem; }
.badge-highlight {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.timeline-meta { text-align: right; flex-shrink: 0; }
.timeline-date {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
}
.timeline-tag {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  background: var(--accent-soft);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 600;
}

.timeline-points {
  list-style: none;
  padding: 0;
}
.timeline-points li {
  position: relative;
  padding-left: 1.25rem;
  margin: 0.4rem 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.timeline-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-points strong { color: var(--text); font-weight: 600; }

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

.skill-group {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.skill-group-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 500;
  transition: all 0.2s;
}
.skill-tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============ EDUCATION ============ */
.edu-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}
.edu-icon { font-size: 2.5rem; flex-shrink: 0; }
.edu-school { font-size: 1.1rem; font-weight: 700; }
.edu-meta { font-size: 0.9rem; color: var(--text-mute); margin-top: 0.2rem; }
.edu-desc { font-size: 0.92rem; color: var(--text-soft); margin-top: 0.6rem; }

/* ============ CTA / CONTACT ============ */
.section-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #0f1f3a 100%);
  position: relative;
  overflow: hidden;
}
.section-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(14, 165, 233, 0.15), transparent),
    radial-gradient(ellipse 60% 60% at 20% 80%, rgba(14, 165, 233, 0.08), transparent);
}

.cta-card { position: relative; text-align: center; max-width: 760px; margin: 0 auto; color: white; }
.cta-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
.cta-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.02rem;
  margin-bottom: 2.25rem;
}

.contact-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
  text-align: left;
}
@media (min-width: 700px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  color: white;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
}
.contact-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}
.contact-btn svg { flex-shrink: 0; }
.contact-btn-wa svg { color: #25D366; }
.contact-btn-email svg { color: #fbbf24; }
.contact-btn-linkedin svg { color: #0A66C2; }

.contact-label { font-size: 0.78rem; color: rgba(255, 255, 255, 0.65); font-weight: 500; }
.contact-value { font-size: 0.95rem; font-weight: 600; word-break: break-all; }

.cta-actions { display: flex; justify-content: center; }
.cta-actions .btn-primary {
  background: white;
  color: var(--primary);
}
.cta-actions .btn-primary:hover {
  background: var(--accent-soft);
  color: var(--primary);
}

/* ============ FOOTER ============ */
.footer {
  padding: 2rem 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-mute);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--text);
}
.footer-brand .nav-logo-mark { width: 28px; height: 28px; font-size: 0.85rem; }

/* ============ ANIMATIONS / REVEAL ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ RESPONSIVE TWEAKS ============ */
@media (max-width: 540px) {
  .nav-logo-text { display: none; }
  .timeline { padding-left: 1.5rem; }
  .timeline::before { left: 0.4rem; }
  .timeline-marker { left: -1.35rem; }
  .timeline-meta { text-align: left; width: 100%; }
  .hero-cta .btn { flex: 1; }
}

/* ============ PRINT FRIENDLY (just in case) ============ */
@media print {
  .nav, .hero-cta, .cta-actions, .footer { display: none; }
  body { font-size: 11pt; }
}
