/* Shared styles across pages: base, cursor, nav, buttons, footer */

:root {
  --brand-dark: #2c2c2c;
  --brand-blue: #3a5b8c;
  --brand-grey: #d6d6d6;
  --bg: #1a1c20;
  --bg2: #222630;
  --card: #252a35;
  --border: rgba(58, 91, 140, 0.22);
  --blue: #3a5b8c;
  --blue-light: #5b84bc;
  --blue-glow: rgba(58, 91, 140, 0.2);
  --text: #d6d6d6;
  --text-muted: #7a8899;
  --white: #fff;
  --nav-h: 70px;
  --shadow: rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(26, 28, 32, 0.85);
}

body.light {
  --bg: #f0f2f5;
  --bg2: #e4e8ee;
  --card: #ffffff;
  --border: rgba(58, 91, 140, 0.18);
  --blue: #3a5b8c;
  --blue-light: #2e4d7a;
  --blue-glow: rgba(58, 91, 140, 0.12);
  --text: #2c2c2c;
  --text-muted: #5a6478;
  --white: #2c2c2c;
  --shadow: rgba(58, 91, 140, 0.12);
  --nav-bg: rgba(240, 242, 245, 0.88);
}

body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 2px;
}

.mascot-svg {
  filter: drop-shadow(0 0 25px rgba(58, 91, 140, 0.8));
  transition: filter 0.3s;
}

.nav-mascot svg.mascot-svg {
  filter: drop-shadow(0 0 15px rgba(58, 91, 140, 1));
}

#cursor-mascot svg.mascot-svg {
  filter: drop-shadow(0 0 20px rgba(58, 91, 140, 1));
}

.footer-mascot svg.mascot-svg {
  filter: drop-shadow(0 0 18px rgba(58, 91, 140, 0.95));
}

#cursor-mascot {
  position: fixed;
  width: 56px;
  pointer-events: none;
  z-index: 99997;
  transform: translate(-50%, -90%);
  opacity: 0;
  transition: opacity 0.2s;
  will-change: transform;
}

#cursor-mascot.show {
  opacity: 1;
}

#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: screen;
}

#cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(74, 127, 193, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: all 0.12s ease-out;
}

body:has(a:hover) #cursor,
body:has(button:hover) #cursor {
  width: 20px;
  height: 20px;
  background: var(--blue-light);
}

body:has(a:hover) #cursor-follower,
body:has(button:hover) #cursor-follower {
  width: 52px;
  height: 52px;
  border-color: rgba(74, 127, 193, 0.3);
}

.main-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  max-width: 1200px;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.nav-time {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.nav-time i {
  color: var(--blue);
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-links a i {
  font-size: 0.8rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(74, 127, 193, 0.12);
}

.nav-theme {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--blue-light);
  font-size: 1rem;
  transition: all 0.25s;
}

.nav-theme:hover {
  background: var(--blue-glow);
}

.nav-mascot {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: default;
}

.nav-mascot:hover {
  transform: scale(1.2) rotate(-8deg);
}

.nav-mascot svg {
  width: 40px;
  height: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 {
  transition-delay: 0.1s;
}

.reveal.delay-2 {
  transition-delay: 0.2s;
}

.reveal.delay-3 {
  transition-delay: 0.32s;
}

.reveal.delay-4 {
  transition-delay: 0.46s;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.28s;
  box-shadow: 0 4px 20px rgba(74, 127, 193, 0.3);
}

.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(44, 44, 44, 0.07);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.28s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}

.bento-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74, 127, 193, 0.12);
  border: 1px solid rgba(74, 127, 193, 0.22);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 0.75rem;
  color: var(--blue-light);
}

footer {
  position: relative;
  background: #0e1219;
  overflow: hidden;
  padding: 80px 80px 40px;
  border-top: 1px solid rgba(74, 127, 193, 0.1);
}

.footer-bg-text {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(120px, 22vw, 240px);
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(74, 127, 193, 0.07);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  line-height: 1;
}

.footer-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  margin-bottom: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-name {
  display: flex;
  flex-direction: column;
}

