@charset "utf-8";

/* -------------------------------------------------------------------------- */
/* Design tokens                                                              */
/* -------------------------------------------------------------------------- */
:root {
  --bg: #0c0f14;
  --bg-elevated: #141a22;
  --bg-card: #161d27;
  --bg-card-hover: #1a2330;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8edf4;
  --text-muted: #9aa8b8;
  --text-soft: #6b7a8c;
  --accent: #5ec8ff;
  --accent-soft: rgba(94, 200, 255, 0.12);
  --accent-strong: #3db4f5;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --max-width: 880px;
  --header-gap: 2rem;
  --transition: 0.2s ease;
}

/* -------------------------------------------------------------------------- */
/* Reset & base                                                               */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 200, 255, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(120, 100, 255, 0.06), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */
.page {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

/* -------------------------------------------------------------------------- */
/* Hamburger & side menu                                                      */
/* -------------------------------------------------------------------------- */
.hamburger {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border-strong);
  background: rgba(20, 26, 34, 0.9);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.hamburger:hover {
  background: var(--bg-card-hover);
  border-color: rgba(94, 200, 255, 0.35);
  transform: translateY(-1px);
}

.hamburger:active {
  transform: translateY(0);
}

.hamburger-box {
  width: 20px;
  height: 14px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 20px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  display: block;
  position: absolute;
  left: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger-inner {
  top: 6px;
}

.hamburger-inner::before {
  content: "";
  top: -6px;
}

.hamburger-inner::after {
  content: "";
  top: 6px;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(300px, 86vw);
  background: rgba(16, 20, 28, 0.98);
  border-right: 1px solid var(--border);
  color: var(--text);
  transform: translateX(-110%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1200;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-inner {
  padding: 1.25rem 1.35rem;
}

.side-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  float: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.side-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.menu-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 2.5rem 0 0.75rem;
  clear: both;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu-list a {
  display: block;
  color: var(--text);
  font-weight: 500;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.menu-list a:hover {
  background: var(--accent-soft);
  border-color: rgba(94, 200, 255, 0.2);
  color: var(--accent);
}

.hamburger.open {
  display: none;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1150;
}

.menu-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* -------------------------------------------------------------------------- */
/* Sticky social rail                                                         */
/* -------------------------------------------------------------------------- */
.sticky-container {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
}

.sticky {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(20, 26, 34, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sticky li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  transition: background var(--transition), transform var(--transition);
}

.sticky li a:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.sticky li img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(0.92);
  opacity: 0.9;
}

/* -------------------------------------------------------------------------- */
/* Hero / header                                                              */
/* -------------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--header-gap);
  margin-bottom: 2.5rem;
  padding: 2rem 1.5rem 2.25rem;
  background: linear-gradient(160deg, rgba(94, 200, 255, 0.06), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}

.profilePhoto {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), #8b7cf6);
  flex-shrink: 0;
}

.profilePhoto img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-card);
}

.profileHeader h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.profileHeader h1 a {
  color: var(--text);
}

.profileHeader h1 a:hover {
  color: var(--accent);
}

.profileHeader .role {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.45;
}

.profileHeader .contact-line {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  justify-content: center;
  align-items: center;
}

.profileHeader .contact-line a {
  color: var(--text-muted);
}

.profileHeader .contact-line a:hover {
  color: var(--accent);
}

.contact-sep {
  color: var(--border-strong);
  user-select: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.15rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition),
    transform var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-strong);
  color: #061018;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(94, 200, 255, 0.35);
  background: var(--accent-soft);
}

/* -------------------------------------------------------------------------- */
/* Sections                                                                   */
/* -------------------------------------------------------------------------- */
.sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.section-title {
  margin: 0 0 1.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(94, 200, 255, 0.35), transparent);
}

.section-body {
  color: var(--text-muted);
}

.section-body > p:first-child {
  margin-top: 0;
}

.section-body > p:last-child {
  margin-bottom: 0;
}

.prose {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* Skill chips */
.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  line-height: 1.4;
}

/* Experience */
.job + .job {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.job-header {
  margin-bottom: 0.75rem;
}

.job-org {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.02em;
}

.job-meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
}

.job-meta .role-title {
  color: var(--accent);
  font-weight: 600;
}

.job-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.job-list li + li {
  margin-top: 0.55rem;
}

.job-list li::marker {
  color: rgba(94, 200, 255, 0.45);
}

.job-list strong {
  color: var(--text);
  font-weight: 600;
}

/* Education */
.edu-block + .edu-block {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.edu-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.edu-heading img {
  width: 40px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.95;
}

.edu-heading .job-org {
  margin: 0;
}

.edu-degree {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.edu-detail {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.edu-detail strong {
  color: var(--text-soft);
  font-weight: 600;
}

/* Cert / research entries */
.entry {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.entry + .entry {
  margin-top: 0.85rem;
}

.entry strong {
  color: var(--text);
  font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footerNote {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .page {
    padding-top: 3rem;
  }

  .hero {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 2rem 2.25rem;
    gap: 1.75rem;
  }

  .profileHeader {
    flex: 1;
    min-width: 0;
  }

  .profileHeader .contact-line {
    justify-content: flex-start;
  }

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

  .section-card {
    padding: 1.75rem 1.85rem 1.6rem;
  }
}

@media (max-width: 720px) {
  .sticky-container {
    right: 0.65rem;
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .sticky {
    flex-direction: row;
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.5rem;
  }

  .sticky li a {
    width: 40px;
    height: 40px;
  }

  .page {
    padding-bottom: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
