:root {
  --font-body: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --bg-body: #f4f2ec;
  --bg-surface: #ffffff;
  --bg-surface-strong: #fdfaf4;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #00b3a4;
  --accent-strong: #008a7f;
  --accent-2: #1f7bff;
  --border: rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
  --transition: all 0.3s ease;
  --nav-bg: rgba(244, 242, 236, 0.82);
  --grid-line: rgba(15, 23, 42, 0.05);
  --ripple: rgba(0, 179, 164, 0.35);
  --header-height: 7.6rem;
  --header-height-mobile: 5rem;
  --hero-image: url("https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=2000&q=80");
  --hero-overlay: linear-gradient(120deg, rgba(244, 242, 236, 0.45) 0%, rgba(244, 242, 236, 0.35) 55%, rgba(0, 179, 164, 0.15) 100%);
  --panel-image: url("https://images.unsplash.com/photo-1444418776041-9c7e33cc5a9c?auto=format&fit=crop&w=1600&q=80");
  --panel-overlay: linear-gradient(180deg, rgba(244, 242, 236, 0.15) 0%, rgba(244, 242, 236, 0.75) 80%);
}

[data-theme="dark"] {
  --bg-body: #0b1117;
  --bg-surface: #111b25;
  --bg-surface-strong: #182330;
  --bg-glass: rgba(17, 27, 37, 0.72);
  --text-main: #f3f5f7;
  --text-muted: #9aa4af;
  --accent: #27f1c8;
  --accent-strong: #12b095;
  --accent-2: #3f7bff;
  --border: rgba(243, 245, 247, 0.12);
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(11, 17, 23, 0.85);
  --grid-line: rgba(243, 245, 247, 0.06);
  --ripple: rgba(39, 241, 200, 0.35);
  --hero-image: url("https://images.unsplash.com/photo-1489515217757-5fd1be406fef?auto=format&fit=crop&w=2000&q=80");
  --hero-overlay: linear-gradient(120deg, rgba(11, 17, 23, 0.92) 0%, rgba(11, 17, 23, 0.7) 55%, rgba(39, 241, 200, 0.15) 100%);
  --panel-image: url("https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1600&q=80");
  --panel-overlay: linear-gradient(180deg, rgba(9, 12, 16, 0.4) 0%, rgba(9, 12, 16, 0.8) 80%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(0, 179, 164, 0.12), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(31, 123, 255, 0.12), transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(0, 179, 164, 0.08), transparent 55%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  z-index: -2;
  pointer-events: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  padding-left: 1.2rem;
}

.container {
  width: min(1200px, 100% - 2.5rem);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 0 0 0.75rem 0.75rem;
  z-index: 2000;
}

.skip-link:focus {
  transform: translateY(0);
}

.bg-mesh {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: floatBlob 22s infinite ease-in-out;
}

.blob-1 {
  width: 480px;
  height: 480px;
  background: var(--accent);
  top: -12%;
  right: -12%;
}

.blob-2 {
  width: 420px;
  height: 420px;
  background: var(--accent-2);
  bottom: -18%;
  left: -12%;
  animation-delay: -6s;
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -40px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav {
  backdrop-filter: blur(12px);
  background: transparent;
  transition: var(--transition);
}

.nav.scrolled {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.9rem + env(safe-area-inset-top)) 1.5rem 0.9rem;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

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

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 600;
  opacity: 0.85;
  position: relative;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-strong));
  color: var(--text-main);
  padding: 0;
  border-radius: 16px;
  font-weight: 600;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  touch-action: manipulation;
}

.mobile-menu-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-menu-btn:active {
  transform: scale(0.96);
}

.subnav {
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
}

.subnav-inner {
  display: flex;
  gap: 0.75rem;
  padding: 0.8rem 1.5rem;
  align-items: center;
  min-height: 3.1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 2.25rem;
  white-space: nowrap;
}

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 0.6rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mobile-bar-btn {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.3rem;
  min-height: 62px;
  min-width: 56px;
  font-weight: 600;
  border-radius: 16px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  touch-action: manipulation;
}

.mobile-bar-btn i {
  font-size: 1.35rem;
}

.mobile-bar-btn span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  line-height: 1;
}

.mobile-bar-btn.active,
.mobile-bar-btn:hover,
.mobile-bar-btn:focus {
  color: var(--accent);
}