.footer-first {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  color: #fff;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.footer-last {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 600;
  color: var(--blue);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.footer-sub {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 12px;
}

.footer-nav {
  display: flex;
  gap: 60px;
  align-self: flex-start;
  padding-top: 8px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-nav-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 4px;
}

.footer-nav-col a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.footer-nav-col a i {
  font-size: 0.82rem;
  width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.footer-nav-col a:hover {
  color: var(--text);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(120, 138, 160, 0.5);
}

.footer-heart {
  color: var(--blue);
}

.footer-mascot {
  width: 90px;
  opacity: 1;
  margin-top: 8px;
  transition: opacity 0.3s, transform 0.3s;
}

.footer-mascot:hover {
  opacity: 1;
  transform: scale(1.08) rotate(-5deg);
}

#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--blue);
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

#scrollTop.visible {
  opacity: 1;
  transform: translateY(0);
}

.edge-bar {
  position: fixed;
  right: 0;
  top: 0;
  width: 4px;
  height: 100vh;
  background: linear-gradient(to bottom, transparent 0%, var(--blue) 40%, var(--blue-light) 60%, transparent 100%);
  z-index: 998;
  opacity: 0.8;
}

body.light .main-nav {
  box-shadow: 0 8px 32px rgba(58, 91, 140, 0.1);
}

body.light .nav-time {
  background: rgba(44, 44, 44, 0.06);
}

body.light footer {
  background: #d6d6d6;
  border-top-color: rgba(58, 91, 140, 0.15);
}

body.light .footer-first {
  color: #2c2c2c;
}

body.light .footer-last {
  color: #3a5b8c;
}

body.light .footer-sub {
  color: rgba(44, 44, 44, 0.55);
}

body.light .footer-nav-col a {
  color: rgba(44, 44, 44, 0.6) !important;
}

body.light .footer-nav-col a:hover {
  color: #2c2c2c !important;
}

body.light .footer-nav-title {
  color: #3a5b8c;
}

body.light .footer-bottom {
  color: rgba(44, 44, 44, 0.45);
}

body.light .footer-bg-text {
  -webkit-text-stroke: 1px rgba(44, 44, 44, 0.07);
}

body.light .footer-heart {
  color: #3a5b8c;
}

body.light #scrollTop {
  box-shadow: 0 4px 20px rgba(58, 91, 140, 0.25);
}

@media (max-width: 1024px) {
  .main-nav {
    width: calc(100% - 32px);
    padding: 0 14px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  footer {
    padding: 72px 28px 30px;
  }

  .footer-top {
    gap: 28px;
    margin-bottom: 36px;
    padding-bottom: 28px;
  }

  .footer-nav {
    gap: 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 128px;
  }

  body {
    cursor: auto;
  }

  #cursor,
  #cursor-follower,
  #cursor-mascot,
  .edge-bar {
    display: none !important;
  }

  .main-nav {
    top: 8px;
    width: calc(100% - 16px);
    min-height: 58px;
    height: auto;
    border-radius: 22px;
    padding: 10px;
    flex-wrap: wrap;
    gap: 8px;
    transform: translateX(-50%);
  }

  .main-nav > div:first-child {
    flex: 1;
    min-width: 0;
  }

  .nav-time {
    min-width: unset;
    font-size: 0.7rem;
    padding: 4px 10px;
    gap: 6px;
  }

  .nav-theme {
    width: 36px;
    height: 36px;
    font-size: 0.86rem;
    flex-shrink: 0;
  }

  .nav-mascot,
  .nav-mascot svg {
    width: 30px;
    height: 30px;
  }

  .nav-links {
    display: flex;
    width: 100%;
    order: 3;
    overflow-x: auto;
    gap: 6px;
    padding: 2px 2px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links li {
    flex: 0 0 auto;
  }

  .nav-links a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 8px 10px;
    border-radius: 14px;
    gap: 5px;
  }

  .nav-links a i {
    display: none;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 18px;
    font-size: 0.84rem;
  }

  #scrollTop {
    width: 42px;
    height: 42px;
    right: 14px;
    bottom: 14px;
  }

  footer {
    padding: 56px 18px 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

  .footer-nav {
    width: 100%;
    justify-content: space-between;
    gap: 14px;
  }

  .footer-first,
  .footer-last {
    font-size: clamp(2.2rem, 12vw, 3.3rem);
  }

  .footer-mascot {
    width: 70px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  :root {
    --nav-h: 136px;
  }

  .nav-links a {
    font-size: 0.72rem;
    padding: 7px 9px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 18px;
  }

  .footer-nav-col {
    width: 100%;
  }
}
