/*
Theme Name: Husen
Theme URI: husen.info
Author: Keyhan
Author URI: keyhan.info
Description: Husen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: husen
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    /* Colors */
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111111;
    --color-bg-tertiary: #1a1a1a;
    --color-text: #e5e5e5;
    --color-text-muted: #888888;
    --color-text-dim: #555555;
    --color-accent: #ffffff;
    --color-border: #222222;
    --color-hover: #2a2a2a;
    
    /* Typography */
    --font-sans: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Ubuntu Mono', 'SF Mono', Consolas, monospace;
    
    /* Sizing */
    --max-width: 1400px;
    --content-width: 800px;
    --spacing: clamp(1rem, 4vw, 2rem);
    --spacing-lg: clamp(3rem, 10vw, 8rem);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

::selection {
    background: var(--color-accent);
    color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-accent);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 0.8rem;
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 0.6rem;
}

p {
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

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

#site-content,
.landing-page,
.words-archive-page,
.videos-archive-page,
.photos-archive-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing);
    min-height: 80vh;
}

/* ==========================================================================
   Header
   ========================================================================== */

#site-header {
    padding: var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.9);
}

.site-branding a {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

#site-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

#site-navigation a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

#site-navigation a:hover {
    color: var(--color-accent);
    opacity: 1;
}

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

#site-footer {
    padding: var(--spacing-lg) var(--spacing);
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.85rem;
}

/* ==========================================================================
   Homepage / Landing Page
   ========================================================================== */

.landing-page {
    padding-top: var(--spacing-lg);
}

.page-content {
    max-width: var(--content-width);
    margin: 0 auto var(--spacing-lg);
    font-size: 1.2rem;
}

.page-content h1:first-child,
.page-content h2:first-child {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 2rem;
}

/* Sections */
.featured-videos-section,
.featured-photos-section,
.featured-words-section {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--color-border);
}

.section-title {
    font-size: 0.85rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.view-all-link {
    display: inline-block;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.25rem;
}

.view-all-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   Video Grid
   ========================================================================== */

.videos-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.video-item,
.video-card {
    position: relative;
}

.video-thumbnail,
.video-card-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg-tertiary);
    margin-bottom: 1rem;
}

.video-thumbnail img,
.video-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-item:hover img,
.video-card:hover img {
    transform: scale(1.03);
}

.video-duration,
.duration {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.video-title,
.video-card-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.video-role,
.video-year {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.video-card-meta {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   Photo Grid
   ========================================================================== */

.photos-grid,
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.photo-item,
.photo-card {
    position: relative;
    overflow: hidden;
}

.photo-thumbnail,
.photo-card-thumbnail {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.photo-thumbnail img,
.photo-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-item:hover img,
.photo-card:hover img {
    transform: scale(1.05);
}

.photo-title,
.photo-card-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

.photo-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover .photo-card-overlay {
    opacity: 1;
}

.photo-card-overlay .photo-card-title {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.photo-location {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Words List
   ========================================================================== */

.words-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-words-section .word-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.featured-words-section .word-item:last-child {
    border-bottom: none;
}

.word-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.word-date {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    font-family: var(--font-mono);
}

.word-excerpt {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Words Archive Page */
.words-archive-page .word-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}

.words-archive-page .word-thumbnail {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.words-archive-page .word-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.words-archive-page .word-content .word-title {
    font-size: 1.8rem;
}

.word-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.word-categories {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.2rem;
}

.read-more:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   Page Headers
   ========================================================================== */

.page-header,
.archive-header {
    padding: var(--spacing-lg) 0 var(--spacing);
    text-align: center;
}

.page-title,
.archive-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */

.word-single,
.video-single,
.photo-single {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing);
}

.entry-header {
    margin-bottom: 3rem;
    text-align: center;
}

.entry-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    font-family: var(--font-mono);
}

.post-thumbnail {
    margin-bottom: 3rem;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.8rem;
}

.entry-content h2 {
    margin-top: 3rem;
}

.entry-content h3 {
    margin-top: 2rem;
}

.entry-content blockquote {
    border-left: 2px solid var(--color-border);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-muted);
}

.entry-content a {
    border-bottom: 1px solid var(--color-border);
}

.entry-content a:hover {
    border-color: var(--color-accent);
    opacity: 1;
}

.entry-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.entry-footer a {
    color: var(--color-text);
}

.meta-label {
    color: var(--color-text-dim);
    margin-right: 0.5rem;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.post-navigation a {
    color: var(--color-text-muted);
}

.post-navigation a:hover {
    color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   Single Video
   ========================================================================== */

.video-single {
    max-width: 1000px;
}

.video-player {
    margin-bottom: 3rem;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.video-meta .meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.video-meta .meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
}

.video-meta .meta-value {
    font-size: 1.1rem;
}

.video-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Single Photo
   ========================================================================== */

.photo-single {
    max-width: 1200px;
}

.photo-image {
    margin-bottom: 3rem;
}

.photo-image img {
    width: 100%;
    height: auto;
}

.photo-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.photo-meta .meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.photo-meta .meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
}

.photo-exif {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.photo-exif h3 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
    margin-bottom: 1.5rem;
}

.exif-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.exif-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exif-item dt {
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

.exif-item dd {
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.photo-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--spacing-lg);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
}

.pagination a:hover {
    background: var(--color-hover);
    opacity: 1;
}

.pagination .current {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

/* ==========================================================================
   Search
   ========================================================================== */

.search-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
}

.search-field {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-sans);
}

.search-field:focus {
    outline: none;
    border-color: var(--color-text-muted);
}

.search-submit {
    padding: 1rem 2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.search-submit:hover {
    opacity: 0.8;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: var(--spacing-lg);
}

.error-404 .entry-title {
    font-size: clamp(3rem, 10vw, 6rem);
}

.error-404 .search-form {
    margin: 2rem auto;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    max-width: var(--content-width);
    margin: 4rem auto 0;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
}

.comment-list li {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-text-muted);
}

.comment-form input[type="submit"] {
    width: auto;
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

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

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .videos-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .photos-grid,
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .words-archive-page .word-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #site-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    #site-navigation ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .video-meta,
    .photo-meta,
    .exif-list {
        gap: 1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .photos-grid,
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
}
