/* 
  Luke Christensen - Premium Portfolio CSS 
  Apple-style Minimalist Light Mode 
*/

:root {
    --bg-color: #ffffff;
    --bg-light: #f5f5f7;
    --text-main: #1d1d1f;
    --text-sec: #86868b;
    --accent: #0066cc;
    --accent-hover: #004499;
    --border-color: rgba(0,0,0,0.08);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.bg-light {
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* Navigation (Glassmorphism) */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: var(--glass-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sec);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Smart Navbar Hide/Show */
.navbar {
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar.hide {
    transform: translateY(-100%);
}
.navbar.shadow {
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-color); /* solid backup over glass */
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--text-sec);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--text-main);
}

.btn-icon:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

.btn-icon.download-btn {
    width: auto;
    padding: 0 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 2rem;
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.5) 60%, var(--bg-color) 100%), url('./assets/tetons_bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.headshot-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.headshot {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
    transform: translateZ(0); /* Hardware accelerate to prevent grain */
}

.status-badge {
    display: inline-block;
    background-color: var(--bg-color);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    white-space: nowrap;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #000000;
    font-weight: 700;
}

.hero-bio {
    font-size: 1.25rem;
    color: #000000;
    font-weight: 500;
    max-width: 600px;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 4px rgba(255,255,255,0.5); /* subtle glow to ensure readability */
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Shared Section Styles */
.section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-sec);
    font-size: 1.1rem;
}

/* Timeline / Experience */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: var(--border-color);
    margin-left: 15px; /* Offset to center the dot approx */
}

.timeline-item {
    display: flex;
    gap: 2rem;
    position: relative;
}

.timeline-date {
    flex: 0 0 150px;
    padding-top: 0.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sec);
    text-align: right;
    position: relative;
}

