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

/* Target cursor */
.target-cursor-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.target-cursor-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.target-cursor-corner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  will-change: transform;
}

.corner-tl { transform: translate(-150%, -150%); border-right: none; border-bottom: none; }
.corner-tr { transform: translate(50%, -150%);  border-left: none;  border-bottom: none; }
.corner-br { transform: translate(50%, 50%);    border-left: none;  border-top: none;    }
.corner-bl { transform: translate(-150%, 50%);  border-right: none; border-top: none;    }

body {
  margin: 0;
  background-color: #161616;
  font-family: 'Inter', sans-serif;
  color: white;
  overflow: hidden;
}

.wrapper {
  display: flex;
  height: 100vh;
}

/* Left: fixed name + nav panel */
header {
  width: 440px;
  min-width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 100px 48px 20px;
  position: relative;
  overflow: hidden;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}

.subtitle {
  margin: 0.65em 0 0;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: #777;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

.subtitle:hover {
  color: #aaa;
}

.side-nav {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.side-nav a {
  color: #555;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  position: relative;
  z-index: 0;
  transition: color 0.35s ease, opacity 0.35s ease;
}

.side-nav a::before {
  content: "";
  background: linear-gradient(
    45deg,
    #4F8EF7, #7C5CBF, #4F8EF7, #7C5CBF, #4F8EF7
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  filter: blur(7px);
  animation: glowing 20s linear infinite;
  transition: opacity 0.35s ease-in-out;
  border-radius: 6px;
  opacity: 0;
}

.side-nav a[href="#about"]::before {
  background-image: linear-gradient(
    45deg,
    #cccccc, #a0a0a0,#8e8d8d, #565555, #8e8d8d, #a0a0a0, #cccccc 
  );
  animation: glowing 20s linear infinite;
}

.side-nav a[href="#contact"]::before {
  background-image: linear-gradient(
    45deg,
   #4F8EF7, #e100ffb1, #4F8EF7, #e100ffb1, #4F8EF7
  );
  animation: glowing 20s linear infinite;
}

.side-nav a:hover,
.side-nav a.active {
  color: #fff;
}

.side-nav a:hover::before,
.side-nav a.active::before {
  opacity: 0.5;
}

.side-nav:has(a:hover) a.active:not(:hover) {
  color: #444;
}

.side-nav:has(a:hover) a.active:not(:hover)::before {
  opacity: 0.1;
}

/* Vertical divider */
.divider {
  width: 1px;
  position: relative;
  background: linear-gradient(
    to bottom,
    #4F8EF7,
    #7C5CBF,
    #4F8EF7
  );
  background-size: 100% 200%;
  animation: divider-scroll 120s linear infinite;
  flex-shrink: 0;
}

.divider-overlay {
  position: absolute;
  inset: 0;
  background-size: 100% 200%;
  animation: divider-scroll 120s linear infinite;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.divider::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 100%;
  background: inherit;
  background-size: 100% 200%;
  animation: divider-scroll 20s linear infinite;
  filter: blur(6px);
  opacity: 0.3;
}

@keyframes divider-glow {
  0%   { background-position: 0 0; }
  50%  { background-position: 0 400%; }
  100% { background-position: 0 0; }
}

@keyframes divider-scroll {
  from { background-position: 0 0%; }
  to   { background-position: 0 100%; }
}

/* Right: scrollable content */
.container {
  position: relative;
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  padding: 0 60px;
}

.container::-webkit-scrollbar {
  width: 0;
}

/* Sections */
.section {
  width: 100%;
  max-width: 860px;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#contact {
  position: relative;
  z-index: 1;
}

.section.visible {
  opacity: 1;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #242424;
  position: relative;
  transition: border-bottom-color 0.4s ease;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  opacity: 0;
  transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

.wrapper:has(.timeline-item[data-tag="research"]:hover) #experience .section-title {
  border-bottom-color: #ffffff;
}
.wrapper:has(.timeline-item[data-tag="research"]:hover) #experience .section-title::after {
  opacity: 0.3T;
  filter: blur(10px);
  background: #ffffff;
  box-shadow: 0 0 8px 3px rgba(255, 255, 255, 0.4);
}

.wrapper:has(.timeline-item[data-tag="founder"]:hover) #experience .section-title {
  border-bottom-color: #5f7ae8;
}
.wrapper:has(.timeline-item[data-tag="founder"]:hover) #experience .section-title::after {
  opacity: 0.4;
  filter: blur(10px);
  background: #5f7ae8;
  box-shadow: 0 0 8px 3px rgba(99, 92, 191, 0.8);
}

.wrapper:has(.timeline-item[data-tag="leadership"]:hover) #experience .section-title {
  border-bottom-color: #7c5cbf;
}
.wrapper:has(.timeline-item[data-tag="leadership"]:hover) #experience .section-title::after {
  opacity: 0.5;
  filter: blur(10px);
  background: #7c5cbf;
  box-shadow: 0 0 8px 3px rgba(124, 92, 191, 0.8);
}

