/* ── Theme ── */
:root {
  --bg: #000;
  --surface: #111;
  --surface-deep: #0a0a0a;
  --border: #1e1e1e;
  --border-hover: #333;
  --text: #fff;
  --text-muted: #bbb;
  --text-dim: #888;
  --text-faint: #555;
  --glow-r: 180;
  --glow-g: 40;
  --glow-b: 40;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Reusable interaction tokens */
  --lift-sm: -2px;
  --lift-md: -4px;
  --lift-lg: -6px;
  --glow-subtle: 0 0 25px 0
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.08);
  --glow-medium: 0 0 40px 5px
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.18);
  --glow-strong: 0 0 60px 10px
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3);
  --border-glow: rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3);
  --transition-interactive:
    transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ── Reusable interactive hover ──
   Add .interactive to any element for lift + glow on hover.
   Customize with data attributes or override --lift and --glow. */
.interactive {
  transition: var(--transition-interactive);
}

.interactive:hover {
  transform: translateY(var(--lift-sm));
  border-color: var(--border-glow);
}

/* ── Reset + Global ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Sora", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  position: relative;
}

/* Subtle radial gradient behind the hero area */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 80vh;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

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

body > * {
  position: relative;
  z-index: 1;
}

/* ── Animations ── */
@keyframes portraitIn {
  0% {
    transform: scale(0.7);
    opacity: 0;
    filter: blur(10px);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

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

@keyframes bubblePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes borderRotate {
  from {
    --border-angle: 0deg;
  }
  to {
    --border-angle: 360deg;
  }
}

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* ── Portrait + Social Bubbles ── */
.portrait-container {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  animation: portraitIn 1.2s var(--ease-out) forwards;
}

.portrait-wrapper {
  position: relative;
  width: 324px;
  height: 324px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    from var(--border-angle),
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.6),
    transparent 40%,
    transparent 60%,
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.6)
  );
  animation: borderRotate 6s linear infinite;
  box-shadow: 0 0 40px 5px
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.12);
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s ease;
}

.portrait-wrapper:hover {
  transform: scale(1.04);
  box-shadow: var(--glow-strong);
}

.portrait {
  width: 316px;
  height: 316px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid #111;
}

.social-bubble {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-interactive);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0);
  animation: bubblePop 0.5s var(--ease-out) forwards;
}

.social-bubble.github {
  top: 15px;
  left: -70px;
  animation-delay: 0.6s;
}
.social-bubble.linkedin {
  bottom: 15px;
  left: -70px;
  animation-delay: 0.75s;
}
.social-bubble.youtube {
  top: 15px;
  right: -70px;
  animation-delay: 0.9s;
}
.social-bubble.x {
  bottom: 15px;
  right: -70px;
  animation-delay: 1.05s;
}

.social-bubble svg {
  width: 24px;
  height: 24px;
  fill: var(--text);
  transition: fill 0.3s ease;
}

/* Platform-colored hovers */
.social-bubble:hover {
  transform: scale(1.2) translateY(var(--lift-sm));
  background: #1a1a1a;
}

.social-bubble.github:hover {
  border-color: #8b5cf6;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(139, 92, 246, 0.3);
}
.social-bubble.github:hover svg {
  fill: #c4b5fd;
}

.social-bubble.linkedin:hover {
  border-color: #0a66c2;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(10, 102, 194, 0.3);
}
.social-bubble.linkedin:hover svg {
  fill: #60a5fa;
}

.social-bubble.youtube:hover {
  border-color: #ff0000;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 0, 0, 0.3);
}
.social-bubble.youtube:hover svg {
  fill: #f87171;
}

.social-bubble.x:hover {
  border-color: #888;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 255, 255, 0.15);
}

/* ── Heading + Intro ── */
h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out) 0.4s forwards;
}

.tagline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out) 0.5s forwards;
}

.tagline span {
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  letter-spacing: 0.3px;
  background: rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.04);
  transition: var(--transition-interactive);
  cursor: default;
}

.tagline span:hover {
  transform: translateY(var(--lift-sm));
  border-color: var(--border-glow);
  box-shadow: var(--glow-subtle);
  color: var(--text-muted);
}

.intro {
  font-size: 1rem;
  max-width: 600px;
  text-align: left;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out) 0.7s forwards;
}

