/* About page specific styles */
html {
  scroll-behavior: smooth;
}

#profile {
  position: relative;
  /* Reserve space so circles don't overlap intro text */
  min-height: clamp(280px, 56vw, 420px);
}

#profile:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 2.5rem;
  width: clamp(200px, 28vw, 320px);
  height: clamp(200px, 28vw, 320px);
  border-radius: 50%;
  /* Layered backgrounds: image above, subtle radial behind */
  background: url('/assets/images/tiger.png') center/cover no-repeat,
              radial-gradient(ellipse at 35% 35%, #384149 0%, #202628 55%, #161a1a 100%);
  outline: 8px solid #2a2f2a;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.6));
  z-index: -2;
}
/* Secondary profile image (online pfp) layered above primary */
#profile:before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(calc(-50% + 140px));
  top: 3.2rem;
  width: clamp(140px, 20vw, 220px);
  height: clamp(140px, 20vw, 220px);
  border-radius: 50%;
  background: url('/assets/images/tigerjess_pfp_resize.png') center/cover no-repeat,
              radial-gradient(ellipse at 35% 35%, #384149 0%, #202628 55%, #161a1a 100%);
  outline: 6px solid #2a2f2a;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.55));
  z-index: -3; /* behind the main image */
  transition: transform 0.35s ease, filter 0.35s ease;
}
/* Third profile image: bottom-left behind main */
.pfp-bottom-left {
  position: absolute;
  left: 50%;
  top: 3.2rem;
  width: clamp(140px, 20vw, 220px);
  height: clamp(140px, 20vw, 220px);
  /* mirror the right-side default offset (+140px) */
  transform: translateX(calc(-50% - 140px)) translateY(4px);
  border-radius: 50%;
  background: url('/assets/images/tigerjess_pfp.jpg') center/cover no-repeat,
              radial-gradient(ellipse at 35% 35%, #384149 0%, #202628 55%, #161a1a 100%);
  outline: 6px solid #2a2f2a;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.45));
  z-index: -4; /* further behind */
  pointer-events: none;
  transition: transform 0.35s ease, filter 0.35s ease;
}
@media (hover: hover) {
  #profile:hover .pfp-bottom-left {
    /* mirror the right-side hover offset (+260px) */
    transform: translateX(calc(-50% - 260px)) translateY(4px);
    filter: drop-shadow(0 12px 30px rgba(57,221,84,.25));
  }
}
@media (hover: hover) {
  #profile:hover:before {
    transform: translateX(calc(-50% + 260px)) translateY(4px);
    filter: drop-shadow(0 12px 30px rgba(57,221,84,.25));
  }
}
/* Tap-to-reveal support: mirrors hover when class applied */
#profile.reveal-side:before {
  transform: translateX(calc(-50% + 260px)) translateY(4px);
  filter: drop-shadow(0 12px 30px rgba(57,221,84,.25));
}
#profile.reveal-side .pfp-bottom-left {
  transform: translateX(calc(-50% - 260px)) translateY(4px);
  filter: drop-shadow(0 12px 30px rgba(57,221,84,.25));
}

