:root {
    --primary: #0a0a0a;
    --accent: #ff6b35;
    --secondary: #2d3142;
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-muted: #666;
    --border: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Mono', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.015) 2px, rgba(0,0,0,0.015) 4px);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'DM Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--accent);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 2rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--accent);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.hero {
    padding: 8rem 0;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-content .highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-content .highlight::after {
    content: '';
    position: absolute;
    bottom: 0.3em;
    left: -0.1em;
    right: -0.1em;
    height: 0.3em;
    background: rgba(255, 107, 53, 0.2);
    z-index: -1;
    transform: skewY(-1deg);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    height: 500px;
}

.code-window {
    position: absolute;
    background: var(--primary);
    border-radius: 8px;
    padding: 1.5rem;
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.code-window:nth-child(1) {
    top: 0;
    left: 0;
    width: 300px;
    animation-delay: 0s;
}

.code-window:nth-child(2) {
    top: 180px;
    right: 0;
    width: 280px;
    animation-delay: 1s;
}

.code-window:nth-child(3) {
    bottom: 0;
    left: 60px;
    width: 260px;
    animation-delay: 2s;
}

.window-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.code-line {
    margin: 0.4rem 0;
    opacity: 0.9;
}

.code-line .keyword {
    color: #ff6b9d;
}

.code-line .function {
    color: #4ec9b0;
}

.code-line .string {
    color: #ce9178;
}

.code-line .number {
    color: #b5cea8;
}

.skills {
    padding: 6rem 0;
    background: white;
    border-top: 1px solid var(--border);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.skills .container {
    padding-left: 4rem;
    padding-right: 4rem;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-card {
    padding: 2.5rem;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    background: var(--accent);
    transform: rotate(5deg);
}

.skill-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
}

.projects {
    padding: 6rem 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #ff8c61);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

.project-card:hover::after {
    transform: scaleX(1);
}

.project-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
}

.project-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    animation: slidePattern 20s linear infinite;
}

@keyframes slidePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    flex-grow: 1;
}

.github-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.project-card:hover .github-icon {
    color: var(--accent);
    transform: rotate(360deg);
}

.project-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat svg {
    width: 16px;
    height: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    padding: 0.3rem 0.7rem;
    background: rgba(45, 49, 66, 0.08);
    color: var(--secondary);
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.project-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.view-all-projects {
    text-align: center;
    margin-top: 3rem;
}

.view-all-projects .btn {
    display: inline-flex;
}

footer {
    padding: 4rem 0 3rem;
    border-top: 1px solid var(--border);
    text-align: center;
    animation: fadeInUp 1s ease-out 0.9s both;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .hero-visual {
        height: 400px;
    }

    .code-window {
        width: 250px !important;
        font-size: 0.75rem;
    }

    nav {
        width: 100%;
        margin-top: 1rem;
    }

    nav a {
        margin-left: 0;
        margin-right: 1.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .skills {
        padding: 4rem 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-visual {
        height: 350px;
    }

    .code-window {
        width: 200px !important;
        padding: 1rem;
    }
}