@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,700;1,400&family=Caveat:wght@500&display=swap');

:root {
  --bg-primary:   #080d18;
  --bg-secondary: #0d1424;
  --bg-card:      #111c30;
  --bg-card-hover:#162238;
  --accent:       #7eaaec;
  --accent2:      #a8c8f5;
  --accent-dim:   rgba(126, 170, 236, 0.12);
  --accent-glow:  rgba(126, 170, 236, 0.07);
  --text:         #dce8f5;
  --text-dim:     #7a95b8;
  --border:       #1c2d47;
  --border-hover: #7eaaec;
  --handwrite:    'Caveat', cursive;
}

* { box-sizing: border-box; }

html, body {
  height: auto;
  overflow-y: auto;
}

body {
  background-color: var(--bg-primary);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* iframe content pages — no shell flex needed */
body.iframe-page {
  display: block;
  min-height: unset;
}

/* ====== NAVBAR ====== */
.navbar {
  background-color: rgba(26, 21, 16, 0.96) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 1rem;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--accent) !important;
}

.navbar-brand:hover { color: var(--accent2) !important; }

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: inline-block;
  transform: translateY(-1px);
}

.nav-link {
  color: var(--text-dim) !important;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem !important;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent) !important;
  background-color: var(--accent-dim);
}

.navbar-toggler { border-color: var(--border); }
.navbar-toggler-icon { filter: invert(0.6); }

/* ====== MAIN ====== */
main {
  min-height: calc(100vh - 120px);
  padding: 2.5rem 0;
}

/* iframe content pages — no navbar so reset min-height */
body.iframe-page main {
  min-height: unset;
  padding: 2rem 0 3rem;
}

/* ====== CARDS ====== */
.retro-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  margin-bottom: 1rem;
  transition: border-color 0.25s, background-color 0.25s;
}

.retro-card:hover {
  border-color: rgba(126, 170, 236, 0.4);
  background-color: var(--bg-card-hover);
}

.retro-card .card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

/* ====== HEADINGS ====== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--text);
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.35rem; }

.section-title {
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}

/* ====== LINKS ====== */
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent2); }

