
/* --------- Properties --------- */
:root {
    --bg: #ffffff;      /* page background */
    --ink: #1a1a1a;     /* main text */
    --muted: #5c626e;   /* secondary text */
    --accent: #302c82;  /* highlight color */
    --hover: #3b35aa;   /* highlight hover */
    --line: #dcdcdc;    /* borders and dividers */
    --header: #b5b2ec;
    


    --white: white;
    --moonglow: #F6F1D5;


    --flow1: #544a7d;
    --flow2: #ffd452;

    --moon1: #0f2027;
    --moon2: #203a43;
    --moon3: #2c5364;

    --font-display: "Short Stack", cursive;
    --font-body: "Sniglet", system-ui;

    --text-sm: 0.875rem;   /* subtitles/captions */
    --text-base: 1rem;     /* body text */
    --text-lg: 1.25rem;    /* lead paragraph, subheadings */
    --text-xl: 2rem;       /* section headings (h2) */
    --text-2xl: 3.5rem;    /* the hero name (h1) */
}


/* --------- Fonts --------- */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    margin-bottom: 0.5em;
}

.hero h1 {
    font-size: var(--text-2xl);
    line-height: 1.05;
}

h2 {
    font-size: var(--text-xl);
    line-height: 1.2;
}

.lead {
    font-size: var(--text-lg);
}

.subtitle {
    font-size: var(--text-sm);
    color: var(--muted);
}

.stack {
    font-family: var(--font-display);
}

/* --------- General --------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background: var(--bg);
    color: var(--ink)
}

img {
    display: block;
    max-width: 100%;
}


.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 24px; /* keeps content off the screen edges on mobile */
}


section {
    padding-block: 10px;
}

/* --------- Reveal --------- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.3s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    color: var(--hover);
    opacity: 0.7;
}

a:focus-visible,
.project-card:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --------- Header --------- */

header {
    position: sticky;
    top: 0;
    
    padding-block: 15px;
    padding-inline: 20px;

    background: linear-gradient(120deg, var(--moon1), var(--moon2), var(--moon3));
    z-index: 10;

    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;

    background-size: 200% 200%; 
    animation: flow 6s ease infinite;
}


header a {
    color: var(--moonglow);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

header a:hover {
    color: var(--white);
    opacity: 1;
}

nav {
    display: flex;
    gap: 24px;
    flex: 1;
}

nav a:first-child {
    margin-right: auto;
}


/* --------- Hero --------- */
.hero {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 0px;

 
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;

}

.hero p {
    max-width: 45ch;
    margin-top: 2px;
}



/* --------- About --------- */

.about p {
    max-width: 65ch;
}

.about-list {
    padding-left: 1.5rem;
}

.about-list li {
    margin-bottom: 8px; 
}

/* --------- Projects --------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

.project-card {
    position: relative;
    border: none;
    border-radius: 12px;
    background: var(--bg);     

    
    padding: 24px;
    display: flex;           
    flex-direction: column;
    gap: 12px;

}

.project-card::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: conic-gradient(from var(--angle), var(--flow1), var(--flow2), var(--flow1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover::before {
    opacity: 1;
    animation: spin 8s linear infinite;
}

.project-card img {
    width: 100%;
    height: 180px;     
    object-fit: cover;
}


.project-card h3, .stack, .subtitle{
    text-align: center;
}

/* --------- Contact --------- */
#contact {
    display: flex;
    gap: 48px;
    justify-content: start;
}

.details {
    flex: 1;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 500px;
}

.contact-form label {
    font-family: var(--font-body);
    margin-top: 8px;
}

.contact-form input,
.contact-form textarea {
    font-family: var(--font-body);
    font-size: var(--text-base);

    padding: 10px;
    border: 2px solid var(--line);
    border-radius: 8px;

    background: var(--bg);
    color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.contact-form button {
    margin-top: 16px;
    padding: 10px 20px;
    
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    
    font-family: var(--font-display);
    font-size: var(--text-sm);
    cursor: pointer;
}

.contact-form button:hover {
    background: var(--hover);
}

/* --------- Footer --------- */

footer {
    margin-bottom: 200px;
}


/* --------- Mobile Sizing --------- */
@media (max-width: 640px) {
    nav {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* --------- Animations --------- */
@media (prefers-reduced-motion: reduce) {
    header { animation: none; }

    .project-card:hover::before { animation: none; }
}

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

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes spin {
    to { --angle: 360deg; }
}