:root {
  --bg: #111214;
  --fg: #ececec;
  --muted: #9a9ca0;
  --accent: #8fb3ff;
  --rule: #24262a;
}

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

html,
body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}

h1 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 48px;
  text-transform: lowercase;
}

.wave {
  display: inline-block;
  transform: rotate(8deg);
}

.intro .tagline {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-transform: lowercase;
}

.tagline-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tagline-row .tagline {
  margin-bottom: 0;
}

.tagline-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}

.tagline-row:hover .tagline-img {
  transform: rotate(-6deg) scale(1.06);
}

@media (max-width: 520px) {
  .tagline-img {
    width: 56px;
    height: 56px;
  }
}

.intro .bio {
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted);
  text-transform: lowercase;
  margin-bottom: 96px;
}

section h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

section + section {
  margin-top: 64px;
}

.experience ul,
.links {
  list-style: none;
}

.experience li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  font-size: 1.05rem;
  text-transform: lowercase;
  border-bottom: 1px solid var(--rule);
}

.experience li:last-child {
  border-bottom: none;
}

.emoji {
  font-size: 1.1rem;
}

.year {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

a:hover {
  border-bottom-color: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.links li {
  text-transform: lowercase;
}

footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: lowercase;
}

@media (max-width: 520px) {
  main {
    padding: 64px 20px 48px;
  }
  .intro .tagline,
  .intro .bio {
    font-size: 1.7rem;
  }
  .tagline-row {
    gap: 12px;
  }
  .experience li {
    flex-wrap: wrap;
  }
  .year {
    margin-left: 0;
    flex-basis: 100%;
    padding-left: 28px;
  }
}

/* ---------- remy quote ---------- */

.quote {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 160px;
}

.quote-img {
  flex: none;
  width: 130px;
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
  transition: transform 0.4s ease;
}

.quote:hover .quote-img {
  transform: rotate(-4deg) translateY(-3px);
}

.quote-text {
  margin: 0;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg);
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.quote-mark {
  color: var(--muted);
  font-size: 1.6em;
  line-height: 0;
  position: relative;
  top: 0.18em;
  margin: 0 2px;
}

.quote-cite {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

@media (max-width: 520px) {
  .quote {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .quote-img {
    width: 110px;
  }
}

/* ---------- get-in-touch CTA (ratatouille) ---------- */

.cta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 64px;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: var(--fg);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 50px -16px rgba(0, 0, 0, 0.55);
}

.cta-img,
.cta-emoji {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.cta:hover .cta-img,
.cta:hover .cta-emoji {
  transform: rotate(-6deg) scale(1.05);
}

.cta-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.cta-sub {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: lowercase;
  margin-top: 2px;
}

.cta-arrow {
  margin-left: auto;
  color: var(--muted);
  flex: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.cta:hover .cta-arrow {
  transform: translateX(6px);
  color: var(--fg);
}

/* ---------- jumpscare overlay ---------- */

.jumpscare {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: none;
  pointer-events: none;
}

.jumpscare.active {
  display: block;
  animation: jumpscare-in 0.06s ease-out;
}

.jumpscare img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

@keyframes jumpscare-in {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* clickable big name in the tagline — hover hint */
.big-name {
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  user-select: none;
}

.big-name:hover {
  color: #ff5b5b;
  text-shadow: 0 0 18px rgba(255, 91, 91, 0.45);
}

.big-name:active {
  color: #ff2d2d;
}

/* ---------- easter egg polaroid ---------- */

.easter-egg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 200px;
  z-index: 100;
  padding: 12px 12px 34px;
  background: #f6f5f1;
  border-radius: 4px;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: rotate(-7deg) translateY(30px) scale(0.85);
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
}

.easter-egg.revealed {
  opacity: 1;
  pointer-events: auto;
  transform: rotate(-7deg) translateY(0) scale(1);
}

.easter-egg:hover {
  transform: rotate(-3deg) translateY(-4px) scale(1.04);
}

.easter-egg img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: #1a1a1a;
}

.egg-caption {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 6px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  font-family: ui-sans-serif, "Caveat", "Inter", sans-serif;
}

.egg-caption-sub {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  font-style: italic;
  color: #4a4a4a;
  letter-spacing: 0.02em;
}

.wave {
  cursor: pointer;
  user-select: none;
}

/* ---------- custom cursor ---------- */

@media (pointer: fine) {
  *,
  *::before,
  *::after {
    cursor: none !important;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  will-change: transform;
  opacity: 1;
  transition: opacity 0.2s ease;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
}

.cursor-ring {
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    opacity 0.2s ease;
}

.cursor-ring.cursor-hover {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

.cursor-dot.cursor-hidden,
.cursor-ring.cursor-hidden {
  opacity: 0;
}

/* hide custom cursor entirely on touch / no-fine-pointer */
@media (pointer: coarse), (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- top fade — fades out the top of the page as you scroll down ---------- */

.scroll-fade-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  pointer-events: none;
  z-index: 30;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    var(--bg) 30%,
    rgba(17, 18, 20, 0.6) 65%,
    rgba(17, 18, 20, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: opacity;
}

.scroll-fade-top.visible {
  opacity: 1;
}

/* ---------- reveal-on-scroll ---------- */

[data-reveal] {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(20px);
  transition: opacity 0.9s ease, filter 0.9s ease, transform 0.9s ease;
  will-change: opacity, filter, transform;
}

[data-reveal].reveal--visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal].reveal--visible {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
}

/* smoother link underline */
a {
  text-underline-offset: 4px;
}

/* ---------- projects carousel ---------- */

.projects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.projects-head h2 {
  margin: 0;
  padding: 0;
  border: none;
}

.projects-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.nav-btn:active { transform: scale(0.95); }

.projects-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  /* native snap & smooth removed — custom JS easing handles both for a smoother feel */
  scroll-behavior: auto;
  padding: 20px 24px 60px;
  margin: -20px -24px -40px;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
}

.projects-rail::-webkit-scrollbar { display: none; }
.projects-rail.dragging { cursor: grabbing; scroll-behavior: auto; }

.project-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: lowercase;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 22px 50px -16px color-mix(in srgb, var(--c1) 60%, transparent),
    0 12px 28px -10px color-mix(in srgb, var(--c2) 50%, transparent);
}

.project-thumb {
  height: 280px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, var(--c1), var(--c2));
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.25), transparent 60%);
  pointer-events: none;
}

