/* =========================================================
   Colours and typography
   ========================================================= */

:root {
    --red:    #FF0000;
    --yellow: #FFFF00;
    --blue:   #00FFFF;
    --teal:   #00C4B3;
    --pink:   #FF00FF;
    --green:  #00ff15;
    --buttonBack:  #00ff15;  


    --panel: #000033;
    --panel-2: #000044;
    

    --bevel-light: #44FFFF;
    --bevel-dark: #000000;
}

body {
    font: 100%/1.5 system-ui;
    max-width: 70rem;
    margin-inline: auto;

    font-family: "Times New Roman", Times, serif;
    color: var(--blue);
    
    padding: 1rem;

    background-repeat: repeat;
    background-image: url("images/tile.jpg");
    background-color: var(--bg);
    
}



/* ---------------------------------------------------------
   Headings
   --------------------------------------------------------- */
h1 {
    color: var(--red);
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 1px var(--red);
    font-size: 3rem;
}

h2 {
    color: var(--yellow);
    font-size: 1.2rem;
}

h3, h4, h5, h6 {
    color: var(--pink);
    font-size: 1.1rem;
}

.headerGIF {
    height: 1em;
    vertical-align: middle;
}


/* ---------------------------------------------------------
   Divider
   --------------------------------------------------------- */

h1::after {
    content: "";
    display: block;
    height: 20px;
    margin-top: 0.5rem;
    background: url("images/divider.gif") center no-repeat;
}

/* ---------------------------------------------------------
   Panels
   --------------------------------------------------------- */

section,
article {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    padding: 1rem;
    margin-block: 1rem;

    border-top: 2px solid var(--bevel-light);
    border-left: 2px solid var(--bevel-light);
    border-right: 2px solid var(--bevel-dark);
    border-bottom: 2px solid var(--bevel-dark);

    box-shadow: 0 0 15px rgba(0,255,255,0.3);
}

/* ---------------------------------------------------------
   Links
   --------------------------------------------------------- */

a {
    color: var(--green);
    text-decoration: underline;
}

a:hover {
    color: var(--red);
}

/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

nav {
    margin-bottom: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.1rem;

    padding: 0;
    margin: 0;

    border-bottom: 2px solid var(--red);
}

nav li {
    flex: 1;
}

nav a {
    display: flex;
    justify-content: center;
    align-items: center;

    height: 2.2rem;
    padding: 0;

    text-decoration: none;
    font-family: "Times New Roman", Times, serif;

    color: var(--red);

    background: linear-gradient(
        180deg,
        #000055,
        #000033
    );

    color: var(--cyan);

    /* bevel */
    border-top: 2px solid var(--teal);
    border-left: 2px solid var(--teal);
    border-right: 2px solid black;
    border-bottom: 3px solid transparent;

    text-shadow: 0 0 6px rgba(0,255,255,0.7);

    transition: color 0.15s ease, border-bottom-color 0.15s ease;

}

nav a:hover {
    background: #000077;
    border-bottom-color: var(--red);
    color: var(--red);
}

nav a.active {
    font-weight: bold;
    color: var(--red);

    border-bottom-color: var(--red);
    background: #000066;
}

nav a.active:hover {
    background: #ad15bb;
    border-bottom-color: var(--red);
}

/* ---------------------------------------------------------
   Form
   --------------------------------------------------------- */


form {
    max-width: 70rem;
    display: grid;
    grid-template-columns: 8rem 1fr; 
    gap: 1rem 1.5rem;
    align-items: start;
}

label {
    text-align: right;
    padding-top: 0.6rem;
    color: var(--retro-blue); 
}

/* Controls */
input,
textarea,
button,
select {
    font: inherit;            
}

input,
textarea {
    display: block;           
    width: 100%;              
    box-sizing: border-box;   

    padding: 0.6rem 0.75rem;

    background: #000022;
    color: var(--yellow);

    border-top: 2px solid var(--blue);
    border-left: 2px solid var(--blue);
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;

    border-radius: 0.1rem;
}