.mobile-bar-btn.active {
  background: var(--bg-surface-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.mobile-bar-btn:active {
  transform: translateY(0);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1100;
}

.nav-drawer.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 1rem);
  right: 1rem;
  width: min(360px, calc(100% - 2rem));
  height: auto;
  max-height: calc(100dvh - env(safe-area-inset-top) - 2rem);
  background: var(--bg-surface);
  padding: 1.5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
  border-radius: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-drawer.active .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.drawer-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.drawer-close {
  border: 1px solid var(--border);
  background: var(--bg-surface-strong);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-group {
  margin-bottom: 1.5rem;
}

.drawer-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.drawer-links {
  display: grid;
  gap: 0.7rem;
}

.drawer-links a {
  font-weight: 600;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border);
  min-height: 48px;
  display: flex;
  align-items: center;
  touch-action: manipulation;
}

main {
  padding-top: 0;
}

.hero {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 140px 0 0;
  background-image: var(--hero-overlay), var(--hero-image);
  background-size: cover;
  background-position: center;
  position: relative;
}

/* One-page hero container */
.hero-container-onepage {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

.hero-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  max-width: 100%;
}

.hero-profile-circle {
  position: absolute;
  top: 0;
  right: 1.5rem;
  flex-shrink: 0;
  margin-bottom: 0;
}

.profile-circle-img {
  width: 200px;
  height: 200px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-lg);
  background: var(--bg-surface);
}

.hero-text-onepage {
  flex: 1;
  min-width: 0;
}

.hero-text {
  max-width: calc(100% - 240px);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  color: var(--accent-strong);
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.1;
  margin: 0 0 2rem;
}

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

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero .btn-group {
  display: none;
}

.btn-group {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0;
}

.scroll-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  animation: bounce 2s infinite;
}

.scroll-arrow i {
  font-size: 2rem;
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent)) drop-shadow(0 0 16px var(--accent));
  opacity: 0.8;
  transition: all 0.3s ease;
}

.scroll-arrow:hover i {
  opacity: 1;
  filter: drop-shadow(0 0 12px var(--accent)) drop-shadow(0 0 24px var(--accent));
  transform: scale(1.1);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  background: var(--bg-surface);
  color: var(--text-main);
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-visual {
  display: grid;
  justify-items: center;
}

.profile-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.profile-card h3 {
  margin: 0.8rem 0 0.2rem;
}

.profile-card p {
  margin: 0;
}

.profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin: 0 auto 1.2rem;
  background: var(--bg-surface);
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  justify-content: center;
  align-items: stretch;
  margin-top: 1rem;
}

.contact-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-surface-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  text-align: center;
  width: 100%;
  line-height: 1.2;
}

.section {
  padding: 140px 0 4.5rem;
  scroll-margin-top: calc(var(--header-height) + env(safe-area-inset-top) + 1rem);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

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

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.6rem;
}

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transform: translateY(0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 179, 164, 0.4);
}

.profile-grid {
  display: grid;
  gap: 2rem;
}

.profile-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  display: grid;
  gap: 0.4rem;
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-value {
  font-weight: 600;
}

.visual-panel {
  background-image: var(--panel-overlay), var(--panel-image);
  background-size: cover;
  background-position: center;
  color: #ffffff;
  border-radius: 24px;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
}

.visual-panel .panel-content {
  padding: 1.6rem;
}

.skills-grid {
  display: grid;
  gap: 1.5rem;
}

.skill-card {
  display: grid;
  gap: 1rem;
}

.skill-icon {
  font-size: 1.6rem;
  color: var(--accent);
}

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

.skill-tag,
.task-chip,
.lang-chip,
.badge-chip {
  background: var(--bg-surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.skills-split {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding-left: 2.4rem;
}

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

.job-card {
  position: relative;
  padding-left: 2rem;
  cursor: pointer;
}

.job-card::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 1.6rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 179, 164, 0.2);
}