.intro p {
  margin-bottom: 16px;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* Intro links - subtle, don't overpower bold text */
.intro a {
  color: #eee;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.6);
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.intro a:hover {
  color: var(--text);
  text-decoration-color: rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.8);
}

/* Bold text glow treatment */
.intro strong {
  color: var(--text);
  text-shadow: 0 0 15px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.6);
}

.intro .highlights {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intro .highlights li {
  position: relative;
  padding: 12px 16px 12px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  line-height: 1.5;
  font-size: 0.92rem;
  transition: var(--transition-interactive);
}

.intro .highlights li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 19px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.7);
  box-shadow: 0 0 8px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.5);
  transition: box-shadow 0.3s ease;
}

.intro .highlights li:hover {
  transform: translateY(var(--lift-sm));
  border-color: var(--border-glow);
  box-shadow: var(--glow-subtle);
}

.intro .highlights li:hover::before {
  box-shadow: 0 0 12px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.8);
}

/* ── Section Dividers ── */
.section-divider {
  width: 100%;
  max-width: 700px;
  height: 1px;
  margin: 40px 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3) 50%,
    transparent 100%
  );
}

/* ── Shared Card Base ── */
.card-base {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(30px);
  transition:
    transform 0.7s var(--ease-out),
    opacity 0.7s var(--ease-out),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  will-change: transform, opacity;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.5),
    var(--glow-subtle);
}

.card-base:hover {
  border-color: var(--border-glow);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.6),
    var(--glow-medium);
  transform: translateY(var(--lift-md));
}

.card-base.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-base.visible:hover {
  transform: translateY(var(--lift-md));
}

/* ── Timeline ── */
.timeline {
  width: 100%;
  max-width: 700px;
}

.timeline h2 {
  font-size: 1.5rem;
  margin-bottom: 40px;
  text-align: center;
}

.timeline-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.sticky-date {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}

.sticky-date::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.6);
  box-shadow: 0 0 8px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.4);
  flex-shrink: 0;
  transition: box-shadow 0.3s ease;
}

.timeline-row:hover .sticky-date {
  color: var(--text-muted);
}

.timeline-row:hover .sticky-date::before {
  box-shadow: 0 0 14px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.7);
}

/* ── Timeline Card Content ── */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: none;
  display: block;
  transition: transform 0.4s var(--ease-out);
}

.card:hover img {
  transform: scale(1.03);
}

.card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.card embed {
  width: calc(100% + 50px);
  height: 250px;
  pointer-events: none;
  margin: -25px;
  display: block;
}

.card > a {
  display: block;
  width: 100%;
  overflow: hidden;
}

.card a:hover {
  opacity: 0.85;
}

.card-content {
  padding: 20px;
  flex: 1;
}

.card-content h3 {
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.card:hover .card-content h3 {
  color: var(--text);
}

.card-content h3 a:hover {
  text-decoration: underline !important;
}

.card-content p {
  color: var(--text-muted);
  line-height: 1.5;
}

.listen-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  transition:
    var(--transition-interactive),
    background 0.3s ease;
  margin-top: 15px;
}

.listen-btn:hover {
  background: #ddd;
  transform: translateY(var(--lift-sm));
}

/* ── Projects Section ── */
.projects {
  width: 100%;
  max-width: 700px;
  margin-bottom: 20px;
}

.projects h2 {
  font-size: 1.5rem;
  margin-bottom: 40px;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-card {
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card .project-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-card:hover h3 {
  color: var(--text);
}

.project-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.project-card .project-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px 10px;
  margin-top: auto;
  align-self: flex-start;
  transition: var(--transition-interactive);
}

.project-card:hover .project-tag {
  border-color: var(--border-glow);
  color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .portrait-wrapper {
    width: 254px;
    height: 254px;
  }

  .portrait {
    width: 246px;
    height: 246px;
  }

  .social-bubble {
    width: 44px;
    height: 44px;
  }

  .social-bubble svg {
    width: 20px;
    height: 20px;
  }

  .social-bubble.github {
    top: 8px;
    left: -48px;
  }
  .social-bubble.linkedin {
    bottom: 8px;
    left: -48px;
  }
  .social-bubble.youtube {
    top: 8px;
    right: -48px;
  }
  .social-bubble.x {
    bottom: 8px;
    right: -48px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .sticky-date {
    font-size: 1.1rem;
  }
}
