:root {
  --bg: #07101f;
  --bg-deep: #040916;
  --surface: rgba(14, 25, 48, 0.76);
  --surface-strong: rgba(17, 31, 59, 0.94);
  --text: #f7faff;
  --muted: #a9b8d3;
  --line: rgba(177, 215, 255, 0.14);
  --line-strong: rgba(190, 226, 255, 0.26);
  --blue: #3ac7ff;
  --blue-dark: #327dff;
  --pink: #ff55b5;
  --violet: #9d7bff;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  --mouse-x: 50%;
  --mouse-y: 24%;
}

body.light {
  --bg: #eef7ff;
  --bg-deep: #e7f2ff;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --text: #13203a;
  --muted: #65738d;
  --line: rgba(38, 91, 151, 0.13);
  --line-strong: rgba(38, 91, 151, 0.24);
  --shadow: 0 18px 46px rgba(54, 102, 162, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(58, 199, 255, 0.12), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(255, 85, 181, 0.07), transparent 25%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  transition: color 0.3s ease, background 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

body.light::before { opacity: 0.035; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.background-glow,
.pointer-light {
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

.background-glow {
  width: 390px;
  height: 390px;
  border-radius: 50%;
  filter: blur(105px);
  opacity: 0.12;
}

.glow-blue {
  top: 3%;
  left: -120px;
  background: var(--blue);
  animation: driftBlue 20s ease-in-out infinite;
}

.glow-pink {
  right: -130px;
  bottom: 5%;
  background: var(--pink);
  animation: driftPink 24s ease-in-out infinite;
}

.pointer-light {
  inset: 0;
  opacity: 0.46;
  background: radial-gradient(circle 280px at var(--mouse-x) var(--mouse-y), rgba(105, 205, 255, 0.08), transparent 67%);
}

@keyframes driftBlue {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(80px, 45px, 0); }
}

@keyframes driftPink {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-75px, -55px, 0); }
}

.site-header,
.hero-portrait,
.gloss-card,
.project-card,
.connect-card,
.hero-links a,
.social-grid a,
.profile-label {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015)),
    var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(1080px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.96rem;
  line-height: 1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 650;
}

.nav-links a { transition: color 0.18s ease; }
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }

.theme-toggle {
  width: 39px;
  height: 39px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  cursor: pointer;
}

.theme-toggle .moon-icon { display: none; }
body.light .theme-toggle .sun-icon { display: none; }
body.light .theme-toggle .moon-icon { display: block; }

.section-shell,
footer {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.section-shell { padding: 82px 0; }

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: 48px;
  padding-top: 60px;
}

