:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent: #38bdf8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(15, 23, 42, 0.65);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.5);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent: #0ea5e9;
    --glass-border: rgba(15, 23, 42, 0.08);
    --nav-bg: rgba(241, 245, 249, 0.75);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

a {
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}



nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 6%;
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(14px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

.logo-link {
    text-decoration: none;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.logo-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

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

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

#theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

#theme-toggle:hover {
    transform: translateY(-2px) rotate(10deg);
    color: var(--accent);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 1.5rem 4rem;
    background: radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.12) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-content p {
    font-size: clamp(1rem, 2.3vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

.highlight {
    color: var(--accent);
}

.cta-btn {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    opacity: 0.95;
}

.section {
    padding: 5rem 6%;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 22px;
    margin: 1.5rem auto;
    max-width: 700px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: var(--shadow);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.35);
}

.glass-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.company {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.glass-card p:last-child {
    color: var(--text-secondary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0 0;
}

.project-card {
    position: relative;
    height: 350px;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.project-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.25) 55%, transparent);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-text {
    max-width: 80%;
}

.project-text h3 {
    color: white;
    margin-bottom: 0.45rem;
    font-size: 1.15rem;
    line-height: 1.25;
}

.project-text p {
    color: #7dd3fc;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
}

.project-link {
    width: 46px;
    height: 46px;
    min-width: 46px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s ease;
    flex-shrink: 0;
}

.project-link:hover {
    transform: rotate(45deg) scale(1.05);
    background: white;
    color: var(--accent);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    max-width: 950px;
    margin: 0 auto;
}

.skill-pill {
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.skill-pill:hover {
    transform: translateY(-3px);
    opacity: 0.95;
}

@media (max-width: 900px) {
    nav {
        padding: 1rem 5%;
    }

    .section {
        padding: 4rem 5%;
    }

    .project-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .cursor {
        display: none;
    }

    nav {
        align-items: flex-start;
        padding: 0.9rem 1rem;
    }

    .logo-link {
        font-size: 0.92rem;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 0.75rem;
        margin-top: 0.4rem;
    }

    .nav-links a {
        font-size: 0.86rem;
    }

    #theme-toggle {
        width: 40px;
        height: 40px;
    }

    .hero {
        min-height: 92vh;
        padding: 6.5rem 1rem 3rem;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .cta-btn {
        width: auto;
        padding: 0.95rem 1.5rem;
    }

    .section {
        padding: 3.25rem 1rem;
    }

    .section-title {
        margin-bottom: 1.5rem;
    }

    .glass-card {
        padding: 1.25rem;
        border-radius: 18px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card {
        height: 280px;
    }

    /* keeps project text visible on touch devices */
    .project-info {
        opacity: 1;
        transform: translateY(0);
        padding: 1.1rem;
    }

    .project-text {
        max-width: 78%;
    }

    .project-text h3 {
        font-size: 1rem;
    }

    .project-text p {
        font-size: 0.84rem;
    }

    .project-link {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .skills-container {
        justify-content: flex-start;
        gap: 0.65rem;
    }

    .skill-pill {
        font-size: 0.84rem;
        padding: 0.58rem 0.9rem;
    }
}

@media (max-width: 420px) {
    .hero-content h1 {
        font-size: 2.1rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .nav-links {
        gap: 0.55rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .project-card {
        height: 250px;
    }

    .project-text h3 {
        font-size: 0.95rem;
    }

    .project-text p {
        font-size: 0.8rem;
    }
}