/* ============================================ Tom Harding Poetry Website - Styles https://tomharding.net ============================================ */ /* Reset and base */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --color-bg: #F9F8F6; --color-text: #2C2825; --color-text-light: #5A534B; --color-muted: #8B8078; --color-link: #8B4513; --color-link-hover: #6B3410; --color-border: #ddd; --color-poem-bg: #f5f0dc; --color-section-bg: #f0ebe4; --font-serif: Georgia, 'Times New Roman', serif; --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; --font-mono: 'SF Mono', Monaco, 'Courier New', monospace; --max-width: 800px; --transition-fast: 0.2s ease; --transition-normal: 0.3s ease; } html { scroll-behavior: smooth; } body { font-family: var(--font-serif); font-size: 17px; line-height: 1.65; color: var(--color-text); background-color: var(--color-bg); padding: 2rem; } a { color: var(--color-link); text-decoration: none; transition: color var(--transition-fast); } a:hover { color: var(--color-link-hover); text-decoration: underline; } /* Focus states for accessibility */ a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; } /* ============================================ Main Container ============================================ */ .container { max-width: var(--max-width); margin: 0 auto; } /* ============================================ Header ============================================ */ header { margin-bottom: 0; padding-bottom: 0; } .header-content { display: flex; align-items: center; gap: 1.5rem; } .header-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .header-text h1 { font-size: 1.75rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 0.25rem; } .header-text h1 a { color: inherit; text-decoration: none; } .header-text h1 a:hover { color: var(--color-link); } .header-text .tagline { color: var(--color-muted); font-size: 1rem; } /* ============================================ Navigation ============================================ */ nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); } /* Sticky navigation */ #mainNav { position: sticky; top: 0; background: var(--color-bg); z-index: 50; margin-left: -1rem; margin-right: -1rem; padding: 0.25rem 1rem 1rem; transition: box-shadow var(--transition-fast); } #mainNav.scrolled { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--color-text); padding: 0.25rem; } .nav-links { padding-left: 1rem; } .nav-links a { font-family: var(--font-sans); margin-right: 1.5rem; color: var(--color-text); font-size: 0.85rem; } .nav-links a:hover { color: var(--color-link); } .nav-social { display: flex; gap: 0.75rem; } .nav-social a { color: var(--color-text-light); display: flex; align-items: center; } .nav-social a:hover { color: var(--color-text); } .nav-social .support-link { background: var(--color-link); color: white !important; padding: 0.35rem 0.65rem; border-radius: 4px; font-size: 0.8rem; font-family: var(--font-sans); gap: 0.35rem; transition: background var(--transition-fast); } .nav-social .support-link.icon-only { padding: 0.35rem; } .nav-social .support-link:hover { background: #6B3410; color: white !important; } .nav-social .support-link svg { width: 14px; height: 14px; } .nav-links .notebook-link { background: var(--color-text); color: white !important; padding: 0.25rem 0.6rem; border-radius: 12px; font-size: 0.8rem; transition: background var(--transition-fast); text-decoration: none; } .nav-links .notebook-link:hover { background: #333; color: white !important; text-decoration: none; } /* Related external sites — set apart from the site's own sections by colour only */ .nav-links a.nav-ext { color: var(--color-muted); } .nav-links a.nav-ext:hover { color: var(--color-link); } body.dark-mode .nav-links a.nav-ext { color: #8095a6; } /* ============================================ Sections ============================================ */ section { margin-bottom: 1rem; padding-top: 0.5rem; } section:first-of-type { padding-top: 0; } section h2 { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-muted); margin-bottom: 1rem; } section p { margin-bottom: 1rem; } /* ============================================ Poem of the Day ============================================ */ .poem-of-day { display: flex; gap: 2rem; margin-top: 1rem; } .poem-column { flex: 1; } .image-column { flex-shrink: 0; width: 300px; margin-top: 3rem; } .image-column img { width: 100%; max-width: 350px; height: auto; transition: opacity var(--transition-normal); } .image-column .support-text { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: 1rem; } /* Poem box */ #poemBox, .poem-box { background: linear-gradient(135deg, #faf6e9 0%, var(--color-poem-bg) 100%); padding: 1.5rem; position: relative; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(139, 69, 19, 0.08); transition: opacity var(--transition-normal); } .poem-date { font-size: 1.3rem; color: var(--color-text); margin-bottom: 1rem; } .poem-title { font-size: 1.2rem; font-weight: 700; margin: 0; } .poem-meta { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 1rem; font-style: italic; } .poem-text { font-size: 1rem; line-height: 1.8; white-space: pre-line; } /* Theme switcher icons */ .theme-icons { position: absolute; top: 0.75rem; right: 0.75rem; display: flex; gap: 0.6rem; align-items: center; } .theme-icons span { cursor: pointer; color: var(--color-text-light); transition: color var(--transition-fast); } .theme-icons span:hover, .theme-icons button:hover { color: var(--color-link); } .theme-icons button { background: none; border: none; padding: 0; cursor: pointer; color: var(--color-text-light); transition: color var(--transition-fast); display: flex; align-items: center; gap: 0.2rem; } .theme-label { font-family: var(--font-sans); font-size: 0.6rem; text-transform: lowercase; letter-spacing: 0.03em; } /* Section subheadings */ .section-subheading { margin-top: 2rem; font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-light); } /* Shuffle links */ .shuffle-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; } .shuffle-link { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.01em; color: var(--color-text-light); cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.85rem; padding: 0.35rem 0.85rem; background: transparent; border: 1px solid var(--color-border); border-radius: 999px; transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast); } .shuffle-link:hover { color: var(--color-link); border-color: var(--color-link); background: rgba(139, 69, 19, 0.06); } .shuffle-link:active { transform: scale(0.96); } /* Share buttons */ .share-buttons { display: flex; gap: 0.75rem; margin-top: 0.75rem; align-items: center; } .share-buttons .share-label { font-size: 0.75rem; color: var(--color-text-light); } .share-buttons a, .share-buttons button { cursor: pointer; color: var(--color-text-light); transition: color var(--transition-fast); background: none; border: none; padding: 0; } .share-buttons a:hover, .share-buttons button:hover { color: var(--color-link); } /* ============================================ Newsletter Section ============================================ */ #newsletter { background: var(--color-section-bg); padding: 2rem; margin: 2rem 0; text-align: center; border-radius: 4px; } #newsletter h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: normal; margin: 0 0 0.5rem; } #newsletter p { font-size: 0.9rem; color: var(--color-text-light); margin: 0 0 1rem; } #newsletter form { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; } #newsletter input[type="email"] { padding: 0.6rem 1rem; border: 1px solid var(--color-border); border-radius: 4px; font-family: var(--font-sans); font-size: 0.9rem; width: 220px; } #newsletter button[type="submit"] { padding: 0.6rem 1.5rem; background: var(--color-text); color: white; border: none; border-radius: 4px; font-family: var(--font-sans); font-size: 0.9rem; cursor: pointer; transition: background var(--transition-fast); } #newsletter button[type="submit"]:hover { background: #333; } #subscribeMessage, #contactMessage { margin-bottom: 1rem; font-size: 0.9rem; } /* ============================================ News Section ============================================ */ .news-toggle { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.5rem 0; margin-bottom: 0.5rem; } .news-toggle h2 { margin: 0; font-family: var(--font-serif); font-size: 1.3rem; font-weight: normal; text-transform: none; letter-spacing: normal; color: var(--color-text); } .news-toggle .arrow { font-size: 0.6rem; transition: transform var(--transition-normal); color: var(--color-muted); } .news-toggle.open .arrow { transform: rotate(90deg); } .news-content { max-height: 0; overflow: hidden; transition: max-height var(--transition-normal), opacity var(--transition-normal); opacity: 0; } .news-content.open { max-height: 2000px; opacity: 1; } .news-item { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--color-text-light); } .news-item .date { font-size: 0.75rem; color: var(--color-muted); } /* ============================================ About Section ============================================ */ .about-content { display: flex; gap: 2rem; align-items: flex-start; } .about-text { flex: 1; } .about-image { flex-shrink: 0; width: 150px; } .about-image img { width: 100%; height: auto; } .about-images { display: flex; gap: 1rem; margin: 1.5rem 0; } .about-images img { width: 150px; height: auto; } /* ============================================ Books Section ============================================ */ .book-list { display: flex; gap: 1.5rem; margin: 1.5rem 0; flex-wrap: wrap; } .book-item { text-align: center; width: 120px; } .book-item img { width: 100%; height: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); margin-bottom: 0.5rem; } .book-item a { font-size: 0.85rem; display: block; } .book-entry { display: flex; gap: 1.5rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); max-width: 80%; } .book-entry:last-child { border-bottom: none; } .book-cover { flex-shrink: 0; } .book-cover img { width: 100px; height: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: transform var(--transition-fast), box-shadow var(--transition-fast); } .book-cover:hover img { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); } .book-info { flex: 1; } .book-entry h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; } .book-info p { color: var(--color-text-light); font-size: 0.95rem; } .book-year { font-size: 0.9rem; color: var(--color-text-light); margin-bottom: 0.5rem; } .book-quote { font-style: italic; color: var(--color-text-light); font-size: 0.95rem; margin-top: 0.75rem; } .book-attribution { font-size: 0.85rem; color: var(--color-text-light); } /* Color squares for links */ .color-square { display: inline-block; width: 10px; height: 10px; margin-right: 0.4rem; } /* ============================================ Contact Section ============================================ */ #contact > div { background: var(--color-section-bg); padding: 2rem; max-width: 500px; margin: 0 auto; border-radius: 4px; } .contact-form { max-width: 400px; margin: 0 auto; } .form-group { margin-bottom: 1rem; } .form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.25rem; } .form-group input, .form-group textarea { width: 100%; padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; font-family: var(--font-serif); font-size: 1rem; transition: border-color var(--transition-fast); } .form-group input:focus, .form-group textarea:focus { border-color: var(--color-link); } .form-group textarea { min-height: 100px; resize: vertical; } .submit-btn { padding: 0.5rem 1.5rem; background: var(--color-text); color: var(--color-bg); border: none; border-radius: 4px; cursor: pointer; font-size: 0.9rem; transition: background var(--transition-fast); } .submit-btn:hover { background: #333; } /* ============================================ Video Grid ============================================ */ .video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 1rem 0; } .video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; background: #f0f0f0; } .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* ============================================ Random Picture ============================================ */ .random-picture { text-align: center; margin: 1.5rem 0; } .random-picture img { max-width: 100%; max-height: 400px; height: auto; } .new-picture-btn { margin-top: 1rem; padding: 0.5rem 1rem; background: var(--color-text); color: var(--color-bg); border: none; cursor: pointer; font-size: 0.9rem; } .new-picture-btn:hover { background: #333; } /* ============================================ Print Image Lightbox ============================================ */ #printLightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 1000; justify-content: center; align-items: center; cursor: pointer; } #printLightbox .close-btn { position: absolute; top: 2rem; right: 2rem; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; } #printLightbox img { max-width: 90%; max-height: 90%; object-fit: contain; } /* ============================================ Back to Top Button ============================================ */ #backToTop { position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px; background: var(--color-text); color: var(--color-bg); border: none; border-radius: 50%; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-fast); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); z-index: 100; } #backToTop.visible { opacity: 1; visibility: visible; } #backToTop:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); } /* ============================================ Links Section ============================================ */ .links { margin: 1rem 0; } .links a { display: inline-block; margin-right: 1.5rem; } .section-link { margin: 1rem 0; } /* ============================================ Footer ============================================ */ footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); font-size: 0.85rem; color: var(--color-text-light); } .footer-links { display: flex; gap: 4rem; margin-bottom: 1.5rem; } .footer-col { display: flex; flex-direction: column; gap: 0.3rem; } .footer-heading { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); margin-bottom: 0.25rem; } footer a { color: var(--color-text-light); text-decoration: none; } footer a:hover { color: var(--color-text); } .footer-image { margin-top: 2rem; max-width: 100%; height: auto; } /* ============================================ Art Preview (homepage) ============================================ */ .art-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1rem; } .art-preview a { display: block; overflow: hidden; border-radius: 2px; } .art-preview img { width: 100%; height: 120px; object-fit: cover; display: block; transition: transform var(--transition-fast); } .art-preview img:hover { transform: scale(1.05); } @media (max-width: 600px) { .art-preview { grid-template-columns: repeat(2, 1fr); } .art-preview img { height: 100px; } } /* ============================================ Art Gallery ============================================ */ .art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0; } .art-grid img { width: 100%; height: 100px; object-fit: cover; cursor: pointer; display: block; transition: transform var(--transition-fast), box-shadow var(--transition-fast); } .art-grid img:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); z-index: 1; position: relative; } /* Art Lightbox */ .lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 1000; justify-content: center; align-items: center; cursor: pointer; } .lightbox.active { display: flex; } .lightbox img { max-width: 90%; max-height: 90%; object-fit: contain; } .lightbox-close { position: absolute; top: 2rem; right: 2rem; color: white; font-size: 2rem; cursor: pointer; font-family: var(--font-sans); } /* ============================================ No Rulers - Comic Strips Gallery ============================================ */ .gallery-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); } .gallery-section h3 { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-muted); margin-bottom: 1rem; } .comic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; } .comic-grid img { width: 100%; height: 150px; object-fit: cover; cursor: pointer; display: block; } .comic-grid img:hover { opacity: 0.8; } /* ============================================ Christmas Cards Gallery ============================================ */ .christmas-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; padding: 2rem 0; } .christmas-gallery figure { margin: 0; cursor: pointer; } .christmas-gallery img { width: 100%; height: auto; display: block; transition: transform 0.3s ease; } .christmas-gallery figure:hover img { transform: scale(1.02); } .christmas-gallery figcaption { font-family: var(--font-serif); font-size: 0.95rem; color: var(--color-text-light); margin-top: 0.75rem; font-style: italic; } /* ============================================ Dark Mode ============================================ */ body.dark-mode { background-color: #1a2a3a; color: #d0d8e0; } body.dark-mode .container { background-color: #1a2a3a; } body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 { color: #e0e8f0; } body.dark-mode .tagline, body.dark-mode p { color: #a0b0c0; } body.dark-mode a { color: #80a0c0; } body.dark-mode #poemBox, body.dark-mode .poem-box { background: #2a4a6a !important; } body.dark-mode .poem-title, body.dark-mode .poem-text { color: #e0e8f0; } body.dark-mode .poem-meta { color: #90a8c0; } body.dark-mode .poem-date { color: #c0d0e0; } body.dark-mode #newsletter { background: #2a4a6a !important; } body.dark-mode #contact > div { background: #2a4a6a !important; } body.dark-mode input, body.dark-mode textarea { background: #2a3a4a; border-color: #3a5a7a; color: #d0d8e0; } body.dark-mode button[type="submit"] { background: #4a6a8a; } body.dark-mode .nav-social a, body.dark-mode .shuffle-link { color: #90a8c0; } body.dark-mode .shuffle-link { border-color: rgba(144, 168, 192, 0.35); } body.dark-mode .shuffle-link:hover { color: #c2d6e8; border-color: #90a8c0; background: rgba(144, 168, 192, 0.12); } body.dark-mode #mainNav { background: #1a2a3a; } body.dark-mode #mainNav.scrolled { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } body.dark-mode #backToTop { background: #4a6a8a; color: #e0e8f0; } /* ============================================ Mobile Responsive ============================================ */ @media (max-width: 600px) { body { padding: 1rem; } .header-content { flex-direction: column; text-align: center; } .header-photo { width: 100px; height: 100px; } .header-text h1 { font-size: 1.5rem; } nav { flex-wrap: wrap; gap: 0.5rem; } .nav-toggle { display: block; } .nav-links { display: none; width: 100%; padding-left: 0; flex-direction: column; gap: 0.5rem; padding-top: 0.5rem; } .nav-links.open { display: flex; } .nav-links a { margin-right: 0; font-size: 0.85rem; } .nav-social { order: -1; } .poem-of-day { flex-direction: column; } .image-column { width: 100%; order: -1; margin-top: 0; } .about-content { flex-direction: column; } .about-image { order: -1; width: 100%; height: 150px; } .book-list { justify-content: center; } .about-images { justify-content: center; } .about-images img { width: 120px; } .book-entry { flex-direction: column; align-items: center; text-align: center; max-width: 100%; } .book-cover img { width: 80px; } .footer-links { gap: 2rem; } } /* ============================================ Print Styles ============================================ */ @media print { body { background: white; color: black; font-size: 12pt; padding: 0; } .container { max-width: 100%; } nav, #backToTop, .shuffle-link, .share-buttons, #newsletter, .theme-icons, .nav-social { display: none !important; } a { color: black; text-decoration: underline; } a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; } #poemBox, .poem-box { background: #f5f5f5 !important; box-shadow: none; border: 1px solid #ccc; } .book-cover img { box-shadow: none; border: 1px solid #ccc; } .image-column img { max-width: 200px; } footer { border-top: 1px solid #ccc; } } /* ============================================ Navigation dropdowns (sub-links on hover) Parents look like the normal text links; granular options reveal on hover (desktop) / show indented (mobile). ============================================ */ .nav-item { position: relative; display: inline; margin-right: 1.5rem; } .nav-links .nav-parent { margin-right: 0; color: var(--color-text); } .nav-links .nav-parent:hover { color: var(--color-link); text-decoration: none; } .nav-parent .caret { font-size: 0.5rem; color: var(--color-muted); margin-left: 0.25rem; vertical-align: middle; } .submenu { display: none; position: absolute; top: 100%; left: -0.75rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09); padding: 0.35rem 0; min-width: 180px; z-index: 60; } .nav-item:hover .submenu, .nav-item:focus-within .submenu { display: block; } .submenu a { display: block; margin: 0; padding: 0.45rem 1.1rem; font-family: var(--font-sans); font-size: 0.82rem; color: var(--color-text); white-space: nowrap; } .submenu a:hover { color: var(--color-link); background: var(--color-section-bg); text-decoration: none; } @media (max-width: 600px) { .nav-item { display: block; margin: 0; padding: 0; } .nav-item .submenu { position: static; box-shadow: none; border: none; border-left: 2px solid var(--color-border); border-radius: 0; padding: 0.15rem 0 0.4rem 0.75rem; margin: 0.15rem 0 0.35rem 0.4rem; min-width: 0; } /* No hover on touch — sub-links stay hidden until the parent is tapped */ .nav-item:hover .submenu { display: none; } .nav-item.open .submenu { display: block; } } /* ============================================ Accessibility - Skip Link ============================================ */ .skip-link { position: absolute; top: -100%; left: 0; background: var(--color-text); color: var(--color-bg); padding: 8px 16px; z-index: 9999; text-decoration: none; font-family: var(--font-sans); font-size: 0.9rem; border-radius: 0 0 4px 0; transform: translateY(-100%); } .skip-link:focus { top: 0; transform: translateY(0); } /* Screen reader only */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }