:root {
    --bg-color: #0c0e12;
    --card-bg: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.4);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(12, 14, 18, 0.95), transparent);
    backdrop-filter: blur(5px);
}

.logo-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 20px var(--accent-glow);
    transition: var(--transition);
}

.logo-container:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--accent-glow);
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10vw;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.8s;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1.1s;
}

.cta-button:hover {
    background: var(--accent);
    color: var(--bg-color);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* Portfolio Grid */
.portfolio {
    padding: 5rem 10vw;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    group: cursor;
}

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

.card-image {
    height: 250px;
    background: #2d333b;
    position: relative;
    overflow: hidden;
}

/* Placeholder pattern for images */
.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #2d333b 25%, #363c44 25%, #363c44 50%, #2d333b 50%, #2d333b 75%, #363c44 75%, #363c44 100%);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    background-color: var(--card-bg);
    /* Match card background to avoid ugly gaps */
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.card-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background Elements */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: var(--accent);
    filter: blur(200px);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
}

.top-right {
    top: -200px;
    right: -200px;
}

.bottom-left {
    bottom: -200px;
    left: -200px;
}

/* Page Specific Styles */
.page-hero {
    min-height: 60vh;
    padding-top: 5rem;
}

.content-section {
    padding: 5rem 10vw;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.text-block {
    margin-bottom: 4rem;
}

.text-block h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--text-primary), var(--text-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-block p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.highlight-bg {
    background: linear-gradient(to bottom, transparent, rgba(22, 27, 34, 0.5), transparent);
}

.section-subtitle {
    text-align: center;
    color: var(--accent);
    margin-bottom: 3rem;
    font-size: 1.25rem;
    font-family: var(--font-heading);
}

.three-col {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-card {
    background: rgba(22, 27, 34, 0.5);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: var(--card-bg);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-secondary);
}

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

.mb-large {
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Active Nav State */
nav a.active {
    color: var(--accent);
    font-weight: 600;
}

/* Contact Section */
.contact-section {
    padding: 5rem 10vw;
    background: var(--bg-color);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.submit-btn {
    align-self: flex-start;
    margin-top: 1rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}