.about-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.about-intro {
  text-align: center;
  margin-bottom: 3rem;
  /* reveal handled via .reveal */
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.about-intro h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.2;
}
.about-intro p {
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.about-section {
  margin: 2.5rem 0;
}
/* Skill sections with tighter spacing */
.skill-section {
  margin: 1.5rem 0;
}
.skill-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.about-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.about-section h2::before {
  content: attr(data-emoji);
}
.about-section p, .about-section li {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.about-section ul {
  list-style: none;
  padding-left: 0;
}
.about-section li {
  padding-left: 1.5rem;
  position: relative;
}
.about-section li::before {
  content: "▹";
  position: absolute;
  left: 0;
}
.skills-grid {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0 1rem 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #1b221a;
  justify-content: center;
}
.skills-grid::-webkit-scrollbar {
  height: 8px;
}
.skills-grid::-webkit-scrollbar-track {
  background: #1b221a;
  border-radius: 10px;
}
.skills-grid::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}
.skills-grid::-webkit-scrollbar-thumb:hover {
  background: #45dd6a;
}
.skill-badge {
  background: #0f120f;
  border: 1px solid #1b221a;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 120px;
  flex-shrink: 0;
}
.skill-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(57, 221, 84, 0.1), transparent);
  transition: left 0.5s ease;
}
.skill-badge:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(57, 221, 84, 0.3);
  transform: translateY(-5px);
}
.skill-badge:hover::before {
  left: 100%;
}
.skill-badge img {
  height: 40px;
  width: 40px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.skill-badge:hover img {
  transform: scale(1.15) rotateY(10deg);
}
.skill-badge span {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}
.projects-highlight {
  background: linear-gradient(135deg, #0f120f 0%, #0a0d0a 100%);
  border: 1px solid #1b221a;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
  position: relative;
}
.projects-highlight:hover {
  border-color: rgba(57, 221, 84, 0.4);
  box-shadow: 0 4px 20px rgba(57, 221, 84, 0.1);
  transform: translateY(-2px);
}
.projects-highlight h3 {
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.projects-highlight p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.projects-highlight a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: gap 0.3s ease;
}
.projects-highlight a:hover {
  gap: 0.75rem;
}
.fun-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  perspective: 1000px;
}
.fun-fact-card {
  position: relative;
  width: 100%;
  height: 280px;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.fun-fact-card.flipped {
  transform: rotateY(180deg);
}
@media (hover: none) {
  .fun-fact-card:not(.flipping):active {
    transform: rotateY(180deg);
  }
}
.fun-fact-front, .fun-fact-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #1b221a;
  padding: 1.25rem;
  text-align: center;
}
.fun-fact-front {
  background: #0f120f;
  color: var(--muted);
}
.fun-fact-front strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.fun-fact-front p {
  color: var(--muted);
  font-size: 0.95rem;
}
.fun-fact-back {
  background: #0f120f;
  transform: rotateY(180deg) translateZ(0.1px);
  padding: 0;
  overflow: hidden;
}
.fun-fact-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.fun-fact-card.flipped .fun-fact-back img {
  transform: scale(1.05);
}
.connect-section {
  background: linear-gradient(135deg, #0f120f 0%, #0a0d0a 100%);
  border: 1px solid #1b221a;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.connect-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(57, 221, 84, 0.03) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}
.connect-section h2 {
  justify-content: center;
}
.connect-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}
.connect-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 1rem;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}
.connect-links a:hover {
  transform: translateY(-8px);
  background: rgba(57, 221, 84, 0.05);
}
.connect-links a span {
  transition: transform 0.3s ease;
  display: inline-block;
}
.connect-links a:hover span {
  transform: scale(1.2) rotate(5deg);
}
/* Scroll reveal baseline */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  will-change: opacity, transform;
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Light stagger for cards inside grids */
.project-card.reveal { transition-delay: 80ms; }
.project-card.reveal:nth-child(2) { transition-delay: 160ms; }
.project-card.reveal:nth-child(3) { transition-delay: 240ms; }
.project-card.reveal:nth-child(4) { transition-delay: 320ms; }
.project-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: #0f120f;
  border: 1px solid #1b221a;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 221, 84, 0.4);
  box-shadow: 0 10px 30px rgba(57, 221, 84, 0.1);
}
.project-title strong {
  font-size: 1.1rem;
  color: var(--text);
}
.project-summary {
  color: var(--muted);
  font-size: 0.95rem;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  background: #121512;
  border: 1px solid #212621;
  color: #cbd5c0;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.project-footnote {
  color: var(--muted);
  font-size: 0.85rem;
}
.project-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}
.btn.primary {
  background: linear-gradient(180deg, #48e56b 0%, var(--accent) 100%);
  color: #0a0a0a;
  box-shadow: var(--shadow);
}
.btn.secondary {
  background: #171a17;
  color: var(--text);
  border: 1px solid #242a24;
}
.btn:hover {
  filter: brightness(1.05);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Waving emoji on load */
.wave-on-load {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: hand-wave 1.4s ease-in-out 1;
}
@keyframes hand-wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(12deg); }
  40% { transform: rotate(-6deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}
/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1 !important; transform: none !important; }
  .wave-on-load { animation: none !important; }
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 2rem;
  transition: gap 0.3s ease;
}
.nav-link:hover {
  gap: 0.75rem;
}
.divider {
  border: none;
  border-top: 1px solid #1b221a;
  margin: 2rem 0;
}
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #000;
  box-shadow: 0 4px 12px rgba(57, 221, 84, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
}
.scroll-to-top.visible {
  display: flex;
}
.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(57, 221, 84, 0.4);
}
@media (max-width: 768px) {
  .about-container {
    padding: 0 1rem;
  }
  .about-intro {
    margin-bottom: 2rem;
  }
  .about-section {
    margin: 2rem 0;
  }
  .skill-section {
    margin: 1.25rem 0;
  }
  .skills-grid {
    gap: 0.75rem;
    margin: 0.75rem 0;
  }
  .skill-badge {
    padding: 0.75rem;
    min-width: 100px;
  }
  .connect-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  .fun-facts {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .fun-fact-card {
    height: 250px;
  }
  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  /* Mobile: keep side pfps beside the main circle, slightly tighter offsets */
  #profile:before {
    transform: translateX(calc(-50% + 110px));
    top: 3rem;
  }
  .pfp-bottom-left {
    transform: translateX(calc(-50% - 110px));
    top: 3rem;
  }
  /* When revealed on mobile, slide out sideways but with smaller offsets */
  #profile.reveal-side:before {
    transform: translateX(calc(-50% + 180px)) translateY(4px);
    top: 3rem;
  }
  #profile.reveal-side .pfp-bottom-left {
    transform: translateX(calc(-50% - 180px)) translateY(4px);
    top: 3rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  #profile:before { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #1b221a;
  color: var(--muted);
}
