/* ==========================================
   CSS Reset & Base Styles
   ========================================== */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

/* ==========================================
   Accessibility - Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-fade-in,
    .animate-main,
    .animate-footer {
        animation: none !important;
    }
}


/* ==========================================
   Seasonal Theme - Prevent Flash
   ========================================== */

/* Hide Christmas lights until theme CSS loads */
.christmas-lights {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* ==========================================
   Font Imports
   ========================================== */

@font-face {
    font-family: "Cartridge Rough";
    src:
        url("/assets/Cartridge-Rough.woff2") format("woff2"),
        url("/assets/Cartridge-Rough.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cartridge Regular";
    src:
        url("/assets/Cartridge-Regular.woff2") format("woff2"),
        url("/assets/Cartridge-Regular.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================
   CSS Custom Properties (Variables)
   ========================================== */

:root {
    /* Fonts */
    --font-main: "Manrope", sans-serif;
    --font-secondary: "Cartridge Rough", sans-serif;
    --font-display: "Cartridge Regular", sans-serif;

    /* Fluid Typography Scale - Based on 1.25 (Major Third) modular ratio
       Responsive from mobile (375px) to desktop (1200px) using clamp() */
    --text-xs: clamp(0.8rem, 0.77rem + 0.15vw, 0.875rem);
    /* 12.8-14px */
    --text-sm: clamp(0.875rem, 0.84rem + 0.17vw, 0.938rem);
    /* 14-15px */
    --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    /* 16-18px - Base */
    --text-lg: clamp(1.125rem, 1.05rem + 0.37vw, 1.35rem);
    /* 18-21.6px - 1.125× base */
    --text-xl: clamp(1.266rem, 1.15rem + 0.58vw, 1.62rem);
    /* 20.25-25.9px - 1.25× base */
    --text-2xl: clamp(1.563rem, 1.4rem + 0.82vw, 1.953rem);
    /* 25-31.25px - 1.25² */
    --text-3xl: clamp(1.953rem, 1.7rem + 1.27vw, 2.441rem);
    /* 31.25-39px - 1.25³ */
    --text-4xl: clamp(2.441rem, 2.05rem + 1.96vw, 3.052rem);
    /* 39-48.8px - 1.25⁴ */
    --text-5xl: clamp(2.986rem, 2.45rem + 2.68vw, 3.815rem);
    /* 47.8-61px - 1.25⁵ */
    --text-6xl: clamp(3.583rem, 2.88rem + 3.52vw, 4.587rem);
    /* 57.3-73.4px - 1.25⁶ */
    --text-7xl: clamp(4.209rem, 3.25rem + 4.8vw, 5.516rem);
    /* 67.3-88.3px - 1.25⁷ */

    /* Line heights - Mathematical scale */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.75;

    /* Spacing scale - Based on 8px grid for consistent vertical rhythm */
    --baseline: 0.5rem;
    /* 8px - Base unit */
    --space-1: 0.5rem;
    /* 8px - 1 unit */
    --space-2: 1rem;
    /* 16px - 2 units */
    --space-3: 1.5rem;
    /* 24px - 3 units */
    --space-4: 2rem;
    /* 32px - 4 units */
    --space-5: 2.5rem;
    /* 40px - 5 units */
    --space-6: 3rem;
    /* 48px - 6 units */
    --space-7: 3.5rem;
    /* 56px - 7 units */
    --space-8: 4rem;
    /* 64px - 8 units */
    --space-10: 5rem;
    /* 80px - 10 units */
    --space-12: 6rem;
    /* 96px - 12 units */

    /* Legacy aliases for backwards compatibility */
    --space-xs: var(--space-1);
    --space-sm: var(--space-2);
    --space-base: var(--space-2);
    --space-lg: var(--space-3);
    --space-xl: var(--space-4);
    --space-2xl: var(--space-6);
    --space-3xl: var(--space-8);
}

/* Dark theme (default) */
:root,
[data-theme="dark"] {
    /* Base colors */
    --bg-color: #191970;
    --text-color: #ffffff;

    /* Theme colors */
    --accent-color: #64ffda;
    --accent-rgb: 100, 255, 218;
    --secondary-color: #b8c4f5;
    --tertiary-color: #4a4e65;

    /* Specific use colors */
    --skills-color: #d1d8e0;
    --heading-color: #f0f2ff;
    --experience-text-color: #c4d0e0;
    --light-gray: #d1d5db;
}

/* Light theme */
[data-theme="light"] {
    /* Base colors */
    --bg-color: #F5FBFF;
    --text-color: #2d3748;

    /* Theme colors */
    --accent-color: #0052a3;
    --accent-rgb: 0, 102, 204;
    --secondary-color: #4a5568;
    --tertiary-color: #cbd5e0;

    /* Specific use colors */
    --skills-color: #2d3748;
    --heading-color: #1a202c;
    --experience-text-color: #4a5568;
    --light-gray: #374151;
}

/* Light theme texture adjustment */
[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.08) 1px, transparent 0),
        radial-gradient(circle at 3px 3px, rgba(0, 0, 0, 0.04) 1px, transparent 0);
}

/* ==========================================
   Base Layout & Typography
   ========================================== */

body {
    font-family: var(--font-main);
    font-size: var(--text-base);
    /* Now fluid: scales from 16px to 18px */
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0),
        radial-gradient(circle at 3px 3px, rgba(255, 255, 255, 0.02) 1px, transparent 0);
    background-size: 8px 8px, 12px 12px;
    line-height: var(--leading-normal);
    padding: 0;
    /* Smooth theme transitions */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container,
main {
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Container width variants for different page types */
.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* Main content responsive grid */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Two-column layout for larger screens */
@media (min-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 45% 50%;
        gap: 4rem;
    }

    .left-column {
        padding-right: 1rem;
    }

    .right-column {
        padding-left: 0.5rem;
        max-width: 100%;
    }

    /* Reset main heading line-height on desktop when broken up */
    h1:has(.desktop-break) {
        line-height: 1;
    }

    /* Line break for desktop only */
    .desktop-break::before {
        content: '\A';
        white-space: pre;
    }
}

/* ==========================================
   Typography
   ========================================== */

/* Heading hierarchy with vertical rhythm (8px baseline grid) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
    font-weight: 500;
    line-height: 1.2;
    /* Tight for headings */
    margin-top: 0;
    margin-bottom: var(--space-3);
    /* 24px - 3 baseline units */
}

h1 {
    font-size: clamp(2.575rem, 3.3475rem + 4.944vw, 5.68148rem);
    line-height: 1.1;
    /* Tighter for large headings */
    letter-spacing: -0.02em;
    /* Optical adjustment for large sizes */
    margin-bottom: var(--space-4);
    /* 32px - 4 baseline units */
}

h2 {
    font-size: var(--text-2xl);
    line-height: 1.2;
    margin-bottom: var(--space-3);
    /* 24px - 3 baseline units */
}

h3 {
    font-size: var(--text-xl);
    line-height: 1.3;
    margin-bottom: var(--space-2);
    /* 16px - 2 baseline units */
}

h4 {
    font-size: var(--text-lg);
    line-height: 1.4;
    margin-bottom: var(--space-2);
    /* 16px - 2 baseline units */
}

h5 {
    font-size: var(--text-base);
    line-height: 1.5;
    margin-bottom: var(--space-2);
    /* 16px - 2 baseline units */
}

h6 {
    font-size: var(--text-sm);
    line-height: 1.5;
    margin-bottom: var(--space-1);
    /* 8px - 1 baseline unit */
}

/* Body text hierarchy with vertical rhythm */
p {
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    /* 25.6px ≈ 24px (3 baseline units) */
    margin-top: 0;
    margin-bottom: var(--space-3);
    /* 24px - 3 baseline units */
    max-width: 70ch;
    /* Optimal line length */
}

ul,
ol {
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: var(--space-3);
    /* 24px - 3 baseline units */
    padding-left: var(--space-4);
    /* 32px - 4 baseline units */
    max-width: 70ch;
}

li {
    margin-bottom: var(--space-1);
    /* 8px - 1 baseline unit */
}

.text-large {
    font-size: var(--text-lg);
    line-height: 1.5;
    /* Maintains rhythm */
    margin-bottom: var(--space-3);
}

.text-small {
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

/* Additional typography utilities */
.text-xs {
    font-size: var(--text-xs);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.text-xl {
    font-size: var(--text-xl);
    line-height: var(--leading-normal);
}

.text-2xl {
    font-size: var(--text-2xl);
    line-height: var(--leading-snug);
}

.text-3xl {
    font-size: var(--text-3xl);
    line-height: var(--leading-snug);
}

/* Line height utilities */
.leading-tight {
    line-height: var(--leading-tight);
}

.leading-normal {
    line-height: var(--leading-normal);
}

.leading-relaxed {
    line-height: var(--leading-relaxed);
}

/* List styling */
ul,
ol {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-base);
}

li {
    margin-bottom: var(--space-xs);
}

/* Definition lists */
dt {
    font-weight: bold;
    margin-bottom: var(--space-xs);
}

dd {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-base);
}

/* Blockquotes & Pull Quotes */
blockquote {
    font-family: var(--font-secondary);
    font-size: var(--text-xl);
    /* Larger for emphasis */
    line-height: var(--leading-relaxed);
    padding: var(--space-4) var(--space-3);
    padding-left: var(--space-6);
    border-left: 4px solid var(--accent-color);
    margin: var(--space-6) 0;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 0 8px 8px 0;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

blockquote p {
    margin: 0;
    line-height: 1.4;
}

blockquote .source {
    margin-top: 1em;
    font-size: var(--text-base);
    color: var(--skills-color);
}

/* ==========================================
   Images & Media
   ========================================== */

/* Image brightness in dark mode for visual comfort */
[data-theme="dark"] img:not([class*="logo"]):not([class*="icon"]) {
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

/* Loading states - Progressive enhancement */
img[data-progressive] {
    transition: opacity 0.3s ease;
}

img[data-progressive]:not([src]) {
    opacity: 0;
}

/* Skeleton/pulse animation for loading content */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading-skeleton {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: rgba(var(--text-rgb, 255, 255, 255), 0.1);
    border-radius: 4px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .loading-skeleton {
        animation: none;
    }
}

/* ==========================================
   Links & Navigation
   ========================================== */

a,
a:link {
    color: var(--text-color);
    text-decoration: underline;
    transition: color 0.2s ease;
    position: relative;
}

/* Visited links - more obvious styling */
a:visited {
    color: var(--skills-color);
    opacity: 0.8;
    text-decoration: underline;
    transition: color 0.2s ease, opacity 0.2s ease;
    position: relative;
}

a[target="_blank"]:after {
    content: "";
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-left: 0.2em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

a:hover,
a:focus {
    color: var(--accent-color);
    text-decoration: underline;
    outline: none;
    text-shadow: none;
    box-shadow: none;
    filter: none;
    backdrop-filter: none;
}

a:active {
    color: var(--accent-color);
}

a[target="_blank"] svg {
    color: var(--accent-color);
}

/* Light theme link adjustments */
[data-theme="light"] a[target="_blank"]:after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
}

[data-theme="light"] a[target="_blank"] svg {
    color: var(--accent-color);
    stroke: var(--accent-color);
}

/* Enhanced focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    text-decoration: underline;
    color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--bg-color);
}

/* Tag links - override global link hover */
.tag,
.tag:hover,
.tag:focus,
.tag:active {
    color: var(--bg-color) !important;
    text-decoration: none !important;
}

/* ==========================================
   Persistent Navigation & Decorative Elements
   ========================================== */

.persistent-nav {
    text-align: center;
    margin: 0 0 3rem 0;
    padding: 1.5rem 0;
    background: rgba(20, 20, 90, 0.35);
    width: 100%;
    position: relative;
}

/* Mobile menu button - hidden by default, appears as plain text */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: var(--text-lg);
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 44px;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    color: var(--accent-color);
}

.mobile-menu-toggle:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--bg-color);
}

