/*
 * Marcelo's Portfolio - Windows 95 Style
 * Based on Orteil's portfolio design
 */

* {
  box-sizing: border-box;
  padding: 0px;
  margin: 0px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  text-rendering: optimizeSpeed;
}

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 10px;
  color: #000;
  cursor: url('cursor.png') 0 0, auto;
}

#wrapper {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #000033;
  background-image: url('./bg-tile.png');
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nosel, .title, .li, #head, #back {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* === WINDOW CHROME - PURE CSS WINDOWS 95 STYLE === */

.window {
  display: inline-block;
  position: relative;
  text-align: initial;
  width: 200px;
  z-index: 2;
  vertical-align: top;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 2px;
  background: #c0c0c0;
  animation: open 0.3s ease-out;
  transform: scale(1, 0);
  animation-fill-mode: forwards;
}

.window-inner {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background: #c0c0c0;
  margin-top: 2px;
}

.title-bar {
  display: block;
  position: relative;
  height: 18px;
  background:
    linear-gradient(calc(var(--grad-pos, 90) * 1deg), rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 40%, transparent 70%),
    linear-gradient(90deg, #1084d0, #000080);
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000080;
  border-bottom: 1px solid #000080;
  z-index: 10;
  margin: 0;
}

.title {
  position: static !important;
  display: block !important;
  text-align: center !important;
  line-height: 16px !important;
  font-weight: normal !important;
  text-shadow: 1px 0px 0px #000 !important;
  color: #ffffff !important;
  font-size: 9px !important;
  padding: 0px 8px !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100 !important;
  white-space: nowrap;
}

.desc {
  background: #c0c0c0;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 2px 4px;
}

.inner, .li a > div, #head {
  background: #c0c0c0;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

/* === LIST ITEMS === */

.li {
  background: #c0c0c0;
  border-bottom: 1px solid #fff;
  font-size: 11px;
  height: 25px;
  position: relative;
}

.li:first-of-type {
  border-top: 1px solid #fff;
}

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

.li a {
  width: 100%;
  height: 100%;
  display: inline-block;
  padding-left: 28px;
  padding-top: 3px;
  padding-right: 4px;
  text-decoration: none;
}

.li img {
  position: absolute;
  left: 2px;
  top: 0px;
  border-right: 1px solid #fff;
  padding-right: 4px;
  padding-top: 2px;
  padding-bottom: 2px;
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.li a:hover img { border-right: 1px solid #666; }
.li a:active img { border-right: 1px solid #000; }

.li a > div {
  display: none;
  background: #1a3050;
  color: #fff;
  position: absolute;
  left: 4px;
  bottom: 100%;
  right: 4px;
  z-index: 100;
  padding: 8px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
  pointer-events: none;
  font-size: 10px;
  border: 1px solid #000;
}

.li a > div b {
  text-shadow: 1px 0px 0px #fff, 0px 1px 0px #000;
  display: block;
  margin-bottom: 4px;
}

.li a:hover > div {
  display: block;
}

/* === TYPOGRAPHY & COLORS === */

b, .title {
  font-weight: normal;
  text-shadow: 1px 0px 0px #000;
}

a { color: #000080; cursor: url('install_h.png') 0 0, pointer; }
a:visited { color: #800080; cursor: url('install_h.png') 0 0, pointer; }

.li a:hover, .li a:active {
  color: #fff;
  background: #000080;
}

.li a:active {
  background: #000040;
}

p {
  text-indent: 8px;
  line-height: 110%;
  margin-bottom: 6px;
}

/* === GLOW WRAPPERS === */

.window-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin: 4px;
  width: 200px;
}

#Wabout-wrapper {
  display: block;
  margin: 10px auto;
  width: 200px;
}

.window-glow {
  position: absolute;
  top: -15px;
  left: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  background: black;
  filter: blur(25px);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  animation: glowFadeIn 1s ease-out forwards;
  animation-delay: 0.3s;
}

.header-wrapper {
  position: relative;
  display: inline-block;
  margin: 4px auto;
  width: 197px;
}

.header-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  background: black;
  filter: blur(20px);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  animation: glowFadeIn 1s ease-out forwards;
  animation-delay: 0.3s;
}

/* === LAYOUT === */

#Wabout, #Wgames, #Wtoys, #Wexps, #Wlinks {
  margin: 4px;
  vertical-align: top;
  display: inline-block;
}

#anchor {
  display: block;
  text-align: center;
}

#Wabout {
  display: block;
  margin: 10px auto;
}

.other-windows {
  display: block;
  text-align: center;
}

/* === HEADER & BACK LINK === */

#head {
  position: relative;
  z-index: 101;
  font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', serif;
  font-size: 18px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0px #000;
  background:
    linear-gradient(calc(var(--grad-pos, 90) * 1deg), rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 40%, transparent 70%),
    linear-gradient(90deg, #1084d0, #000080);
  color: #fff;
  font-variant: small-caps;
  padding: 6px 0px;
  display: inline-block;
  margin: 4px auto;
  width: 197px;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 0px;
}

#back {
  position: relative;
  z-index: 101;
  text-shadow: 0px 1px 0px #fff;
  display: inline-block;
  background: #c0c0c0;
  padding: 2px 6px;
  margin-top: -2px;
  padding-bottom: 3px;
  color: #000080;
  text-decoration: none;
  cursor: url('install_h.png') 0 0, pointer;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}

#back:hover { text-decoration: none; background: #dfdfdf; }
#back:active {
  background: #808080;
  color: #fff;
  text-shadow: 1px 1px 0px #000;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

/* === ANIMATION === */

@keyframes open {
  0% { transform: scale(1, 0); }
  60% { transform: scale(1.03, 1.05); }
  100% { transform: scale(1, 1); }
}

@keyframes glowFadeIn {
  0% { opacity: 0; }
  100% { opacity: 0.85; }
}

#Wabout { animation-delay: 0.05s; }
#Wgames { animation-delay: 0.15s; }
#Wtoys { animation-delay: 0.10s; }
#Wexps { animation-delay: 0.25s; }
#Wlinks { animation-delay: 0.20s; }

/* === RESPONSIVE === */

@media (max-width: 600px) {
  .window {
    display: block;
    margin: 4px auto;
    width: 90%;
    max-width: 200px;
  }

  #anchor {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
