/* 
// ╔╗ ╔═╗╔╗╔╔╦╗╔═╗
// ╠╩╗║╣ ║║║ ║ ║ ║
// ╚═╝╚═╝╝╚╝ ╩ ╚═╝ 
*/

/* 
//  ┬  ┬┌─┐┬─┐┬┌─┐┌┐ ┬  ┌─┐┌─┐
//  ┐┌┘├─┤├┬┘│├─┤├┴┐│  ├┤ └─┐
//  ┘ ┴ ┴┴└─┴┴ ┴└─┘┴─┘└─┘└─┘ 
 */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&display=swap'); /* Font Import */

:root {
  --fg-primary: 12vh;
  --fg-secondary: 3vh;
  --fg-date: 8vh;
  --fg-list: 2vh;
  --icon: 3vh;
  --fg: #1d1d1f;
  --sfg: #6e6e73;
  --accent: rgba(0, 122, 255, 0.75);
  --background: #f5f5f7;
  --cards: rgba(20, 22, 30, 0.72);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --glass-highlight: rgba(255, 255, 255, 0.32);
  --imgbg: url(assets/background.jpg);
  --imgcol: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0));
}

.darktheme {
  --accent: rgba(10, 132, 255, 0.85);
  --background: #000000;
  --cards: rgba(16, 18, 26, 0.78);
  --glass-border: rgba(255, 255, 255, 0.32);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.14);
  --fg: #f5f5f7;
  --sfg: #a1a1a6;
  --imgcol: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0));
}

/* 
//  ┌─┐┌┬┐┬ ┬┬  ┌─┐┌─┐
//  └─┐ │ └┬┘│  ├┤ └─┐
//  └─┘ ┴  ┴ ┴─┘└─┘└─┘ 
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  transition: 0.2s ease-in-out;
}

body {
  width: 100vw;
  height: 100vh;
  background-color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notransition {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}

.withImageBackground {
  background-image: var(--imgcol), var(--imgbg);
  background-size: cover;
}

#themeButton {
  position: absolute;
  margin: 2em 2em 0 0;
  right: 0;
  top: 0;
  color: var(--fg);
  border: none;
  cursor: pointer;
  background-color: #00000000;
}

#themeIcon {
  width: 25px;
  height: 25px;
}

.container {
  width: 145vh;
  height: 85vh;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  grid-gap: 30px;
  padding: 20px;
}

.card {
  background: var(--cards);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
}

.card:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.42);
}

.timeBlock {
  grid-row: 1 / span 2;
  grid-column: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.weatherBlock {
  grid-column: 3 / span 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.date {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}

.weather {
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock {
  display: flex;
  align-items: center;
  justify-content: center;
}

#hour,
#separator,
#minutes {
  font-size: var(--fg-primary);
  font-weight: bolder;
  color: var(--fg);
}

#month,
#day {
  font-size: var(--fg-date);
  font-weight: bold;
  color: var(--fg);
}

#day {
  margin-left: 1.5rem;
}

#greetings {
  font-size: var(--fg-secondary);
  color: var(--fg);
}

.weatherIcon img {
  width: 70px;
  height: 70px;
}

.weatherValue p {
  font-size: var(--fg-secondary);
  font-weight: bolder;
  margin-left: 15px;
  color: var(--fg);
}

.weatherDescription p {
  font-size: var(--fg-secondary);
  margin-left: 15px;
  color: var(--fg);
}

.reduceGap {
  grid-gap: 2rem !important;
}

.removeGap {
  grid-gap: 0 !important;
}

.linksBlock {
  grid-row: 3 / span 2;
  grid-column: 1 / span 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-gap: 1.5rem;
}

.linksBlockLeft {
  grid-row: 1 / span 2;
  grid-column: 1 / span 2;
}

.linksBlockRight {
  grid-row: 1 / span 2;
  grid-column: 3 / span 2;
}

.buttonsContainer {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-gap: 30px;
  padding: 20px;
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.buttonIcon {
  width: var(--icon);
  height: var(--icon);
  color: var(--fg);
}

.button__1 {
  grid-row: 1;
  grid-column: 1;
}
.button__2 {
  grid-row: 1;
  grid-column: 2;
}
.button__3 {
  grid-row: 2;
  grid-column: 1;
}
.button__4 {
  grid-row: 2;
  grid-column: 2;
}
.button__5 {
  grid-row: 1;
  grid-column: 3;
}
.button__6 {
  grid-row: 2;
  grid-column: 3;
}
.button:hover {
  background-color: var(--glass-highlight);
}
.button:hover svg {
  stroke: var(--sfg);
}

.listsContainer {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-gap: 3rem;
  padding: 0.4rem;
}

.list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.list__1 {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.list__2 {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.listIcon {
  /* margin-top: 3vh; */
  margin-bottom: 2vh;
  color: var(--fg);
  width: var(--icon);
  height: var(--icon);
}
.listItem {
  text-decoration: none;
  font-size: var(--fg-list);
  color: var(--fg);
  margin-top: 1vh;
  padding: 8px 12px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  width: 80%;
}
.listItem:hover {
  background-color: var(--glass-highlight);
  color: var(--fg);
  font-weight: 700;
}

