/*
  style.css — Modern, responsive, accessible portfolio styles
  - Variables for theme
  - Grid / Flex layouts
  - Subtle animations and reduced-motion support
*/

:root {
    --bg: #0f1724;
    --surface: #0b1220;
    --muted: #9aa4b2;
    --accent: #4f46e5;
    --accent-2: #06b6d4;
    --card: #0f1724;
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 12px;
    --max-width: 1100px;
    --gap: 1.25rem;
    --transition: 300ms cubic-bezier(.2, .9, .2, 1);
    color-scheme: dark;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg, #071023 0%, #071229 100%);
    color: #e6eef6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0
}

.brand a {
    color: inherit;
    text-decoration: none
}

.brand-name {
    margin: 0;
    font-size: 1.125rem;
    letter-spacing: 0.4px
}

.brand-sub {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted)
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    width: 100%;
    backdrop-filter: blur(6px);
    z-index: 60;
    transition: background var(--transition)
}

.site-header.scrolled {
    background: linear-gradient(180deg, rgba(8, 10, 15, 0.6), rgba(8, 10, 15, 0.35));
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    align-items: center
}

.nav-list a {
    color: var(--muted);
    text-decoration: none;
    padding: .4rem .6rem;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition)
}

.nav-list a:hover,
.nav-list a:focus {
    color: #fff;
    background: var(--glass)
}

.cta {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: white;
    padding: .5rem .75rem;
    border-radius: 10px
}

.nav-toggle {
    display: none
}

.hero {
    padding: 6.5rem 0 4rem
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: center
}

.hero-title {
    font-size: 2rem;
    margin: 0 0 .5rem
}

.hero-lead {
    color: var(--muted);
    margin: 0 0 1rem
}

.hero-ctas .btn {
    margin-right: 0.5rem
}

.device-mockup {
    width: 100%;
    height: 220px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    display: flex;
    align-items: center;
    justify-content: center
}

.mockup-screen {
    width: 85%;
    height: 70%
}

.section {
    padding: 3rem 0
}

.section-header h3 {
    margin: 0;
    font-size: 1.25rem
}

.section-header p {
    margin: .5rem 0 1.25rem;
    color: var(--muted)
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem
}

.project-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition)
}

.project-card:hover,
.project-card:focus {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6)
}

.project-thumb {
    height: 140px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem
}

.skill-card {
    background: var(--glass);
    padding: 1rem;
    border-radius: 10px
}

.skill-bar {
    background: rgba(255, 255, 255, 0.03);
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
    margin: .5rem 0
}

.skill-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 600ms ease
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start
}

.contact-form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 1rem;
    border-radius: 12px
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: .75rem
}

.form-row label {
    font-size: .9rem;
    margin-bottom: .25rem
}

.form-row input,
.form-row textarea {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: .6rem;
    border-radius: 8px;
    color: inherit
}

.form-actions {
    display: flex;
    gap: .5rem;
    align-items: center
}

.form-feedback {
    color: var(--accent-2);
    min-height: 1.25rem
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    color: var(--muted)
}

.btn {
    display: inline-block;
    padding: .6rem .9rem;
    border-radius: 10px;
    text-decoration: none;
    border: 0;
    cursor: pointer
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted)
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.6));
    z-index: 120
}

.modal[aria-hidden="false"] {
    display: flex
}

.modal-content {
    background: linear-gradient(180deg, #071026, #071229);
    padding: 1.25rem;
    border-radius: 12px;
    max-width: 720px;
    width: 92%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6)
}

.modal-close {
    position: absolute;
    right: 1.25rem;
    top: 1rem;
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 1.25rem;
    cursor: pointer
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    padding: .5rem .75rem;
    background: #fff;
    color: #000;
    border-radius: 6px
}

/* Responsive */
@media (max-width:900px) {
    .hero-inner {
        grid-template-columns: 1fr
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .contact-grid {
        grid-template-columns: 1fr
    }
}

@media (max-width:600px) {
    .nav-list {
        display: none
    }

    .nav-toggle {
        display: inline-block;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.06);
        padding: .4rem .6rem;
        border-radius: 8px
    }

    .projects-grid {
        grid-template-columns: 1fr
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}

/* utility */
.muted {
    color: var(--muted);
    font-size: .9rem
}

.section-header {
    margin-bottom: 1rem
}