:root {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --card: #111c33;
  --border: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #22d3ee;
  --primary-dark: #0e7490;
  --accent: #34d399;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  gap: 1.6rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

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

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
  background:
    radial-gradient(700px 400px at 85% 10%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(52, 211, 153, 0.10), transparent 60%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: center;
}

.greeting {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #fff 30%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.tagline {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #062530;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.35);
}

.btn-primary:hover {
  background: #67e8f9;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.5);
}

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

.btn-outline:hover {
  background: rgba(34, 211, 238, 0.1);
}

.photo-frame {
  width: min(320px, 80%);
  margin: 0 auto;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  z-index: -1;
  transform: translate(12px, 12px);
  opacity: 0.5;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Sections ---------- */
.section {
  padding: 90px 0;
}

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

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.sub-title {
  font-size: 1.3rem;
  margin: 2.5rem 0 1.2rem;
  color: var(--primary);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--muted);
}

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

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span {
  color: var(--muted);
  white-space: nowrap;
}

.info-row strong {
  text-align: right;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--primary);
  z-index: 1;
}

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

.timeline-card:hover {
  transform: translateX(6px);
  border-color: var(--primary);
}

.timeline-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.role-badge {
  display: inline-block;
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-meta {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.timeline-card ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.timeline-card li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

/* ---------- Experience gallery ---------- */
.exp-gallery {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border);
}

.gallery-caption {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
}

.gallery-item {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  cursor: zoom-in;
  transition: transform 0.2s, border-color 0.2s;
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem 0.3rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.video-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-item video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.video-item .gallery-caption {
  text-align: center;
  padding: 0.4rem 0.3rem;
  background: var(--bg-alt);
  margin: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 7, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Education ---------- */
.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.edu-top {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.edu-text {
  flex: 1;
  min-width: 260px;
}

.edu-photo {
  width: 165px;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.edu-photo img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.edu-gpa {
  display: inline-block;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  margin: 0.8rem 0 1.2rem;
}

.edu-detail {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.edu-detail h4 {
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.edu-detail p {
  color: var(--muted);
}

.edu-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--primary);
  transition: color 0.2s;
}

.edu-link:hover {
  color: #67e8f9;
}

.cert-card {
  display: flex;
  gap: 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  align-items: flex-start;
}

.cert-icon {
  font-size: 1.8rem;
  background: rgba(34, 211, 238, 0.12);
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.cert-card h4 {
  font-size: 1.1rem;
}

.cert-card p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
}

.org-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.org-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.org-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.org-card h4 span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.3rem;
}

.org-card p {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.org-card ul {
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.org-card li {
  margin-bottom: 0.4rem;
}

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

.skill-group h3 {
  color: var(--primary);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-chips span {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.skill-chips span:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

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

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

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}

.project-tag {
  align-self: flex-start;
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.project-tech span {
  font-size: 0.78rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact-intro {
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 1.8rem;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

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

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

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

  .hero-actions,
  .contact-actions {
    justify-content: center;
  }

  .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .photo-frame {
    order: -1;
  }

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

  .info-row strong {
    text-align: left;
  }

  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .hamburger {
    display: flex;
  }

  .hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}