.wrapper:has(.contact-item:hover) #contact .section-title {
  border-bottom-color: rgba(225, 0, 255, 0.55);
}
.wrapper:has(.contact-item:hover) #contact .section-title::after {
  opacity: 0.4;
  filter: blur(10px);
  background: #e100ff;
  box-shadow: 0 0 8px 3px rgba(225, 0, 255, 0.5);
}

/* About */
.about-text {
  font-size: 1rem;
  line-height: 1.85;
  color: #bbb;
  font-weight: 300;
  margin: 0;
}

/* Project cards */
.projects-pager {
  position: relative;
  width: 100%;
}

.card-grid-viewport {
  width: 100%;
  overflow: hidden;
}

.card-grid-pages {
  display: flex;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-grid {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-content: start;
}

.project-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #272727;
  background: #1a1a1a;
  color: #999;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
  z-index: 2;
}

.project-arrow-left {
  left: -50px;
}

.project-arrow-right {
  right: -50px;
}

.project-arrow:hover {
  border-color: #5f7ae8;
  color: #fff;
  background-color: #202020;
}

.project-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.project-arrow:disabled:hover {
  border-color: #272727;
  color: #999;
  background-color: #1a1a1a;
}

.project-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.project-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #333;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.project-dot:hover {
  background: #555;
}

.project-dot.active {
  background: #5f7ae8;
  transform: scale(1.2);
}

.card {
  border: 1px solid #272727;
  border-radius: 12px;
  padding: 22px;
  position: relative;
  z-index: 0;
  cursor: none;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
}

.card:hover {
  border-color: #383838;
}

.card::after {
  content: "";
  z-index: -1;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #1c1c1c;
  left: 0;
  top: 0;
  border-radius: 11px;
  transition: background-color 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::after {
  background-color: #202020;
}

.card::before {
  content: "";
  background: linear-gradient(
    45deg,
    #4F8EF7, #7C5CBF, #4F8EF7, #7C5CBF, #4F8EF7
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  filter: blur(10px);
  animation: glowing-rtl 30s ease-in-out infinite alternate;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  opacity: 0;
  will-change: opacity;
}

.card:hover::before {
  opacity: 0.6;
}


@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

@keyframes glowing-rtl {
  0% { background-position: 400% 0; }
  50% { background-position: 0 0; }
  100% { background-position: 400% 0; }
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.card-tags {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
  background: linear-gradient(45deg, #4F8EF7, #7C5CBF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card p:last-child {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.65;
  margin: 0;
}

/* Experience timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.45rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: #555;
  letter-spacing: 0.04em;
}

.timeline-tag-research {
  font-size: 0.68rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.timeline-tag-founder {
  font-size: 0.68rem;
  color: #5f7ae8;
  background: rgba(99, 92, 191, 0.16);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.timeline-tag-leadership {
  font-size: 0.68rem;
  color: #8869cc;
  background: rgba(123, 92, 191, 0.22);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  font-weight: 500;
}


.timeline-item {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, opacity 0.4s ease;
  transform-origin: left center;
}

.timeline-item::after {
  content: "↳";
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  color: #383838;
  font-size: 1rem;
  transition: color 0.25s ease, left 0.25s ease;
}

.timeline-item:hover {
  transform: scale(1.05);
}

#experience:has(.timeline-item:hover) .timeline-item:not(:hover) {
  opacity: 0.35;
  transform: scale(1);
}

.timeline-item:hover::after {
  color: #666;
  left: -28px;
}

.timeline-item h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-company {
  font-size: 0.82rem;
  text-decoration: none;
  color: #4f8ef7;
  margin: 0 0 0.55rem;
}

.timeline-item p:last-child {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.65;
  margin: 0;
}




/* Contact */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  padding: 16px 20px;
  background: #1a1a1a;
  border: 1px solid #272727;
  border-radius: 10px;
  position: relative;
  z-index: 0;
  transition: border-color 0.5s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-item::before {
  content: "";
  background: linear-gradient(45deg, #464646, #2b1c36, #464646, #2b1c36, #464646);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  filter: blur(10px);
  animation: glowing-rtl 60s ease-in-out infinite alternate;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-item::after {
  content: "→";
  position: absolute;
  right: 20px;
  color: #444;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.contact-item:hover {
  border-color: rgba(225, 0, 255, 0.45);
  background-color: #1e1e1e;
  box-shadow:
    0 0 12px rgba(225, 0, 255, 0.2),
    0 0 30px rgba(225, 0, 255, 0.08),
    inset 0 0 12px rgba(247, 247, 247, 0.03);
}

.contact-item:hover::before {
  opacity: 0.45;
}

.contact-item:hover::after {
  opacity: 0;
  transform: translateX(0);
  color: #666;
}

.contact-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  min-width: 58px;
  color: #777;
}

.contact-value {
  font-size: 0.875rem;
  color: #aaa;
  transition: color 0.3s ease;
}

.contact-item:hover .contact-value {
  color: #ddd;
}
