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

/* ===== THEME VARIABLES ===== */
:root {
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --accent: #4f8ef7;
  --accent2: #a78bfa;
  --green: #34d399;
  --radius: 12px;
  --radius-sm: 8px;
}

[data-theme="dark"] {
  --bg: #0d0f14;
  --bg-card: #13161e;
  --bg-card2: #1a1d27;
  --border: #1f2333;
  --text: #e2e8f0;
  --muted: #8892a4;
  --muted2: #5a6378;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --code-bg: #0d0f14;
  --phone-border: #1f2333;
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card2: #eef1f6;
  --border: #dde2ec;
  --text: #1a2035;
  --muted: #5a6378;
  --muted2: #8892a4;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --code-bg: #1a1d27;
  --phone-border: #dde2ec;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 10px;
  border-radius: 2px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* ===== NAV ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

[data-theme="light"] #navbar {
  background: rgba(245,247,250,0.9);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.3);
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-links a.nav-active { color: var(--text); background: var(--bg-card); font-weight: 500; }

.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 500;
}

.btn-nav:hover { opacity: 0.9; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle */
.theme-toggle {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

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

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

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 48px;
}

.hero-content { flex: 1; min-width: 0; }

.hero-tag {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.2);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

#hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.accent { color: var(--accent); }

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  align-items: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover { border-color: var(--accent); background: rgba(79,142,247,0.05); }

.btn-ghost-sm {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}

.btn-ghost-sm:hover { color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid rgba(79,142,247,0.3);
  transition: background 0.2s;
  display: inline-block;
  margin-top: 12px;
}

.btn-ghost:hover { background: rgba(79,142,247,0.1); }

.hero-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-links a {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.hero-links a:hover { color: var(--accent); transform: translateY(-2px); }

/* Phone visual */
.hero-visual { flex-shrink: 0; display: flex; justify-content: center; }

.phone-frame {
  width: 260px;
  height: 420px;
  background: var(--bg-card);
  border: 2px solid var(--phone-border);
  border-radius: 36px;
  padding: 16px;
  position: relative;
  box-shadow: var(--shadow), 0 0 0 1px rgba(79,142,247,0.1), 0 0 60px rgba(79,142,247,0.08);
}

.phone-frame::before {
  content: '';
  display: block;
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin: 0 auto 16px;
}

.phone-screen {
  background: var(--code-bg);
  border-radius: 24px;
  height: calc(100% - 22px);
  overflow: hidden;
  padding: 24px 16px;
  border: 1px solid var(--border);
}

.code-snippet {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: #8892a4;
}

.code-keyword { color: var(--accent2); }
.code-fn { color: var(--accent); }
.code-str { color: var(--green); }
.code-num { color: #f9a84d; }

/* ===== ABOUT ===== */
#about { background: var(--bg-card); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 16px; line-height: 1.75; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }

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

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: border-color 0.2s;
}

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

.stat-num { font-size: 2rem; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.stat-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

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

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.skill-group:hover { border-color: rgba(79,142,247,0.3); }

.skill-group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 600;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--mono);
  transition: 0.2s;
}

.tag.primary {
  background: rgba(79,142,247,0.1);
  border-color: rgba(79,142,247,0.3);
  color: var(--accent);
}

.tag:hover { border-color: var(--accent); color: var(--text); }

/* ===== EXPERIENCE ===== */
#experience { background: var(--bg-card); }

.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -29px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 2px solid var(--muted2);
  transition: border-color 0.2s;
}

.timeline-marker.current {
  border-color: var(--accent);
  background: rgba(79,142,247,0.2);
  box-shadow: 0 0 12px rgba(79,142,247,0.4);
}

.timeline-item:hover .timeline-marker { border-color: var(--accent); }

.timeline-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}

.timeline-item:hover .timeline-content { border-color: rgba(79,142,247,0.3); }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.job-header h3 { font-size: 1.1rem; font-weight: 600; }
.company { color: var(--accent); font-size: 0.9rem; margin-top: 2px; }

.date-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.2);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.job-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; line-height: 1.65; }

/* Google Play badges */
.play-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.play-badges a {
  display: inline-block;
  transition: opacity 0.2s, transform 0.2s;
  border-radius: 6px;
  overflow: hidden;
}

.play-badges a:hover { opacity: 0.85; transform: translateY(-1px); }

.play-badges img { display: block; height: 44px; width: auto; }

.job-highlights {
  list-style: disc;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.job-highlights li { margin-bottom: 4px; }

.tech-used { display: flex; flex-wrap: wrap; gap: 6px; }

.tech-used span {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--muted2);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover { border-color: rgba(79,142,247,0.4); transform: translateY(-2px); }

.project-card.placeholder {
  align-items: center;
  text-align: center;
  border-style: dashed;
  grid-column: 1 / -1;
  max-width: 400px;
  margin: 0 auto;
}

.project-icon { color: var(--accent); margin-bottom: 16px; }
.project-card h3 { font-size: 1.05rem; margin-bottom: 0; }
.project-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.65; flex: 1; margin-bottom: 16px; }

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.project-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-icon-sm {
  width: 36px; height: 36px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.project-link {
  color: var(--muted2);
  transition: color 0.2s;
  padding: 4px;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-tags span {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--muted2);
  padding: 2px 8px;
  border-radius: 4px;
}

.projects-cta { text-align: center; }

/* ===== TESTIMONIALS ===== */
#testimonials { background: var(--bg-card); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.testimonial-card:hover { border-color: rgba(79,142,247,0.3); transform: translateY(-2px); }

.testimonial-quote {
  color: var(--accent);
  opacity: 0.4;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, serif;
  margin-bottom: -8px;
}

.testimonial-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
  flex: 1;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(79,142,247,0.15);
  border: 1px solid rgba(79,142,247,0.3);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.author-name { font-size: 0.9rem; font-weight: 600; }
.author-role { font-size: 0.78rem; color: var(--muted2); margin-top: 1px; }

/* Placeholder card */
.testimonial-card.placeholder-card {
  border-style: dashed;
  grid-column: 1 / -1;
  max-width: 400px;
  margin: 0 auto;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 16px 0;
  color: var(--muted2);
}

.placeholder-inner svg { color: var(--accent); opacity: 0.5; }

.placeholder-inner p { font-size: 0.9rem; color: var(--muted); }

.testimonials-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.testimonials-note { color: var(--muted); font-size: 0.95rem; }

/* ===== EDUCATION ===== */
#education { background: var(--bg); }

.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.edu-card:hover { border-color: rgba(79,142,247,0.3); }

.edu-icon {
  width: 44px; height: 44px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.3);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.1rem;
  color: var(--accent); flex-shrink: 0;
}

.edu-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.edu-school { color: var(--accent); font-size: 0.85rem; margin-bottom: 2px; }
.edu-date { color: var(--muted2); font-size: 0.8rem; font-family: var(--mono); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
  color: var(--text);
  min-width: 0;
}

.contact-card:not(.no-link):hover { border-color: var(--accent); transform: translateY(-2px); }

.contact-card svg { color: var(--accent); flex-shrink: 0; }

.contact-card > div { min-width: 0; }

.contact-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.contact-value {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-all;
  overflow-wrap: break-word;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--muted2);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 72px 0; }

  #hero { flex-direction: column; min-height: auto; padding-top: 100px; }

  .hero-visual { display: none; }

  .about-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 4px;
  }

  .hamburger { display: flex; }

  .job-header { flex-direction: column; }

  .timeline { padding-left: 24px; }

  .play-badges img { height: 38px; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeUp 0.6s ease both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