/* M E D I A - Q U E R I E S */

@media only screen and (max-width: 68.75em) {
  .container {
    grid-gap: 20px;
    padding: 40px;
  }

  .timeBlock {
    grid-row: 1 / span 2;
    grid-column: 1 / span 4;
  }

  .weatherBlock {
    display: none;
  }

  #greetings {
    font-size: var(--fg-secondary);
  }

  .linksBlockRight {
    display: none;
  }

  .linksBlockLeft {
    grid-column: 1 / span 4;
  }

  .button {
    grid-gap: 3vw;
    padding-left: 100px;
    padding-right: 100px;
  }
}


#themeButton {
  background: var(--cards) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border) !important;
  border-radius: 14px;
  padding: 0.6em;
  box-shadow: var(--glass-shadow);
}


/* ui-visibility-on-cosmos — header rearrange */
.container {
  position: relative;
  z-index: 2;
}

/* Top header: time left, date right; free more space for cards */
.timeBlock {
  grid-row: 1 / span 1 !important;
  grid-column: 1 / span 2 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2.2vh;
  width: fit-content !important;
  max-width: 100%;
  padding: 1.4vh 2.4vh !important;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  z-index: 4;
  align-self: end;
  margin-bottom: 0.5vh;
}

.timeBlock .clock {
  display: flex;
  align-items: baseline;
  gap: 0.2vh;
  line-height: 1;
}

.timeBlock #greetings {
  margin: 0 !important;
  padding-left: 0.4vh;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 2vh;
  white-space: nowrap;
  align-self: center;
}

.weatherBlock {
  grid-row: 1 / span 1 !important;
  grid-column: 3 / span 2 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: fit-content !important;
  max-width: 100%;
  justify-self: end;
  align-self: end;
  padding: 1.4vh 2.4vh !important;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  z-index: 4;
  margin-bottom: 0.5vh;
}

/* hide broken empty weather; keep date only */
.weatherBlock .weather {
  display: none !important;
}

.weatherBlock .date {
  margin-top: 0 !important;
  gap: 1.2vh;
}

/* cards get more vertical room */
.linksBlock {
  grid-row: 2 / span 3 !important;
  grid-column: 1 / span 4 !important;
}

.clock,
#greetings,
#hour,
#minutes,
#separator,
#month,
#day {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

#hour,
#separator,
#minutes {
  font-size: 8.5vh !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

#month,
#day {
  font-size: 5.5vh !important;
  font-weight: 700;
  line-height: 1;
}

#greetings {
  font-size: 2.4vh !important;
  font-weight: 600;
  opacity: 0.92;
}

#themeButton {
  position: absolute !important;
  z-index: 20 !important;
  right: 1.2rem !important;
  top: 1.2rem !important;
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(14px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#themeButton svg,
#themeIcon,
#themeButton i {
  width: 22px !important;
  height: 22px !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  opacity: 1 !important;
}

@media only screen and (max-width: 68.75em) {
  .timeBlock {
    grid-column: 1 / span 4 !important;
    flex-wrap: wrap;
  }
  .weatherBlock {
    display: none !important;
  }
}


/* ui-visibility-on-cosmos — compact Apple header + denser cards */
.container {
  position: relative;
  z-index: 2;
  align-content: start;
  padding-top: 3vh !important;
}

