/* =========================================
   Gothic Portfolio - Design System
   ========================================= */

:root {
    --bg-color: #0a0a0b;
    --text-color: #e0e0e0;
    --accent-color: #8b0000;
    --accent-hover: #b30000;
    --gold-accent: #b89947;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

/* Noise Background */
.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Typography */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-5 {
    margin-top: 5rem;
}

/* =========================================
   Custom Cursor
   ========================================= */
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--gold-accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(184, 153, 71, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.3s, height 0.3s, border-color 0.3s;
}

/* Hover States for cursor */
.cursor.hovering {
    width: 0;
    height: 0;
}

.cursor-follower.hovering {
    width: 60px;
    height: 60px;
    background-color: rgba(139, 0, 0, 0.1);
    border-color: var(--accent-color);
    mix-blend-mode: exclusion;
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--gold-accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    transition: var(--transition);
}

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

/* =========================================
   Hero Section
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(20,20,20,1) 0%, rgba(10,10,11,1) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 5px;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gold-accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transition: var(--transition);
    z-index: -1;
}

.cta-btn:hover {
    border-color: var(--accent-color);
    color: #fff;
}

.cta-btn:hover::before {
    left: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--gold-accent);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

.phone-swipe {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    position: relative;
    margin: 0 auto;
}

.phone-swipe::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--gold-accent);
    border-radius: 50%;
    animation: swipe 2s infinite;
    opacity: 0;
}

@keyframes swipe {
    0% { transform: translate(-50%, 0); opacity: 0; }
    20% { opacity: 1; }
    80% { transform: translate(-50%, -15px); opacity: 0; }
    100% { opacity: 0; }
}

.desktop-only { display: block; }
.mobile-only { display: none; }

/* =========================================
   About Section
   ========================================= */
.about {
    padding: 8rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #bbb;
}

.about-text strong {
    color: var(--gold-accent);
    font-weight: 500;
}

.about-text em {
    color: #fff;
    font-style: italic;
    font-family: var(--font-heading);
}

.arch-frame {
    position: relative;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-top-left-radius: 150px;
    border-top-right-radius: 150px;
    overflow: hidden;
}

.arch-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 150px;
    border-top-right-radius: 150px;
    filter: grayscale(80%) contrast(1.2);
    transition: var(--transition);
}

.arch-frame:hover img {
    filter: grayscale(0%) contrast(1.1);
}

.frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-color) 0%, transparent 40%);
    pointer-events: none;
}

/* =========================================
   Works Section
   ========================================= */
.works {
    padding: 8rem 0;
    background-color: #0d0d0e;
}

.work-category h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--gold-accent);
    color: var(--gold-accent);
    border-radius: 20px;
}

/* Masonry for drawings */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-item {
    overflow: hidden;
    position: relative;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(30%);
    transition: transform 0.5s, filter 0.5s;
}

.grid-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Grid for 3D Models */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.model-item {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.model-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.model-info {
    padding-top: 1.5rem;
    text-align: center;
}

.model-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--gold-accent);
}

.model-info p {
    font-size: 0.9rem;
    color: #888;
}

/* =========================================
   Contact & Footer
   ========================================= */
.contact {
    padding: 6rem 0 3rem;
    background: linear-gradient(to bottom, #0d0d0e, var(--bg-color));
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.copyright {
    font-size: 0.8rem;
    color: #666;
}

/* =========================================
   Animations & Reveals
   ========================================= */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-fade.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .arch-frame {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.8rem;
    }
    
    /* Disable custom cursor on mobile */
    .cursor, .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
}

/* =========================================
   Fullscreen Image Modal
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

.modal-bg-sea {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: #000;
    background-image: 
        radial-gradient(circle at center, rgba(10,20,30,0.8) 0%, rgba(0,0,0,1) 70%),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 10px, transparent 10px, transparent 20px);
    z-index: -1;
    animation: flowSea 20s linear infinite;
    opacity: 0.95;
}

@keyframes flowSea {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(5%, 5%) rotate(5deg); }
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 10;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.active .modal-content img {
    transform: scale(1);
}
