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

:root {
  --accent: #6366f1;
  --accent-light: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --bg-dark: #f1f5f9;
  --bg-section: #f4f6fb;
  --border: rgba(0, 0, 0, 0.08);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --gold: #d97706;
  --green: #059669;
  --red: #e11d48;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-accent: 0 0 32px rgba(99, 102, 241, 0.12);
  --transition: 0.25s ease;
  --nav-h: 68px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY & UTILS
   ============================================================ */
.accent { color: var(--accent); }

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

.section {
  padding: 96px 0;
}

.section--dark {
  background-color: var(--bg-section);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: var(--accent-light);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.85rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn--sm:hover {
  background: var(--accent-light);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
}

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

.nav__logo {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav__links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav__links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

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

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero__bg::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero__left {
  flex: 1;
  max-width: 600px;
}

.hero__right {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.hero__photo-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), #a5b4fc, transparent);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.15), var(--shadow);
}

.hero__photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--bg);
  display: block;
}

.hero__greeting {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.hero__name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #0f172a 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__role {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 2em;
  font-family: var(--mono);
}

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

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 560px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-light);
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}

.about__avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.avatar-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), #a5b4fc, transparent);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.15);
}

.avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--bg);
  display: block;
}

.about__info-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.info-card__num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--mono);
  min-width: 48px;
}

.info-card__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__text p {
  color: var(--text-muted);
  line-height: 1.8;
}

.about__text strong {
  color: var(--text);
}

.about__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.detail__icon {
  font-size: 1rem;
}

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

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

.skill-group:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-accent);
}

.skill-group__icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

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

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

.skill-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.skill-tag:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent-light);
}

.skill-tag--primary {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--accent);
}

/* ============================================================
   TIMELINE (EXPERIENCE)
   ============================================================ */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(99, 102, 241, 0.1));
}

.timeline__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.timeline__dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  margin-top: 4px;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.timeline__item--active .timeline__dot {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 16px var(--accent-glow);
}

.timeline__item--active .timeline__dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline__item--active .timeline__card {
  border-color: rgba(99, 102, 241, 0.25);
}

.timeline__card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-accent);
}

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

.timeline__role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.timeline__company {
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 2px;
}

.timeline__period {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.timeline__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.timeline__list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.timeline__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

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

.timeline__tech span {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: var(--accent);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent), var(--shadow);
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__icon {
  font-size: 2rem;
}

.project-card__badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-card__badge--senior {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--accent);
}

.project-card__badge--junior {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.project-card__period {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.project-card__achievements {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-card__achievements li {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-card__achievements strong {
  color: var(--text);
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.project-card__tech span {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ============================================================
   EDUCATION
   ============================================================ */
.edu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.edu__subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 16px;
}

.edu-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.edu-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.edu-card__major {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 2px;
}

.edu-card__period {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.edu-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.edu-card__list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.edu-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.edu-card__list strong {
  color: var(--text);
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cert-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cert-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.cert-item__dot--gold { background: var(--gold); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.cert-item__dot--blue { background: var(--accent); box-shadow: 0 0 6px rgba(99, 102, 241, 0.3); }
.cert-item__dot--orange { background: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, 0.4); }
.cert-item__dot--gray { background: var(--text-dim); }

.cert-item__name {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

.cert-item__year {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact__sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  text-align: center;
  line-height: 1.8;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}

.contact-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}

.contact-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-card__label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.contact-card__value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer__note {
  font-family: var(--mono);
  font-size: 0.78rem;
}

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

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 4px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__avatar {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }

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

  .edu__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section { padding: 64px 0; }

  .timeline::before { left: 12px; }
  .timeline__item { grid-template-columns: 32px 1fr; gap: 16px; }
  .timeline__dot { width: 26px; height: 26px; }

  .footer__inner { flex-direction: column; text-align: center; }

  .hero__content { flex-direction: column-reverse; gap: 32px; padding-top: 24px; }
  .hero__right { width: 100%; }
  .hero__photo-ring { width: 200px; height: 200px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
  .projects__grid, .skills__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
