/* ============================================
   Reset & Base
   ============================================ */

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

:root {
  --bg: #121212;
  --bg-elevated: #1a1a1a;
  --text: #eeeeee;
  --text-muted: #777777;
  --text-secondary: #999999;
  --border: #333333;
  --gradient-start: #F743B6;
  --gradient-end: #FCC043;
  --font: 'Recursive', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  cursor: crosshair;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-variation-settings: 'MONO' 1, 'CASL' 0;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   Vertical Marquees
   ============================================ */

.marquee {
  position: fixed;
  top: 0;
  width: 80px;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
  opacity: 0.25;
  pointer-events: none;
}

.marquee-left {
  left: 0;
}

.marquee-right {
  right: 0;
}


.marquee-track {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.marquee-left .marquee-track {
  animation: marqueeDown 40s linear infinite;
}

.marquee-right .marquee-track {
  animation: marqueeUp 40s linear infinite;
}

.marquee-track span {
  display: block;
  writing-mode: vertical-lr;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1.3rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  padding: 2rem 0;
  margin: 0 auto;
}

@keyframes marqueeDown {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

@keyframes marqueeUp {
  0% { transform: translateY(0%); }
  100% { transform: translateY(-50%); }
}

/* Hide marquees on narrow screens */
@media (max-width: 768px) {
  .marquee {
    display: none;
  }
}

/* ============================================
   Load Animations
   ============================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dotPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.hero-title,
.social-links {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
  animation-delay: 0.9s;
}

.social-links {
  animation-delay: 1.1s;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 14vh 2rem 8vh;
  position: relative;
}

.hero-name {
  font-size: clamp(3.5rem, 12vw, 9rem);
  font-weight: 900;
  font-variation-settings: 'MONO' 1, 'CASL' 0;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 0.2em;
  display: flex;
  justify-content: center;
}

.hero-name .char {
  display: inline-block;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 30%, #ffffff 50%, var(--gradient-start) 70%, var(--gradient-end) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             gradientShift 6s ease-in-out infinite;
  opacity: 0;
  transition: font-variation-settings 0.3s ease, transform 0.3s ease;
  cursor: crosshair;
}

.hero-name .char.space {
  width: 0.3em;
}

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

.hero-title {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.hero-title-dash {
  color: var(--text-muted);
  font-weight: 700;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.social-links a::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-links a:hover::before {
  opacity: 1;
}

.social-links a:hover {
  border-color: transparent;
  transform: scale(1.1) rotate(3deg);
  box-shadow: 0 0 16px rgba(247, 67, 182, 0.15), 0 0 16px rgba(252, 192, 67, 0.1);
}

.social-links a:active {
  transform: scale(0.95);
}

.social-links a img {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.social-links a:hover img {
  opacity: 1;
}

/* ============================================
   Section Dividers
   ============================================ */

.section-divider {
  border: none;
  height: 1px;
  max-width: 60%;
  margin: 0 auto;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gradient-start) 30%,
    var(--gradient-end) 70%,
    transparent 100%
  );
  opacity: 0.4;
}

/* ============================================
   Experience
   ============================================ */

.experience {
  padding: 6vh 3rem 8vh;
}

.experience-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.experience-summary {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 72px;
  line-height: 1.9;
}

/* Timeline */

ul.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 140px;
  list-style: none;
}

