:root {
  --bg: #08111b;
  --bg-2: #0f1725;
  --text: #eef5ff;
  --muted: #c3d2e8;
  --line: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --highlight: rgba(255, 255, 255, 0.28);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(118, 184, 255, 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(122, 239, 255, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.025), rgba(255,255,255,0.025)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.035)' stroke-width='1'%3E%3Cpath d='M0 80h160M80 0v160'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.55;
  pointer-events: none;
}

.background-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.glow-one {
  background: #5ec5ff;
  top: -8rem;
  left: -8rem;
}

.glow-two {
  background: #8e9bff;
  right: -10rem;
  top: 18rem;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(calc(100% - 2rem), var(--max));
  margin: 1rem auto 0;
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 1rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand,
.nav-links a,
.project-links a,
.button {
  text-decoration: none;
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.nav-links a {
  color: var(--muted);
  font-weight: 500;
}

.nav-links a:hover,
.project-links a:hover {
  color: white;
}

main {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.section {
  padding: 2.5rem 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.25rem;
  align-items: stretch;
  min-height: 75vh;
}

.hero-text,
.hero-photo,
.card,
.project-card {
  padding: 1.5rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: #dbe9ff;
  opacity: 0.85;
}

h1,
h2,
h3,
p,
li {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

p,
li {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 60ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.button.secondary {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.hero-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    radial-gradient(circle at 50% 20%, rgba(60, 140, 255, 0.22), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(0, 80, 200, 0.16), transparent 65%);
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 8% 10%;
  border-radius: 2rem;
  background: radial-gradient(circle, rgba(70, 160, 255, 0.30), transparent 65%);
  filter: blur(32px);
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.02)
  );
  pointer-events: none;
  z-index: 0;
}

.profile-photo {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 38px rgba(70, 160, 255, 0.22),
    0 0 70px rgba(30, 110, 255, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.18);
  filter: brightness(1.03) saturate(1.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
}

.hero-photo:hover .profile-photo {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.38),
    0 0 50px rgba(70, 160, 255, 0.32),
    0 0 90px rgba(30, 110, 255, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.22);
  filter: brightness(1.06) saturate(1.08);
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 1.6rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.clean-list {
  padding-left: 1.15rem;
  margin-bottom: 0;
}

.section-heading {
  margin-bottom: 1.15rem;
}

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

.project-card {
  min-height: 100%;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.single-project {
  grid-template-columns: 1fr;
}

.project-placeholder {
  max-width: 48rem;
}

.project-card:hover,
.card:hover {
  transform: translateY(-4px);
  border-color: var(--highlight);
  background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06));
}

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

.project-links a {
  color: #f2f7ff;
  font-weight: 600;
}

.site-footer {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 0 0 2rem;
}

.site-footer p {
  text-align: center;
  color: rgba(233, 240, 252, 0.7);
}

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

  .reveal,
  .reveal.visible,
  .project-card:hover,
  .card:hover,
  .button:hover {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

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

  .hero {
    min-height: auto;
  }

  .site-header {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.9rem;
  }

  .nav-links {
    gap: 0.65rem;
    font-size: 0.95rem;
  }

  .hero-text,
  .hero-photo,
  .card,
  .project-card {
    padding: 1.15rem;
  }

  .section {
    padding: 1.75rem 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    filter 0.7s ease;
  will-change: opacity, transform, filter;
}

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

.card a {
  color: #f2f7ff;
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  color: white;
  text-decoration: underline;
}

.laptop-panel {
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

.laptop-panel::before {
  content: none;
}

.laptop-glow {
  position: absolute;
  left: 50%;
  bottom: 3.2rem;
  width: 13rem;
  height: 5rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(55, 145, 255, 0.34), transparent 72%);
  filter: blur(24px);
  opacity: 0.95;
  pointer-events: none;
}

.laptop {
  position: relative;
  width: min(100%, 280px);
  display: grid;
  place-items: center;
}

.laptop-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 10 / 7;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
    linear-gradient(135deg, rgba(10,18,34,0.94), rgba(5,10,20,0.98));
  box-shadow:
    0 18px 36px rgba(0,0,0,0.28),
    0 0 34px rgba(70,160,255,0.18),
    inset 0 1px 0 rgba(255,255,255,0.14);
  overflow: hidden;
  transform-origin: bottom center;
  transform: perspective(900px) rotateX(82deg) translateY(16px) scale(0.96);
}

.camera-dot {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  width: 0.36rem;
  height: 0.36rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(220,238,255,0.7);
}

.code-lines {
  position: absolute;
  inset: 1.3rem 1.1rem 1rem;
  display: grid;
  align-content: center;
  gap: 0.68rem;
}

.code-line {
  display: block;
  height: 0.42rem;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      rgba(170,220,255,0.95),
      rgba(85,165,255,0.84) 60%,
      rgba(255,255,255,0.22)
    );
  box-shadow:
    0 0 12px rgba(70,160,255,0.22),
    0 0 24px rgba(40,120,255,0.10);
  opacity: 0.88;
}

.code-line.w-80 { width: 80%; }
.code-line.w-55 { width: 55%; }
.code-line.w-68 { width: 68%; }
.code-line.w-42 { width: 42%; }

.laptop-base {
  position: relative;
  width: 112%;
  height: 1rem;
  margin-top: -0.1rem;
  border-radius: 0 0 1.2rem 1.2rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05)),
    linear-gradient(180deg, rgba(20,30,46,0.92), rgba(7,11,20,0.98));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 12px 24px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.16);
}

.trackpad {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.2rem;
  height: 0.36rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(210,230,255,0.18);
}

.reveal.visible .laptop {
  animation: laptop-float-twist 5s ease-in-out 1s infinite;
  transform-origin: center center;
}

.reveal.visible .laptop-screen {
  animation: laptop-open 0.95s cubic-bezier(.2,.8,.2,1) 0.08s forwards;
}

.reveal.visible .code-line {
  animation: code-pulse 2.6s ease-in-out infinite;
}

.reveal.visible .code-line:nth-child(2) { animation-delay: 0.2s; }
.reveal.visible .code-line:nth-child(3) { animation-delay: 0.4s; }
.reveal.visible .code-line:nth-child(4) { animation-delay: 0.6s; }

@keyframes laptop-open {
  0% {
    transform: perspective(900px) rotateX(82deg) translateY(16px) scale(0.96);
    opacity: 0.4;
  }
  100% {
    transform: perspective(900px) rotateX(18deg) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes laptop-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes code-pulse {
  0%, 100% {
    opacity: 0.72;
    transform: scaleX(0.96);
    filter: brightness(0.95);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
    filter: brightness(1.12);
  }
}
@keyframes laptop-float-twist {
  0%, 82%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  40% {
    transform: translateY(-8px) rotate(0deg) scale(1);
  }

  88% {
    transform: translateY(-6px) rotate(-4deg) scale(1.01);
  }

  92% {
    transform: translateY(-6px) rotate(4deg) scale(1.01);
  }

  96% {
    transform: translateY(-3px) rotate(-2deg) scale(1);
  }
}

@media (max-width: 640px) {
  .laptop-panel {
    min-height: 240px;
  }

  .laptop {
    width: min(100%, 220px);
  }
}
