/* Base reset */
html,
body {
    margin: 0;
    padding: 0;
    font-family: "Raleway", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

h1 {
    font-size: 36px;
    margin: 10px 0;
}

h2 {
    font-size: 30px;
    margin: 10px 0;
}

h3 {
    font-size: 24px;
    margin: 10px 0;
}

/* Sidebar */
.w3-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    overflow-y: auto;
    z-index: 3;
    padding: 16px;
}

/* Overlay (mobile) */
.w3-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
    cursor: pointer;
}

/* Main content */
.w3-main {
    margin-left: 0 !important;
    transition: margin-left .4s;
}

/* Containers & layout */
.w3-container {
    padding: 0.01em 16px;
}

.w3-row-padding {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.w3-third {
    flex: 1 1 33%;
    padding: 0 8px;
    box-sizing: border-box;
}

/* Cards */
.w3-card-4 {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.w3-container.w3-white {
    background: #fff;
}

/* Buttons */
.w3-button {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.w3-button:hover {
    background: #ccc;
    color: #000;
}

.w3-block {
    display: block;
    width: 100%;
}

/* Colors */
.w3-teal {
    background: #009688;
    color: #fff;
}

.w3-black {
    background: #000;
    color: #fff;
}

.w3-grey {
    background: #9e9e9e;
    color: #fff;
}

.w3-dark-grey {
    background: #616161;
    color: #fff;
}

/* Misc */
.w3-round {
    border-radius: 4px;
}

.w3-circle {
    border-radius: 50%;
}

.w3-margin-bottom {
    margin-bottom: 16px;
}

.w3-padding-16 {
    padding: 16px;
}

.w3-bottombar {
    border-bottom: 6px solid #ccc;
}

.w3-text-grey {
    color: #757575;
}

.w3-text-red {
    color: red;
}

.w3-hover-opacity:hover {
    opacity: 0.6;
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .w3-sidebar {
        display: none;
    }

    .w3-main {
        margin-left: 0;
    }

    .w3-overlay {
        display: block;
    }
}

.header-logo {
    width: 40px;
}

@media (min-width: 600px) {
    .header-logo {
        width: 50px;
    }
}

@media (min-width: 900px) {
    .header-logo {
        width: 65px;
    }
}

@media (max-width: 600px) {
    .w3-third {
        flex: 1 1 100%;
        /* full width */
        max-width: 100%;
        padding: 0 4px;
        /* reduce side padding */
        margin-bottom: 12px;
        /* slightly smaller gap */
    }

    .w3-card-4 {
        padding: 12px;
        /* reduce card padding */
    }

    .w3-card-4 p {
        font-size: 0.9rem;
        /* smaller text in cards */
    }

    .w3-button {
        padding: 6px 12px;
        /* smaller buttons */
        font-size: 0.9rem;
    }

}




.header-flex {
    display: flex;
    align-items: center;
    /* vertically center h1 and logo */
    justify-content: center;
    /* center the flex row */
    gap: 20px;
    /* space between h1 and logo */
    flex-wrap: wrap;
    /* wrap on small screens */
    padding: 20px 0;
    text-align: center;
}

.header-flex h1 {
    margin: 0;
    flex: 1;
}

.header-flex a {
    position: absolute;
    /* take out of flow */
    top: 0;
    /* top right corner */
    right: 0;
}

.hero-container {
    text-align: center;
    margin: 40px 0;
}

.hero-text {
    font-size: 1.3rem;
    margin-bottom: 24px;

    /* grey border */
    border-radius: 8px;
    /* rounded corners */
    padding: 16px 20px;
    /* space around text */
    background-color: #d6d6d6;
    /* dark grey background */
    color: #000000;
    /* white text for contrast */
    display: inline-block;
    /* shrink-wrap around text */
}

.hero-form {
    box-shadow: 0 8px 20px rgba(155, 155, 155, 0);
    border-radius: 8px;
    margin: 0 auto;
}

.hero-input {
    border-radius: 6px;
    padding: 2px;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.hero-input:focus {
    border-color: #009688;
    box-shadow: 0 0 6px rgba(0, 150, 136, 0.3);
    outline: none;
}

header#portfolio {
    background: linear-gradient(135deg, #f9f9f9, #c6c6c6);
    /* subtle gradient */
    /* make text readable */
    padding: 40px 20px;
    text-align: center;
    /* optional accent line */
}

.w3-main {
    margin-left: 0 !important;
    /* keep your previous style */
    transition: margin-left 0.4s;
    background-color: #000;
    /* black background */
    /* white text for contrast */
}

.w3-row-padding:not(footer .w3-row-padding)>.w3-third {
    display: flex;
}

footer.w3-dark-grey {
    width: 100vw;
    /* span full viewport width */
    margin-left: calc(-50vw + 50%);
    /* cancel container centering */
}