/* ========================================
   1993 RETRO + APPLE 2000 BLEND
   Clean minimalism meets 90s nostalgia
   ======================================== */

/* Modern CSS Reset & Best Practices */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #C0C0C0;
    /* Retro textured background pattern */
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.05) 10px, rgba(255,255,255,.05) 20px),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(0,0,0,.03) 10px, rgba(0,0,0,.03) 20px);
    color: #000000;
    font-family: "Times New Roman", Times, serif;
    margin: max(20px, 5vw);  /* Fluid margin for all screen sizes */
    line-height: 1.6;
    font-size: 14pt;
    /* Modern performance */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    body {
        margin: 15px;
        font-size: 14pt;
    }

    .header-img {
        float: none;
        display: block;
        margin: 0 auto 15px auto;
        max-width: 100%;
        height: auto;
    }

    marquee {
        font-size: 10pt;
    }
}

/* Small phones - extra responsive */
@media (max-width: 480px) {
    body {
        margin: 10px;
        font-size: 15pt;  /* Slightly larger on very small screens */
    }

    h1 {
        font-size: 22pt;
    }

    h2 {
        font-size: 17pt;
    }

    .nav {
        font-size: 13pt;
    }
}

/* Tablet landscape / Small desktop - optimize layout */
@media (min-width: 1024px) {
    body {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 40px;
        padding-right: 40px;
    }

    .three-column {
        gap: 30px;  /* More spacing on larger screens */
    }

    .product-box {
        padding: 25px;  /* More comfortable padding */
    }
}

/* Large desktop - maximum width constraint */
@media (min-width: 1440px) {
    body {
        max-width: 1400px;
        font-size: 15pt;  /* Slightly larger on big screens */
    }

    h1 {
        font-size: 28pt;
    }

    h2 {
        font-size: 20pt;
    }

    .hero-section p {
        font-size: 18pt;
    }
}

h1 {
    font-size: 24pt;
    font-weight: bold;
    margin-bottom: 5px;
    margin-top: 20px;
}

h2 {
    font-size: 18pt;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 10px;
}

h3 {
    font-size: 16pt;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 8px;
}

p {
    margin-bottom: 12px;
}

ul, ol {
    margin-bottom: 12px;
    line-height: 1.8;
}

li {
    margin-bottom: 6px;
}

/* VISIBLE HYPERTEXT LINKS - UX Optimized */
a {
    color: #003D82;  /* Dark navy blue - WCAG AA compliant (7.2:1 contrast) */
    text-decoration: none;
    border-bottom: 1px solid #999;  /* Always visible */
    transition: all 0.2s;
    position: relative;
}

a:hover {
    border-bottom: 2px solid #003D82;
    color: #0052CC;  /* WCAG AA compliant hover (5.4:1 contrast) */
    cursor: pointer;
}

a:visited {
    color: #4B0082;  /* Indigo - distinct from unvisited (5.2:1 contrast) */
    border-bottom-color: #996699;  /* Slightly lighter border for visited */
}

/* Mobile: Even more visible */
@media (max-width: 768px) {
    a {
        color: #003D82;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
        border-bottom: none;
        padding: 12px 8px;  /* WCAG AA compliant 44px touch target */
    }
}

/* External links get subtle arrow marker */
a[target="_blank"]::after {
    content: " →";
    font-size: 10pt;
    color: #666666;
}

/* HOVER METADATA TOOLTIPS - DESKTOP ONLY */
/* Uses title attribute for metadata display */
@media (hover: hover) and (pointer: fine) {
    /* Desktop/mouse devices only */
    a[title]:hover::after {
        content: attr(title);
        position: absolute;
        left: 0;
        top: 100%;
        margin-top: 5px;
        padding: 8px 12px;
        background-color: #F0F0F0;
        border: 1px solid #000000;
        color: #000000;
        font-size: 10pt;  /* Increased for better readability */
        line-height: 1.4;
        width: 300px;
        max-width: 90vw;  /* Responsive on small screens */
        z-index: 1000;
        box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        white-space: normal;
        word-wrap: break-word;
        pointer-events: none;
    }

    /* For links with data-cite attribute (academic citations) */
    a[data-cite]:hover::after {
        content: "📚 " attr(data-cite);
        position: absolute;
        left: 0;
        top: 100%;
        margin-top: 5px;
        padding: 8px 12px;
        background-color: #F0F0F0;
        border: 1px solid #000000;
        color: #000000;
        font-size: 10pt;  /* Increased for better readability */
        line-height: 1.4;
        width: 350px;
        max-width: 90vw;  /* Responsive on small screens */
        z-index: 1000;
        box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        white-space: normal;
        word-wrap: break-word;
        pointer-events: none;
        font-style: italic;
    }
}

