/* ========== CSS Variables ========== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-primary: #ff9b4a;
    --accent-secondary: #ffb977;
    --border-color: #222222;
    --gradient-1: linear-gradient(135deg, #ffab4a 0%, #ff7777 100%);
    --gradient-2: linear-gradient(135deg, #ff6b4a 0%, #ff4a9e 100%);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Custom Cursor ========== */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 155, 74, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ========== Header & Navigation ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop Navigation */
.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-item {
    position: relative;
}

.nav-item a {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    text-decoration: none;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
}

.nav-item a:hover {
    color: var(--text-primary);
}

.nav-item a:hover::after {
    width: 100%;
}

/* Dropdown Menus */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
}

.dropdown-menu li a:hover {
    background: rgba(74, 158, 255, 0.1);
    color: var(--accent-primary);
}

.dropdown-menu li a::after {
    display: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -6px);
}

.menu-link {
    display: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.menu-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ========== Hero Section ========== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #ff8c4a1a 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-label {
    display: inline-block;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(74, 158, 255, 0.1);
}

/* ========== About Section ========== */
.about {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== Featured Projects ========== */
.featured {
    padding: 6rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.featured-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.featured-card:hover::before {
    opacity: 0.05;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-category {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== Contact Section ========== */
.contact {
    padding: 6rem 0;
    background: var(--bg-secondary);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-email {
    display: inline-block;
    font-size: 2rem;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-primary);
}

.social-link:hover::after {
    transform: scaleX(1);
}

/* ========== Blog Page ========== */
.page-header {
    padding: 6rem 0 4rem;
    text-align: center;
    background: var(--bg-secondary);
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

.blog-list {
    padding: 4rem 0;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateX(10px);
    border-color: var(--accent-primary);
}

.blog-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.blog-category {
    color: var(--accent-primary);
}

.blog-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.blog-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.blog-link:hover {
    letter-spacing: 1px;
}

/* ========== Projects Page ========== */
.projects-section {
    padding: 4rem 0;
}

.project-block {
    margin-bottom: 4rem;
}

.block-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.block-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--bg-secondary), var(--bg-card));
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        #ff8c4a1a 0%, transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(180deg); }
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 146, 74, 0.1);
    border: 1px solid rgba(255, 155, 74, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* ========== Menu Page ========== */
.menu-page {
    padding: 4rem 0;
    text-align: center;
}

.full-menu {
    max-width: 600px;
    margin: 4rem auto 0;
    text-align: left;
}

.full-menu ul {
    list-style: none;
}

.full-menu > ul > li {
    margin-bottom: 2rem;
}

.full-menu > ul > li > a {
    font-size: 2rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin-bottom: 1rem;
}

.full-menu > ul > li > a:hover {
    color: var(--accent-primary);
    transform: translateX(10px);
}

.submenu {
    margin-left: 2rem;
}

.submenu li {
    margin-bottom: 0.75rem;
}

.submenu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    transition: var(--transition);
    display: inline-block;
}

.submenu a:hover {
    color: var(--accent-primary);
    transform: translateX(10px);
}

/* ========== Footer ========== */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    margin-top: auto;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Header & Navigation */
    .mobile-menu-btn {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        padding: 100px 20px 20px;
        transition: var(--transition);
        z-index: 100;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .nav-item a {
        font-size: 1.25rem;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding-left: 1rem;
        margin-top: 0.5rem;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-toggle::after {
        content: '▼';
        font-size: 0.8rem;
        margin-left: 0.5rem;
        display: inline-block;
        transition: var(--transition);
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    .menu-link {
        display: inline-block;
    }
    
    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Featured Projects */
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-title {
        font-size: 2rem;
    }
    
    .contact-email {
        font-size: 1.5rem;
    }
    
    /* Blog Page */
    .page-title {
        font-size: 2.5rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .blog-title {
        font-size: 1.5rem;
    }
    
    /* Menu Page */
    .full-menu > ul > li > a {
        font-size: 1.75rem;
    }
    
    .submenu a {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .blog-card {
        padding: 1.5rem;
    }
    
    .project-info {
        padding: 1.5rem;
    }
    
    .project-tech span {
        font-size: 0.75rem;
    }
}

/* ========== Animations ========== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 3s ease-in-out infinite;
}

/* ========== Utility Classes ========== */
.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-1);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}