/* Menu text styling */
.menu-text {
    font-family: var(--font-main);
    font-size: var(--text-lg);
    font-weight: 500;
}

/* Navigation links container */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
}

/* Hide close button on desktop from both visual and screen readers */
.mobile-close-button {
    display: none;
}

[data-theme="light"] .persistent-nav {
    background: rgba(0, 0, 0, 0.03);
    position: relative;
}

/* Doodle lines for index page */
.doodle-lines {
    position: relative;
    width: 100%;
    height: 84px;
    margin: -3.5rem 0 1rem 0;
}

.doodle-svg {
    width: 100%;
    height: 100%;
    shape-rendering: geometricPrecision;
    image-rendering: optimizeQuality;
}

.doodle-line {
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: center;
    vector-effect: non-scaling-stroke;
    shape-rendering: geometricPrecision;
}

/* Doodle line animations for desktop */
@media (min-width: 769px) {
    .line-1 {
        animation: vertical-float-1 8s ease-in-out infinite;
    }

    .line-2 {
        animation: vertical-float-2 6s ease-in-out infinite;
    }

    .line-3 {
        animation: vertical-float-3 10s ease-in-out infinite;
    }
}

.nav-links a,
.nav-links a:link,
.nav-links a:visited,
.nav-links a:hover,
.nav-links a:focus,
.nav-links a:active {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 500;
    text-decoration: none !important;
    color: var(--text-color) !important;
    position: relative;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
    background: transparent;
    transition: none !important;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a:active {
    color: var(--accent-color) !important;
}

.nav-links a.current,
.nav-links a.current:link,
.nav-links a.current:visited,
.nav-links a.current:hover,
.nav-links a.current:active {
    color: var(--accent-color) !important;
    font-weight: 600;
    position: relative;
}

.nav-links a.current::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M2,6 Q10,3 20,4.5 Q30,6 40,3.5 Q50,1 60,4 Q70,7 80,3.5 Q90,0 98,5' stroke='%2364ffda' stroke-width='3' fill='none' opacity='0.8' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transform: rotate(-1deg);
    z-index: 0;
}