/* ====== HERO ====== */
.hero-section {
  background: linear-gradient(135deg, var(--bg-card) 0%, #0e1a30 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(126, 170, 236, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Аниме-аватар */
.hero-anime-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-anime-img {
  width: 110px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--border-hover);
  display: block;
}

.hero-anime-placeholder {
  width: 110px;
  height: 150px;
  border-radius: 12px;
  border: 2px solid var(--border-hover);
  background: linear-gradient(160deg, #111e35, #182c4a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  flex-shrink: 0;
  gap: 0.3rem;
}

.hero-anime-placeholder span {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.hero-tagline {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* ====== SOCIAL LINKS ====== */
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--accent-dim);
  border: 1px solid var(--border);
  color: var(--text-dim) !important;
  padding: 0.28rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background-color: rgba(126, 170, 236, 0.18);
}

/* ====== ЛИЧНАЯ ЗАМЕТКА (handwrite) ====== */
.personal-note {
  background: linear-gradient(135deg, #0e1828, #121e35);
  border: 1px solid rgba(126, 170, 236, 0.2);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.personal-note::before {
  content: '✦';
  position: absolute;
  top: -10px; left: 18px;
  background: var(--bg-primary);
  padding: 0 6px;
  color: var(--accent);
  font-size: 0.8rem;
}

.personal-note p {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

/* ====== NOW БЛОК ====== */
.now-block .now-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.now-block .now-item:last-child { border-bottom: none; }

.now-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.now-label {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.05rem;
}

.now-value {
  color: var(--text);
  font-size: 0.9rem;
}

/* ====== DO ITEMS ====== */
.do-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.do-item:last-child { border-bottom: none; }

.do-item .do-icon {
  color: var(--accent);
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ====== UPDATES ====== */
.update-item {
  display: flex;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.87rem;
}

.update-item:last-child { border-bottom: none; }

.update-date {
  color: var(--accent);
  flex-shrink: 0;
  width: 90px;
  font-weight: 500;
}

.update-text { color: var(--text-dim); }

/* ====== BANNERS ====== */
.banners-section {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.banner-placeholder {
  width: 88px; height: 31px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
}

/* ====== SKILL BADGES ====== */
.skill-badge {
  display: inline-block;
  background-color: var(--accent-dim);
  border: 1px solid rgba(126, 170, 236, 0.2);
  color: var(--accent);
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  margin: 0.2rem;
}

/* ====== PROJECT CARDS ====== */
.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  height: 100%;
  transition: border-color 0.25s, transform 0.2s, background-color 0.25s;
}

.project-card:hover {
  border-color: rgba(126, 170, 236, 0.5);
  transform: translateY(-3px);
  background-color: var(--bg-card-hover);
}

.project-card h3 { color: var(--text); font-size: 1.25rem; margin-bottom: 0.5rem; }
.project-card p { color: var(--text-dim); font-size: 0.87rem; margin-bottom: 0.8rem; line-height: 1.6; }

.project-card .tag {
  display: inline-block;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  border-radius: 10px;
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
}

/* ====== BLOG ====== */
.blog-post-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.25s, background-color 0.25s;
}

.blog-post-item:hover {
  border-color: rgba(126, 170, 236, 0.4);
  background-color: var(--bg-card-hover);
}

.blog-post-item h3 { font-size: 1.25rem; margin-bottom: 0.2rem; color: var(--text); }
.blog-post-item h3 a { color: var(--text); }
.blog-post-item h3 a:hover { color: var(--accent); }
.blog-meta { color: var(--text-dim); font-size: 0.8rem; margin-bottom: 0.5rem; font-weight: 500; }
.blog-excerpt { color: var(--text-dim); font-size: 0.87rem; line-height: 1.6; margin-bottom: 0.6rem; }

/* ====== GUESTBOOK ====== */
.guestbook-form {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

.guestbook-form h3 { color: var(--text); font-size: 1.25rem; margin-bottom: 1rem; }

.form-label { color: var(--text-dim); font-size: 0.84rem; font-weight: 500; margin-bottom: 0.3rem; }

.form-control {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
}

.form-control:focus {
  background-color: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(126, 170, 236, 0.12);
}

.form-control::placeholder { color: var(--text-dim); opacity: 0.5; }

.btn-retro {
  background-color: var(--accent);
  color: #080d18;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.5rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}

.btn-retro:hover { background-color: var(--accent2); transform: translateY(-1px); color: #13100c; }

.guestbook-message {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
}

.guestbook-message .msg-author { color: var(--accent); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.1rem; }
.guestbook-message .msg-date { color: var(--text-dim); font-size: 0.78rem; margin-bottom: 0.5rem; }
.guestbook-message .msg-text { color: var(--text); font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }

/* ====== ABOUT SOCIAL BUTTONS ====== */
.about-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--bg-card);
  transition: border-color .2s, color .2s, background .2s;
}
.about-social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ====== FOOTER ====== */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.2rem 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}

.site-footer a { color: var(--text-dim); transition: color 0.2s; }
.site-footer a:hover { color: var(--accent); }

/* ====== KAWAII ДЕТАЛЬ — декоративные звёздочки ====== */
.sparkle {
  display: inline-block;
  color: var(--accent);
  animation: twinkle 2.5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #2e2318; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ====== RESPONSIVE ====== */
@media (max-width: 576px) {
  .hero-name { font-size: 2.1rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero-section { padding: 1.4rem; }
}

/* ====== COZY AUDIO PLAYER ====== */
.cozy-player {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(126,170,236,.07);
  border: 1px solid rgba(126,170,236,.18);
  border-radius: 20px;
  padding: .25rem .75rem .25rem .45rem;
  margin-top: .35rem;
  max-width: 100%;
}

.cozy-play-btn {
  background: rgba(126,170,236,.15);
  border: none;
  color: var(--accent);
  font-size: .85rem;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
  padding: 0;
}

.cozy-play-btn:hover { background: rgba(126,170,236,.28); }

.cozy-track {
  font-size: .78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* ====== NOW — RICH CONTENT ====== */
.now-mood-img {
  display: block;
  max-width: 100%;
  max-height: 130px;
  border-radius: 8px;
  margin-top: .45rem;
  border: 1px solid var(--border);
  object-fit: cover;
}

.now-thinking {
  font-size: .87rem;
  line-height: 1.6;
  color: var(--text);
  margin-top: .15rem;
}

.now-thinking p { margin: 0 0 .35rem; }
.now-thinking p:last-child { margin: 0; }
.now-thinking a { color: var(--accent); }

.cozy-prev-btn, .cozy-next-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: .75rem;
  cursor: pointer;
  padding: 0 .1rem;
  line-height: 1;
  transition: color .2s;
  flex-shrink: 0;
}

.cozy-prev-btn:hover, .cozy-next-btn:hover { color: var(--accent); }

.cozy-counter {
  font-size: .7rem;
  color: var(--text-dim);
  flex-shrink: 0;
  opacity: .7;
}


/* ====== SIDE PLAYER ====== */
#fp-panel {
  position: fixed;
  top: 50%;
  right: 0;
  width: 300px; /* 40px tab + 260px content */
  display: flex;
  flex-direction: row;
  /* collapsed: shift right by content width, only 40px tab stays visible */
  transform: translateY(-50%) translateX(260px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

#fp-panel.fp-open {
  transform: translateY(-50%) translateX(0);
}

/* TAB — leftmost, always visible when collapsed */
#fp-tab {
  width: 40px;
  flex-shrink: 0;
  background: rgba(9, 14, 26, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(126,170,236,.25);
  border-right: none;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem 0;
  transition: background .2s;
  box-shadow: -4px 0 20px rgba(0,0,0,.4);
}

#fp-tab:hover {
  background: rgba(126,170,236,.1);
}

#fp-tab-icon {
  font-size: .9rem;
  line-height: 1;
}

#fp-tab-arrow {
  font-size: .95rem;
  color: var(--accent);
  line-height: 1;
  transition: transform .3s;
}

#fp-panel.fp-open #fp-tab-arrow {
  transform: rotate(180deg);
}

#fp-tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .3s;
}

#fp-panel.fp-playing #fp-tab-dot {
  opacity: 1;
  animation: fp-pulse 1.6s ease-in-out infinite;
}

@keyframes fp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .25; transform: scale(.5); }
}

