/* ================================
   OLIVER.JW - STYLESHEET
   Design: Clean & Minimal with Neutrals
   ================================ */


/* --------------------------------
   1. CSS VARIABLES

   Variables let you define values once and reuse them.
   Change a color here → it updates everywhere.
   The ":root" selector means "the whole document"
   -------------------------------- */

:root {
    --color-background: #FAFAFA;
    --color-text: #2D2D2D;
    --color-accent: #1A1A1A;
    --color-subtle: #E5E5E5;
    --color-link: #4A5568;

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-heading: "Inter", var(--font-body);

    --width-content: 720px;
    --spacing-small: 16px;
    --spacing-medium: 32px;
    --spacing-large: 64px;
}


/* --------------------------------
   2. RESET & BASE

   Browsers have built-in styles that vary.
   This creates a clean, consistent starting point.
   -------------------------------- */

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

/* box-sizing: border-box = padding is INCLUDED in width
   Without it: a 100px box + 20px padding = 140px total (confusing!)
   With it: a 100px box + 20px padding = 100px total (much better) */

html {
    font-size: 18px;              /* Base size - all other sizes relative to this */
    scroll-behavior: smooth;      /* Smooth scrolling when clicking links */
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.7;             /* Space between lines - 1.7 = 170% of font size */
}


/* --------------------------------
   3. TYPOGRAPHY

   How text looks throughout the site.
   -------------------------------- */

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;            /* rem = relative to root font size (18px) */
    font-weight: 600;             /* How bold: 400=normal, 600=semi-bold, 700=bold */
    color: var(--color-accent);
    margin-bottom: var(--spacing-small);
    letter-spacing: -0.02em;      /* Slightly tighter letter spacing */
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: var(--spacing-small);
}

p {
    margin-bottom: 1rem;
    max-width: 65ch;              /* ch = width of the "0" character */
}                                 /* 65 characters per line is ideal for reading */

a {
    color: var(--color-link);
    text-decoration: none;        /* Removes the underline */
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;  /* Smooth animation when hovering */
}

a:hover {
    border-bottom-color: var(--color-link);  /* Underline appears on hover */
}


/* --------------------------------
   4. LAYOUT

   How the page is structured.
   -------------------------------- */

nav, main, footer {
    max-width: var(--width-content);
    margin: 0 auto;               /* auto = center horizontally */
    padding: 0 var(--spacing-medium);
}

main {
    min-height: 70vh;             /* vh = viewport height (screen height) */
    padding-top: var(--spacing-large);
    padding-bottom: var(--spacing-large);
}


/* --------------------------------
   5. NAVIGATION
   -------------------------------- */

nav {
    padding-top: var(--spacing-medium);
    padding-bottom: var(--spacing-medium);
    display: flex;                /* Flexbox: items sit in a row */
    gap: var(--spacing-medium);   /* Space between each link */
}

nav a {
    font-size: 0.9rem;
    color: var(--color-text);
    text-transform: lowercase;    /* makes text lowercase */
}

nav a:hover {
    color: var(--color-accent);
}


/* --------------------------------
   6. ARTICLES (Projects & Writings)
   -------------------------------- */

article {
    margin-bottom: var(--spacing-large);
    padding-bottom: var(--spacing-medium);
    border-bottom: 1px solid var(--color-subtle);
}

article:last-child {
    border-bottom: none;          /* Remove border from the last article */
}

article h2 {
    margin-bottom: 0.5rem;
}

article time {
    font-size: 0.85rem;
    color: var(--color-link);
    display: block;               /* Makes it sit on its own line */
    margin-bottom: 0.75rem;
}


/* --------------------------------
   7. MEDIA PAGE (Images & Videos)
   -------------------------------- */

section {
    margin-bottom: var(--spacing-large);
}

figure {
    margin-bottom: var(--spacing-medium);
}

figure img,
figure video {
    max-width: 100%;              /* Never wider than its container */
    height: auto;                 /* Maintain aspect ratio */
    display: block;
    border-radius: 4px;           /* Slightly rounded corners */
}

