/* Aerospace Minimal Design System */

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

:root {
  /* Core Colors */
  --bg-main: #f6f8fb;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-solid: #ffffff;

  --text-main: #0b1220;
  --text-muted: #566276;

  /* Accent Palette */
  --color-cyan: #4bb8ff;
  --color-pink: #ff7a8a;
  --color-violet: #6a7cf7;
  --color-indigo: #2f50d6;

  --accent: var(--color-cyan);
  --grad-aurora: linear-gradient(135deg, #e6f4ff 0%, #eef2ff 50%, #ffffff 100%);

  --border-dim: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.2);

  --shadow-soft: 0 12px 36px rgba(10, 20, 40, 0.08);
  --shadow-lift: 0 18px 55px rgba(10, 20, 40, 0.12);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;

  /* Layout */
  --bento-gap: 28px;
  --container-width: 1180px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Background Atmosphere */
.mesh-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(75, 184, 255, 0.25), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(106, 124, 247, 0.2), transparent 55%),
    radial-gradient(800px 480px at 70% 100%, rgba(255, 122, 138, 0.18), transparent 55%),
    linear-gradient(180deg, #f5f8ff 0%, #f9fbff 60%, #ffffff 100%);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
  opacity: 0;
  visibility: hidden;
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--color-cyan);
  border-radius: 50%;
  z-index: 10000;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.cursor-outline {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(75, 184, 255, 0.6);
  border-radius: 50%;
  z-index: 10000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.custom-cursor,
body.custom-cursor * {
  cursor: none;
}

body.custom-cursor .cursor-dot,
body.custom-cursor .cursor-outline {
  opacity: 1;
  visibility: visible;
}

body:hover .cursor-outline.hovered {
  width: 48px;
  height: 48px;
  background-color: rgba(75, 184, 255, 0.08);
  border-color: transparent;
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 48px;
}

.page {
  padding-top: 24px;
  padding-bottom: 60px;
}

.section {
  margin-top: 80px;
}

.section:first-of-type {
  margin-top: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 36px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.count-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border-dim);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.text-link {
  color: var(--color-indigo);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.text-link:hover {
  color: var(--text-main);
}

/* Navbar */
.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 0 24px;
  gap: 20px;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-main);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  padding: 6px 10px;
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--border-dim);
}

/* Grid Systems */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(100px, auto);
  gap: var(--bento-gap);
  margin-bottom: 80px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--bento-gap);
}

/* Card */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.45), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.bento-card > * {
  position: relative;
  z-index: 1;
}

.bento-card:hover {
  border-color: rgba(75, 184, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* Hero */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--bento-gap);
  align-items: stretch;
  margin-bottom: 80px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
  overflow: visible;
}

.hero-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(75, 184, 255, 0.35) 0%, rgba(75, 184, 255, 0.05) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-orbit {
  position: absolute;
  top: 42%;
  right: 22%;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 1px solid rgba(75, 184, 255, 0.3);
  box-shadow: 0 0 20px rgba(75, 184, 255, 0.2);
  pointer-events: none;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-cyan);
  box-shadow: 0 0 16px rgba(75, 184, 255, 0.5);
}

.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  margin-bottom: 18px;
  line-height: 1.05;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  margin-bottom: 28px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 520px;
  margin-bottom: 36px;
  font-size: 1.1rem;
}

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

.hero-aside {
  display: grid;
  gap: var(--bento-gap);
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tech-icon {
  width: 32px;
  height: 32px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

.tech-icon:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
}

/* Typography Helpers */
.display-text {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
}

.text-xl {
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  letter-spacing: -0.02em;
}

.text-lg {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
}

.text-md {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.sub-text {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.body-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.text-gradient {
  background: linear-gradient(120deg, #2f50d6 0%, #4bb8ff 60%, #7bd5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Components */
.skill-tag {
  font-size: 0.8rem;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border-dim);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background: rgba(75, 184, 255, 0.12);
  border-color: rgba(75, 184, 255, 0.5);
  transform: translateY(-2px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: linear-gradient(120deg, #2f50d6 0%, #4bb8ff 100%);
  color: white;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 12px 30px rgba(47, 80, 214, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(47, 80, 214, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-main);
  border: 1px solid var(--border-dim);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.9);
}

.btn-magnetic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  border: 1px solid var(--border-dim);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn-magnetic:hover {
  transform: translateY(-2px);
  border-color: rgba(75, 184, 255, 0.6);
  box-shadow: var(--shadow-lift);
}

/* Publications */
.publication-row {
  display: grid;
  grid-template-columns: 100px 1fr 150px;
  align-items: center;
  gap: 20px;
}

.publication-body {
  padding-right: 40px;
}

.publication-actions {
  text-align: right;
}

.publication-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.publication-tags span {
  color: var(--text-muted);
  text-transform: uppercase;
}

.publication-tags span:first-child {
  color: var(--color-indigo);
  border: 1px solid rgba(47, 80, 214, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
}

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

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
}

.skill-card img {
  margin-bottom: 14px;
  transition: transform 0.3s;
}

.skill-card:hover img {
  transform: translateY(-4px) scale(1.03);
}

/* About */
.about-card {
  padding: 52px;
}

.about-grid {
  max-width: 860px;
}

.book-text p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 22px;
  max-width: 100%;
  text-align: left;
}

.experience-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 28px;
}

/* Contact */
.contact-card {
  padding: 48px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.contact-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 184, 255, 0.35), rgba(75, 184, 255, 0.05));
  filter: blur(0.5px);
  margin-bottom: 20px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

/* Footer */
.site-footer {
  margin-top: 120px;
  padding: 36px 0 20px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-card,
  .contact-card {
    padding: 32px;
  }
}

@media (max-width: 900px) {
  .nav-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .bento-card {
    padding: 24px;
    border-radius: 18px;
  }

  .hero-card {
    min-height: auto;
  }

  .hero-orbit {
    display: none;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .publication-row {
    grid-template-columns: 1fr;
  }

  .publication-actions {
    text-align: left;
  }

  .publication-body {
    padding-right: 0;
  }

  .experience-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-outline {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
