@font-face {
    font-family: 'Press Start 2P';
    src: url('../assets/font/PressStart2P-Regular.ttf') format('truetype');
}



@font-face {
    font-family: 'Cafe Sweet';
    src: url('../assets/font/cafesweet.ttf') format('truetype');
}

/* ======= LIGHT THEME (default) ======= */

body {
    font-family: 'Press Start 2P';
    font-size: 16px;
    color: #4a4a4a; /* Dark gray text */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    background-color: #7db2d4;
    background-image: url('../assets/background/star-bg-blue.webp');
    background-repeat: repeat;
    background-attachment: fixed;
    height: 100vh;
}

u {
  text-decoration: underline dotted;
}

.container {
    max-width: 1200px;
    width: 100%;
    background-color: white;
    display: flex;
    justify-content: space-between;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    border: 6px solid #b9d8e8;
    border-radius: 10px;
    overflow: auto; 
    height: 100%;
    z-index: 999;
}

.navigation-elements {
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background-color: #b9d8e8;
    border: 4px solid #5f93b3; 
    padding: 20px;
    margin-bottom: 20px;
}

.microblog {
    flex: 0 0 270px;
    overflow: hidden;
    height: 100%;
}

.responsive-iframe {
    width: 100%;
    height: 100%;
    border: none;
    box-sizing: border-box;
}

.content-wrapper {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    margin: 0 20px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 640px;
}

.content {
    overflow: auto;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: #4a4a4a;
    border: 4px solid #b9d8e8;
    border-radius: 10px;
    max-width: 100%;
    overflow-x: hidden;
}

