/* =============================================================================
   CSS Variables
   ============================================================================= */

:root {
  /* Fonts */
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, 
               "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, 
               Helvetica, "Helvetica Neue", sans-serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;

  /* Colors - Base */
  --bg: #E7EAE5;
  --accent-bg: #E7EAE5;
  --section-bg: #E7EAE5;
  --text: #191923;
  --text-light: #0C0908;
  --border: #191923;
  --accent: #010B13;
  --disabled: #efefef;
  --link-hover: #ed7117;

  /* Colors - Code */
  --code: #FF2400;
  --preformatted: #444;
  --marked: #FC7405;

  /* Colors - Custom Palette */
  --color1: #E11584;
  --color2: #936f41;
  --color3: #7F5112;
  --color4: #FF2400;
  --color5: #27292B;
  --color6: #6c6e6e;
  --color7: #B87B5C;
  --color8: #89A203;
  --color9: #861a97;
  --color10: #78280b;
  --color11: #196bcc;
  --color12: #f1b002;	

  /* Layout */
  --base-padding: 1rem;
  --base-border: 1px solid #191923;
}


/* =============================================================================
   Reset and Base Styles
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

textarea,
select,
input,
progress {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

html {
  font-family: var(--sans-font);
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background-color: var(--bg);
  font-size: 0.9rem;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  width: 100%;
  font-family: sans-serif;
}


/* =============================================================================
   Layout - Structural Elements
   ============================================================================= */

body > * {
  width: 100%;
  max-width: 54rem;
  background-color: transparent;
  backdrop-filter: none;
  border-radius: 0;
}

body > header {
  background-color: var(--section-bg);
  border: var(--base-border);
  padding: var(--base-padding);
  text-align: center;
  border-radius: 0 !important;
}

body > header h1 {
  max-width: 1200px;
  margin: 1rem auto;
}

body > header p {
  max-width: 40rem;
  margin: 1rem auto;
}

body > footer {
  margin-top: 4rem;
  padding: 2rem 1rem 1.5rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
  border-top: var(--base-border);
  width: 100%;
  max-width: 54rem;
  background-color: transparent !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
}

.top-header {
  background-color: var(--bg);
  padding: var(--base-padding);
  text-align: center;
  border: var(--base-border);
  margin-top: 0.5rem;
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
}

.main-header {
  background-color: var(--section-bg);
  padding: var(--base-padding);
  text-align: center;
  border: var(--base-border);
  border-top: none;
  width: 100%;
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
}

main {
  padding-top: 0.5rem;
  flex-grow: 1;
  width: 100%;
  max-width: 54rem;
}


/* =============================================================================
   Typography
   ============================================================================= */

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.6rem;
  margin-top: 3rem;
}

h3 {
  font-size: 2rem;
  margin-top: 3rem;
}

h4 {
  font-size: 1.44rem;
}

h5 {
  font-size: 1.15rem;
}