.timeline-date::after {
    content: '';
    position: absolute;
    right: -2rem; /* Matches gap */
    top: 8px;
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px white;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-date::after {
    background-color: var(--accent-hover);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px var(--bg-light);
}

.timeline-content {
    flex: 1;
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.timeline-content:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.company-desc {
    font-size: 0.9rem;
    color: var(--text-sec);
    margin-bottom: 1rem;
    font-style: italic;
}

.timeline-content ul {
    list-style-position: outside;
    padding-left: 1.2rem;
    color: var(--text-sec);
    line-height: 1.7;
}

.timeline-content li {
    margin-bottom: 0.8rem;
}

/* Bento Grid / Projects */
/* Project Grid Redesign */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.project-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: #f5f5f7;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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


.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: block;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.project-info p {
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    gap: 0.5rem;
    transition: gap 0.2s;
}

.project-link::after {
    content: "→";
    transition: transform 0.2s;
}

.project-link:hover::after {
    transform: translateX(4px);
}

.project-status {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    align-self: flex-start;
}

.bento-card {
    background-color: white;
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.bento-card.large {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .bento-card.large {
        grid-column: span 1;
    }
}

.card-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1rem;
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: var(--bg-light);
    color: var(--text-sec);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.bento-card p {
    color: var(--text-sec);
    line-height: 1.6;
}

/* Footer Section */
footer {
    background-color: #111111; /* Contrast dark footer */
    color: white;
    padding: 6rem 2rem 2rem;
    text-align: center;
}

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

.footer-content p {
    color: #888888;
    font-size: 1.2rem;
}

.footer-bottom {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.skills-list {
    color: rgba(255,255,255,0.5) !important;
}

/* View Document Buttons */
.view-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background-color: rgba(0, 102, 204, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.view-doc-link:hover {
    background-color: rgba(0, 102, 204, 0.15);
    transform: translateX(3px);
}

.timeline-content .view-doc-link {
    margin-top: 0.5rem;
}

/* Contact Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-color);
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.modal-backdrop.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sec);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-main);
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-sec);
    margin-bottom: 2rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.modal-form-group {
    margin-bottom: 1.5rem;
}

.modal-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.modal-form-group input,
.modal-form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--bg-light);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-form-group input:focus,
.modal-form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background-color: white;
}

.modal-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.modal-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.modal-submit:hover {
    background-color: var(--accent-hover);
}

.modal-submit:active {
    transform: scale(0.98);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slideshow */
.slideshow-container {
    max-width: 800px;
    position: relative;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-color); /* To handle avatars correctly without transparent gaps */
}

.slide {
    display: none;
    width: 100%;
    height: 450px;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0 8px 8px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.7);
}

.slide-dots {
    text-align: center;
    margin-top: 1.5rem;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 6px;
    background-color: var(--border-color);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: var(--accent);
}

.fade-animation {
    animation-name: slideFade;
    animation-duration: 1s;
}

@keyframes slideFade {
    from {opacity: .5} 
    to {opacity: 1}
}

/* =====================
   RESPONSIVE — TABLET (max 768px)
   Desktop is completely unaffected by all rules below
   ===================== */
@media (max-width: 768px) {

    /* Nav */
    .nav-links {
        gap: 1rem;
    }
    .nav-links a {
        font-size: 0.8rem;
    }
    .btn-primary {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    /* Hero */
    .hero {
        padding: 5rem 1.5rem 2rem;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-bio {
        font-size: 1.1rem;
    }
    .headshot {
        width: 160px;
        height: 160px;
    }
    .status-badge {
        font-size: 0.7rem;
        right: -10px;
        padding: 0.3rem 0.7rem;
    }

    /* Section padding */
    .section {
        padding: 4rem 1.5rem;
    }
    .section-header {
        margin-bottom: 2.5rem;
    }
    .section-header h2 {
        font-size: 2rem;
    }

    /* Timeline */
    .timeline::before {
        display: none;
    }
    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    .timeline-date {
        text-align: left;
        flex: auto;
    }
    .timeline-date::after {
        display: none;
    }
    .timeline-content {
        padding: 1.5rem;
    }

    /* Project grid — single column on tablet */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-card.large {
        grid-column: span 1;
    }

    /* Slideshow */
    .slide {
        height: 300px;
    }

    /* Footer */
    footer {
        padding: 4rem 1.5rem 2rem;
    }
    .footer-content h2 {
        font-size: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Viewer modal */
    .viewer-content {
        height: 100vh;
        max-width: 100vw;
        border-radius: 0;
    }
    .viewer-header h2 {
        font-size: 1rem;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* =====================
   RESPONSIVE — PHONE (max 480px)
   ===================== */
@media (max-width: 480px) {

    /* Nav — hide text links, show logo + connect only */
    .nav-links {
        display: none;
    }
    .nav-content {
        padding: 0.8rem 1.2rem;
    }

    /* Hero */
    .hero {
        padding: 4.5rem 1.2rem 2rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-bio {
        font-size: 1rem;
    }
    .headshot {
        width: 130px;
        height: 130px;
    }
    .status-badge {
        font-size: 0.65rem;
        right: -5px;
        padding: 0.25rem 0.6rem;
        bottom: 5px;
    }
    .hero-actions {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }
    .btn-icon.download-btn {
        font-size: 0.85rem;
        padding: 0 1rem;
        height: 44px;
    }

    /* Sections */
    .section {
        padding: 3rem 1.2rem;
    }
    .section-header h2 {
        font-size: 1.75rem;
    }
    .section-header p {
        font-size: 1rem;
    }

    /* Timeline content */
    .timeline-content {
        padding: 1.2rem;
        border-radius: 16px;
    }
    .timeline-content h3 {
        font-size: 1.15rem;
    }
    .timeline-content h4 {
        font-size: 0.95rem;
    }
    .timeline-content ul {
        font-size: 0.92rem;
    }

    /* Project cards */
    .project-grid {
        gap: 1.2rem;
        padding: 1rem 0;
    }
    .project-info {
        padding: 1.5rem;
    }
    .project-info h3 {
        font-size: 1.2rem;
    }

    /* Slideshow */
    .slide {
        height: 220px;
    }
    .prev, .next {
        padding: 10px;
        font-size: 18px;
    }

    /* Footer */
    footer {
        padding: 3rem 1.2rem 2rem;
    }
    .footer-content h2 {
        font-size: 1.6rem;
    }
    .footer-content p {
        font-size: 1rem;
    }
    .skills-list {
        font-size: 0.8rem;
    }
}

/* Viewer Modal Specifics */
.viewer-content {
    max-width: 95vw;
    width: 1200px;
    height: 90vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viewer-header {
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.viewer-header h2 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.viewer-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-right: 3rem; /* Leave space for close button */
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.viewer-body {
    flex: 1;
    position: relative;
    background-color: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Fallback message for non-renderable files */
.viewer-fallback {
    text-align: center;
    padding: 3rem;
}

.viewer-fallback h3 {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .viewer-content {
        height: 100vh;
        max-width: 100vw;
        border-radius: 0;
    }
    
    .viewer-header h2 {
        font-size: 1rem;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
