:root{
    --bg:#fff;
    --accent:#111;
    --text:#111;
    --muted:#555;
    --accent-text:#fff;
}

* {
  box-sizing: border-box;
}

body{
    margin:0;
    min-height:100vh;
    display:flex;
    flex-direction:column;
    font-family:Arial, Helvetica, sans-serif;
}

.navbar{
    height:70px;
    background:#121212;
    color:white;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 40px;

    border-bottom:1px solid #2b2b2b;
}

.nav-title{
    font-size:28px;
    font-weight:bold;
}

.nav-links{
    list-style:none;
    display:flex;
    gap:35px;
    margin:0;
    padding:0;
}

.nav-links a{
    color:white;
    text-decoration:none;
    font-size:16px;
    transition:.2s;
}

.nav-links a:hover{
    color:#bdbdbd;
}

.app-layout{
    flex:1;
    display:grid;
    grid-template-columns:350px 1fr;
    min-height:calc(100vh - 70px);
}

.edit-container{
    padding:20px;
    background:#121212;
    color: var(--bg);
    overflow-y:auto;
}

.edit-container input,
.edit-container textarea,
.edit-container button{
    width:100%;
    margin-top:8px;
    margin-bottom:15px;
    padding:10px;
}

#preview-container{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:flex-start;   /* instead of center */
    padding:60px 40px;
    overflow:auto;
    background:var(--bg);
    color:var(--text);
}

.preview-placeholder{
    width:100%;
    max-width:700px;
    padding:50px 30px;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;

    border:2px dashed #d0d0d0;
    border-radius:12px;
    background:#fafafa;
    color:#666;
}

.preview-placeholder h2{
    margin:0 0 12px;
    font-size:32px;
    color:#222;
}

.preview-placeholder p{
    margin:0 0 10px;
    font-size:18px;
}

.preview-placeholder span{
    font-size:14px;
    color:#888;
}


/* media query for the form */
@media (max-width:768px){

    .navbar{
        flex-direction:column;
        height:auto;
        padding:20px;
        gap:15px;
    }

    .nav-links{
        gap:20px;
        flex-wrap:wrap;
        justify-content:center;
    }

    .app-layout{
        grid-template-columns:1fr;
    }

    .edit-container{
        height:auto;
    }

}

/* Preview Area */
#preview-container {
    background:var(--bg);
    color:var(--text);
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

/* Main Portfolio */
.portfolio-preview {
    width: 900px;
    max-width: 100%;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
}

/* Contact Modal */
.contact{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-bottom:40px;
}

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    justify-content:center;
    align-items:center;
    z-index:1000;
}

.modal-content{
    background: var(--accent);
    color:var(--text);
    padding:30px;
    border-radius:12px;
    width:350px;
    max-width:90%;
    position:relative;
    text-align:center;
}

.modal-content h2{
    margin-top:0;
}

.modal-content a{
    color:var(--text);
    text-decoration:none;
}

.modal-content a:hover{
    text-decoration:underline;
}

.close-btn{
    position:absolute;
    top:10px;
    right:15px;
    font-size:24px;
    cursor:pointer;
}

.contact-btn{
    cursor:pointer;
    border:none;
    background:var(--accent);
    color:var(--accent-text);
    padding:8px 18px;
    border-radius:999px;
    font-size:13px;
}

/* Header */

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.profile h1 {
    margin: 0;
    font-size: 36px;
    font-weight: bold;
}

.about {
    max-width: 600px;
    margin: auto;
    line-height: 1.6;
    color:var(--muted);
}

/* Skills */

.skills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0 50px;
}

.skills span {
    background:var(--accent);
    color:var(--accent-text);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
}

/* Projects */

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.project {
    text-align: left;
}

.project img{
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    border-radius:8px;
    display:block;
}

.project h3 {
    margin: 10px 0 5px;
    font-size: 16px;
}

.project p {
    margin: 0;
    color:var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.project a {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
    color:var(--text);
    font-weight: bold;
}

.project a:hover {
    text-decoration: underline;
}