figcaption {
    font-size: 0.85rem;
    color: var(--color-link);
    margin-top: 0.5rem;
}


/* --------------------------------
   8. FOOTER
   -------------------------------- */

footer {
    padding-top: var(--spacing-medium);
    padding-bottom: var(--spacing-medium);
    border-top: 1px solid var(--color-subtle);
}

footer p {
    font-size: 0.85rem;
    color: var(--color-link);
}


/* --------------------------------
   9. SOCIAL LINKS
   -------------------------------- */

.social-links {
    display: flex;                /* Icons in a row */
    gap: var(--spacing-small);    /* Space between icons */
    margin-top: var(--spacing-medium);
}

.social-links a {
    color: var(--color-text);
    border-bottom: none;          /* Remove underline from icon links */
    opacity: 0.7;                 /* Slightly faded */
    transition: opacity 0.2s ease;
}

.social-links a:hover {
    opacity: 1;                   /* Full color on hover */
    border-bottom: none;
}

.social-links svg {
    display: block;
}


/* --------------------------------
   10. COMING SOON PAGES
   -------------------------------- */

.coming-soon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--spacing-medium);
}

.pepe {
    display: block;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 8px;
}


/* --------------------------------
   11. BOTTOM BAR (Profile Photo + Social Icons)
   -------------------------------- */

.bottom-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--width-content);
    padding: 0 var(--spacing-medium);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bottom-bar .social-links {
    display: flex;
    gap: 10px;
    margin: 0;
}

.bottom-bar .social-links a {
    opacity: 0.6;
}

.bottom-bar .social-links a:hover {
    opacity: 1;
}

.bottom-bar .social-links svg {
    width: 20px;
    height: 20px;
}

.profile-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-subtle);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.profile-photo:hover {
    opacity: 1;
}


/* --------------------------------
   12. DROPDOWN MENU
   -------------------------------- */

.dropdown {
    position: relative;           /* Dropdown positions relative to this */
    display: flex;                /* Aligns with other nav items */
    align-items: center;          /* Vertically centers the link */
}

.dropdown-content {
    display: none;                /* Hidden by default */
    position: absolute;           /* Floats below the parent */
    top: 100%;                    /* Right below the "Writings" link */
    left: 0;
    background-color: var(--color-background);
    min-width: 150px;
    padding: 8px 0;
    border: 1px solid var(--color-subtle);
    border-radius: 4px;
    z-index: 100;                 /* Appears above other content */
}

.dropdown:hover .dropdown-content {
    display: block;               /* Show on hover */
}

.dropdown-content a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--color-text);
}

.dropdown-content a:hover {
    background-color: var(--color-subtle);
    border-bottom: none;
}


/* --------------------------------
   13. BOOK REVIEWS (Collapsible)
   -------------------------------- */

details.book-review {
    margin-bottom: var(--spacing-small);
    border-bottom: 1px solid var(--color-subtle);
    padding-bottom: var(--spacing-small);
}

details.book-review summary {
    cursor: pointer;
    list-style: none;             /* Removes default arrow */
    padding: var(--spacing-small) 0;
}

details.book-review summary::-webkit-details-marker {
    display: none;                /* Removes arrow in Safari/Chrome */
}

details.book-review summary::before {
    content: "+ ";
    font-weight: bold;
    color: var(--color-link);
}

details.book-review[open] summary::before {
    content: "- ";
}

.book-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-accent);
}

.book-author {
    font-style: italic;
    color: var(--color-link);
    margin-left: 0.5rem;
    font-size: 0.95rem;
}

.review-content {
    padding: var(--spacing-small) 0;
    padding-left: var(--spacing-small);
    border-left: 2px solid var(--color-subtle);
    margin-top: var(--spacing-small);
}

.review-content p {
    margin-bottom: 1rem;
}


/* --------------------------------
   14. READING LIST
   -------------------------------- */

.reading-list {
    padding-left: var(--spacing-medium);
}

.reading-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.reading-list .book-author {
    margin-left: 0;
}
