/* Vars */
:root {
    --bg: #060911;
    --surface: #0E111B;
    --surface-2: #1A1F2E;
    --text: #F0F5FF;
    --subtext: #B8BDCB;
    --inputtext: #757575;
    --primary: #CA79FF;
    --secondary: #00D2FD;
    --accent: #FF49BA;
    --warning: #E6CC00;
    --danger: #F93247;

    --border: #291D3C;
    --badge-2: #00D3FF33;           /* with 20% transparency */
    --badge-2-border: #00D3FF59;    /* with 35% transparency */
    --badge-3: #FF4ABA33;           /* with 20% transparency */
    --badge-3-border: #FF4ABA59;    /* with 35% transparency */
    --btn-border: #CA79FF8C;        /* with 55% transparency */


    --btn-normal-from:#CA79FFCC;    /* with 80% transparency */
    --btn-normal-to:#CA79FF99;      /* with 60% transparency */

    --btn-hover-from:#CA79FFCC;     /* with 80% transparency */
    --btn-hover-to:#FFFFFF99;       /* with 60% transparency */

    --btn-active-from:#9B00FFCC;    /* with 80% transparency */
    --btn-active-to:#CA79FF99;      /* with 60% transparency */

    --grid-section-shadow: 0px 8px 24px #00000059;
    --btn-shadow: 0px 1px 2px #0000004D;


    --body-font-family: 'Inter', Arial, sans-serif;
    --extra-font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;

    --body-font: 1rem;          /* 16px */
    --small-font: 0.938rem;     /* 15px */
    --caption-font: 0.813rem;   /* 13px */

    --font-weight: 600;

    --section-radius: 24px;
    --form-radius: 16px;
    --article-radius: 24px;

    --section-padding: 25px 25px;
    --form-padding: 13px 17px;
    --article-padding: 24px 25px 25px;

    --hero-gap: clamp(0.525rem, calc(0.525rem + ((100vw - 500px)/10) * 0.2), 0.75rem);              /* 12px */
    --card-grid-gap-main: clamp(0.525rem, calc(0.525rem + ((100vw - 500px)/10) * 0.2), 0.75rem);    /* 12px */
    --card-grid-gap-articles: clamp(0.7rem, calc(0.7rem + ((100vw - 500px)/10) * 0.2), 1rem);       /* 16px */
    --article-gap: clamp(0.525rem, calc(0.525rem + ((100vw - 500px)/10) * 0.2), 0.75rem);           /* 12px */
    --main-gap: clamp(0.7rem, calc(0.7rem + ((100vw - 500px)/10) * 0.2), 1rem);                     /* 16px */

    --tags-padding-top: 4px;
    --tags-gap: 8px;

    --badge-padding: 5.59px 10.6px 7.1px;
    --badge-radius: 16px;

    --h1-font-size: clamp(1.575rem, calc(1.575rem + ((100vw - 500px)/10) * 0.2), 2.25rem);      /* 36px */
    --h2-font-size: clamp(1.225rem, calc(1.225rem + ((100vw - 500px)/10) * 0.2), 1.75rem);      /* 28px */
    --h3-font-size: clamp(0.9625rem, calc(0.9625rem + ((100vw - 500px)/10) * 0.2), 1.375rem);   /* 22px */

    --h1-font-weight: bold;
    --h2-font-weight: 700;
    --h3-font-weight: bold;

    --label-font-weight: 400px;
}

/* Reset */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main*/
html{
    scroll-behavior: smooth;
}

body{
    background-color: rgb(78, 78, 78);
    min-height: 100svh;
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;

    font-family: var(--body-font-family);
}

h1{
    font-family: var(--extra-font-family);
    font-size: var(--h1-font-size);
    font-weight: var(--h1-font-weight);
    min-height: clamp(1.8375rem, calc(1.8375rem + ((100vw - 500px)/10) * 0.2), 2.625rem);
    margin-top: 7px;
    margin-bottom: 7px;
}

header{
    margin-top: clamp(2.0566rem, calc(2.0566rem + ((100vw - 500px)/10) * 0.2), 2.938rem);
    display: flex;
    flex-direction: column;
}

header p{
    font-size: var(--caption-font);
}

main{
    margin-top: -7px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--main-gap);
}

section{
    padding: var(--section-padding);
    border-radius: var(--section-radius);
}

footer{
    margin-top: clamp(2.1rem, calc(2.1rem + ((100vw - 500px)/10) * 0.2), 3rem);
    margin-bottom: clamp(0.875rem, calc(0.875rem + ((100vw - 500px)/10) * 0.2), 1.25rem);
    padding-left: 16px;
    padding-right: 16px;
    display: flex;
    justify-content: space-between;
}

h2{
    font-size: var(--h2-font-size);
    font-weight: var(--h2-font-weight);
}

/* Hero */
#hero{
    display: flex;
    flex-direction: column;
    gap: var(--hero-gap);
}

#hero p{
    margin-top: 4px;
    margin-bottom: 4px;
}

#hero-buttons{
    padding-top: 4px;
    display: flex;
    gap: 8px;
}

/* Card grid section */
#card-grid{
    display: flex;
    flex-direction: column;
    gap: var(--card-grid-gap-main);
    background-color: var(--surface);
    box-shadow: var(--grid-section-shadow);
}

#articles{
    display: flex;
    flex-wrap: wrap;
    gap: var(--card-grid-gap-articles);
    justify-content: space-between;
}

