@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700&display=swap');

:root {
    --bg: #050505;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --primary: #8a2be2;
    --primary-soft: rgba(138, 43, 226, 0.3);
    --card-bg: #0f0f0f;
    --border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Container & Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
nav {
    position: fixed; top: 0; width: 100%;
    padding: 30px 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(5, 5, 5, 0.7);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.1rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--primary); }

/* --- Hero Section --- */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 60px;
}

.overline {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 30px;
}

.text-gradient {
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 50px;
}

/* Image Styling */
.image-wrapper {
    width: 350px;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 80px -20px rgba(0,0,0,0.8);
}
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 0.5s ease;
}
.image-wrapper:hover img { filter: grayscale(0%); transform: scale(1.05); }

/* Buttons */
.btn-group { display: flex; gap: 20px; }

.btn {
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg);
}
.btn-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 30px var(--primary-soft);
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

/* --- Sections General --- */
section { padding: 120px 0; }

.section-header {
    margin-bottom: 80px;
}
.section-header h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}
.section-header .line {
    width: 60px;
    height: 2px;
    background: var(--primary);
}

/* --- Tech Grid --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: 0.4s ease;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
}

.icon-box {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.card h3 { margin-bottom: 15px; font-size: 1.2rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* --- Project Card --- */
.project-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.project-image {
    height: 100%;
    min-height: 400px;
    background: #111;
}
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}
.project-card:hover .project-image img { transform: scale(1.03); }

.project-content { padding: 60px; }

.tag {
    display: inline-block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-content h3 { font-size: 2.5rem; margin-bottom: 20px; line-height: 1.1; }
.project-content p { color: var(--text-muted); margin-bottom: 30px; }

.tech-list {
    list-style: none;
    display: flex;
    gap: 15px;
}
.tech-list li {
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    padding: 8px 16px;
    border-radius: 50px;
    color: var(--text-main);
}

/* --- Contact --- */
.contact-container { text-align: center; }
.contact-container h2 { font-size: 3rem; margin-bottom: 20px; }
.email-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    margin-top: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
    transition: 0.3s;
}
.email-link:hover { color: var(--primary); border-color: var(--primary); }

.socials {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1.5rem;
}
.socials a { color: var(--text-muted); transition: 0.3s; }
.socials a:hover { color: var(--text-main); transform: translateY(-3px); }

footer { padding: 50px; text-align: center; color: #444; font-size: 0.9rem; }

/* --- Animations & Utilities --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- Custom Cursor --- */
#cursor-dot {
    position: fixed; width: 6px; height: 6px; background: white; border-radius: 50%; pointer-events: none; z-index: 9999;
}
#cursor-ring {
    position: fixed; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; pointer-events: none; z-index: 9998;
    transition: width 0.3s, height 0.3s, background 0.3s;
}
body.hovering #cursor-ring {
    width: 50px; height: 50px; background: rgba(255,255,255,0.05); border-color: transparent;
}

/* --- Mobile --- */
@media (max-width: 900px) {
    .hero-container { flex-direction: column; text-align: center; }
    .image-wrapper { width: 100%; max-width: 350px; height: 350px; margin-top: 40px; }
    .btn-group { justify-content: center; }
    .project-card { grid-template-columns: 1fr; }
    .project-image { min-height: 250px; }
    .nav-links { display: none; }
    nav { justify-content: center; }
    h1 { font-size: 2.5rem; }
    
    /* Touch devices: normal cursor */
    @media (hover: none) {
        * { cursor: auto !important; }
        #cursor-dot, #cursor-ring { display: none; }
    }
}