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

:root {
  --bg: #012a4a;
  --bg-alt: #013a63;
  --surface: #01497c;
  --surface-hover: #015c99;
  --border: #006eb3;
  --text: #e0fbfc;
  --text-muted: #98c1d9;
  --accent: #00b4d8;
  --accent-glow: rgba(0, 180, 216, 0.15);
  --accent-2: #48cae4;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-2);
}

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

/* ── NAV ─────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

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

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

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

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

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  padding: 24px;
  flex-direction: column;
  gap: 20px;
  z-index: 999;
  border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 0;
}

.mobile-menu a:hover {
  color: var(--text);
}

/* ── HERO ────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 216, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 216, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}

.hero-avatar {
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.hero-avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(0, 180, 216, 0.1);
  transition: var(--transition);
}

.hero-avatar img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(0, 180, 216, 0.2);
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s 0.35s forwards;
}

.hero-name .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

.hero-location {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s 0.7s forwards;
}

.hero-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.social-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeUp 0.6s 1s forwards;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

/* ── BUTTONS ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0096b8;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 180, 216, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── SECTIONS ────────────────────────────────── */

.section {
  padding: 100px 0;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── ABOUT ───────────────────────────────────── */

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.highlight-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.highlight-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── TIMELINE ────────────────────────────────── */

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

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

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -37px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.section-alt .timeline-marker {
  border-color: var(--bg-alt);
}

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

.timeline-content:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

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

.timeline-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
  padding: 4px 12px;
  background: var(--accent-glow);
  border-radius: 20px;
}

.timeline-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.timeline-detail {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.timeline-list {
  list-style: none;
  padding: 0;
}

.timeline-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── PROJECTS ────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

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

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.project-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
  padding: 3px 10px;
  background: var(--accent-glow);
  border-radius: 20px;
}

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

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-2);
  background: rgba(72, 202, 228, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(72, 202, 228, 0.2);
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.project-features {
  list-style: none;
  padding: 0;
  margin-top: auto;
}

.project-features li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.project-features li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── SKILLS ──────────────────────────────────── */

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

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

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

.skill-items span {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.skill-items span:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ── ORG ─────────────────────────────────────── */

.org-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 600px;
  transition: var(--transition);
}

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

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

.org-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.org-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding: 4px 12px;
  background: var(--accent-glow);
  border-radius: 20px;
}

.org-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

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

/* ── CONTACT ─────────────────────────────────── */

.contact-content {
  max-width: 600px;
}

.contact-content > p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── FOOTER ──────────────────────────────────── */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

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

/* ── ANIMATIONS ──────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  40% {
    transform: rotate(45deg) translateY(-8px);
  }
  60% {
    transform: rotate(45deg) translateY(-4px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── RESPONSIVE ──────────────────────────────── */

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

  .nav-toggle {
    display: flex;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .hero-avatar img {
    width: 120px;
    height: 120px;
  }

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

  .about-highlights {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .highlight-card {
    flex: 1;
    min-width: 120px;
  }

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

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

  .timeline-header {
    flex-direction: column;
    gap: 8px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .project-card {
    padding: 20px;
  }
}
