@import "tailwindcss"; @import "./colors.css"; @theme static { --font-title: "Cal Sans", var(--font-sans); --font-text: "Red Hat Text", var(--font-sans); --color-background: #000000; --color-foreground: #ffffff; --color-text: color-mix(in oklab, var(--color-foreground), black 10%); --color-accent: #888888; } @layer base { :root { font-family: var(--font-text); } a { text-decoration: underline; transition: color 0.1s ease-in-out; &:hover { color: var(--color-foreground); } &[href^="http"]::after { content: "↗"; } } html { width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; overflow: hidden; } body { scroll-behavior: smooth; width: 100%; height: 100%; overflow-y: scroll; } body { margin: 0; color: color-mix(in oklab, var(--color-foreground), black 10%); background-color: var(--color-background); } p { text-align: justify; } h1, h2, h3, h4, h5, h6 { color: var(--color-foreground); font-family: var(--font-title); margin-bottom: --spacing(5); } h1 { font-size: var(--text-5xl); line-height: var(--text-5xl); --line-height: var(--text-5xl); } article:has(article:nth-of-type(2)) { @variant sm { display: grid; & > h1, & > h2, & > h3, & > h4, & > h5, & > h6 { grid-column: span 2 / span 2; } grid-template-rows: 3; grid-template-columns: repeat(2, 1fr); } } article:has(article:nth-of-type(3)) { @variant sm { display: grid; & > h1, & > h2, & > h3, & > h4, & > h5, & > h6 { grid-column: span 2 / span 2; } grid-template-rows: 3; grid-template-columns: repeat(2, 1fr); } @variant md { display: grid; & > h1, & > h2, & > h3, & > h4, & > h5, & > h6 { grid-column: span 3 / span 3; } grid-template-rows: 2; grid-template-columns: repeat(3, 1fr); } } article:has(> img):has(> h1):has(> p), article:has(> img):has(> h2):has(> p), article:has(> img):has(> h3):has(> p), article:has(> img):has(> h4):has(> p), article:has(> img):has(> h5):has(> p), article:has(> img):has(> h6):has(> p) { display: grid; img { mask-image: linear-gradient(black, transparent); } &:has(ul) { grid-template-columns: repeat(2, 1fr); & > * { grid-column: span 2 / span 2; } h1, h2, h3, h4, h5, h6 { grid-column: 1; } ul { grid-column: 2; gap: --spacing(1); display: flex; justify-self: end; } } } } @layer components { .word-carousel { width: fit-content; height: var(--line-height); overflow-y: hidden; li { animation-name: word-carousel; animation-duration: 20s; animation-iteration-count: infinite; } } .image-grid { display: grid; grid-template-columns: repeat(2, 1fr); @variant sm { grid-template-columns: repeat(3, 1fr); } img { width: 100%; height: 100%; object-fit: cover; mask-image: linear-gradient(black, transparent); } } previewable-image { overflow: hidden; & > button { width: 100%; height: 100%; & > img, & > picture > img { transition-property: transform; transition-duration: 0.2s; transition-timing-function: ease-out; width: 100%; } & > img:hover, &:hover > img, &:focus > img { transform: scale(1.1); } } dialog[open] { width: 100vw; width: 100dvw; height: 90vh; height: 90dvh; animation: popin 0.1s ease-in forwards; position: fixed; margin: 0 auto; /* top: 50%; */ /* left: 50%; */ /* transform: translate(-50%, -50%); */ background-color: transparent; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 100; img { width: 100%; height: unset; max-height: 90%; object-fit: contain; mask-image: unset; } form { color: var(--color-foreground); background-color: var(--color-background); width: 50%; button { padding: --spacing(1); width: 100%; } } &::backdrop { background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(1rem); } } } } @utility marker-none { &::marker { content: ""; } &::-webkit-details-marker { display: none; } } @keyframes word-carousel { 0%, 14% { transform: translateY(calc(var(--line-height) * 1)); opacity: 0; } 15%, 29% { transform: translateY(0px); opacity: 1; } 30%, 44% { transform: translateY(calc(var(--line-height) * 1 * -1)); } 45%, 59% { transform: translateY(calc(var(--line-height) * 2 * -1)); } 60%, 74% { transform: translateY(calc(var(--line-height) * 3 * -1)); } 75%, 89% { transform: translateY(calc(var(--line-height) * 4 * -1)); } 90%, 99% { transform: translateY(calc(var(--line-height) * 5 * -1)); opacity: 1; } 100% { transform: translateY(calc(var(--line-height) * 6 * -1)); opacity: 0; } } @keyframes popin { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0rem); } } @font-face { font-family: Cal Sans; font-style: normal; font-display: swap; font-weight: 600; src: url("./fonts/CalSans-SemiBold.woff2?v=1.0") format("woff2"), url("./fonts/CalSans-SemiBold.woff?v=1.0") format("woff"), url("./fonts/CalSans-SemiBold.ttf?v=1.0") format("truetype"); } @font-face { font-family: Red Hat Text; font-style: normal; font-display: swap; src: url("./fonts/RedHatText-Regular.woff2?v=1.0") format("woff2"), url("./fonts/RedHatText-Regular.otf?v=1.0") format("opentype"), url("./fonts/RedHatText-Regular.ttf?v=1.0") format("truetype"); }