/* ============================================
   CSS Variables & Base Styles
   ============================================ */
:root {
    --color-bg: #0a0a0a;
    --color-bg-elevated: #141414;
    --color-text: #f5f0e8;
    --color-text-muted: #8a847a;
    --color-accent: #d4a574;
    --color-accent-hover: #e8b989;
    --color-border: #2a2a2a;
    
    --font-display: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    z-index: 100;
    background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: transform var(--transition-smooth);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-links a:hover {
    color: var(--color-text);
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: var(--space-xl) var(--space-lg);
    position: relative;
}

.hero-content {
    z-index: 2;
}

.hero-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-title .line:nth-child(1) {
    animation-delay: 0.4s;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.6s;
}

.hero-title .accent {
    color: var(--color-accent);
    position: relative;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 480px;
    margin-bottom: var(--space-lg);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-shapes {
    position: relative;
    width: 400px;
    height: 400px;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 30% 30%, var(--color-accent), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 70% 30%, #7a5c3e, transparent 70%);
    top: 20%;
    right: 10%;
    animation: float 6s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 50% 50%, #3a3025, transparent 70%);
    bottom: 20%;
    left: 20%;
    animation: float 7s ease-in-out infinite;
    animation-delay: -2s;
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: var(--space-xl) var(--space-lg);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
}

/* ============================================
   About Section
   ============================================ */
.about {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
}

.about-text {
    max-width: 640px;
}

.about-lead {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.about-text p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.about-skills h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}

.skills-grid {
    display: grid;
    gap: var(--space-xs);
}

.skill-item {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-weight: 500;
    transition: all var(--transition-smooth);
}

.skill-item:hover {
    border-color: var(--color-accent);
    transform: translateX(8px);
}

/* ============================================
   Work Section
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-md);
}

.project-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--color-bg) 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--color-border);
}

.project-placeholder {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-border);
    transition: color var(--transition-smooth);
}

.project-card:hover .project-placeholder {
    color: var(--color-accent);
}

.project-info {
    padding: var(--space-md);
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.project-info p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.project-tags {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 500;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    text-align: center;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.contact .section-header {
    justify-content: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-lead {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-lg);
    position: relative;
    transition: all var(--transition-smooth);
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-smooth);
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.social-link:hover {
    color: var(--color-accent);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0px);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-30px);
    }
}

/* Scroll reveal animation class */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 4rem;
    }
    
    .nav {
        padding: var(--space-sm) var(--space-md);
    }
    
    .nav-links {
        gap: var(--space-sm);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}