article{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: var(--article-padding);
    gap: var(--article-gap);
    border-radius: var(--article-radius);
}

h3{
    font-size: var(--h3-font-size);
    font-weight: var(--h3-font-weight);
}

article p{
    font-size: 16px;
}

.tags{
    display: flex;
    gap: var(--tags-gap);
    padding-top: var(--tags-padding-top);
}

.tags span{
    background-color: antiquewhite;
    padding: var(--badge-padding);
    border-radius: var(--badge-radius);
    font-size: var(--small-font);
    font-weight: var(--font-weight);
}

/* From */
#contact-form h2{
    margin-bottom: 7px;
}

form{
    display: flex;
    flex-direction: column;
}

label{
    font-size: var(--small-font);
    font-weight: var(--label-font-weight);
    height: 23px;
    margin-bottom: 7px;
}

.inputs{
    margin-top: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.msg-box{
    margin-top: 28px;
}

#send{
    margin-top: 24px;
}

.input-group{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

input, textarea{
    padding: var(--form-padding);
    font-size: var(--small-font);
    border-radius: var(--form-radius);
}

#message{
    resize: none;
    height: 93px;
}

button{
    width: fit-content;
    padding: 13px 17px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 16px;

    cursor: pointer;
    transition: transform 0.2s ease-out;
}

button:hover{
    transform: translateY(-1px);
}

button:active{
    transform: translateY(0px);
}

/* colors */

body{
    background-color: var(--bg);
}

h1, h2, h3, button, span{
    color: var(--text);
}

p, label{
    color: var(--subtext);
}

input, textarea{
    color: var(--inputtext);
    background-color: var(--surface);

    border: none;
    transition: all 0.2s ease-in-out;

    font-family: var(--body-font);
}

input:focus, textarea:focus{
    outline: none;
    box-shadow: 0px 0px 5px var(--primary);
}

.tags span{
    background-color: var(--badge-2);
    border-color: var(--badge-2-border);
    border-style: solid;
    border-width: 2px;
}

.tags span:first-of-type{
    background-color: var(--border);
    border-color: var(--border);
}

.tags span:last-of-type{
    background-color: var(--badge-3);
    border-color: var(--badge-3-border);
}

#contact-form, #hero{
    border-color: var(--border);
    border-style: solid;
    border-width: 2px;
}

article{
    border-color: var(--border);
    border-style: solid;
    border-width: 2px;
}

#hero-buttons button:first-of-type, #send{
    box-shadow: var(--btn-shadow);
    border-color: var(--btn-border);
    border-style: solid;
    border-width: 2px;

    background: linear-gradient(var(--btn-normal-from), var(--btn-normal-to));
    transition: all 0.2s ease;
}

#hero-buttons button:first-of-type:hover, #send:hover{
    box-shadow: 0px 0px 5px var(--primary);
}

#hero-buttons button:first-of-type:active, #send:active{
    transform: translateY(0px);
}

#hero-buttons button:last-of-type{
    box-shadow: var(--btn-shadow);
    border: none;
    background-color: #00000000;
    transition: all 0.2s ease;
}

#hero-buttons button:last-of-type:hover{
    outline-style: solid;
    outline-width: 1px;
    outline-color: var(--primary);
    box-shadow: 0px 0px 5px var(--primary);
}

/* background blobs */
.blob-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.7;
}

.blob1 {
    width: 400px;
    height: 400px;
    top: 100%;
    left: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #ff3cac, transparent 30%);
}

.blob2 {
    width: 500px;
    height: 500px;
    top: 0%;
    left: 0%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #CA79FF, transparent 70%);
}

.blob3 {
    width: 600px;
    height: 600px;
    top: 0%;
    left: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #00D2FD, transparent 50%);
}

.blob4 {
    width: 400px;
    height: 400px;
    top: 100%;
    left: 0%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #ff3cac, transparent 30%);
}

/*special padding*/
header{
    padding-left: clamp(0px,(1250px - 100vw) / 2, 20px);
}

/* Modal Window*/
.modal {
    
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    /* flex center */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade 0.3s ease;
    transition: opacity 0.5s ease-out;
}

.modal.hide {
    opacity: 0;
}

/* content box */
.modal-content {
    background: var(--surface);
    font-family: var(--body-font-family);

    padding: 24px 32px;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    
    animation: fadeIn 0.3s ease;
    position: relative;
}

/* simple fade */
@keyframes fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-content button {
    box-shadow: var(--btn-shadow);
    border: none;
    background-color: #00000000;
    transition: all 0.2s ease;
}

.modal-content button:hover {
    outline-style: solid;
    outline-width: 1px;
    outline-color: var(--primary);
    box-shadow: 0px 0px 5px var(--primary);
}

/* Alerts */
.alert-good{
    padding: 17px 17px;
    border-radius: 24px;
    background-color: #00D3FF24;

    border-color: #00D3FF66;
    border-style: solid;
    border-width: 2px;
}

.alert-warn{
    padding: 17px 17px;
    border-radius: 24px;
    background-color: #E6CC0024;

    border-color: #E6CC0066;
    border-style: solid;
    border-width: 2px;
}

.alert-error{
    padding: 17px 17px;
    border-radius: 24px;
    background-color: #F9324724;

    border-color: #F9324766;
    border-style: solid;
    border-width: 2px;
}

.alert-good p, .alert-warn p, .alert-error p{
    color: var(--text);
}