h6 {
  font-size: 0.96rem;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

/* Mobile Typography */
@media only screen and (max-width: 720px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  h4 {
    font-size: 1.25rem;
  }
}


/* =============================================================================
   Links and Buttons
   ============================================================================= */

a,
a:visited {
  color: var(--accent);
}

a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"],
label[type="button"] {
  border: none;
  background-color: var(--accent);
  font-size: 1rem;
  color: var(--bg);
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0;
}

button[disabled],
[role="button"][aria-disabled="true"],
input[type="submit"][disabled],
input[type="reset"][disabled],
input[type="button"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][disabled],
select[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  background-color: var(--disabled);
}

input[type="range"] {
  padding: 0;
}

abbr[title] {
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

button:focus,
button:enabled:hover,
[role="button"]:focus,
[role="button"]:not([aria-disabled="true"]):hover,
input[type="submit"]:focus,
input[type="submit"]:enabled:hover,
input[type="reset"]:focus,
input[type="reset"]:enabled:hover,
input[type="button"]:focus,
input[type="button"]:enabled:hover,
label[type="button"]:focus,
label[type="button"]:hover {
  filter: brightness(1.4);
  cursor: pointer;
}


/* =============================================================================
   Navigation
   ============================================================================= */

header > nav {
  font-size: 1rem;
  line-height: 2;
  padding: 1rem 0 0 0;
}

header > nav ul,
header > nav ol {
  align-content: space-around;
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

header > nav ul li,
header > nav ol li {
  display: inline-block;
}

header > nav a,
header > nav a:visited {
  margin: 0 0.5rem 1rem 0.5rem;
  border: var(--base-border);
  color: var(--text);
  display: inline-block;
  padding: 0.1rem 1rem;
  text-decoration: none;
}

header > nav a:hover {
  border-color: var(--link-hover);
  color: var(--link-hover);
  cursor: pointer;
}

/* Mobile Navigation */
@media only screen and (max-width: 720px) {
  header > nav a {
    border: none;
    padding: 0;
    text-decoration: underline;
    line-height: 1;
  }
}


/* =============================================================================
   Content Blocks
   ============================================================================= */

aside,
details,
pre,
progress {
  background-color: #66C0DC;
  border: var(--base-border);
  margin-bottom: 1rem;
}

article,
fieldset {
  background-color: var(--section-bg);
  border: var(--base-border);
  padding: var(--base-padding);
  margin-bottom: 0.5rem;
}

article.no-padding {
  padding: 0;
}

article h2:first-child,
section h2:first-child {
  margin-top: 1rem;
}

article {
  position: relative;
}

article::after {
  content: attr(data-page);
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.top-article,
.main-article {
  padding: var(--base-padding);
  width: 100%;
}

.top-article {
  padding: 0.5rem 1rem;
  background-color: var(--bg);
  border-bottom: var(--base-border);
  text-align: center;
}

.main-article {
  background-color: var(--section-bg);
  text-align: center;
}

section {
  border-top: var(--base-border);
  border-bottom: var(--base-border);
  margin: 0;
  width: 100%;
  max-width: 54rem;
}

section + section,
section:first-child {
  border-top: 0;
  padding-top: 0;
}

section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

aside {
  font-size: 1rem;
  width: 30%;
  padding: 0 15px;
  margin-left: 15px;
  float: right;
}

/* Mobile Content Blocks */
@media only screen and (max-width: 720px) {
  aside {
    width: 100%;
    float: none;
    margin-left: 0;
  }
}

details {
  padding: 0.7rem 1rem;
}

summary:hover {
  cursor: pointer;
  font-weight: bold;
  padding: 0.7rem 1rem;
  margin: -0.7rem -1rem;
  word-break: break-all;
  color: #FC7405;
}

details[open] > summary + * {
  margin-top: 0;
}

details[open] > summary {
  margin-bottom: 0.5rem;
}

details[open] > :last-child {
  margin-bottom: 0;
}


/* =============================================================================
   Tables
   ============================================================================= */

.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 auto;
}

table {
  border-collapse: collapse;
  display: table;
  margin: 1.5rem auto;
  max-width: 100%;
  width: auto;
  background-color: var(--accent-bg);
}

td,
th {
  text-align: left;
  padding: 0.5rem;
  border: 1px solid var(--border);
}

th {
  background-color: var(--accent-bg);
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: var(--accent-bg);
}

table caption {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Mobile Tables */
@media only screen and (max-width: 720px) {
  table td,
  table th {
    padding: 0.3rem;
  }
}


/* =============================================================================
   Forms
   ============================================================================= */

textarea,
select,
input {
  font-size: inherit;
  font-family: inherit;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  background-color: var(--bg);
  border: var(--base-border);
  max-width: 100%;
  display: inline-block;
}

label {
  display: block;
}

textarea:not([cols]) {
  width: 100%;
}

select:not([multiple]) {
  background-image: 
    linear-gradient(45deg, transparent 49%, var(--text) 51%),
    linear-gradient(135deg, var(--text) 51%, transparent 49%);
  background-position: calc(100% - 15px), calc(100% - 10px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 25px;
}

input[type="checkbox"],
input[type="radio"] {
  vertical-align: middle;
  position: relative;
  width: min-content;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--accent);
}

input[type="checkbox"]:checked::after {
  content: " ";
  width: 0.18em;
  height: 0.32em;
  position: absolute;
  top: 0.05em;
  left: 0.17em;
  background-color: transparent;
  border-right: solid var(--bg) 0.08em;
  border-bottom: solid var(--bg) 0.08em;
  font-size: 1.8em;
  transform: rotate(45deg);
}

input[type="radio"]:checked::after {
  content: " ";
  width: 0.25em;
  height: 0.25em;
  position: absolute;
  top: 0.125em;
  background-color: var(--bg);
  left: 0.125em;
  font-size: 32px;
}

input[type="color"] {
  height: 2.5rem;
  padding: 0.2rem;
}

input[type="file"] {
  border: 0;
}

/* Mobile Forms */
@media only screen and (max-width: 720px) {
  textarea,
  select,
  input {
    width: 100%;
  }
}


/* =============================================================================
   Miscellaneous Elements
   ============================================================================= */

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 1rem auto;
}

mark {
  padding: 2px 5px;
  background-color: var(--marked);
}

img,
video {
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
  text-align: center;
}

figcaption {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

blockquote {
  margin: 2rem 0 2rem 2rem;
  padding: 0.4rem 0.8rem;
  border-left: 0.35rem solid var(--accent);
  color: var(--text-light);
  font-style: italic;
}

cite {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: normal;
}

dt {
  color: var(--text-light);
}

code,
pre,
pre span,
kbd,
samp {
  font-family: var(--mono-font);
  color: var(--code);
}

kbd {
  color: var(--preformatted);
  border: 2px solid var(--preformatted);
  border-bottom: 3px solid var(--preformatted);
  padding: 0.1rem 0.4rem;
}

pre {
  padding: 1rem 1.4rem;
  max-width: 100%;
  overflow: auto;
  color: var(--preformatted);
}

pre code {
  color: var(--preformatted);
  background: none;
  margin: 0;
  padding: 0;
}

progress {
  width: 100%;
}

progress:indeterminate {
  background-color: var(--accent-bg);
}

progress::-webkit-progress-bar {
  background-color: var(--accent-bg);
}

progress::-webkit-progress-value {
  background-color: var(--accent);
}

progress::-moz-progress-bar {
  background-color: var(--accent);
  transition-property: width;
  transition-duration: 0.3s;
}

progress:indeterminate::-moz-progress-bar {
  background-color: var(--accent-bg);
}


/* =============================================================================
   Custom Components
   ============================================================================= */

.social-links {
  text-align: center;
  margin-bottom: 1rem;
}

.social-links a {
  margin: 0 1rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--accent);
}

.social-links a:hover {
  text-decoration: underline;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: visible;
  max-width: 100%;
  background-color: #FFFBFE;
}

.video-wrapper .video-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0.75rem solid #191923;
  box-sizing: border-box;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* =============================================================================
   Particles System
   ============================================================================= */

.particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  max-width: none;
}

/* Hide particles on touch devices */
@media (pointer: coarse) {
  .particle-container {
    display: none;
  }
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.content-overlay {
  backdrop-filter: blur(1px);
  background-color: rgba(15, 15, 30, 0.15);
}


/* =============================================================================
   Closet Drawer Component
   ============================================================================= */

.closet-container {
  position: relative;
  width: 100%;
  max-width: 225px; /* original image width */
  margin: 40px auto;
}

.closet-image {
  width: 100%;
  height: auto;
  display: block;
}

.drawer-link {
  position: absolute;
  left: 0;
  width: 100%;
  height: 36px;
  text-indent: -9999px;
  z-index: 2;
}

.drawer-link:hover,
.drawer-link:active {
  background-color: rgba(255, 255, 0, 0.3);
  cursor: pointer;
}

/* Drawer Positions */
.drawer-1 { top: 190px; }
.drawer-2 { top: 226px; }
.drawer-3 { top: 262px; }
.drawer-4 { top: 298px; }
.drawer-5 { top: 334px; }
.drawer-6 { top: 370px; }
.drawer-7 { top: 406px; }
.drawer-8 { top: 442px; }
.drawer-9 { top: 478px; }
.drawer-10 { top: 514px; }
.drawer-11 { top: 550px; }
.drawer-12 { top: 586px; }


/* =============================================================================
   Utility Classes
   ============================================================================= */

/* Text Colors */
.text-color1 { color: var(--color1); }
.text-color2 { color: var(--color2); }

/* Background Colors */
.bg-color1 { background-color: var(--color1); }
.bg-color2 { background-color: var(--color2); }
.bg-color3 { background-color: var(--color3); }
.bg-color4 { background-color: var(--color4); }
.bg-color5 { background-color: var(--color5); }
.bg-color6 { background-color: var(--color6); }
.bg-color7 { background-color: var(--color7); }
.bg-color8 { background-color: var(--color8); }
.bg-color9 { background-color: var(--color9); }
.bg-color10 { background-color: var(--color10); }
.bg-color11 { background-color: var(--color11); }
.bg-color12 { background-color: var(--color12); }

/* Border Utilities */
.border-color2 {
  border: 2px solid var(--color2);
  display: inline-block;
  padding: 2px 5px;
  vertical-align: middle;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.border-color3 {
  border: 2px solid var(--color3);
  display: inline-block;
  padding: 2px 5px;
  vertical-align: middle;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.border-color5 {
  border: 2px solid var(--color5);
  display: inline-block;
  padding: 2px 5px;
  vertical-align: middle;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.border-color6 {
  border: 2px solid var(--color6);
  display: inline-block;
  padding: 2px 5px;
  vertical-align: middle;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Text Utilities */
.small-text {
  font-size: 0.75rem;
}

.mark2 {
  background-color: var(--color1);
  border-radius: 8px;
  padding: 2px 5px;
}