.job-card[data-expanded="true"] {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.job-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.job-role {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.job-company {
  font-weight: 600;
  color: var(--text-muted);
}

.job-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.job-period {
  align-self: flex-start;
  background: var(--bg-surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.job-summary {
  margin-top: 0.4rem;
}

.job-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.job-card[data-expanded="true"] .job-details {
  max-height: 1000px;
  opacity: 1;
  margin-top: 1.1rem;
}

.detail-block {
  margin-top: 1.2rem;
}

.detail-block h4 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.detail-block ul {
  display: grid;
  gap: 0.4rem;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.job-footer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.education-grid,
.internship-grid,
.recommendation-grid {
  display: grid;
  gap: 1.5rem;
}

.education-card h3,
.internship-card h3,
.recommendation-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.recommendation-card blockquote {
  font-style: italic;
  color: var(--text-muted);
  margin: 1rem 0;
}

.recommendation-meta {
  font-weight: 600;
}

.cta-panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 2rem;
  max-width: 640px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: var(--bg-surface-strong);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
}

.chatbot-btn {
  position: fixed;
  right: 1.5rem;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0b1117;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 1200;
}

.chatbot-window {
  position: fixed;
  right: 1.5rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  width: min(340px, 90vw);
  background: var(--bg-surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1200;
}

.chat-header {
  padding: 1rem;
  background: var(--bg-surface-strong);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-body {
  padding: 1rem;
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 0.6rem;
}

.msg {
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem;
}

.msg-bot {
  background: var(--bg-surface-strong);
}

.msg-user {
  background: var(--accent);
  color: #0b1117;
  justify-self: end;
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: var(--bg-surface);
  color: var(--text-main);
}

.chat-input button {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
}

.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  border: none;
  background: var(--text-main);
  color: var(--bg-surface);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1100;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-4px);
}

.clickable {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: var(--ripple);
  transform: scale(0);
  animation: ripple 0.6s ease;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero-content-wrapper {
    gap: 2rem;
  }

  .profile-circle-img {
    width: 110px;
    height: 110px;
  }

  .hero-container {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 0 2rem;
  }

  .profile-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .skills-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .education-grid,
  .internship-grid,
  .recommendation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 899px) {
  .timeline {
    padding-left: 2.1rem;
  }

  .timeline::before {
    left: 0.85rem;
  }

  .job-card {
    padding-left: 1.7rem;
  }

  .job-card::before {
    left: -1.35rem;
  }

  .subnav {
    display: none;
  }

  .mobile-bottom-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }

  main {
    padding-top: 0;
    padding-bottom: calc(6.8rem + env(safe-area-inset-bottom));
  }

  .hero {
    min-height: 100vh;
    height: 100vh;
    padding: 1.5rem 0;
  }

  .hero-content-wrapper {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .profile-circle-img {
    width: 110px;
    height: 110px;
  }

  .hero-text-onepage {
    max-width: 100%;
  }

  .btn-group {
    justify-content: center;
  }

  .hero-container {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
  }

  .hero-visual {
    order: -1;
    margin-top: 0.6rem;
  }

  .hero-text {
    text-align: left;
  }

  .section {
    scroll-margin-top: calc(var(--header-height-mobile) + env(safe-area-inset-top) + 0.6rem);
  }

  .nav-container {
    padding: calc(0.75rem + env(safe-area-inset-top)) 1.2rem 0.75rem;
  }

  .theme-toggle {
    display: none;
  }

  .mobile-menu-btn {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 1.2rem;
  }

  .chatbot-btn {
    right: 1rem;
    bottom: calc(6.2rem + env(safe-area-inset-bottom));
  }

  .chatbot-window {
    right: 1rem;
    bottom: calc(9.2rem + env(safe-area-inset-bottom));
  }

  .back-to-top {
    display: none;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(1200px, 100% - 2.4rem);
  }

  main {
    padding-top: 0;
  }

  .nav-container {
    padding: calc(0.65rem + env(safe-area-inset-top)) 1rem 0.65rem;
  }

  .nav-logo {
    font-size: 1.05rem;
  }

  .theme-toggle {
    display: none;
  }

  .mobile-menu-btn {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 1.3rem;
  }

  .subnav-inner {
    padding: 0.45rem 0.9rem;
    gap: 0.4rem;
  }

  .subnav-link {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
  }

  .hero {
    min-height: 100vh;
    height: 100vh;
    padding: 1.5rem 0;
  }

  .hero-content-wrapper {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .profile-circle-img {
    width: 100px;
    height: 100px;
  }

  .hero-text-onepage {
    max-width: 100%;
  }

  .hero-text-onepage h1 {
    font-size: 1.8rem;
  }

  .btn-group {
    justify-content: center;
    flex-direction: column;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero-container {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 0 1rem;
  }

  .hero-visual {
    order: -1;
  }

  .hero-tag {
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
  }

  .hero-text h1 {
    font-size: clamp(2rem, 7vw, 2.7rem);
  }

  .hero-text {
    text-align: left;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.2rem;
  }

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

  .profile-card {
    padding: 1.5rem;
    max-width: 100%;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  .contact-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .contact-pill {
    text-align: center;
    width: 100%;
    padding: 0.55rem 0.7rem;
    font-size: 0.85rem;
    min-height: 48px;
  }

  .section {
    padding: 3.6rem 0;
    scroll-margin-top: calc(var(--header-height-mobile) + env(safe-area-inset-top) + 0.5rem);
  }

  .card {
    padding: 1.3rem;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline::before {
    left: 0.8rem;
  }

  .job-card {
    padding-left: 1.4rem;
  }

  .job-card::before {
    left: -1.15rem;
    top: 1.4rem;
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 3px rgba(0, 179, 164, 0.2);
  }

  .job-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .job-actions .btn {
    width: 100%;
  }

  .chatbot-btn {
    right: 1rem;
    bottom: calc(6.2rem + env(safe-area-inset-bottom));
  }

  .chatbot-window {
    right: 1rem;
    bottom: calc(9.2rem + env(safe-area-inset-bottom));
  }

  .back-to-top {
    right: 1rem;
    bottom: calc(10.8rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
