/* ============================================
   PORTFOLIO STYLES - lolimtaco
   Dark theme with blocky Minecraft-inspired aesthetic
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --accent: #d49806;
    --accent-hover: #e8a907;
    --accent-glow: rgba(212, 152, 6, 0.3);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --border-color: #30363d;
    --success: #7ee787;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s ease;
    --container-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    /* Blocky - no border radius */
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-subtitle .accent {
    color: var(--accent);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(212, 152, 6, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(212, 152, 6, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Blocky grid pattern overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(48, 54, 61, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 54, 61, 0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    opacity: 0.5;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 48px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
}

/* About Section */
.about-content {
    max-width: 800px;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.about-content strong {
    color: var(--accent);
}

/* Projects Section */
.projects-category {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 60px 0 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

/* Featured Project - Expanded Layout */
.featured-project {
    position: relative;
    margin-bottom: 48px;
}

.featured-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Project Card (Standard) */
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
    /* Ensure full height */
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(212, 152, 6, 0.1);
    transform: translateY(-4px);
}

.project-image {
    aspect-ratio: 16/9;
    flex-shrink: 0;
    /* Prevent squashing in flex container */
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

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

.project-placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.5;
}

.project-card.featured-expanded {
    display: block;
    /* Different layout for featured */
    height: auto;
}

/* Hero Image Top */
.featured-hero-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.featured-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Grid (Poster + Info) */
.featured-content-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    /* Increased from 300px for larger poster */
    gap: 48px;
    /* Increased gap for better spacing */
    padding: 32px;
}

/* Poster */
.featured-poster {
    width: 100%;
    aspect-ratio: 3/4;
    /* Adjusted to 3:4 to match actual image dimensions */
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.featured-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px constant var(--border-color);
    pointer-events: none;
}

.featured-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fills the 11:14 box completely. If image is 11:14, no crop. */
    display: block;
}

.poster-placeholder {
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

/* Featured Info */
.featured-info .project-tags {
    margin: 20px 0;
}

.featured-actions {
    margin-top: 24px;
    display: flex;
    gap: 16px;
}

/* Subsection (What If Series) */
.featured-subsection {
    margin-top: 32px;
    padding: 20px;
    background: rgba(48, 54, 61, 0.4);
    border: 1px solid var(--border-color);
    /* Blocky */
}

.featured-subsection h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.featured-subsection .accent {
    color: var(--accent);
}

.subsection-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Standard Project Cards - Button Update */
.project-link {
    width: 100%;
    margin-top: auto;
    /* Push to bottom */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-link::after {
    content: '→';
    /* Arrow icon */
    font-weight: bold;
    transition: transform 0.3s ease;
}

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

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-description {
    flex-grow: 1;
    /* Allows description to fill space */
}

/* Missing Typography & Tags Restored */
.project-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.project-duration {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
    flex-grow: 1;
    /* Keep flex-grow from previous edit */
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    /* Blocky - no border radius */
}

/* Mobile Responsive Updates */
@media (max-width: 900px) {
    .featured-content-grid {
        grid-template-columns: 1fr;
        /* Stack poster and info */
        gap: 24px;
        padding: 24px;
    }

    .featured-poster {
        max-width: 300px;
        /* Don't let poster get too huge on mobile */
        margin: 0 auto;
    }
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.skill-category {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 24px;
    /* Blocky - no border radius */
}

.skill-category-title {
    font-size: 1.125rem;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    color: var(--text-primary);
    font-weight: 500;
}

.skill-level {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Contact Section */
.contact {
    text-align: center;
}

.contact .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.contact-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 16px 32px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition);
    /* Blocky - no border radius */
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .project-card.featured {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }

    .hero {
        padding: 100px 24px 60px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease forwards;
}