.project-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.project-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- find-me boxes ---------- */

.link-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: lowercase;
  text-decoration: none;
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  width: 100%;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  will-change: transform;
}

.link-box:hover {
  transform: scale(1.04) translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}

.link-box:active {
  transform: scale(1.01);
}

.box-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.25s ease, transform 0.25s ease;
}

.link-box:hover .box-icon {
  transform: rotate(-4deg) scale(1.05);
}

.box-text {
  min-width: 0;
}

.box-label {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.box-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}

/* per-brand hover accents — colored glow under the box matches each logo */
.hover-instagram:hover {
  border-color: rgba(221, 42, 123, 0.7);
  /* instagram gradient: yellow → orange → pink */
  box-shadow:
    0 22px 50px -14px rgba(221, 42, 123, 0.7),
    0 14px 32px -10px rgba(245, 133, 41, 0.55),
    0 8px 22px -6px rgba(254, 218, 119, 0.4);
}
.hover-chula:hover {
  border-color: rgba(236, 72, 153, 0.75);
  box-shadow:
    0 22px 50px -14px rgba(236, 72, 153, 0.7),
    0 10px 26px -8px rgba(236, 72, 153, 0.5);
}
.hover-github:hover {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 22px 50px -14px rgba(255, 255, 255, 0.35),
    0 10px 26px -8px rgba(255, 255, 255, 0.2);
}
.hover-discord:hover {
  border-color: rgba(88, 101, 242, 0.85);
  box-shadow:
    0 22px 50px -14px rgba(88, 101, 242, 0.8),
    0 10px 26px -8px rgba(88, 101, 242, 0.5);
}

/* ---------- themed language tokens ---------- */

.lang-python,
.lang-cpp,
.lang-react {
  font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Python: navy + sun yellow (logo colors) */
.py-blue   { color: #3776ab; }
.py-yellow { color: #f5c518; }

/* C++: ISO C++ blue, with raised "++" */
.lang-cpp { color: #00599c; }
.cpp-plus {
  display: inline-block;
  font-size: 0.78em;
  transform: translateY(-0.25em);
  letter-spacing: -0.05em;
  margin-left: 0.04em;
}

/* React: brand cyan */
.lang-react { color: #61dafb; }

/* clickable language tokens — strip default link styling, add subtle hover */
.lang-link {
  text-decoration: none;
  border-bottom: none !important;
  display: inline-block;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.lang-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}
.lang-python.lang-link:hover { filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 212, 59, 0.5)); }
.lang-cpp.lang-link:hover    { filter: brightness(1.2)  drop-shadow(0 0 10px rgba(0, 89, 156, 0.6)); }
.lang-react.lang-link:hover  { filter: brightness(1.2)  drop-shadow(0 0 12px rgba(97, 218, 251, 0.6)); }
