@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&family=Space+Grotesk:wght@400;600;700&display=swap");

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

:root {
  --orange-25: #fff6ed;
  --orange-50: #ffe5d2;
  --orange-100: #ffc89b;
  --orange-200: #ffa664;
  --orange-300: #ff8a32;
  --orange-400: #f66d14;
  --orange-500: #e8580a;
  --orange-600: #c44706;
  --orange-700: #9e3704;
  --contrast: #7dd3fc;
  --ink: #eaf1ff;
  --muted: rgba(234, 241, 255, 0.72);
  --muted-2: rgba(234, 241, 255, 0.58);
  --surface: #101d33;
  --surface-2: #142546;
  --border: rgba(146, 186, 255, 0.18);
  --shadow-1: 0 10px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 22px 60px rgba(0, 0, 0, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #1b2b4a 0%, #0b1220 60%, #070b13 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.72);
  border-bottom: 1px solid rgba(146, 186, 255, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--orange-300);
}

.nav {
  display: flex;
  gap: 20px;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-solid {
  background: linear-gradient(140deg, var(--orange-300), var(--orange-600));
  color: white;
  box-shadow: var(--shadow-1);
}

.btn-ghost {
  background: rgba(234, 241, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--border);
}

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

.hero {
  padding: 80px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 48px;
}

.hero-copy h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 3.6vw, 3.6rem);
  margin: 12px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange-500);
}

.lead {
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-actions,
.about-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.hero-media {
  background: linear-gradient(145deg, rgba(20, 37, 70, 0.75), rgba(7, 11, 19, 0.65));
  border-radius: 32px;
  padding: 24px;
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(146, 186, 255, 0.14);
}

.projects {
  padding: 60px 0 80px;
}

.section-title h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  margin-bottom: 10px;
}

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

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.project-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(146, 186, 255, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2);
}

.project-card h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 10px 0;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 138, 50, 0.15);
  font-weight: 700;
  color: var(--orange-300);
}

.about {
  padding: 70px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
  align-items: center;
}

.about-media {
  background: linear-gradient(160deg, rgba(255, 138, 50, 0.15), rgba(20, 37, 70, 0.7));
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(146, 186, 255, 0.14);
}

.about-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  margin-bottom: 8px;
}

.role {
  color: var(--contrast);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.contact {
  padding: 60px 0 80px;
}

.contact-card {
  background: linear-gradient(130deg, rgba(20, 37, 70, 0.85), rgba(16, 29, 51, 0.85));
  border-radius: 28px;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(146, 186, 255, 0.14);
}

.site-footer {
  padding: 24px 0 40px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-2);
}

.project-hero {
  padding: 80px 0 40px;
  background: radial-gradient(circle at 18% 12%, rgba(255, 138, 50, 0.14), transparent 58%),
    linear-gradient(130deg, rgba(20, 37, 70, 0.92), rgba(11, 18, 32, 0.96));
  border-bottom: 1px solid rgba(146, 186, 255, 0.12);
}

.project-hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  margin-bottom: 12px;
}

.project-content {
  padding: 40px 0 80px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.info-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(146, 186, 255, 0.14);
}

.info-card h3 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 0;
}

.blog-flow {
  line-height: 1.7;
  max-width: 820px;
}

.blog-flow h3,
.blog-flow h4 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 0;
}

.blog-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--contrast);
}

.icon-link .material-symbols-rounded {
  font-size: 20px;
  line-height: 1;
}

.blog-meta {
  color: var(--muted-2);
  font-size: 0.95rem;
  margin-top: -6px;
}

.blog-flow img {
  border-radius: 18px;
  margin: 12px 0;
}

.caption {
  color: var(--muted-2);
  font-size: 0.9rem;
  margin-top: 0;
}

.code-block {
  background: rgba(16, 29, 51, 0.78);
  border: 1px solid rgba(146, 186, 255, 0.14);
  border-radius: 18px;
  box-shadow: var(--shadow-1);
  padding: 18px 20px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}

.code-block pre code {
  background: transparent;
  padding: 0;
  display: block;
}

.code-details {
  margin: 16px 0;
  border: 1px solid rgba(146, 186, 255, 0.14);
  border-radius: 18px;
  background: rgba(16, 29, 51, 0.58);
  overflow: hidden;
}

.code-details summary {
  cursor: pointer;
  padding: 16px 20px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--ink);
}

.code-details .code-block {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
  max-height: 560px;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(125, 211, 252, 0.06);
  margin: 12px 0;
  border: 1px solid rgba(146, 186, 255, 0.12);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stl-viewer {
  background: rgba(16, 29, 51, 0.7);
  border-radius: 24px;
  padding: 16px;
  border: 1px solid rgba(146, 186, 255, 0.14);
  box-shadow: var(--shadow-1);
}

.stl-viewer canvas {
  width: 100%;
  min-height: 360px;
  display: block;
  border-radius: 18px;
}

.simple-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: rgba(16, 29, 51, 0.65);
  box-shadow: var(--shadow-1);
  cursor: zoom-in;
  overflow: hidden;
}

.simple-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(16, 29, 51, 0.65);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.gallery-number {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(7, 11, 19, 0.72);
  border: 1px solid rgba(234, 241, 255, 0.28);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(7, 11, 19, 0.88);
  backdrop-filter: blur(10px);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 82vh;
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  object-fit: contain;
}

.gallery-lightbox p {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(234, 241, 255, 0.28);
  border-radius: 999px;
  background: rgba(16, 29, 51, 0.78);
  color: var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(234, 241, 255, 0.28);
  pointer-events: none;
}

.blog-flow a,
.project-content a {
  color: var(--contrast);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.35);
  text-underline-offset: 3px;
}

.blog-flow a:hover,
.project-content a:hover {
  text-decoration-color: rgba(125, 211, 252, 0.7);
}

.project-hero .collaborator-link {
  color: var(--contrast);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.project-hero .collaborator-link:hover {
  color: var(--orange-300);
  text-decoration-color: rgba(255, 138, 50, 0.75);
}

[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 820px) {
  .nav {
    display: none;
  }

  .hero {
    padding-top: 56px;
  }
}

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