/* ============================================
   lilancatdev — portfolio & contact
   Recreated 1:1 from Figma
   ============================================ */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: 64px;
  position: relative;
  background-image: linear-gradient(135deg, #060e20 0%, #1a1b4b 50%, #2d1b4e 100%),
    linear-gradient(90deg, #ffffff 0%, #ffffff 100%);
  font-family: "Inter", sans-serif;
  color: #c7c4d7;
}

/* Header - Navigation Shell (TopAppBar) */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(11, 19, 38, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px 0 rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Main Content Canvas */
.main {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 80px 16px;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.main--contact {
  gap: 80px;
}

/* ---------- Glass card ---------- */
.glass {
  background: rgba(45, 52, 73, 0.4);
  border: 1px solid rgba(192, 193, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- Hero ---------- */
.hero {
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  padding: 49px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.hero--centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-ring {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 9999px;
  background: #131b2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px 0 rgba(192, 193, 255, 0.1);
  padding: 5px;
}

.avatar-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center;
}

.hero-text {
  flex: 1;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero--centered .hero-text {
  flex: none;
  align-items: center;
}

.hero h1 {
  margin: 0;
  padding-bottom: 8px;
  font-family: "Geist", sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.96px;
  color: #c0c1ff;
  text-shadow: 0 0 15px rgba(192, 193, 255, 0.4);
  word-break: break-word;
}

.hero--centered h1 {
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.9px;
  white-space: nowrap;
}

.hero--centered .tagline {
  white-space: nowrap;
}

.hero h1 .role {
  display: block;
  font-weight: 600;
}

.hero .tagline {
  margin: 0;
  padding-bottom: 16px;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 28px;
  color: #4cd7f6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.hero--centered .hero-actions {
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: #c0c1ff;
  color: #1000a9;
  padding: 12px 24px;
}

.btn--secondary {
  background: #222a3d;
  border: 1px solid rgba(144, 143, 160, 0.3);
  color: #dae2fd;
  padding: 13px 25px;
}

/* ---------- Sections ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header img {
  display: block;
  flex-shrink: 0;
}

.section h2 {
  margin: 0;
  font-family: "Geist", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: #dae2fd;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  border-radius: 12px;
  padding: 25px;
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  margin: 0;
  font-family: "Geist", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 36px;
  color: #c0c1ff;
  word-break: break-word;
}

.project-card .project-desc {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: #c7c4d7;
}

.project-head {
  padding-bottom: 16px;
}

.project-tags {
  display: flex;
  gap: 8px;
  padding-bottom: 24px;
  margin-top: auto;
}

.tag {
  background: #2d3449;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 5px 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 16.5px;
  letter-spacing: 0.55px;
  color: #4cd7f6;
  white-space: nowrap;
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-links a {
  flex: 1;
  min-width: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border: 1px solid rgba(144, 143, 160, 0.2);
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-decoration: none;
  white-space: nowrap;
}

.project-links a.live {
  background: #2d3449;
  color: #dae2fd;
}

.project-links a.source {
  color: #c7c4d7;
}

/* ---------- Skills ---------- */
.skills-row {
  display: flex;
  gap: 16px;
}

.skill-chip {
  flex: 1;
  min-width: 1px;
  background: #222a3d;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 25px 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.skill-chip--tall {
  padding: 17px;
}

.skill-chip img {
  display: block;
  flex-shrink: 0;
}

.skill-chip span {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 20px;
  color: #dae2fd;
  white-space: nowrap;
}

/* Contact page: 2 x 2 skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skills-grid .skill-chip {
  padding: 17px;
  height: 58px;
}

.skills-grid .skill-chip--tall {
  height: 74px;
}

/* ---------- Education ---------- */
.edu-item {
  position: relative;
  border-radius: 12px;
  border-left: 2px solid rgba(192, 193, 255, 0.5);
  padding: 24px 24px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edu-dot {
  position: absolute;
  left: -9px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #0b1326;
  border: 2px solid #c0c1ff;
  box-shadow: 0 0 10px 0 rgba(192, 193, 255, 0.8);
}

.edu-date,
.project-date {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  color: #4cd7f6;
}

.edu-item h3 {
  margin: 0;
  font-family: "Geist", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 30px;
  color: #dae2fd;
}

.edu-desc {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #c7c4d7;
}

/* ---------- Contact card ---------- */
.contact-card {
  border-radius: 16px;
  padding: 49px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 13px 25px;
  background: #222a3d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  color: #dae2fd;
  text-decoration: none;
  white-space: nowrap;
}

.contact-link img {
  display: block;
  flex-shrink: 0;
}

.contact-link--primary {
  background: #c0c1ff;
  border: none;
  color: #1000a9;
  height: 48px;
  padding: 12px 24px;
}

/* ---------- Microinteractions (matched to the Stitch original) ---------- */
/* Tailwind timing: 150ms cubic-bezier(0.4, 0, 0.2, 1) unless noted */

.avatar-ring {
  overflow: hidden;
}

.avatar-ring img {
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-ring:hover img {
  transform: scale(1.05);
}

.btn {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--primary:hover {
  box-shadow: 0 0 20px rgba(192, 193, 255, 0.3);
}

.btn--secondary:hover {
  background: #2d3449;
  border-color: rgba(144, 143, 160, 0.6);
}

.project-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 193, 255, 0.4);
  box-shadow: 0 10px 40px rgba(192, 193, 255, 0.1);
}

.project-links a {
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.project-links a.live:hover {
  color: #c0c1ff;
}

.project-links a.source:hover {
  background: #2d3449;
  color: #dae2fd;
}

.skill-chip {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-chip:hover {
  background: #2d3449;
  border-color: rgba(192, 193, 255, 0.3);
}

.skill-chip img {
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-chip:hover img {
  transform: scale(1.1);
}

.edu-item {
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.edu-item:hover {
  background: rgba(45, 52, 73, 0.3);
}

/* Contact page links — same language as the hero buttons */
.contact-link {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-link:hover {
  background: #2d3449;
  border-color: rgba(144, 143, 160, 0.6);
}

.contact-link--primary:hover {
  background: #c0c1ff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(192, 193, 255, 0.3);
}

/* ---------- Hide scrollbars (touch-device look inside the iPad shell) ---------- */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  display: none;
}

/* ---------- Page transitions ---------- */
body {
  animation: page-enter 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

body.page-exit {
  animation: page-exit 230ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes page-exit {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

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

/* ---------- Responsive (portfolio page below tablet width) ---------- */
@media (max-width: 820px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero .hero-text {
    flex: none;
    align-items: center;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.9px;
    white-space: nowrap;
  }

  .hero .tagline {
    white-space: nowrap;
  }

  .hero-actions {
    justify-content: center;
    width: auto;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-chip {
    padding: 17px;
  }
}
