:root {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --surface: #1e293b;
  --surface-strong: #374151;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --primary: #3b82f6;
  --secondary: #06b6d4;
  --emerald: #10b981;
  --border: rgba(59, 130, 246, 0.35);
  --shadow: 0 16px 40px rgba(2, 6, 23, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(130deg, #0f172a 10%, #111827 45%, #0b1220 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 0.85rem;
  border-radius: 0.4rem;
  z-index: 999;
}

.skip-link:focus {
  left: 0.9rem;
  top: 0.9rem;
}

.bg-orb {
  position: fixed;
  width: 20rem;
  height: 20rem;
  border-radius: 999px;
  filter: blur(64px);
  opacity: 0.26;
  pointer-events: none;
  z-index: -2;
}

.orb-one {
  background: radial-gradient(circle, var(--primary), transparent 70%);
  top: -9rem;
  right: -6rem;
  animation: floatOrb 12s ease-in-out infinite;
}

.orb-two {
  background: radial-gradient(circle, var(--secondary), transparent 70%);
  left: -8rem;
  top: 45vh;
  animation: floatOrb 16s ease-in-out infinite reverse;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 2.1rem 2.1rem;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, -22px); }
}

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

.section {
  padding: 5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.55));
  border-block: 1px solid rgba(6, 182, 212, 0.16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background-color: rgba(15, 23, 42, 0.74);
  border-bottom: 1px solid rgba(59, 130, 246, 0.22);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.logo-dot {
  color: var(--secondary);
}

.site-nav {
  display: flex;
  gap: 1.1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.site-nav a:hover {
  color: var(--text);
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.45);
}

.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.45);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}

.hero {
  padding-top: 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: 0.4px;
  animation: pulseText 4s ease-in-out infinite;
}

@keyframes pulseText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #f8fafc 0%, #93c5fd 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: heroGradientShift 8s ease infinite;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  margin-bottom: 1rem;
}

.subsection-title {
  margin-top: 2rem;
}

h3 {
  margin-bottom: 0.65rem;
}

.hero-text,
.section-text {
  color: var(--muted);
  max-width: 68ch;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.34);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.36);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(30, 41, 59, 0.35);
}

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

.hero-card,
.project-card,
.timeline-item {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  --lift: 0px;
  --rx: 0deg;
  --ry: 0deg;
  transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-card:hover,
.project-card:hover,
.timeline-item:hover {
  --lift: -4px;
  border-color: rgba(6, 182, 212, 0.52);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.68);
}

.profile-wrap {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  margin: 0 auto 1rem;
  padding: 3px;
  background: linear-gradient(130deg, var(--primary), var(--secondary), var(--emerald));
  animation: profilePulse 3.5s ease-in-out infinite;
}

@keyframes profilePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.32);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(6, 182, 212, 0.08);
    transform: scale(1.02);
  }
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 3px solid rgba(15, 23, 42, 0.9);
}

.hero-card ul {
  margin-top: 0.8rem;
  padding-left: 1rem;
  color: var(--muted);
}

.chip-grid {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chip {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9), rgba(55, 65, 81, 0.9));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.chip:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--secondary);
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.2);
}

.project-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.timeline {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.timeline-item p,
.project-card p {
  color: var(--muted);
}

.project-card p {
  margin-bottom: 0.8rem;
}

.project-card a,
.contact-links a {
  color: #93c5fd;
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.project-card a::after,
.site-nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.28s ease;
}

.project-card a:hover::after,
.site-nav a:hover::after {
  width: 100%;
}

.project-card a:hover,
.contact-links a:hover {
  color: #67e8f9;
  text-shadow: 0 0 10px rgba(103, 232, 249, 0.4);
}

.contact-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer {
  border-top: 1px solid rgba(59, 130, 246, 0.25);
  padding: 1.3rem 0 2rem;
  color: var(--muted);
}

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

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

@keyframes heroGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .menu-btn {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 4%;
    width: min(280px, 92vw);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
    flex-direction: column;
    display: none;
  }

  .site-nav.open {
    display: flex;
  }
}