/* Merge look: one top bar feel — time+greet left cluster, date beside it */
.timeBlock {
  grid-row: 1 / span 1 !important;
  grid-column: 1 / span 3 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2vh;
  width: max-content !important;
  max-width: calc(100% - 2vh);
  padding: 1.1vh 2.2vh !important;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  z-index: 4;
  align-self: start;
  justify-self: start;
  margin: 0 !important;
}

.weatherBlock {
  grid-row: 1 / span 1 !important;
  grid-column: 1 / span 3 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: max-content !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 5;
  /* visually tuck date into the same pill via negative overlap is fragile;
     instead place date as sibling pill next to time */
  align-self: start;
  justify-self: start;
  margin-left: min(52vh, 46vw);
  margin-top: 0.15vh;
}

.weatherBlock .weather { display: none !important; }
.weatherBlock .date {
  margin: 0 !important;
  gap: 1vh;
  padding: 1.1vh 2vh;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.timeBlock .clock {
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  line-height: 1;
}

.timeBlock #greetings {
  margin: 0 !important;
  padding-left: 1.8vh;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  font-size: 2.2vh !important;
  font-weight: 600;
  opacity: 0.95;
}

/* service cards: shorter, denser, less empty */
.linksBlock {
  grid-row: 2 / span 3 !important;
  grid-column: 1 / span 4 !important;
  align-content: center;
  padding-top: 2vh;
}

.listsContainer {
  grid-template-rows: 1fr !important;
  grid-gap: 1.6rem !important;
  padding: 0 !important;
  align-items: stretch;
  height: auto !important;
  min-height: 42vh;
}

.list,
.card.list {
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding: 2.2vh 2vh !important;
  gap: 0.6vh;
  min-height: 0 !important;
  height: auto !important;
}

.listIcon {
  align-self: center;
  margin-bottom: 1.2vh;
  width: 3.2vh !important;
  height: 3.2vh !important;
}

.listItem {
  width: 100%;
  text-align: center;
  margin: 0.35vh 0 !important;
  padding: 1.1vh 1vh !important;
  border-radius: 12px;
  font-size: 2vh !important;
  font-weight: 600;
}

.clock,
#greetings,
#hour,
#minutes,
#separator,
#month,
#day {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

#hour,
#separator,
#minutes {
  font-size: 6.8vh !important;
  font-weight: 800;
  line-height: 1;
}

#month,
#day {
  font-size: 3.6vh !important;
  font-weight: 700;
  line-height: 1;
}

#day { margin-left: 0.8vh !important; }

#themeButton {
  position: absolute !important;
  z-index: 30 !important;
  right: 1.2rem !important;
  top: 1.2rem !important;
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(14px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

#themeButton svg,
#themeIcon,
#themeButton i {
  width: 22px !important;
  height: 22px !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
}

@media only screen and (max-width: 68.75em) {
  .timeBlock { grid-column: 1 / span 4 !important; }
  .weatherBlock { display: none !important; }
}


.timeBlock .dateInline {
  display: flex;
  align-items: center;
  margin-left: 0.4vh;
  padding-left: 1.8vh;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.timeBlock .dateInline .date {
  margin: 0 !important;
  gap: 1vh;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.weatherBlock { display: none !important; }


/* cosmosBright */
.withImageBackground {
  filter: none;
}
body.withImageBackground::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--imgbg);
  background-size: 120% 120%;
  background-position: 0% 50%;
  animation: cosmosDrift 32s ease-in-out infinite alternate;
  filter: brightness(0.75) contrast(1.05) saturate(0.9);
}
body.withImageBackground {
  background-color: #050510 !important;
  background-image: none !important;
  animation: none !important;
}
#starfieldCanvas { z-index: 1 !important; }
.container { z-index: 2 !important; }


/* readability-boost */
.card,
.card.list {
  background: rgba(12, 14, 22, 0.82) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45) !important;
}

.listItem,
.listItem:link,
.listItem:visited {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  font-weight: 700 !important;
  opacity: 1 !important;
}

.listItem:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

.listIcon,
.buttonIcon,
.card svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  opacity: 1 !important;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}

.timeBlock {
  background: rgba(8, 10, 18, 0.82) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.timeBlock,
.timeBlock * {
  color: #ffffff !important;
}

#themeButton {
  background: rgba(8, 10, 18, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
}

/* dim animated solar layer so UI wins */
#starfieldCanvas {
  opacity: 0.55 !important;
}