/* CONTENT — appears to the right of tab when panel is open */
#fp-content {
  width: 260px;
  flex-shrink: 0;
  background: rgba(9, 14, 26, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(126,170,236,.2);
  border-radius: 0 0 0 0;
  padding: 1.3rem 1.2rem 1.1rem;
  box-shadow: 4px 0 40px rgba(0,0,0,.5);
}

#fp-label {
  font-size: .66rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

#fp-title {
  font-size: .92rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .18rem;
}

#fp-counter {
  font-size: .7rem;
  color: var(--text-dim);
  opacity: .6;
  margin-bottom: .9rem;
}

#fp-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
}

.fp-ctrl {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .8rem;
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
  padding: 0;
}

.fp-ctrl:hover { border-color: var(--accent); color: var(--accent); }

.fp-ctrl-main {
  background: rgba(126,170,236,.14);
  border-color: rgba(126,170,236,.38);
  color: var(--accent);
  width: 42px;
  height: 42px;
  font-size: .95rem;
}

.fp-ctrl-main:hover { background: rgba(126,170,236,.26); }

/* progress bar */
#fp-progress-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  margin-top: .6rem;
  cursor: pointer;
  position: relative;
}
#fp-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .1s linear;
  pointer-events: none;
}
#fp-progress-wrap:hover { background: rgba(255,255,255,.18); }

/* time */
#fp-time {
  display: flex;
  justify-content: space-between;
  font-size: .62rem;
  color: var(--text-dim);
  margin-top: .2rem;
}

/* playlist list */
#fp-playlist-list {
  margin-top: .6rem;
  max-height: 140px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  padding-top: .4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.fp-pl-item {
  font-size: .75rem;
  color: var(--text-dim);
  padding: .2rem .3rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s, color .15s;
}
.fp-pl-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.fp-pl-item.fp-pl-active { color: var(--accent); font-weight: 600; }