.scrolling-header {
    background-color: #a9d2e6;
    color: #4a4a4a;
    padding: 10px 20px;
    white-space: nowrap;
    animation: scroll 20s linear infinite;
    font-size: 24px;
    border-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.navbar {
    width: 250px;
    min-width: 250px;
    flex-shrink: 0;
    overflow: hidden;
}

h1, hr {
    margin-top: 0;
    font-size: 32px; 
}

h2 {
    margin-top: 0;
    font-size: 24px;
}

h3 {
    font-size: 16px;
}

p {
    margin-top: 0;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: #4a4a4a;
}
a:hover {
    color: #5f93b3;
}

.image-container-single {
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 0 auto; 
}

.image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.code-container {
    background-color: #2e2e2e; 
    color: #f5f5f5;           
    border-radius: 8px;     
    padding: 16px;           
    overflow-x: auto;         
    font-family: 'Courier New', Courier, monospace; 
    font-size: 14px;          
    line-height: 1.5;         
    border: 1px solid #444;
}

.image-container img.active {
    opacity: 1;
}

@keyframes imageAnimation {
    0%, 100% { opacity: 0; }
    25% { opacity: 1; }
    50%, 75% { opacity: 0; }
}

.image-container img:nth-child(1) {
    animation: imageAnimation 18s infinite;
    animation-delay: 0s;
}
.image-container img:nth-child(2) {
    animation: imageAnimation 18s infinite;
    animation-delay: 6s;
}
.image-container img:nth-child(3) {
    animation: imageAnimation 18s infinite;
    animation-delay: 12s;
}

.image-with-text {
    display: flex;
    align-items: center;
}

.marquee, .marquee-nonpause {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
    line-height: 1;
    margin: 0;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    line-height: 0;
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.button-container {
    width: 100%;
    line-height: 0;
    margin: auto auto;
    text-align: center;
}

.button-container img {
    margin: 0;  
}

.button-background {
  background-image: url("../assets/background/water_day.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  animation: scrollBg 120s linear infinite;
}
@keyframes scrollBg {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -848px 0; 
  }
}
.button-background-color {
  background-color: #00197d;  
}
.bar-beach {
  background-image:url('../assets/dividers/bar3.png')
}

.pixel-container {
    width: 100%;
}

.project-card-div {
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

a:hover .project-card-div {
    background-color: #b9d8e8;
}

.cool-text {
    font-family: 'DotGothic16'; 
    font-size: 16px;
    line-height: 1.5;
    color: black;
    margin: 0;
}

.images-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.images-flex img {
    margin: 10px;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;  
}

.button-pattern {
    background-image: url('../assets/background/bg57.gif');
    border: 1px solid #5f93b3;
}

.button-pattern-2 {
    background-image: url('../assets/background/bg51.gif');
    border: 1px solid #5f93b3;
}


.category-description {
    font-family: 'DotGothic16';
    font-size: 16px;
}


.pixel-button {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    background-color: #b9d8e8;
    color: #4a4a4a;
    border: 4px solid #5f93b3;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 #5f93b3;
    text-shadow: 1px 1px white;
    width: 95%;
}

.pixel-button::before {
  content: 'Light theme';
  text-align: center;
}

.pixel-button:hover {
    background-color: #a9d2e6;
    color: #333;
    box-shadow: 2px 2px 0 #5f93b3;
    transform: translate(2px, 2px);
}

.pixel-button:active {
    background-color: #93bdda;
    box-shadow: none;
    transform: translate(4px, 4px);
}

.invertable-border {
	border: 1px solid #5f93b3;
}

.bottom-pattern {
background-image:  url('../assets/background/shape_3_3.png');
box-sizing: border-box;
}

.bottom-pattern img {
outline: 1px solid #5f93b3;
background-color: white;
padding: 8px;
}


/* ======= DARK THEME ======= */

body.dark .bottom-pattern {
background-image:  url('../assets/background/shape_2_3.png');
}


body.dark {
    background-color: #121217;
    color: white;
    background-color: #355a73;
    background-image: url('../assets/background/star-bg-blue.webp');
    background-repeat: repeat;
    background-attachment: fixed;
}

body.dark .container {
    background-color: #1c1c26;
    border-color: #3ea0ff;
}

body.dark .navigation-elements {
    background-color: #23232f;
    border-color: #3ea0ff;
    box-shadow: 0 0 8px rgba(62, 160, 255, 0.7);
}

body.dark .content {
    background-color: #1c1c26;
    color: white;
    border-color: #3ea0ff;
    box-shadow: 0 0 12px rgba(62, 160, 255, 0.6);
}

body.dark a {
    color: #3ea0ff;
    transition: color 0.3s ease;
}

body.dark a:hover {
    color: #1a8cff;
}

body.dark a:hover .project-card-div {
    background-color: #2a2a38;
}

body.dark .cool-text {
    color: white;
}

body.dark .cool-pattern-2 {
    border-color: #3ea0ff;
}

body.dark .category-description {
    color: white;
}

body.dark .button-pattern {
	background-image: url('../assets/background/shape_2_4.png');
	border-color: white;
	background-position: center; 
}

body.dark .button-pattern-2 {
	background-color: #121217;
	opacity: 1;
	background-size: 20px 20px;
	background-image:  repeating-linear-gradient(to right, #3ea0ff, #3ea0ff 1px, #121217 1px, #121217);
        border-color: white;
}


body.dark .invert {
	filter: invert(100%);
}

body.dark .pixel-button {
    background-color: #23232f;
    color: #3ea0ff;
    border-color: #3ea0ff;
    box-shadow: 4px 4px 0 rgba(62, 160, 255, 0.6);
    text-shadow: 1px 1px #000;
}

body.dark .pixel-button::before {
  content: 'Dark theme';
  text-align: center;
}

body.dark .pixel-button:hover {
    background-color: #2a2a38;
    color: #ffffff;
    box-shadow: 2px 2px 0 rgba(62, 160, 255, 0.6);
    transform: translate(2px, 2px);
}

body.dark .pixel-button:active {
    background-color: #1c1c26;
    box-shadow: none;
    transform: translate(4px, 4px);
}

body.dark .invertable-border {
	border: 1px solid white;
}

body.dark .button-background {
  background-image: url("../assets/background/water_night.png");  
}

body.dark .button-background-color {
  background-color: #000020;
background-image:
radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 10px),
radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 5px),
radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 10px),
radial-gradient(rgba(255,255,255,.4), rgba(255,255,255,.1) 2px, transparent 5px);
background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px; 
background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;

  animation: scrollBg 400s linear infinite;
}

body.dark .bar-beach {
  background-image:url('../assets/dividers/bar_night.png')
}
/* ===== blob-blue scrollbars ===== */
* { scrollbar-color: #7db2d4 #dcecf7e0; scrollbar-width: auto; }
html { scrollbar-color: #7db2d4 #dceef7; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #dceef7; }
::-webkit-scrollbar-thumb { background: #7db2d4; border: 2px solid #5f93b3; }
::-webkit-scrollbar-thumb:hover { background: #5f93b3; }
::-webkit-scrollbar-corner { background: #dceef7; }
/* ===== aligned navigation: icons in a fixed column, labels tidy ===== */
.navigation-elements ul { text-align: left; padding: 0; }
.navigation-elements ul li a { display: flex !important; align-items: center; gap: 10px; }
.navigation-elements ul li a img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }

/* ===== TOVU / PERSONAL WEBSPACE RECOMPOSITION ===== */
:root {
  --bw-ink:#182b3b;
  --bw-paper:#f4ead8;
  --bw-paper-2:#fffaf0;
  --bw-mint:#7fc9c2;
  --bw-mint-dark:#2d7d7a;
  --bw-coral:#ef795b;
  --bw-blue:#377c9f;
  --bw-line:#182b3b;
  --bw-shadow:#0d1b26;
}

html { scrollbar-color:var(--bw-coral) var(--bw-ink); }
body {
  min-height:100vh;
  height:auto;
  display:block;
  padding:28px;
  color:var(--bw-ink);
  background-color:#122738;
  background-image:none;
}
.site-backdrop,.star-background {
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
}
.site-backdrop {
  background-color:#122738;
  background-image:none;
  transition:background-color .65s ease,background-image .65s ease;
}
.star-background {
  background-image:url('../assets/background/star-bg-blue.webp');
  background-repeat:repeat;
  background-size:420px auto;
  opacity:.42;
  filter:none;
  mix-blend-mode:normal;
  transition:opacity .65s ease,filter .65s ease;
}
body.theme-green .site-backdrop {
  background-color:#c9e65b;
  background-image:radial-gradient(circle at 50% 35%,#d6eb76 0%,#c9e65b 58%,#bdd64e 100%);
}
body.theme-green .star-background {
  opacity:.72;
  filter:hue-rotate(250deg) saturate(.55) brightness(1.1) contrast(1.12);
  mix-blend-mode:normal;
}
body.dark:not(.theme-green) .site-backdrop { background-color:#07131d; }
body::before {
  content:"TOVU // SELF-HOSTED DIGITAL FAMILIAR";
  position:fixed;
  z-index:10000;
  top:0;left:0;right:0;
  height:24px;
  display:flex;align-items:center;
  padding:0 30px;
  box-sizing:border-box;
  color:var(--bw-paper);
  background:var(--bw-ink);
  border-bottom:1px solid var(--bw-mint);
  font-family:'DotGothic16',monospace;
  font-size:10px;
  letter-spacing:.12em;
}
.container {
  position:relative;
  box-sizing:border-box;
  width:min(1320px,100%);
  max-width:1320px;
  min-height:calc(100vh - 56px);
  height:auto;
  margin:0 auto;
  padding:14px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 260px 230px;
  gap:14px;
  align-items:start;
  overflow:visible;
  border:3px solid var(--bw-ink);
  border-radius:0;
  background:var(--bw-paper);
  box-shadow:12px 12px 0 rgba(0,0,0,.3);
}
.content-wrapper { order:1; min-width:0; margin:0; overflow:visible; }
.microblog { order:2; width:auto; height:calc(100vh - 90px); min-height:650px; position:sticky; top:38px; border:2px solid var(--bw-ink); background:var(--bw-paper-2); }
.navbar { order:3; width:auto; min-width:0; position:sticky; top:38px; overflow:visible; }
.content {
  padding:26px;
  overflow:hidden;
  border:2px solid var(--bw-ink);
  border-radius:0;
  box-shadow:none;
  background:var(--bw-paper-2);
  color:var(--bw-ink);
}
.content > h1 {
  margin:-26px -26px 26px;
  padding:24px 26px 18px;
  color:var(--bw-paper-2);
  background:var(--bw-ink);
  border-bottom:5px solid var(--bw-coral);
  font-size:clamp(25px,3vw,42px);
  line-height:1.2;
  text-align:left !important;
  letter-spacing:-.05em;
}
.content > hr:first-of-type { display:none; }
.content h2 { color:var(--bw-ink); font-size:21px; }
.content a { color:var(--bw-blue); text-decoration:underline; text-decoration-style:dotted; text-underline-offset:3px; }
.image-with-text { gap:18px; align-items:start; }
.image-with-text > * { min-width:0; }
img[src*="tovu-seal.png"] { width:220px !important; height:220px !important; padding:16px !important; object-fit:contain !important; box-sizing:border-box; }
.navigation-elements,.music-player-box {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  margin:0 0 14px !important;
  padding:12px !important;
  color:var(--bw-ink) !important;
  background:var(--bw-mint) !important;
  border:2px solid var(--bw-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bw-shadow) !important;
}
.navigation-elements::before { content:"DIRECTORY / 01"; display:block; margin-bottom:10px; padding-bottom:7px; border-bottom:1px solid var(--bw-ink); font-family:'DotGothic16',monospace; font-size:10px; letter-spacing:.12em; }
.navigation-elements > .marquee-nonpause { display:none; }
.navigation-elements ul { margin:0; }
.navigation-elements li { margin:0; border-bottom:1px dashed rgba(24,43,59,.35); }
.navigation-elements li:last-child { border-bottom:0; }
.navigation-elements ul li a { padding:7px 2px; color:var(--bw-ink); font-size:12px; text-decoration:none; }
.navigation-elements ul li a:hover { color:var(--bw-paper-2); background:var(--bw-ink); }
.pixel-button { width:100%; min-width:0; margin:0 0 14px !important; border:2px solid var(--bw-ink); border-radius:0; color:var(--bw-ink); background:var(--bw-coral); box-shadow:5px 5px 0 var(--bw-shadow); }
.nice-box { background:var(--bw-paper-2); border:1px solid var(--bw-ink) !important; border-radius:0; }
.nice-box .title { color:var(--bw-ink); background:var(--bw-paper-2); }
.cool-pattern { background-color:var(--bw-paper-2) !important; background-image:radial-gradient(var(--bw-mint) 1px,transparent 1px) !important; background-size:8px 8px !important; }
.marquee,.marquee-nonpause { border-top:1px solid var(--bw-ink); border-bottom:1px solid var(--bw-ink); background:var(--bw-paper); }
.marquee-content { animation-duration:28s; }
.cool-text { color:var(--bw-ink); }
.warning { display:none; }
body > .top-overlay { opacity:1; z-index:1; pointer-events:none; }
.top-overlay .cloud-theme-control {
  pointer-events:auto;
  cursor:pointer;
  transition:transform .18s ease;
}
.top-overlay .cloud-theme-control:hover { transform:translateY(-2px); }
.top-overlay .cloud-theme-control:focus-visible { outline:2px dotted var(--bw-paper); outline-offset:-8px; }
.about-logo-wrap { flex:0 0 64px; }
.about-logo-wrap .tovu-about-logo { width:64px; height:auto; max-width:none; object-fit:contain; box-sizing:border-box; padding:6px; }
.bottom-overlay { pointer-events:none; }
.bottom-overlay:nth-of-type(3) { opacity:.6; }
.bottom-overlay:nth-of-type(4) { display:none; }
.casio-tv-container { pointer-events:auto; }
.phone-container,.button-container,.media-i-like { max-width:100%; }
img { max-width:100%; }

body.dark { color:#dbe9e7; background-color:#07131d; }
body.dark .container { background:#101f2a; border-color:var(--bw-mint); }
body.dark .content { background:#132633; color:#dbe9e7; border-color:var(--bw-mint); }
body.dark .content > h1 { background:#08151f; color:#dbe9e7; }
body.dark .content h2,body.dark .content h3 { color:#dbe9e7; }
body.dark .nice-box { background:#132633; border-color:var(--bw-mint) !important; }
body.dark .nice-box .title { background:#132633; color:#dbe9e7; }

@media (max-width:1080px) {
  body { padding:24px 12px 20px; }
  .container { grid-template-columns:minmax(0,1fr) 230px; }
  .content-wrapper { grid-column:1; }
  .navbar { grid-column:2; grid-row:1; }
  .microblog { grid-column:1/-1; grid-row:2; position:relative; top:0; height:520px; min-height:0; }
}
@media (max-width:720px) {
  body { padding:24px 0 0; overflow-x:hidden; }
  body::before { padding:0 12px; font-size:8px; }
  .container { width:100%; display:flex; flex-direction:column; padding:8px; border-left:0;border-right:0;box-shadow:none; }
  .navbar { order:1; position:static; width:100%; }
  .navigation-elements { padding:8px !important; }
  .navigation-elements::before { display:none; }
  .navigation-elements ul { display:flex; gap:4px; overflow-x:auto; scrollbar-width:none; }
  .navigation-elements li { flex:none; border:0; }
  .navigation-elements ul li a { padding:6px 9px; border:1px solid var(--bw-ink); }
  .navigation-elements ul li a img { width:20px;height:20px; }
  .navbar > .music-player-box,.navbar > .warning { display:none; }
  .pixel-button { min-height:34px; }
  .content-wrapper,.content,.image-with-text { min-width:0 !important; max-width:100% !important; width:100% !important; box-sizing:border-box !important; }
  .content-wrapper { order:2; }
  .content { padding:18px 14px; overflow:hidden; }
  .content p,.content h1,.content h2,.content h3 { max-width:100%; overflow-wrap:anywhere; }
  .content > .image-with-text > div,.content > .image-with-text p { width:calc(100vw - 52px) !important; max-width:calc(100vw - 52px) !important; }
  .content > h1 { margin:-18px -14px 20px; padding:20px 14px 14px; font-size:27px; }
  .image-with-text { display:block; }
  .image-with-text > div { width:100% !important; }
  img[src*="tovu-seal.png"] { display:block; width:190px !important; height:190px !important; margin:0 auto; padding:8px !important; }
  .marquee,.marquee-nonpause { max-width:100%; }
  .icon-container { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .microblog { order:3; width:100%; height:520px; border-width:2px; }
  .top-overlay { display:none; }
  .bottom-overlay { opacity:.7; }
  .phone-text { left:17%; width:65%; }
}



