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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617 0, #020014 45%, #020617 100%);
  color: #e5e7eb;
  overflow-x: hidden;
}

/* Intro fade */
.preload .page-wrap {
  opacity: 0;
  transform: translateY(8px);
}

body.loaded .page-wrap {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  width: 0;
  z-index: 100;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  background: rgba(3, 7, 18, 0.96);
  backdrop-filter: blur(18px);
  z-index: 90;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.nav-inner {
  max-width: 1080px;
  margin: auto;
  padding: 0.75rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
}

.brand span {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #e5e7eb;
}

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

.links a {
  color: #cbd5f5;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.links a:hover {
  opacity: 1;
  color: #f9fafb;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 4.1rem 1.3rem 3.1rem;
  overflow: hidden;
}

.hero-inner {
  max-width: 1080px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 2.5rem;
}

/* Shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(32px);
  opacity: 0.35;
  pointer-events: none;
}

.shape1 {
  width: 220px;
  height: 220px;
  background: #1e3a8a;
  top: -60px;
  left: -80px;
}

.shape2 {
  width: 200px;
  height: 200px;
  background: #0ea5e9;
  top: 120px;
  right: -80px;
}

.shape3 {
  width: 200px;
  height: 200px;
  background: #312e81;
  bottom: -70px;
  left: 18%;
}

/* Hero particles */
.particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  opacity: 0.7;
  animation: floatUp 6s linear infinite;
}

@keyframes floatUp {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  30% {
    opacity: 0.9;
  }
  to {
    transform: translateY(-40px);
    opacity: 0;
  }
}

/* Hero text */
.headline span {
  display: block;
}

.headline {
  font-size: 2.1rem;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.highlight {
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text {
  font-size: 0.98rem;
  max-width: 36rem;
  margin-bottom: 1.3rem;
  color: #cbd5f5;
}

/* CTAs */
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #020617;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.55);
}

/* LinkedIn button */
.btn.linkedin {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.65);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.8);
}

.btn.linkedin:hover {
  transform: translateY(-2px);
  background: radial-gradient(circle at top left, #0f172a, #020617);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.95);
}

.linkedin-icon {
  width: 18px;
  height: 18px;
}

/* Hero photo */
.hero-right {
  display: flex;
  justify-content: flex-end;
}

.photo-wrap {
  width: 180px;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.9);
  box-shadow:
    0 0 16px rgba(15, 23, 42, 0.9),
    0 0 26px rgba(37, 99, 235, 0.45);
  animation: glowPulse 3.4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from {
    box-shadow:
      0 0 14px rgba(15, 23, 42, 0.9),
      0 0 18px rgba(37, 99, 235, 0.35);
  }
  to {
    box-shadow:
      0 0 18px rgba(15, 23, 42, 1),
      0 0 32px rgba(56, 189, 248, 0.5);
  }
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Sections ===== */
.section {
  padding: 3rem 1.3rem;
}

.section-dark {
  background: radial-gradient(circle at top, #020617 0, #020014 55%);
}

.inner {
  max-width: 1080px;
  margin: auto;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 1.6rem;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-intro {
  font-size: 0.95rem;
  max-width: 42rem;
  color: #cbd5f5;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Journey timeline ===== */
.journey-section {
  position: relative;
  background: radial-gradient(circle at top, #020617 0, #020014 60%);
  overflow: hidden;
}

.journey-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
  opacity: 0.85;
}

.journey-section .inner {
  position: relative;
  z-index: 1;
}

.particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* reuse .particle + @keyframes floatUp */

/* Timeline */
.timeline {
  border-left: 1px solid rgba(148, 163, 184, 0.6);
  padding-left: 1.8rem;
  display: grid;
  gap: 2rem;
  margin-bottom: 2.4rem;
}

.timeline-item {
  position: relative;
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  position: absolute;
  left: -28px;
  top: 4px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
}

.t-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  color: #e5e7eb;
}

.t-content p {
  font-size: 0.9rem;
  color: #cbd5f5;
}

/* ===== Grids & cards ===== */
.uc-grid,
.m-grid,
.r-grid,
.edu-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.uc-card,
.m-card,
.r-card,
.edu-card,
.contact-card {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.uc-card:hover,
.m-card:hover,
.r-card:hover,
.edu-card:hover,
.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 1);
}

.uc-card h3,
.m-card h3,
.r-card h3,
.edu-card h3,
.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: #e5e7eb;
}

.uc-card p,
.m-card p,
.r-card p,
.edu-card p,
.contact-card p {
  font-size: 0.88rem;
  color: #cbd5f5;
}

.uc-card {
  text-decoration: none;
}

/* Extra meta texts */
.uc-meta,
.edu-meta {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: #a5b4fc;
}

/* Philosophy quote */
.quote {
  max-width: 42rem;
  border-left: 3px solid #facc15;
  padding-left: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
}

/* Links */
.section a[href^="mailto:"],
.section a[href^="http"] {
  color: #38bdf8;
}

.section a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #9ca3af;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .links::-webkit-scrollbar {
    display: none;
  }

  .links a {
    font-size: 0.85rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.9rem;
  }

  .hero {
    padding: 3.2rem 1.25rem 2.7rem;
  }

  .headline {
    font-size: 1.6rem;
  }

  .hero-text {
    font-size: 0.9rem;
  }

  .hero-right {
    justify-content: flex-start;
  }

  .photo-wrap {
    width: 155px;
    height: 195px;
  }

  .section {
    padding: 2.4rem 1.25rem;
  }

  .section-title {
    font-size: 1.4rem;
    margin-bottom: 1.3rem;
  }

  .timeline {
    padding-left: 1.5rem;
    gap: 1.6rem;
  }

  .t-content p {
    font-size: 0.86rem;
  }

  .uc-card,
  .m-card,
  .r-card,
  .edu-card,
  .contact-card {
    padding: 0.85rem 0.9rem;
  }
}

@media (max-width: 480px) {
  .headline {
    font-size: 1.45rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .uc-grid,
  .m-grid,
  .r-grid,
  .edu-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