.eyebrow {
  margin: 0 0 17px;
  color: #72d3ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

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

h1 {
  max-width: 650px;
  margin-bottom: 20px;
  font-size: clamp(4rem, 6vw, 5.75rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #69d9ff 3%, #7199ff 51%, #ff76c4 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-text {
  max-width: 610px;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.15rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.button,
.project-button {
  padding: 13px 18px;
  border-radius: 15px;
  font-weight: 750;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.project-button:hover { transform: translateY(-2px); }

.button.primary {
  color: white;
  background: linear-gradient(135deg, #28c6ff, #397fff 58%, #9d63ff);
  box-shadow: 0 13px 29px rgba(43, 126, 255, 0.28), inset 0 1px rgba(255,255,255,0.42);
}

.button.secondary,
.project-button {
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 21px;
}

.hero-links a {
  min-height: 44px;
  padding: 7px 12px 7px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 15px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.hero-links img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.hero-links a:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.hero-portrait {
  position: relative;
  height: 500px;
  overflow: hidden;
  display: grid;
  place-items: end center;
  border-radius: 32px;
  isolation: isolate;
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 24px;
  pointer-events: none;
}

.portrait-glow {
  position: absolute;
  top: 45px;
  left: 50%;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(60, 199, 255, 0.35), rgba(71, 121, 255, 0.08) 55%, transparent 72%);
  transform: translateX(-50%);
  filter: blur(15px);
  z-index: -1;
}

.hero-profile {
  width: min(330px, 84%);
  max-height: 455px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 24px 24px rgba(0,0,0,0.27));
}

.profile-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #62efa1;
  box-shadow: 0 0 14px rgba(98, 239, 161, 0.76);
}

.profile-label div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-label small {
  color: var(--muted);
  font-size: 0.74rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2,
.connect-copy h2 {
  margin-bottom: 13px;
  font-size: clamp(2.25rem, 4.1vw, 3.85rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.section-copy {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.01rem;
  line-height: 1.7;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gloss-card {
  position: relative;
  min-height: 255px;
  padding: 24px;
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gloss-card::before,
.project-card::before,
.connect-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,0.12), transparent 25%, transparent 75%, rgba(75,164,255,0.06));
  opacity: 0.68;
}

.card-icon {
  width: 82px;
  height: 82px;
  margin-bottom: 26px;
  display: grid;
  place-items: center;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 15px rgba(0,0,0,0.2));
}

.card-icon.cloud-icon { padding: 7px; }

.gloss-card h3,
.project-card h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.gloss-card p,
.project-card p,
.connect-copy > p,
footer p {
  color: var(--muted);
  line-height: 1.67;
}

.gloss-card:hover,
.project-card:hover,
.social-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  min-height: 445px;
  padding: 19px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-art {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.018));
}

.project-art .art-glow {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.3;
  background: #2ac5ff;
}

.rocket-art .art-glow { background: #4b7dff; }

.project-art img {
  position: relative;
  z-index: 1;
  width: min(185px, 55%);
  height: 185px;
  object-fit: contain;
  filter: drop-shadow(0 17px 20px rgba(0,0,0,0.24));
}

.cloudlab-art img { width: min(175px, 51%); }

.project-content {
  position: relative;
  z-index: 1;
  padding: 20px 6px 5px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.project-content h3 {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
}

.project-content p {
  max-width: 500px;
  margin-bottom: 20px;
}

.project-button {
  width: fit-content;
  margin-top: auto;
}

.connect-card {
  position: relative;
  padding: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(390px, 1.15fr);
  align-items: center;
  gap: 34px;
  border-radius: 28px;
}

.connect-copy {
  position: relative;
  z-index: 1;
}

.connect-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.connect-identity > img {
  width: 104px;
  height: 126px;
  object-fit: contain;
  object-position: bottom;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(63, 198, 255, 0.15), rgba(255,255,255,0.025));
  border: 1px solid var(--line);
}

.connect-identity .eyebrow { margin-bottom: 9px; }
.connect-identity h2 { margin-bottom: 0; }

.social-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.social-grid a {
  min-height: 78px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.17);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.social-grid a img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.social-grid a span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-grid small {
  color: var(--muted);
  font-size: 0.79rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

footer {
  padding: 31px 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.8rem;
}

footer p { margin-bottom: 0; }

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

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

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 96px;
  }

  .hero-copy { max-width: 760px; }
  .hero-portrait { height: 500px; }
  .hero-profile { width: min(350px, 72%); }

  .about-grid { grid-template-columns: 1fr; }
  .gloss-card { min-height: 0; }

  .connect-card {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .section-shell,
  footer {
    width: calc(100% - 24px);
  }

  .site-header {
    top: 8px;
    margin-top: 8px;
    padding: 10px 11px;
  }

  .nav-links { display: none; }
  .section-shell { padding: 66px 0; }

  h1 {
    font-size: clamp(3.1rem, 16vw, 4.9rem);
  }

  .hero {
    gap: 28px;
    padding-top: 86px;
  }

  .hero-portrait {
    height: 440px;
    border-radius: 27px;
  }

  .hero-profile {
    width: min(315px, 86%);
    max-height: 405px;
  }

  .profile-label {
    left: 14px;
    bottom: 14px;
  }

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

  .project-card {
    min-height: 0;
  }

  .project-art {
    min-height: 210px;
  }

  .connect-card,
  .gloss-card,
  .project-card {
    padding: 20px;
  }

  .connect-identity {
    align-items: flex-end;
  }

  .connect-identity > img {
    width: 82px;
    height: 103px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pointer-light { display: none; }
}

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

  .reveal,
  .background-glow,
  .pointer-light,
  .button,
  .project-button,
  .gloss-card,
  .project-card,
  .social-grid a,
  .hero-links a {
    transition: none !important;
    animation: none !important;
  }
}
