/* absolute barebones for beginners with some notes
 * Edited August 2026
 * CSS variables have support in everything since 2017 and are useful but still optional if it's new to you.
 * I'm using HSL because I just grabbed colors from my main CSS, you can use #123456 or rgb() or whatever, don't worry about it.
 * Also the custom font load is something you have to worry about download size and if it's free to use, so it's very optional.
*/

 @font-face {
    font-family: 'calligraffitiregular';
    src: url('/fonts/Calligraffiti-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --ink: hsl(0, 0%, 8%); /* seemed like a good name for text color */
    --paper: hsl(240, 25%, 98%); /* this is for the background behind text VISIBILITY IS REQUIRED */
    --bg1: hsl(195, 13%, 88%); /* background color */
    --bg2: hsl(240, 36%, 96%);
    --border1: hsl(209, 49%, 72%);
    --border2: hsl(120, 100%, 38%);

    /* unless you're a typography nerd just some generic defaults will work until you find something cool */
    --font-sans: Cantarell, 'Noto Sans', sans-serif;
    --font-serif: 'IBM Plex Serif', Merriweather, serif;
    --font-mono: 'Fira Code', Consolas, monospace;
    --font-script: Calligraffiti, 'Happy Monkey', cursive;
}
/* I copied my main CSS so the light/dark mode is built in but you can have just one color scheme, or go nuts like I did and have 5 or 6. */
@media (prefers-color-scheme: dark) {
    :root {
        --ink: hsl(0, 5%, 96%);
        --paper: hsl(0, 9%, 9%);
        --bg1: hsl(0, 8%, 7%);
        --bg2: hsl(0, 3%, 11%);
        --border1: hsl(240, 22%, 19%);
        --border2: hsl(120, 31%, 42%);
    }
}

html {
    color: var(--ink); /* the font color is only called "color" for some reason */
    font-size: 1rem; /* resets to standard size */
    font-family: var(--font-sans);
    line-height: 1.5; /* space the lines of text out to be easier to read */
    color-scheme: dark light; /* only need if */
}

body {
    background-color: var(--bg1);
    margin: 0; /* optional, only if you need something to completely fill the window */
}

/* just a wacky pattern that seemed fun */
.hypnotic {
    background: repeating-radial-gradient(circle at center,var(--bg1), var(--bg1) 10px,var(--bg2) 10px, var(--bg2) 20px);
}

/* I don't normally do "hero images" but this is a basic example using it as background.
 * If you just had an image with no need for text on top you could just use an <img> in the <header>
*/
.personal-header {
    background-image: url("https://i.imgur.com/iokELnB.jpeg");
    background-position: center;
    min-height: 150px;
    background-color: var(--bg2);
    border-bottom: 3px solid var(--border1);
    padding: 1em 0;
    margin-bottom: 24px;
    font-family: var(--font-script);
    text-align: center;
}

/* the primary content box with narrow navigation menu on the left and larger main text/image stuff on right.
 * I'm using px because it's more obvious here.
 */
.personal-wrapper {
    max-width: 960px; /* random choice */
    margin-inline: auto;
}
/* the @media here just checks how wide the window is, on phones it'll just turn into one long box but that's what we want to happen!!!
 * I know @container exists but aiming at wider support. Also simplicity for beginners.
 */
@media (width > 460px) { /* goal: phones will make a column, tablets and bigger screens will use the grid */
    .personal-wrapper {
        display: grid; /* flexbox also works but I want automagic sizing of columns */
        gap: 16px; /* a newer thing we can use since it's a minor visual improvement */
        grid-template-columns: 1fr 3fr; /* fr stands for fraction. you can use percent like 25% 75% if that looks better to you */
    }
}

.navbar {
    background-color: var(--paper);
    padding: 0 1em;
}
.navbar > * {
    margin-bottom: 1em
}

/* normally you see <ul> BUT that puts tons of extra <li></li> inside AND you have to UNDO the default list styling.
 * IF you want to have dots (or learn how to turn the dots into different symbols) this is fine.
 * But I am LAZY and this is fast and simple and I can just throw <a>link</a> in there.
 */
.links {
    display: flex;
    gap: 12px;
    flex-direction: column;
}
.links > a {
    border: 2px solid var(--border1);
    border-radius: 12px;
    padding: .25em;
    text-decoration: none;
}
.links > a:hover {
    border: 2px solid var(--border2);
}
/* the > is a "child selector" so I'm telling it that links in the .links box should have this style.
 * You could just make a style just for that and manually add it to each link but this is faster, IF it's the only place used.
 */


/* having this as default article styling may not suit everyone so it can be a class.
 * I use articles because they are designed to have a header and text content and images all in one little box.
 * Helps keep things tidy when reorganizing.
 */
article {
    background-color: var(--paper);
    border: var(--border1) 2px solid;
    padding: 12px;
    margin-bottom: 18px;
}

/* headers are ACCESSABILITY tools and not simply styling. H1 is reserved for the main page title. H2 for primary things. */
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    margin: 0; /* defaults are really big and can addd too much empty space, personal choice here */
}

/* I wanted the text areas to be a bit more visible but not resize all the text, like in the headers. */
p {
    font-size: 1.1em;
}

/* this is standard reset to make images behave and not do wacky annoying things. As often. */
img,
picture,
svg,
video {
    max-width: 100%;
    object-fit: cover;
    aspect-ratio: 1;
}

/* honestly this is mainly to pad the bottom out more since the content is so short. */
.page-footer {
    background-color: var(--paper);
    border-top: 3px solid var(--border1);
    margin-top: 64px;
    padding-bottom: 48px;
    font-family: var(--font-script);
    text-align: center;
}