input:focus,
textarea:focus {
    outline: none;
    box-shadow:
        0 0 0 2px var(--pink),
        0 0 12px var(--pink);
}


textarea {
    min-height: 6rem;
    resize: vertical;
}

button {
    grid-column: 1 / -1;
    margin-top: 0.5rem;

    padding: 0.75rem;
    cursor: pointer;

    background: #000055;
    color: black;

    border-top: 2px solid var(--blue);
    border-left: 2px solid var(--blue);
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;

    border-radius: 0.2rem;
}

button:hover {
    background: #000077;
    color: var(--yellow);
}

input:focus,
textarea:focus {
    outline: 2px var(--red);
    outline-offset: 2px;
}

/* ---------------------------------------------------------
   Misc
   --------------------------------------------------------- */
footer {
    margin-top: 2rem;
    text-align: center;
}

.center-pic {
    display: block;
    margin: 2rem auto;

    filter:
        drop-shadow(0 0 20px #00FFFF)
}

@keyframes rainbowShift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.rainbow-text {
    background: linear-gradient(
        90deg,
        red,
        yellow,
        cyan,
        magenta,
        red
    );
    background-size: 200% auto;
    animation: rainbowShift 4s linear infinite;

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
    -webkit-text-fill-color: transparent;
}


.counter {
    text-align: center;
    margin-top: 2rem;
    font-family: "Courier New", monospace;
    color: #00FF00;
    text-shadow: 0 0 6px #00FF00;
}

#visitor-count {
    font-weight: bold;
    letter-spacing: 2px;
}



/* ---------------------------------------------------------
   Projects grid
   --------------------------------------------------------- */

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
    gap: 1.5rem;
}

.projects article {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
}

.projects h2 {
    margin: 0;
}

.projects img {
    width: 100%;
    height: auto;
}


/* ---------------------------------------------------------
   CV grid
   --------------------------------------------------------- */
button,
.cv-button {
    margin-top: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;

    display: block;
    text-align: center;
    text-decoration: none;

    background: var(--buttonBack);
    color: black;

    border-top: 2px solid var(--blue);
    border-left: 2px solid var(--blue);
    border-right: 2px solid #000000;
    border-bottom: 2px solid #000000;

    border-radius: 0.2rem;
}

.cv-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

/* Hover */
button:hover,
.cv-button:hover {
    background: var(--yellow);
    color: var(--red);
}

/* Active (clicked state) */
button:active,
.cv-button:active {
    background: var(--cyan);
    color: #000000;
}







section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
    gap: 1.5rem;
    align-items: start;
}

section > h2 {
    grid-column: 1 / -1;
    margin: 0;

    padding: 0.75rem 1rem;
    text-align: center;

    text-shadow: 0 0 8px var(--yellow);
}

section > article {
    margin: 0;                 
    padding: 1rem;


    box-shadow: 0 0 10px rgba(0, 255, 255, 0.25);
}


/* ===============================
   Webring
   =============================== */

.webring {
    margin: 1rem auto 0;
    padding: 0.6rem;

    width: fit-content;
    max-width: 90%;

    display: grid;
    gap: 0.35rem;

    background: var(--panel);

    border: 2px solid var(--bevel-light);

    box-shadow:
      0 0 4px var(--blue);
}

.webring-title {
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.15em;

    color: var(--yellow);
    text-shadow: 0 0 5px var(--yellow);
}

.webring-tagline {
    text-align: center;
    font-size: 0.75rem;
    color: var(--blue);
}

.webring-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;

    font-size: 0.75rem;
}

.webring-links a {
    padding: 0.25rem 0.45rem;

    background: #000022;
    color: var(--green);
    text-decoration: none;

    border: 1px solid var(--pink);
}

.webring-links a:hover {
    background: var(--buttonBack);
    color: var(--yellow);
}

.webring-meta {
    text-align: center;
    font-size: 0.7rem;
    color: var(--blue);
}

.pro-header { margin-bottom: 1rem; }
.byline { margin: 0.25rem 0 0; color: var(--pro-muted); }
.subtitle { margin: 0.25rem 0 0; font-style: italic; color: var(--pro-muted); }