.timeline-entry {
  position: relative;
  width: 60%;
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.timeline-entry.left {
  align-self: flex-start;
  flex-direction: row;
  text-align: left;
}

.timeline-entry.right {
  align-self: flex-end;
  flex-direction: row-reverse;
  text-align: right;
}

/* Hover: shift content toward center, dot stays fixed */
.timeline-entry.left:hover .timeline-content {
  transform: translateX(6px);
}

.timeline-entry.right:hover .timeline-content {
  transform: translateX(-6px);
}

/* Dot */
.timeline-dot {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: default;
  z-index: 2;
  margin-top: 10px;
  animation: dotPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.2s 1 both;
}

/* First dot — current role, star diffraction effect */
.timeline-entry:first-child .timeline-dot {
  position: relative;
  overflow: visible;
  box-shadow:
    0 0 8px rgba(247, 67, 182, 0.4),
    0 0 20px rgba(247, 67, 182, 0.15);
}

.timeline-entry:hover .timeline-dot {
  transform: scale(1.4);
  box-shadow:
    0 0 12px rgba(247, 67, 182, 0.5),
    0 0 28px rgba(252, 192, 67, 0.25);
}

/* Content */
.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.timeline-entry.right .timeline-header {
  justify-content: flex-end;
}


.timeline-entry.right .timeline-role {
  border-left: none;
  border-right: 2px solid var(--border);
  padding-left: 0;
  padding-right: 0.75em;
}

.timeline-company {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

/* Gradient company name on entry hover */
.timeline-entry:hover .timeline-company {
  background: linear-gradient(135deg, var(--gradient-start) 20%, var(--gradient-end) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timeline-dates {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.timeline-role {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  padding-left: 0.75em;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s ease;
}

.timeline-entry:hover .timeline-role {
  border-image: linear-gradient(180deg, var(--gradient-start), var(--gradient-end)) 1;
}

/* SVG connector line drawn by JS */
.timeline-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   Contact
   ============================================ */

.contact {
  padding: 6vh 2rem 8vh;
  text-align: center;
}

.contact-heading {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.contact-email {
  font-size: clamp(1.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.contact-email:hover {
  background: linear-gradient(135deg, var(--gradient-start) 20%, var(--gradient-end) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)) 1;
}

/* ============================================
   Tablet (≤1024px)
   ============================================ */

@media (max-width: 1024px) {
  .timeline {
    gap: 64px;
  }

  .timeline-company {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
  }

  .experience {
    padding: 100px 2rem;
  }
}

/* ============================================
   Mobile (≤768px)
   ============================================ */

@media (max-width: 768px) {
  .timeline {
    --timeline-padding-left: 8px;
    --dot-size: 20px;
    gap: 36px;
    padding-left: var(--timeline-padding-left);
  }

  .timeline-entry,
  .timeline-entry.left,
  .timeline-entry.right {
    width: 100%;
    align-self: flex-start;
    flex-direction: row;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
  }

  .timeline-entry.right .timeline-header {
    align-items: flex-start;
  }

  .timeline-entry.right .timeline-role {
    border-right: none;
    border-left: 2px solid var(--border);
    padding-right: 0;
    padding-left: 0.75em;
  }

  /* Disable horizontal hover shift on mobile */
  .timeline-entry.left:hover .timeline-content,
  .timeline-entry.right:hover .timeline-content {
    transform: none;
  }

  /* Hide SVG zigzag on mobile */
  .timeline-svg {
    display: none;
  }

  /* Straight vertical dotted line on the left — aligned to dot center */
  .timeline::before {
    content: '';
    position: absolute;
    top: 7px;
    left: calc(var(--timeline-padding-left) + var(--dot-size) / 2); /* padding-left + half dot width */
    width: 0;
    height: calc(100% - 14px);
    border-left: 2px dotted var(--border);
    z-index: 1;
  }

  .experience {
    padding: 8vh 1.5rem 10vh;
  }

  .experience-summary {
    margin-bottom: 60px;
  }

  .contact {
    padding: 6vh 1.5rem 10vh;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: 0.15em;
  }

  .social-links {
    gap: 0.75rem;
  }

  .social-links a {
    width: 38px;
    height: 38px;
  }

  .social-links a img {
    width: 16px;
    height: 16px;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .hero-name .char,
  .hero-title,
  .social-links {
    opacity: 1;
    animation: none;
  }

  .timeline-dot {
    animation: none;
  }

  .timeline-svg path {
    animation: none !important;
  }

  .timeline-entry,
  .social-links a,
  .timeline-dot,
  .contact-email,
  .timeline-company {
    transition: none;
  }
}
