/*
 * Georgia Essig Personal Portfolio
 * Warm minimalist – tab-based layout with typing effect
 */

:root {
    /* Background & Surfaces */
    --bg-page: #faf8f5;
    --bg-white: #ffffff;
    --bg-hover: #f5f0ea;

    /* Borders */
    --border-light: #e8e2d9;
    --border-hover: #d4ccc0;

    /* Text Colors */
    --text-dark: #1a1a1a;
    --text-body: #3d3d3d;
    --text-muted: #6b6560;
    --text-light: #9a938b;

    /* Accent – warm terracotta */
    --accent: #a0785c;
    --accent-hover: #8a6548;
    --accent-bg: #f5ede6;

    /* Connections solved */
    --solved-yellow-bg: #f9df7b;
    --solved-green-bg: #a0c35a;
    --solved-blue-bg: #b0c4ef;
    --solved-purple-bg: #ba76c4;
    --solved-text-color: #1a1a1a;

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Inconsolata', 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-page);
    font-family: var(--font-sans);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Layout Grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
    flex: 1;
    width: 100%;
}

/* --- Left Column: Bio Card --- */
.bio-column {
    position: sticky;
    top: 56px;
}

.bio-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.2s ease;
}

.bio-card:hover {
    border-color: var(--border-hover);
}

.photo-frame {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-light);
    margin-bottom: 24px;
    transition: border-color 0.3s ease;
}

.bio-card:hover .photo-frame {
    border-color: var(--accent);
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bio-name {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.bio-location {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.bio-location i {
    color: var(--text-light);
}

.bio-email {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bio-email:hover {
    color: var(--accent);
}

.card-divider {
    width: 100%;
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

.bio-links-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-bio-link {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.btn-bio-link:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

/* --- Right Column: Content Dashboard --- */
.main-content-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 40px;
    transition: border-color 0.2s ease;
}

.main-content-card:hover {
    border-color: var(--border-hover);
}

/* --- Clean Navigation Tabs --- */
.nav-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 32px;
    gap: 4px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.15s ease;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.nav-tab:hover {
    color: var(--text-dark);
}

.nav-tab.active {
    color: var(--accent);
}

.nav-tab.active::after {
    background-color: var(--accent);
}

/* --- Tab Panel Visibility --- */
.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

/* --- Tab 1: About --- */
.hero-block {
    margin-bottom: 36px;
}

.hero-greeting {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    display: inline;
    line-height: 1.3;
}

/* Typing cursor */
.typing-cursor {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 300;
    color: var(--accent);
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-intro {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-top: 16px;
    max-width: 580px;
}

/* --- Artwork Accent --- */
.artwork-accent {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 64px;
    padding: 20px;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.artwork-image-wrap {
    flex: 0 0 160px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.artwork-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.artwork-image-wrap:hover .artwork-image {
    transform: scale(1.03);
}

.artwork-caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.artwork-title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    font-style: italic;
    color: var(--text-dark);
}

.artwork-artist {
    font-size: 13px;
    color: var(--text-muted);
}

.artwork-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.artwork-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.artwork-link i {
    font-size: 10px;
}

/* --- Section Titles --- */
.section-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* --- Timeline --- */
.timeline-container {
    margin-bottom: 40px;
}

.timeline {
    position: relative;
    border-left: 1px solid var(--border-light);
    padding-left: 24px;
    margin-left: 6px;
    padding-bottom: 16px;
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -29.5px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-white);
    border: 2px solid var(--border-light);
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-marker {
    border-color: var(--accent);
    background-color: var(--accent);
}

.timeline-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-dark);
}

.timeline-subtitle {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.timeline-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* --- Tab 2: Projects --- */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    background: var(--bg-white);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.project-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.project-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--text-light);
}

.project-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 12px;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.project-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* --- Tab 3: Connections Game --- */
.game-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.connections-board-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.connection-card {
    background: #f0ebe4;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 16 / 11;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    font-weight: 700;
    font-size: 12px;
    font-family: var(--font-sans);
    color: var(--text-dark);
    user-select: none;
    text-transform: uppercase;
    word-break: break-word;
    line-height: 1.25;
    letter-spacing: 0.03em;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.connection-card:hover {
    background-color: #e8dfd5;
    border-color: var(--border-hover);
}

.connection-card:active {
    transform: scale(0.97);
}

.connection-card.selected {
    background-color: #5a5a5a;
    color: #ffffff;
    border-color: #5a5a5a;
}

/* Solved rows */
.solved-categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.solved-row {
    width: 100%;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    color: var(--solved-text-color);
    animation: popIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.solved-row-title {
    font-family: var(--font-sans);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.solved-row-words {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
}

.solved-row.difficulty-0 { background-color: var(--solved-yellow-bg); }
.solved-row.difficulty-1 { background-color: var(--solved-green-bg); }
.solved-row.difficulty-2 { background-color: var(--solved-blue-bg); }
.solved-row.difficulty-3 { background-color: var(--solved-purple-bg); }

/* Game status */
.game-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.game-alert-message {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.game-alert-message.highlight {
    color: var(--accent);
}

.mistakes-tracker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mistakes-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
}

.mistake-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-light);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.dot.active {
    background-color: var(--text-muted);
}

.dot.lost {
    transform: scale(0);
}

/* Game buttons */
.game-action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-game-primary {
    background-color: var(--text-dark);
    border: 1px solid var(--text-dark);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.btn-game-primary:hover:not(:disabled) {
    background-color: #333;
}

.btn-game-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: transparent;
    border-color: var(--border-light);
    color: var(--text-light);
}

.btn-game-sec {
    background-color: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-game-sec:hover {
    background-color: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Game Modal --- */
.game-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 26, 26, 0.35);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.game-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.game-modal-content {
    width: 100%;
    max-width: 380px;
    padding: 28px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.game-modal-overlay.open .game-modal-content {
    transform: scale(1);
}

#game-over-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

#game-over-subtitle {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.emoji-grid-display {
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-family: monospace;
    font-size: 16px;
    line-height: 1.4;
    white-space: pre;
    letter-spacing: 4px;
    user-select: all;
    display: inline-block;
}

.game-modal-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.game-modal-actions button {
    width: 100%;
    justify-content: center;
}

/* --- Footer --- */
footer {
    margin-top: auto;
    color: var(--text-light);
    font-size: 13px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    padding: 24px 0;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { transform: scale(0.96); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.2s ease-in-out 2;
}

/* --- Responsive --- */
@media (max-width: 800px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .bio-column {
        position: static;
    }
    
    .wrap {
        padding: 32px 16px;
    }
    
    .main-content-card {
        padding: 28px 20px;
    }
    
    .artwork-accent {
        flex-direction: column;
    }
    
    .artwork-image-wrap {
        flex: 0 0 auto;
        max-width: 200px;
    }
}

@media (max-width: 500px) {
    .nav-tabs {
        margin-bottom: 20px;
    }
    
    .nav-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .hero-greeting {
        font-size: 28px;
    }
    
    .typing-cursor {
        font-size: 28px;
    }
    
    .connections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .connection-card {
        aspect-ratio: 16 / 9;
        font-size: 11px;
    }
    
    .game-action-buttons {
        flex-direction: column;
        gap: 8px;
    }
}