/* Disable hover tooltips on touch devices (iOS/Android) */
@media (hover: none) and (pointer: coarse) {
    a[title]:hover::after,
    a[data-cite]:hover::after {
        display: none !important;
    }
}

/* Navigation links - slightly different */
.nav {
    margin: 15px 0;
    font-size: 12pt;
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 1px solid #000000;
    margin: 20px 0;
}

/* Images */
img {
    border: 1px solid #000000;
    margin: 10px 0;
}

.header-img {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.inline-img {
    vertical-align: middle;
    margin: 0 5px;
}

/* Tables - simple 1993 style */
table {
    border-collapse: collapse;
    margin: 15px 0;
}

td, th {
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #000000;
    font-size: 11pt;
    color: #333333;  /* Darker for better contrast (6.3:1 ratio) */
}

/* Publication entries */
.pub-entry {
    margin-bottom: 20px;
}

.pub-title {
    font-weight: bold;
}

.pub-authors {
    font-style: italic;
}

.pub-journal {
    font-style: italic;
}

.pub-meta {
    font-size: 11pt;
    color: #333333;
}

/* Code/preformatted text */
pre {
    font-family: "Courier New", Courier, monospace;
    background-color: #E0E0E0;
    padding: 10px;
    border: 1px solid #000000;
    overflow-x: auto;
}

code {
    font-family: "Courier New", Courier, monospace;
    background-color: #E0E0E0;
    padding: 2px 4px;
}

/* Blockquotes */
blockquote {
    margin-left: 40px;
    font-style: italic;
    color: #333333;
}

/* Definition lists */
dt {
    font-weight: bold;
    margin-top: 10px;
}

dd {
    margin-left: 40px;
    margin-bottom: 10px;
}

/* Emphasis */
b, strong {
    font-weight: bold;
}

i, em {
    font-style: italic;
}

/* Address block */
address {
    font-style: normal;
    margin-top: 20px;
}

/* ========================================
   RETRO 1990s ELEMENTS
   ======================================== */

/* Scrolling marquee */
marquee {
    background-color: #000080;
    color: #FFFFFF;  /* White instead of yellow for better contrast (8.6:1 ratio) */
    padding: 5px;
    font-weight: bold;
    border: 2px solid #FFD700;
}

/* Blinking "NEW!" text */
.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Rainbow horizontal rule */
.rainbow-hr {
    height: 6px;
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
    border: none;
    margin: 20px 0;
}

/* 3D embossed horizontal rule */
.hr-3d {
    height: 4px;
    background: linear-gradient(to bottom, #999, #fff, #999);
    border: none;
    margin: 20px 0;
}

/* Awards and badges section */
.badges-section {
    background-color: #F0F0F0;
    border: 3px ridge #999;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.badge {
    display: inline-block;
    background-color: #FFD700;
    border: 2px solid #FFA500;
    padding: 10px;
    margin: 5px;
    font-size: 11pt;  /* Increased for readability */
    font-weight: bold;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.3);
}

/* Webring navigation */
.webring {
    background-color: #E0E0E0;
    border: 2px solid #000080;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    font-size: 10pt;
}

.webring a {
    color: #000080;
    font-weight: bold;
    text-decoration: underline;
}

/* "What's New" section */
.whats-new {
    background-color: #FFFFCC;
    border: 2px dashed #FF0000;
    padding: 15px;
    margin: 20px 0;
}

.whats-new h3 {
    color: #FF0000;
    margin-top: 0;
}

/* Best viewed in badges */
.browser-badge {
    background-color: #F0F0F0;
    border: 1px solid #666;
    padding: 8px;
    margin: 10px 0;
    text-align: center;
    font-size: 9pt;
    font-family: Arial, sans-serif;
}

/* Email button */
.email-button {
    display: inline-block;
    background-color: #4169E1;
    color: #FFFFFF;
    padding: 8px 15px;
    border: 2px outset #4169E1;
    text-decoration: none;
    font-weight: bold;
    font-size: 11pt;
}

.email-button:hover {
    background-color: #1E90FF;
    border: 2px inset #4169E1;
}

/* Under construction section */
.under-construction {
    background-color: #FFFF00;
    border: 3px solid #FF0000;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    animation: construction-blink 0.5s ease-in-out infinite alternate;
}

@keyframes construction-blink {
    from { background-color: #FFFF00; }
    to { background-color: #FFA500; }
}

/* Java/JavaScript badges */
.powered-badge {
    display: inline-block;
    background: linear-gradient(to bottom, #FF0000, #CC0000);
    color: #FFFFFF;
    padding: 5px 10px;
    border: 1px solid #000;
    font-family: Arial, sans-serif;
    font-size: 9pt;
    font-weight: bold;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 5px;
}

/* Animated GIF placeholder styling */
.animated-gif {
    display: inline-block;
    vertical-align: middle;
    margin: 0 3px;
}

/* Guestbook styles */
.guestbook-entry {
    background-color: #F0F0F0;
    border: 1px solid #999;
    padding: 10px;
    margin: 10px 0;
}

.guestbook-form {
    background-color: #E0E0E0;
    border: 2px solid #666;
    padding: 15px;
    margin: 20px 0;
}

.guestbook-form input,
.guestbook-form textarea {
    font-family: Arial, sans-serif;
    font-size: 10pt;
    padding: 5px;
    border: 1px solid #666;
    width: min(300px, 90vw);  /* Responsive width, never overflow */
}

.guestbook-form input[type="submit"] {
    background-color: #4169E1;
    color: #FFFFFF;
    font-weight: bold;
    cursor: pointer;
    width: auto;
    padding: 8px 20px;
}

/* Multiple counter styles */
.counter-container {
    text-align: center;
    margin: 15px 0;
}

.counter-style-2 {
    background: linear-gradient(to bottom, #000080, #0000CD);
    color: #00FFFF;
    padding: 10px;
    border: 2px solid #FFD700;
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: 18pt;
    font-weight: bold;
}

/* Frames notice */
.frames-notice {
    background-color: #FFCCCC;
    border: 2px dashed #FF0000;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 10pt;
}

/* ========================================
   MODERN ENHANCEMENTS (2024)
   Keeping retro look, adding modern UX
   ======================================== */

/* Smooth fade-in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Lazy loading images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Better link interaction */
a {
    transition: all 0.2s ease;
}

/* Improved focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #000080;
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000080;
    color: #FFFFFF;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    marquee, .webring {
        display: none;
    }

    body {
        background: white;
        color: black;
        margin: 0;
    }

    a {
        text-decoration: underline;
    }
}

/* Prefers 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;
    }

    .blink {
        animation: none;
    }
}

/* Dark mode support (optional enhancement) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #2C2C2C;
        color: #DDDDDD;
    }

    a {
        color: #DDDDDD;
    }

    hr {
        border-top-color: #666666;
    }
}

/* Better mobile navigation */
@media (max-width: 768px) {
    p a {
        display: inline-block;
        padding: 8px 0;
        margin: 2px 0;
    }

    .badges-section .badge {
        display: block;
        margin: 10px auto;
        max-width: 200px;
    }

    .whats-new {
        font-size: 11pt;
    }

    table {
        width: 100%;
        overflow-x: auto;
        display: block;
    }
}

/* Performance: Will-change for animated elements */
marquee,
.blink,
.under-construction {
    will-change: transform;
}

/* Modern table responsiveness */
@media (max-width: 768px) {
    table {
        font-size: 10pt;
    }

    td, th {
        padding: 4px 6px;
    }
}

/* Loading state for async content */
.loading {
    position: relative;
}

.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(192, 192, 192, 0.9);
    padding: 10px 20px;
    border: 1px solid #000;
}

/* ========================================
   APPLE 2000 BLEND - Clean Minimalism
   ======================================== */

/* Apple-style hero section */
.hero-section {
    background: linear-gradient(to bottom, #FFFFFF, #F5F5F5);
    padding: clamp(30px, 8vw, 60px) 20px;  /* Fluid padding that scales with viewport */
    text-align: center;
    border-bottom: 1px solid #DDD;
    margin: 20px calc(-1 * max(20px, 5vw));  /* Match body margin */
}

.hero-section h1 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 42pt;
    font-weight: 300;
    color: #333;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-section p {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16pt;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Apple-style product boxes */
.product-box {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-box:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.product-box h3 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 20pt;
    font-weight: 500;
    color: #333;
    margin-top: 0;
}

.product-box p {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #666;
    line-height: 1.6;
}

/* Apple-style three-column layout */
.three-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .three-column {
        grid-template-columns: 1fr;
    }
}

/* Apple-style buttons */
.btn-apple {
    display: inline-block;
    background: linear-gradient(to bottom, #5BA4F0, #4A8FD8);
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 6px;
    border: 1px solid #3A7EC0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12pt;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-apple:hover {
    background: linear-gradient(to bottom, #6BB0F8, #5A9FE8);
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transform: translateY(-1px);
    border-bottom-color: #FFF;
}

.btn-apple:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Apple-style secondary button */
.btn-secondary {
    background: #FFFFFF;
    color: #4A8FD8;
    border: 1px solid #D0D0D0;
}

.btn-secondary:hover {
    background: #F8F8F8;
    color: #5BA4F0;
}

/* Clean white content sections */
.clean-section {
    background: #FFFFFF;
    padding: 40px;
    margin: 20px -40px;
    border-top: 1px solid #E8E8E8;
    border-bottom: 1px solid #E8E8E8;
}

/* Apple-style navigation enhancement - STICKY */
.apple-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-bottom: 1px solid #D0D0D0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.apple-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apple-nav-logo {
    font-weight: bold;
    font-size: 14pt;
    color: #000080 !important;
    border-bottom: none !important;
}

.apple-nav-logo:hover {
    color: #4A8FD8 !important;
}

.apple-nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.apple-nav a {
    color: #333;
    font-size: 11pt;
    text-decoration: none;
    border-bottom: none !important;
    transition: color 0.2s;
}

.apple-nav a:hover {
    color: #4A8FD8;
}

/* CTA button in nav */
.apple-nav .btn-apple {
    padding: 8px 20px;
    font-size: 11pt;
    margin-left: 5px;
    border-bottom: none !important;
    color: #FFFFFF !important;
}

/* Mobile navigation */
@media (max-width: 768px) {
    .apple-nav {
        padding: 12px 15px;
    }

    .apple-nav-logo {
        font-size: 12pt;
    }

    .apple-nav-links {
        gap: 12px;
        font-size: 10pt;
    }

    .apple-nav a {
        font-size: 10pt;
    }

    .apple-nav .btn-apple {
        padding: 6px 12px;
        font-size: 10pt;
    }
}

/* Featured content card (Apple style) */
.feature-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #F0F0F0;
}

.feature-card h2 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 28pt;
    font-weight: 400;
    color: #333;
    margin-top: 0;
}

.feature-card .subtitle {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14pt;
    color: #666666;  /* Darker for better contrast (5.7:1 ratio) */
    font-weight: 300;
    margin-top: -15px;
}

/* Apple-style divider */
.apple-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #D0D0D0, transparent);
    margin: 40px 0;
    border: none;
}

/* Refined typography */
h1.apple-heading {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 36pt;
    font-weight: 300;
    color: #333;
    letter-spacing: -0.5px;
}

h2.apple-heading {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 28pt;
    font-weight: 400;
    color: #333;
}

h3.apple-heading {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18pt;
    font-weight: 500;
    color: #444;
}

/* Apple-style list */
.clean-list {
    list-style: none;
    padding: 0;
}

.clean-list li {
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.clean-list li:last-child {
    border-bottom: none;
}

/* Subtle accent color (Apple blue) */
.apple-accent {
    color: #4A8FD8;
}

/* Professional footer style */
.footer.apple-style {
    background: #F8F8F8;
    border-top: 1px solid #E0E0E0;
    padding: 30px 40px;
    margin: 40px -40px -40px -40px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 10pt;
    color: #888;
}

/* Learn more link (Apple style) */
.learn-more {
    color: #4A8FD8;
    text-decoration: none;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11pt;
    border-bottom: none;
}

.learn-more:hover {
    color: #5BA4F0;
    text-decoration: underline;
}

.learn-more::after {
    content: " →";
    font-weight: bold;
}

/* Spacious layout option */
.spacious {
    padding: 20px 0;
    line-height: 1.8;
}

/* Clean card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Minimalist quote style */
.apple-quote {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18pt;
    font-weight: 300;
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 40px auto;
    max-width: 700px;
    line-height: 1.6;
}

.apple-quote cite {
    display: block;
    margin-top: 15px;
    font-size: 12pt;
    color: #999;
    font-style: normal;
}

/* Elegant transitions */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional image container */
.image-container {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: inline-block;
}

.image-container img {
    display: block;
    border: none;
}