/* Light theme variation */
[data-theme="light"] .nav-links a.current::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M2,6 Q10,3 20,4.5 Q30,6 40,3.5 Q50,1 60,4 Q70,7 80,3.5 Q90,0 98,5' stroke='%230066cc' stroke-width='3' fill='none' opacity='0.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ==========================================
   Responsive Typography
   ========================================== */

/* Theme toggle text hiding for narrower screens */
@media (max-width: 900px) {
    .theme-toggle-text {
        display: none;
    }
}

/* Tablet/Mobile navigation breakpoint (750px) */
@media (max-width: 750px) {

    /* Show menu button on tablet and mobile - centered */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 998;
    }

    /* Hide desktop nav links on mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(20, 20, 90, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 0;
        z-index: 999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        border-radius: 0 0 8px 8px;
    }

    [data-theme="light"] .nav-links {
        background: rgba(245, 251, 255, 0.95);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    /* Show nav links when menu is open */
    .nav-links.mobile-menu-open {
        display: flex;
    }

    /* Mobile close button - only show on mobile */
    .mobile-close-button {
        display: flex;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 2rem;
        padding: var(--space-base);
        cursor: pointer;
        text-align: center;
        transition: color 0.3s ease;
        min-height: 60px;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-close-button:hover,
    .mobile-close-button:focus {
        color: var(--accent-color);
    }

    .mobile-close-button:focus-visible {
        outline: 3px solid var(--accent-color);
        outline-offset: 3px;
        box-shadow: 0 0 0 1px var(--bg-color);
    }

    .close-text {
        font-weight: 300;
        line-height: 1;
    }

    [data-theme="light"] .mobile-close-button {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links a {
        font-size: var(--text-xl);
        padding: var(--space-lg) var(--space-xl);
        margin: 0;
        border-radius: 0;
        width: 100%;
        text-align: center;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-color);
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a:hover,
    .nav-links a:focus,
    .nav-links a:active {
        background: rgba(255, 255, 255, 0.1);
        color: var(--accent-color);
    }

    .nav-links a.current {
        background: rgba(var(--accent-rgb), 0.15);
        color: var(--accent-color);
        font-weight: 600;
    }

    [data-theme="light"] .nav-links a {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    [data-theme="light"] .nav-links a:hover,
    [data-theme="light"] .nav-links a:focus,
    [data-theme="light"] .nav-links a:active {
        background: rgba(0, 0, 0, 0.05);
        color: var(--accent-color);
    }

    [data-theme="light"] .nav-links a.current {
        background: rgba(var(--accent-rgb), 0.1);
        color: var(--accent-color);
    }

    /* Adjust current page indicator for mobile */
    .nav-links a.current::after {
        display: none;
    }

}

/* Mobile breakpoint (500px) */
@media (max-width: 500px) {
    h1 {
        font-size: var(--text-6xl);
    }

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

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

/* Mobile breakpoint (480px) */
/* Tablet and mobile stacking */
@media (max-width: 600px) {
    .info-section-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .info-section a {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: var(--text-sm);
        padding: 0;
    }

    h1 {
        font-size: var(--text-5xl);
        line-height: 1.1;
        /* Tighter for mobile when it naturally breaks */
    }

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

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

    p,
    ul,
    ol,
    li {
        font-size: var(--text-sm);
        line-height: var(--leading-relaxed);
    }

    /* Mobile navigation adjustments */
    .nav-links a {
        font-size: var(--text-lg);
        padding: var(--space-base) var(--space-lg);
    }

    /* Reduce contact section spacing on mobile */
    .contact-section {
        margin-top: 1rem;
    }

    /* Mobile-friendly info section adjustments */
    .info-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .info-section-row {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .info-section a {
        font-size: 1.1rem;
        padding: 1rem;
        justify-content: center;
        text-align: center;
        min-height: 48px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Adjust image margins on mobile */
    .post img,
    .entry img,
    .post-content img,
    .entry-content img {
        margin: 20px 0;
    }
}

/* ==========================================
   Site Navigation (Bottom Links)
   ========================================== */

.site-navigation {
    background: rgba(var(--accent-rgb), 0.08);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.site-navigation a {
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.site-navigation a:hover,
.site-navigation a:focus {
    transform: translateY(-2px);
}

/* ==========================================
   Accessibility Features
   ========================================== */

/* Skip Link Styling */
.skip-link {
    position: absolute !important;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--accent-color);
    z-index: 9999;
    transition: all 0.2s ease;
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    width: auto;
    height: auto;
    overflow: auto;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* ==========================================
   Theme Toggle
   ========================================== */

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
    min-height: 44px;
    /* Minimum touch target size */
    min-width: 44px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 1px var(--bg-color);
}

.theme-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle-text {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Light theme adjustments for toggle */
[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   Layout Components
   ========================================== */

header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2.5rem;
}

.current-role {
    margin-bottom: 1em;
}


.divider {
    border: 0;
    height: 20px;
    background: none;
    margin: 2rem 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.divider::before {
    content: '';
    width: 100%;
    max-width: 600px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 15 Q40 8, 70 16 T130 12 T190 18 T250 14 T310 17 T370 13 T430 16 T490 12 T550 15 T590 14' stroke='%23' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3Cdefs%3E%3Cfilter id='rough'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='2' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='1.5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Apply color dynamically with CSS custom properties */
.divider {
    --divider-color: #{var(--tertiary-color)};
}

/* For dark theme */
.divider::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M80 10 L270 12 L275 11 L280 12 L520 10' stroke='%23ffffff' stroke-width='2' fill='none' stroke-linecap='round' stroke-opacity='0.5' style='filter: url(%23grain);'/%3E%3Cdefs%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.6' numOctaves='2' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='1.5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E");
}

/* Light theme divider */
[data-theme="light"] .divider::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M80 10 L270 12 L275 11 L280 12 L520 10' stroke='%232d3748' stroke-width='2' fill='none' stroke-linecap='round' style='filter: url(%23grain);'/%3E%3Cdefs%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.6' numOctaves='2' result='noise'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='noise' scale='1.5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/defs%3E%3C/svg%3E");
}

/* ==========================================
   Content Sections
   ========================================== */

.bio {
    font-family: var(--font-main);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Top Skills Box */
.top-skills-box {
    background-image: radial-gradient(circle, #2c9ecb1a, #a1177708);
    background-color: rgb(255 255 255 / 0%);
    border: 1px solid rgb(255 255 255 / 6%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 1em;
    border-radius: 0.3125rem;
    font-size: 1rem;
    margin-bottom: 1.875rem;
    text-align: center;
    position: relative;
    /* Needed for positioning the pseudo-element */
    overflow: hidden;
    /* To hide the part of the sheen outside the div */
}

/* Light theme override for more subtle shadow */
[data-theme="light"] .top-skills-box {
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-image: radial-gradient(circle, rgba(0, 102, 204, 0.03), rgba(0, 102, 204, 0.01));
}

.top-skills-box::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 30%,
            rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.top-skills-box:hover::before {
    opacity: 1;
}


/* Light theme specific sheen effect */
[data-theme="light"] .top-skills-box::before {
    background: radial-gradient(circle at center,
            rgba(0, 102, 204, 0.2) 0%,
            rgba(0, 102, 204, 0.1) 30%,
            rgba(0, 102, 204, 0) 70%);
}

.top-skills-box ul {
    margin: auto;
}

.top-skills-box strong {
    display: block;
    margin-bottom: 0.625rem;
    color: var(--heading-color);
}

.top-skills-list {
    list-style: none;
    padding-left: 0;
    margin: 0 auto;
}

.top-skills-list li {
    display: inline;
}

.top-skills-list li:not(:last-child)::after {
    content: " • ";
    margin: 0 0.3125rem;
    color: var(--accent-color);
}

/* Skills and Experience Containers */
.skills-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.875rem;
}

.experience-philosophy-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.skills-column,
.experience-column,
.philosophy-column {
    width: 47%;
    max-width: 47%;
    overflow-wrap: break-word;
}

.philosophy-column p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Column Headers with Icons */
.experience-column h3,
.skills-column h3,
.philosophy-column h3 {
    position: relative;
    padding-left: 1.6em;
}

.skills-column h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 40%;
    transform: translateY(-50%);
    width: 1.2em;
    height: 1.2em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a1c6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.experience-column h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 40%;
    transform: translateY(-50%);
    width: 1.2em;
    height: 1.2em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a1c6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.philosophy-column h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 40%;
    transform: translateY(-50%);
    width: 1.2em;
    height: 1.2em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a1c6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.11 15.88c-.83 2.17-3.02 3.62-5.44 3.62H7.33c-.81 0-1.59-.23-2.26-.67-.98-.63-1.68-1.65-1.93-2.85-.25-1.19-.05-2.44.56-3.43.61-1 1.63-1.74 2.8-1.87l.5-.05c.23-1.15.77-2.19 1.55-2.98.78-.79 1.81-1.34 2.95-1.57.23-.05.46-.08.7-.1.24-.01.47-.01.71 0 1.14.05 2.21.47 3.07 1.17.44.36.8.8 1.08 1.3.71-.26 1.48-.35 2.25-.27 1.26.13 2.39.77 3.18 1.77.79 1.01 1.19 2.32 1.05 3.64'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

/* Skills List */
.skills-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.skills-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-color);
}

.skills-list li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
}

/* Experience Entries */
.experience {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

.experience h4 {
    margin-bottom: 0.3125rem;
    font-size: 1.1rem;
}

.experience p {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 400;
}

/* ==========================================
   Link Share Section
   ========================================== */

.link-share-section {
    margin-bottom: 3rem;
}

.link-share-section h2 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    padding: 1rem;
    margin: -1rem;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.link-thumb {
    width: 128px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-card:hover .link-thumb {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.link-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--heading-color);
    margin: 0 0 0.5rem;
}

.link-info p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 60ch;
    margin: 0 auto;
}

/* ==========================================
   Reading Section
   ========================================== */

.reading-section {
    margin-bottom: var(--space-3xl);
}

.reading-section h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-base);
}

/* Movies Section */
.recently-watched {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.recently-watched h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xl);
}

/* ==========================================
   Journal & Entry Content
   ========================================== */

/* Journal and entry content paragraphs should be more readable */
.post-content p,
.entry-content p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

/* First paragraph in journal and entry pages should be larger */
.post-content p:first-of-type,
.entry-content p:first-of-type {
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
}

/* Journal and entry images */
.post img,
.entry img,
.post-content img,
.entry-content img {
    max-width: 100%;
    width: 100%;
    height: auto;
    margin: 10px 0 15px 0;
}

/* Post and entry content containers */
.post-content,
.entry-content {
    position: relative;
}



/* ==========================================
   Page Intro Sections
   ========================================== */
.page-intro {
    font-size: 1.1rem !important;
    color: var(--skills-color) !important;
    max-width: 600px;
    margin: 0 auto 2rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
    font-weight: normal !important;
    font-family: var(--font-main) !important;
}

/* Section intros for movies, reading sections on about page keep their own styling */

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    margin-top: 3rem;
    margin-bottom: var(--space-xl);
}

.contact-section .section-divider {
    border: none;
    border-top: 1px solid rgba(var(--accent-rgb), 0.2);
    margin: 0 0 1.5rem 0;
}

.contact-section h3 {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.social-links-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

.social-link::before {
    content: '→';
    margin-right: 0.5rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s ease;
}

.social-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.social-link:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.4);
    transform: translateY(-1px);
}

.social-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.social-name {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

@media (max-width: 600px) {
    .social-links-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }

    .social-link {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   About Section
   ========================================== */

.about-intro {
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}

.currently-reading {
    background: rgba(var(--accent-rgb), 0.08);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.author-headshot {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    display: block;
    margin: 0 auto 2rem auto;
    object-fit: cover;
}


.book-entry {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.book-cover {
    width: 96px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.book-info {
    flex: 1;
    min-width: 0;
}

.book-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--heading-color);
    margin: 0 0 0.5rem;
}

.book-info p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* ==========================================
   Movie Reviews Section
   ========================================== */

#reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 10px;
}

.review-card {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-4px);
}

.review-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.review-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.review-card:hover img {
    transform: scale(1.05);
}

.review-info {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 40%,
            rgba(0, 0, 0, 0.7) 70%,
            rgba(0, 0, 0, 0.85) 100%);
    color: white;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.review-card:hover .review-info {
    opacity: 1;
}

.review-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.review-info time {
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
}

.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f8f8;
    border-radius: 8px;
}

/* ==========================================
   Footer Components
   ========================================== */

footer {
    width: 100%;
    margin-top: 4rem;
    padding: 2.5rem 0 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] footer {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}


.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2em;
    position: relative;
    z-index: 1;
}

