/* Reset */
@import url('./fonts.css');

:root {
    --text-color: #5C4B75;
    --text-color-light: #7b4f88;
    --background-color: #FFF7FB;
    --border-color: #F2A9E1;
    --accent-color: #FF66C4;
    --accent-bg: #FADCF1;

    --font-sans: 'Fragment Sans', sans-serif;
    --font-serif: 'Fragment Glare', serif;
    --max-width: 650px;
  }


/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
      --text-color: #E6E0F0;
      --text-color-light: #BBAAC6;
      --background-color: #181420;
      --border-color: #52445C;
      --accent-color: #FFA8D4;
      --accent-bg: #3A2F44;
    }
  }

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
}

li {
    list-style: none;
}

p {
    font-family: var(--font-sans);
    margin: 0;
}

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

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

a:hover .twigg-icon {
    fill: var(--accent-color);
}


.container {
    max-width: var(--max-width);
    min-height: calc(100vh - 4rem);
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
}

.intro {
    margin-bottom: 4rem;
}

.intro h1{
    margin-bottom: 3rem;
    text-align: center;
}

.intro p {
    color: var(--text-color-light);
}

.intro h1 {
    font-size: 2rem;
    margin-block-end: 1rem;
    color: var(--text-color);
}

.note-date {
    color: var(--text-color-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Notes list styles */

ul.notes-list  {
    padding: 0;
}

.notes-list {
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    line-height: 0;
}

.note-title {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
}

.note-item:hover {
    color: var(--text-color-light);
    background-color: var(--accent-bg);
    border-radius: 999px;
    padding: 1rem;
    transition: all .3s ease-in-out;
}

.notes-list-title {
    font-size: 1.5rem;
    margin: 0rem;
}

/* Individual note page styles */

.note-content {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 auto;
    width: 100%;
    margin-bottom: 4rem;
}

.note-content p {
    margin: 1.5rem 0;
}

.note-content a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.note-content a:hover {
    color: var(--text-color-light);
}

.note-data {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tags */
.note-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    color:  var(--text-color);
    background:var(--accent-bg) ;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    border: none;
    transition: background 0.2s ease;
}

/* Footer styles */
.footer {
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    margin: 0;
    line-height: 1.2;
    flex: 1;
}

.back-link {
    background: var(--accent-bg);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.back-link:hover {
    background: var(--accent-bg);
    color: var(--text-color);
    transition: all 0.2s ease;
    border: 1px solid var(--accent-color);
}

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
        mix-blend-mode: normal;
        position: absolute;
        inset: 0;
        will-change: transform, opacity;
    }

    ::view-transition-old(root) {
    animation: fade-up .4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 1;
    }

    ::view-transition-new(root) {
    animation: fade-down 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 2;
    }


    @keyframes fade-up {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
    }

    @keyframes fade-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
    }

@media (max-width: 640px) {
    .container {
        padding: 2rem 1rem;
    }

    .intro {
        margin-bottom: 2rem;
    }

    .intro h1 {
        font-size: 1.75rem;
    }

    .note-content {
        font-size: 1rem;
        margin-bottom: 3rem;
    }

    .note-tags {
        margin-bottom: 3rem;
    }

    .footer {
        margin-top: 2rem;
    }

    .footer p {
        width: 100%;
        flex: auto;
    }
}