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

:root {
  --bg: #050816;
  --bg-alt: #080e1f;
  --surface: #0d1b2e;
  --surface-2: #112240;
  --border: rgba(100, 160, 255, 0.1);
  --border-hover: rgba(100, 160, 255, 0.25);
  --primary: #64b5f6;
  --accent: #A42823;
  --accent-dim: rgba(164, 40, 35, 0.08);
  --accent-glow: rgba(164, 40, 35, 0.15);
  --purple: #a78bfa;
  --green: #34d399;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(164, 40, 35, 0.06), 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
}

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

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

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #1e3a5f; }

/* ── Layout ─────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

.section { padding: 110px 0; }
.section-alt { background-color: var(--bg-alt); }

/* ── Navbar ──────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(5, 8, 22, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: opacity var(--transition);
}

.nav-logo:hover { opacity: 0.8; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

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

.nav-cta {
  border: 1px solid rgba(164, 40, 35, 0.4) !important;
  color: var(--accent) !important;
}

.nav-cta:hover {
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--transition);
}

.hamburger:hover { background: rgba(255,255,255,0.06); }

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

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 28px 20px;
  background: rgba(5, 8, 22, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

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

.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 13px 0;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 60%, rgba(0, 150, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(124, 58, 237, 0.07) 0%, transparent 60%);
  pointer-events: none;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100, 181, 246, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 181, 246, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 110px 28px 80px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 18px;
  letter-spacing: 0.06em;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -2.5px;
  color: var(--text);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: -0.3px;
}

.hero-title .divider {
  color: var(--accent);
  margin: 0 10px;
  font-weight: 300;
}

.hero-desc {
  max-width: 540px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-socials {
  display: flex;
  gap: 12px;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all var(--transition);
}

.hero-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.hero-socials svg { width: 18px; height: 18px; }

.scroll-indicator {
  position: absolute;
  bottom: 44px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2.2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(1); transform-origin: top; }
  50% { opacity: 0.9; transform: scaleY(0.5); transform-origin: top; }
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #c23530;
  box-shadow: 0 0 28px rgba(164, 40, 35, 0.35);
  transform: translateY(-2px);
}

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

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

/* ── Accent ──────────────────────────────────── */
.accent { color: var(--accent); }

/* ── Section Title ───────────────────────────── */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 64px;
  position: relative;
  display: inline-block;
  line-height: 1.2;
}

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

/* ── About ───────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px;
  align-items: start;
}

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

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

.about-highlights {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.highlight-item { display: flex; flex-direction: column; }

.highlight-number {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
}

.highlight-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}

.info-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.info-list a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.info-list a:hover { color: var(--accent); }

/* ── Skills ──────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.skill-cat-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon { font-size: 1rem; }

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

.tag {
  padding: 5px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: default;
}

.tag:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }

.tag-ai {
  background: rgba(164, 40, 35, 0.05);
  border-color: rgba(164, 40, 35, 0.14);
  color: rgba(164, 40, 35, 0.82);
}

.tag-ai:hover { background: rgba(164, 40, 35, 0.1); }

.tag-cloud {
  background: rgba(100, 181, 246, 0.05);
  border-color: rgba(100, 181, 246, 0.14);
  color: rgba(100, 181, 246, 0.82);
}

.tag-cloud:hover { background: rgba(100, 181, 246, 0.1); }

.tag-concept {
  background: rgba(167, 139, 250, 0.05);
  border-color: rgba(167, 139, 250, 0.14);
  color: rgba(167, 139, 250, 0.85);
}

.tag-concept:hover { background: rgba(167, 139, 250, 0.1); }

.tag-sm {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ── Timeline ────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(164, 40, 35, 0.05));
}

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

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

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 28px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(164, 40, 35, 0.6);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

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

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.contract-badge, .startup-badge {
  font-size: 0.65rem;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.contract-badge {
  background: rgba(100, 181, 246, 0.1);
  color: var(--primary);
  border: 1px solid rgba(100, 181, 246, 0.2);
}

.startup-badge {
  background: rgba(167, 139, 250, 0.1);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.timeline-company {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

.timeline-meta {
  text-align: right;
  flex-shrink: 0;
}

.timeline-date {
  display: block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 5px;
}

.timeline-location {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.timeline-bullets { list-style: none; margin-bottom: 20px; }

.timeline-bullets li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

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

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 4px;
  opacity: 0.8;
}

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

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ── Projects ────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  cursor: default;
}

.project-card:hover {
  border-color: rgba(164, 40, 35, 0.2);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-icon { font-size: 1.9rem; }

.project-badge {
  font-size: 0.67rem;
  padding: 4px 11px;
  background: rgba(164, 40, 35, 0.07);
  border: 1px solid rgba(164, 40, 35, 0.18);
  border-radius: 20px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.78;
}

.project-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.project-highlights li {
  position: relative;
  padding-left: 16px;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.65;
}

.project-highlights li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Education ───────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.edu-icon { font-size: 2rem; flex-shrink: 0; }

.edu-degree {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.4;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.edu-location {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.edu-date {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(164, 40, 35, 0.06);
  border: 1px solid rgba(164, 40, 35, 0.14);
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: rgba(164, 40, 35, 0.75);
  letter-spacing: 0.02em;
}

.edu-minor {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 9px;
}

/* ── Contact ─────────────────────────────────── */
.contact-wrapper {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
}

.contact-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 44px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 14px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  transition: all var(--transition);
}

.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateX(4px);
}

.contact-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.75;
}

.contact-item:hover svg { opacity: 1; }

.contact-btn { margin: 0 auto; }

/* ── Footer ──────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 44px 0;
  text-align: center;
}

footer p { color: var(--text-dim); font-size: 0.85rem; }
footer strong { color: var(--text-muted); font-weight: 600; }
footer .footer-sub { margin-top: 6px; font-size: 0.78rem; }

/* ── Animations ──────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.15s; }
.fade-up:nth-child(3) { animation-delay: 0.25s; }
.fade-up:nth-child(4) { animation-delay: 0.35s; }
.fade-up:nth-child(5) { animation-delay: 0.45s; }
.fade-up:nth-child(6) { animation-delay: 0.55s; }

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

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* stagger siblings */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

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

  .section { padding: 80px 0; }
  .hero-content { padding-top: 130px; }

  .timeline { padding-left: 24px; }
  .timeline-dot { left: -28px; }
  .timeline-header { flex-direction: column; gap: 10px; }
  .timeline-meta { text-align: left; }

  .about-highlights { gap: 24px; }
  .scroll-indicator { display: none; }
}

@media (max-width: 500px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .container { padding: 0 20px; }
}