footer p {
    margin: 0;
}

.changelog {
    color: var(--skills-color);
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 1.4em 0;
    padding: 0;
    border-top: none;
    max-width: none !important;
}


.changelog a {
    color: var(--skills-color);
    border-bottom: 1px dotted var(--skills-color);
    text-decoration: none;
}

.changelog a:hover,
.changelog a:focus {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

/* Webring */
.webring {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
}

.webring strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
    font-size: 1.1rem;
}

.webring-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.webring-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--tertiary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.webring-links a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

[data-theme="light"] .webring-links a {
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .webring-links a:hover {
    border-color: var(--accent-color);
}

/* Footer Content */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer Icon */
.footer-icon {
    margin: 0 0 0.5rem 0;
}

.footer-icon img {
    max-width: 100px;
    height: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: block;
}

.footer-icon img:hover {
    opacity: 0.8;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0 0 0;
    padding: 0;
    list-style: none;
}

.social-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.125rem;
    height: 3.125rem;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--text-color);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-decoration: none !important;
    border-bottom: none !important;
}

.social-icon:hover,
.social-icon:focus,
.social-icon:visited {
    text-decoration: none !important;
    border-bottom: none !important;
}

.social-icon i {
    font-size: 20px;
    transition: transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Tooltip */
.social-icon .tooltip {
    position: absolute;
    top: 0;
    font-size: 0.875rem;
    background: #fff;
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-icon .tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    background: #fff;
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-icon:hover .tooltip {
    top: -45px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.social-icon:hover .tooltip {
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}

.social-icon:hover i {
    transform: scale(1.1);
}

/* Remove external link icon from social icons */
.social-icon[target="_blank"]::after {
    display: none !important;
}

/* Brand Colors */
.social-icon.bluesky:hover,
.social-icon.bluesky:hover .tooltip,
.social-icon.bluesky:hover .tooltip::before {
    background: #1185fe;
    color: #fff;
}

.social-icon.threads:hover,
.social-icon.threads:hover .tooltip,
.social-icon.threads:hover .tooltip::before {
    background: #000000;
    color: #fff;
}

.social-icon.linkedin:hover,
.social-icon.linkedin:hover .tooltip,
.social-icon.linkedin:hover .tooltip::before {
    background: #0177B5;
    color: #fff;
}

.social-icon.medium:hover,
.social-icon.medium:hover .tooltip,
.social-icon.medium:hover .tooltip::before {
    background: #00ab6c;
    color: #fff;
}


/* ==========================================
   Animations
   ========================================== */

/* Fade-in Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Doodle Line Float Animations */
@keyframes vertical-float-1 {

    0%,
    100% {
        transform: translateY(0px);
    }

    25% {
        transform: translateY(-6px);
    }

    50% {
        transform: translateY(3px);
    }

    75% {
        transform: translateY(-2px);
    }
}

@keyframes vertical-float-2 {

    0%,
    100% {
        transform: translateY(2px);
    }

    33% {
        transform: translateY(-4px);
    }

    66% {
        transform: translateY(5px);
    }
}

@keyframes vertical-float-3 {

    0%,
    100% {
        transform: translateY(-1px);
    }

    20% {
        transform: translateY(4px);
    }

    40% {
        transform: translateY(-3px);
    }

    60% {
        transform: translateY(2px);
    }

    80% {
        transform: translateY(-4px);
    }
}

/* Animation Classes */
.animate-fade-in {
    opacity: 0;
    animation-name: fadeIn;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
}

/* Specific animations for each section with different delays */
.animate-header {
    animation-duration: 1s;
    animation-delay: 0.3s;
}

.animate-main {
    animation-duration: 1s;
    animation-delay: 0.6s;
}

.animate-footer {
    animation-duration: 1s;
    animation-delay: 0.9s;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet screens - extra right margin */
@media (max-width: 1024px) {
    .container {
        padding: 0 3em;
    }

    /* Additional padding for right column content */
    .right-column {
        padding-right: 1em;
    }

    .skills-column,
    .philosophy-column {
        padding-right: 1em;
    }
}

/* Tablet and smaller screens */
@media (max-width: 768px) {

    /* Scale down h1 for mobile */
    h1 {
        font-size: clamp(2.1rem, 5vw + 1rem, 3.15rem) !important;
    }

    .doodle-lines {
        height: 60px;
    }

    .doodle-line {
        stroke-width: 1.5;
    }

    .line-2 {
        stroke-width: 1.3;
    }

    .line-3 {
        stroke-width: 1.7;
    }

    /* Reset to single column on tablets and smaller */
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .left-column,
    .right-column {
        padding: 0;
    }

    /* Stack skills and experience sections on mobile */
    .skills-container,
    .experience-philosophy-container {
        flex-direction: column;
    }

    .skills-column,
    .experience-column,
    .philosophy-column {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    /* About page specific styles */
    .about-intro {
        margin-top: 2rem;
    }

    .author-headshot {
        margin: 0 auto 2rem auto;
    }
}

/* Mobile screens - continued styles */
@media (max-width: 500px) {

    /* Theme toggle adjustments - move left to avoid overlap */
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.75rem;
        min-width: 48px;
        min-height: 48px;
    }

    /* Layout adjustments - column styles now handled in tablet breakpoint */

    /* Component adjustments */
    .top-skills-box {
        font-size: 0.9rem;
        padding: 0.75em;
    }

    .site-navigation a {
        font-size: 0.9rem;
        display: block;
        margin-right: 0;
        margin-bottom: 0.75rem;
        background: rgba(var(--accent-rgb), 0.08);
        padding: 0.75rem 1rem;
        border-radius: 6px;
        text-align: center;
    }

    .site-navigation a:last-child {
        margin-bottom: 0;
    }

    /* Footer mobile styles */
    footer {
        padding: 2rem 1.5rem;
        margin-top: 2.5rem;
    }

    .footer-content {
        gap: 1rem;
    }

    .changelog {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .footer-icon img {
        max-width: 80px;
    }

    .webring {
        padding: 0.75rem;
        margin-top: 1.5rem;
    }

    .webring strong {
        font-size: 0.9rem;
    }

    .webring-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .webring-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
        flex: 1;
        min-width: 80px;
    }

    .book-info h3 {
        font-size: 1.1rem;
    }

    .book-info p {
        font-size: 1rem;
    }
}

/* ==========================================
   Under Construction Message
   ========================================== */

.under-construction {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    position: relative;
    padding: 1rem 0;
}

.under-construction::before {
    content: "🚧";
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.under-construction::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 90px;
    height: 1px;
    background: rgba(128, 128, 128, 0.4);
}

.under-construction p {
    margin: 0;
    color: var(--text-color-secondary);
    font-style: italic;
    position: relative;
    font-size: 1rem !important;
}

.under-construction p::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -1rem;
    transform: translateX(-50%);
    width: 90px;
    height: 1px;
    background: rgba(128, 128, 128, 0.4);
}

/* ==========================================
   Info Sections (RSS Feeds & Social Media)
   ========================================== */

.info-section {
    background: rgba(var(--accent-rgb), 0.08);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}

.info-section p {
    text-align: left;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.info-section-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.info-section a {
    color: var(--skills-color);
    text-decoration: underline;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 0;
    min-height: auto;
    min-width: auto;
    background: transparent;
    border: none;
}

.info-section a:hover {
    color: var(--accent-color);
    background: transparent;
    border: none;
    transform: none;
}

.info-section a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}


[data-theme="dark"] .info-section p strong {
    color: var(--text-color);
}

.feed-links {
    background: rgba(var(--accent-rgb), 0.12);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.feed-links p {
    text-align: left;
    font-size: 1rem;
    color: var(--text-color-secondary, var(--skills-color));
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.feed-links .info-section-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.feed-links a {
    color: var(--skills-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    min-height: 44px;
    min-width: 44px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}

.feed-links a:hover {
    color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-1px);
}


[data-theme="dark"] .feed-links p strong {
    color: var(--text-color);
}

/* ==========================================
   Accessibility - Reduced Motion Support
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    /* Disable all animations and transitions for users with motion sensitivity */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Specifically disable floating animations for doodle lines */
    .line-1,
    .line-2,
    .line-3 {
        animation: none !important;
    }

    /* Disable fade-in animations */
    .animate-fade-in,
    .animate-main,
    .animate-header,
    .animate-footer {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/*
 * ╔════════════════════════════════════════╗
 * ║           INVISIBLE BOY                ║
 * ║                                        ║
 * ║ And here we see the invisible boy      ║
 * ║ In his lovely invisible house,         ║
 * ║ Feeding a piece of invisible cheese    ║
 * ║ To a little invisible mouse.           ║
 * ║ Oh, what a beautiful picture to see!   ║
 * ║ Will you draw an invisible picture     ║
 * ║ for me?                                ║
 * ║                                        ║
 * ║             - Shel Silverstein         ║
 * ║               Where the Sidewalk Ends  ║
 * ╚════════════════════════════════════════╝
 *
 * Sometimes the most beautiful things are the ones we cannot see,
 * just like clean, well-structured CSS.
 */