/* ===================================
   MINIMAL PORTFOLIO - CLEAN STYLES
   ================================= */

html,
body {
    font-size: 62.5%;
    height: 100vh;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    scroll-behavior: smooth;
}

body {
    height: 100vh;
    width: 100%;
    box-sizing: border-box;
    border: none;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Minimal scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===================================
   OVERLAY PANEL STYLES
   ================================= */

.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    /* Strictly hide */
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.detail-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.detail-panel {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
}

/* Project mode: full-screen scrolling */
.detail-panel.project-mode {
    max-width: 100%;
    width: 100%;
    height: 90vh;
    max-height: 90vh;
    padding: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.detail-controls {
    position: relative;
    margin-bottom: 2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* When in project mode, use vertical scroll */
.detail-panel.project-mode .detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    overflow: visible;
}

.detail-tile {
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.detail-tile:hover {
    transform: translateY(-2px);
    box-shadow: 8px 8px 0px var(--border-color) !important;
}

.detail-tile h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: 'DotGothic16', monospace;
}

.detail-tile p {
    font-size: 1.4rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Project-specific styles */
.project-slide {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 90vh;
    height: 90vh;
    padding: 2rem 5rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Header area for title/desc/meta */
.project-slide-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 2rem;
}

.project-slide h3 {
    font-size: 5rem;
    font-family: 'DotGothic16', monospace;
    margin: 0 0 1rem 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.project-slide .desc {
    font-size: 2.4rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.project-slide-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 1.8rem;
}

.project-slide-meta a {
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
}

.project-slide-meta a:hover {
    opacity: 0.7;
}

.project-readme-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    max-height: none;
    border: 1px dashed var(--border-color);
}

.readme-content {
    font-size: 1.6rem;
    line-height: 1.8;
}

.readme-content h1,
.readme-content h2,
.readme-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-family: 'DotGothic16', monospace;
}

.readme-content h1 {
    font-size: 2.2em;
}

.readme-content h2 {
    font-size: 1.8em;
}

.readme-content h3 {
    font-size: 1.5em;
}

.readme-content p {
    margin: 1em 0;
}

.readme-content code {
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.readme-content pre {
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

.readme-content pre code {
    padding: 0;
}

.readme-content ul,
.readme-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.readme-content li {
    margin: 0.5em 0;
}

.readme-content a {
    text-decoration: underline;
    transition: opacity 0.2s;
}

.readme-content a:hover {
    opacity: 0.7;
}

.readme-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.readme-content blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 3px solid var(--border-color);
}

.readme-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.readme-content th,
.readme-content td {
    border: 1px solid var(--border-color);
    padding: 0.5em;
    text-align: left;
}

.readme-content th {
    font-weight: bold;
}

/* Project navigation */
#projectNav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

#projectNav button {
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.4rem;
    font-family: 'DotGothic16', monospace;
    transition: all 0.2s ease;
}

#projectNav button:hover:not(:disabled) {
    background: var(--text-primary);
    color: var(--bg-primary);
}

#projectNav button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Scrollbar for readme area */
.project-readme-area::-webkit-scrollbar {
    width: 6px;
}

.project-readme-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.project-readme-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.project-readme-area::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}