/* =====================================================
   SAMEER PORTFOLIO
   Clean layout, responsive design and theme support
   ===================================================== */

:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-2: #f0f0ed;

    --text: #171717;
    --text-soft: #5e5e5e;
    --text-faint: #858585;

    --border: #deded9;
    --border-strong: #c8c8c2;

    --accent: #1d4ed8;
    --accent-dark: #163da8;

    --header-bg: rgba(247, 247, 245, 0.92);

    --container: 1180px;

    --radius-small: 8px;
    --radius: 14px;
    --radius-large: 20px;

    --shadow: 0 12px 35px rgba(0, 0, 0, 0.06);

    --transition: 180ms ease;
}


/* ================= DARK MODE ================= */

[data-theme="dark"] {
    --bg: #111211;
    --surface: #191a18;
    --surface-2: #20211f;

    --text: #f2f2ef;
    --text-soft: #b1b1ab;
    --text-faint: #85857e;

    --border: #30312e;
    --border-strong: #41423e;

    --accent: #7aa2ff;
    --accent-dark: #9bb8ff;

    --header-bg: rgba(17, 18, 17, 0.92);

    --shadow: 0 15px 40px rgba(0, 0, 0, 0.22);
}


/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}


body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;

    transition:
        background-color 180ms ease,
        color 180ms ease;
}


img {
    display: block;
    max-width: 100%;
}


a {
    color: inherit;
    text-decoration: none;
}


button,
input,
textarea {
    font: inherit;
}


button {
    border: 0;
}


.container {
    width: min(
        calc(100% - 48px),
        var(--container)
    );

    margin-inline: auto;
}


/* ================= HEADER ================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: var(--header-bg);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(14px);
}


.header-inner {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-weight: 700;
    font-size: 17px;

    white-space: nowrap;
}


.brand-mark {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border-strong);
    border-radius: 9px;

    font-size: 14px;
}


.nav {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 26px;
}


.nav-link {
    position: relative;

    color: var(--text-soft);

    font-size: 13px;
    font-weight: 500;

    padding: 28px 0;

    transition:
        color var(--transition);
}


.nav-link:hover,
.nav-link.active {
    color: var(--text);
}


.nav-link.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 20px;

    height: 2px;

    background: var(--accent);
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


.theme-button,
.menu-button {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 9px;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}


.theme-button:hover,
.menu-button:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}


.header-cta {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 17px;

    background: var(--text);
    color: var(--bg);

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    transition:
        opacity var(--transition),
        transform var(--transition);
}


.header-cta:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}


.menu-button {
    display: none;

    flex-direction: column;
    gap: 4px;
}


.menu-button span {
    width: 17px;
    height: 1.5px;

    background: currentColor;
}


/* ================= HERO ================= */

.hero {
    padding: 88px 0 50px;
}


.hero-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(340px, 0.75fr);

    gap: 90px;

    align-items: center;
}


.hero-main {
    max-width: 720px;
}


.availability {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 7px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--text-soft);

    font-size: 12px;
}


.availability-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #3f8f55;
}


.hero-label {
    margin-top: 42px;
    margin-bottom: 18px;

    color: var(--accent);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.13em;
}


.hero h1 {
    max-width: 760px;

    font-size:
        clamp(48px, 6vw, 78px);

    line-height: 0.99;
    letter-spacing: -0.055em;
    font-weight: 750;
}


.hero h1 span {
    display: block;

    color: var(--text-soft);
}


.hero-text {
    max-width: 620px;

    margin-top: 28px;

    color: var(--text-soft);

    font-size: 17px;
    line-height: 1.75;
}


.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 34px;
}


.button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 0 19px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}


.button:hover {
    transform: translateY(-2px);
}


.button-primary {
    background: var(--text);
    color: var(--bg);

    border: 1px solid var(--text);
}


.button-primary:hover {
    opacity: 0.88;
}


.button-outline {
    background: transparent;
    color: var(--text);

    border: 1px solid var(--border-strong);
}


.button-outline:hover {
    background: var(--surface);
}


.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;

    margin-top: 35px;
}


.social-row a {
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 550;

    border-bottom: 1px solid transparent;

    transition:
        color var(--transition),
        border-color var(--transition);
}


.social-row a:hover {
    color: var(--text);
    border-color: var(--text);
}


/* ================= PROFILE CARD ================= */

.hero-profile {
    width: 100%;

    padding: 18px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow);
}


.profile-top,
.profile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    color: var(--text-faint);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}


.profile-photo {
    aspect-ratio: 1 / 1;

    margin-top: 18px;

    overflow: hidden;

    border-radius: 12px;

    background: var(--surface-2);
}


.profile-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.profile-details {
    padding: 25px 4px 24px;
}


.profile-label {
    margin-bottom: 8px;

    color: var(--text-faint);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}


.profile-details h2 {
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}


.profile-details p:last-child {
    margin-top: 12px;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.65;
}


.profile-footer {
    padding-top: 15px;

    border-top: 1px solid var(--border);
}


/* ================= HERO BOTTOM ================= */

.hero-bottom {
    display: grid;

    grid-template-columns: 180px 1fr;

    gap: 50px;

    margin-top: 70px;
    padding-top: 20px;

    border-top: 1px solid var(--border);
}


.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--text-faint);

    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


.scroll-arrow {
    width: 27px;
    height: 27px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 50%;
}


.hero-bottom p {
    color: var(--text-soft);
    font-size: 13px;
}


.hero-bottom strong {
    color: var(--text);
}


/* ================= SECTIONS ================= */

.section {
    padding: 120px 0;
}


.section-muted {
    background: var(--surface-2);
}


.section-heading {
    display: grid;

    grid-template-columns: 1fr 1.6fr;

    gap: 60px;

    margin-bottom: 58px;
}


.section-heading > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}


.section-number {
    color: var(--accent);

    font-size: 12px;
    font-weight: 700;
}


.section-label {
    color: var(--text-faint);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
}


.section-heading h2 {
    max-width: 650px;

    font-size: clamp(34px, 4vw, 52px);

    line-height: 1.05;
    letter-spacing: -0.04em;
}


.section-heading p {
    max-width: 500px;

    margin-top: 13px;

    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.7;
}


/* ================= ABOUT ================= */

.about-layout {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 100px;
}


.about-lead p {
    max-width: 520px;

    font-size: 28px;
    line-height: 1.35;
    letter-spacing: -0.025em;
}


.about-copy {
    max-width: 570px;
}


.about-copy p {
    margin-bottom: 20px;

    color: var(--text-soft);

    font-size: 15px;
    line-height: 1.8;
}


.inline-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 12px;

    color: var(--text);

    font-size: 13px;
    font-weight: 650;

    border-bottom: 1px solid var(--border-strong);

    padding-bottom: 4px;
}


.inline-link span {
    transition: transform var(--transition);
}


.inline-link:hover span {
    transform: translateX(4px);
}


/* ================= SKILLS ================= */

.skills-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}


.skill-card {
    min-height: 210px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 27px;

    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    background: var(--surface);

    transition:
        background var(--transition),
        transform var(--transition);
}


.skill-card:hover {
    transform: translateY(-3px);
}


.card-number {
    color: var(--text-faint);

    font-size: 11px;
    font-weight: 700;
}


.skill-card h3 {
    margin-bottom: 8px;

    font-size: 19px;
}


.skill-card p {
    max-width: 270px;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.65;
}


/* ================= PROJECTS ================= */

.projects-heading {
    grid-template-columns: 1fr 1.6fr;
}


.projects-list {
    border-top: 1px solid var(--border);
}


.project {
    display: grid;

    grid-template-columns: 80px 1fr auto;

    gap: 35px;

    align-items: center;

    padding: 34px 0;

    border-bottom: 1px solid var(--border);
}


.project-id {
    color: var(--text-faint);

    font-size: 12px;
    font-weight: 700;
}


.project-body {
    min-width: 0;
}


.project-category {
    color: var(--accent);

    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.12em;
}


.project h3 {
    margin-top: 8px;

    font-size: 23px;
    letter-spacing: -0.025em;
}


.project p {
    max-width: 650px;

    margin-top: 8px;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.7;
}


.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 15px;
}


.tags span {
    padding: 5px 9px;

    color: var(--text-soft);

    background: var(--surface-2);

    border: 1px solid var(--border);

    border-radius: 5px;

    font-size: 10px;
}


.project-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 13px;

    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 650;

    white-space: nowrap;

    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition);
}


.project-button:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface);
}


/* ================= EDUCATION ================= */

.education-list {
    border-top: 1px solid var(--border);
}


.education-item {
    display: grid;

    grid-template-columns: 180px 1fr;

    gap: 50px;

    padding: 32px 0;

    border-bottom: 1px solid var(--border);
}


.education-year {
    color: var(--text-faint);

    font-size: 12px;
    font-weight: 700;
}


.education-content h3 {
    font-size: 21px;
}


.education-content p {
    margin-top: 5px;

    color: var(--text-soft);

    font-size: 14px;
}


.education-content span {
    display: inline-block;

    margin-top: 9px;

    color: var(--text-faint);

    font-size: 11px;
}


/* ================= CERTIFICATES ================= */

.certificate-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
}


.certificate {
    min-height: 145px;

    display: grid;

    grid-template-columns: 55px 1fr;

    gap: 20px;

    align-items: start;

    padding: 25px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}


.certificate:hover {
    transform: translateY(-3px);

    border-color: var(--border-strong);

    box-shadow: var(--shadow);
}


.certificate-number {
    color: var(--accent);

    font-size: 11px;
    font-weight: 700;
}


.certificate h3 {
    font-size: 17px;
}


.certificate p {
    margin-top: 8px;

    color: var(--text-soft);

    font-size: 12px;
}


/* ================= CONTACT ================= */

.contact-section {
    padding: 120px 0;

    background: var(--text);
    color: var(--bg);
}


.contact-layout {
    display: grid;

    grid-template-columns: 0.9fr 1.1fr;

    gap: 100px;

    align-items: start;
}


.contact-info .section-label {
    color: rgba(255, 255, 255, 0.48);
}


.contact-info h2 {
    margin-top: 25px;

    font-size: clamp(40px, 5vw, 62px);

    line-height: 1;
    letter-spacing: -0.045em;
}


.contact-info > p {
    max-width: 470px;

    margin-top: 25px;

    color: rgba(255, 255, 255, 0.62);

    font-size: 14px;
    line-height: 1.75;
}


.contact-links {
    margin-top: 40px;

    display: grid;

    gap: 18px;
}


.contact-links a {
    display: grid;
    gap: 3px;

    padding-bottom: 16px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}


.contact-links span {
    color: rgba(255, 255, 255, 0.42);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}


.contact-links strong {
    color: white;

    font-size: 13px;
    font-weight: 550;
}


.contact-form {
    padding: 32px;

    background: var(--surface);

    color: var(--text);

    border-radius: var(--radius-large);
}


.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;
}


.form-group {
    display: grid;
    gap: 8px;

    margin-bottom: 18px;
}


.form-group label {
    color: var(--text-soft);

    font-size: 11px;
    font-weight: 650;
}


.form-group input,
.form-group textarea {
    width: 100%;

    padding: 13px 14px;

    background: var(--bg);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 8px;

    outline: none;

    resize: vertical;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}


.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px
        color-mix(in srgb, var(--accent) 13%, transparent);
}


.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}


.submit-button {
    width: 100%;

    margin-top: 3px;
}


.form-note {
    min-height: 20px;

    margin-top: 10px;

    color: var(--text-soft);

    font-size: 12px;
}


/* ================= FOOTER ================= */

.footer {
    background: var(--text);
    color: var(--bg);

    border-top:
        1px solid
        rgba(255, 255, 255, 0.12);
}


.footer-main {
    display: grid;

    grid-template-columns: 1fr auto;

    gap: 80px;

    padding: 60px 0;
}


.footer-brand .brand {
    color: var(--bg);
}


.footer-brand .brand-mark {
    border-color: rgba(255, 255, 255, 0.25);
}


.footer-brand p {
    margin-top: 15px;

    color: rgba(255, 255, 255, 0.48);

    font-size: 12px;
}


.footer-nav {
    display: grid;

    grid-template-columns: 120px 120px;

    gap: 50px;
}


.footer-nav > div {
    display: flex;
    flex-direction: column;
    gap: 9px;
}


.footer-nav span {
    margin-bottom: 5px;

    color: rgba(255, 255, 255, 0.35);

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}


.footer-nav a {
    color: rgba(255, 255, 255, 0.65);

    font-size: 12px;

    transition: color var(--transition);
}


.footer-nav a:hover {
    color: white;
}


.footer-bottom {
    min-height: 65px;

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.12);

    color: rgba(255, 255, 255, 0.38);

    font-size: 10px;
}


.footer-bottom span:nth-child(2) {
    text-align: center;
}


.footer-bottom a {
    justify-self: end;

    color: rgba(255, 255, 255, 0.65);
}


.footer-bottom a:hover {
    color: white;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 1000px) {

    .nav {
        gap: 16px;
    }

    .hero-layout {
        grid-template-columns: 1fr 330px;
        gap: 45px;
    }

    .section-heading {
        gap: 35px;
    }

    .about-layout,
    .contact-layout {
        gap: 55px;
    }

}


@media (max-width: 820px) {

    .container {
        width: min(
            calc(100% - 32px),
            var(--container)
        );
    }


    .header-inner {
        min-height: 68px;
    }


    .nav {
        position: absolute;

        top: 68px;
        left: 16px;
        right: 16px;

        display: none;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 8px;

        background: var(--surface);

        border: 1px solid var(--border);
        border-radius: 12px;

        box-shadow: var(--shadow);
    }


    .nav.open {
        display: flex;
    }


    .nav-link {
        padding: 12px;

        border-radius: 7px;
    }


    .nav-link:hover {
        background: var(--surface-2);
    }


    .nav-link.active::after {
        display: none;
    }


    .menu-button {
        display: flex;
    }


    .header-cta {
        display: none;
    }


    .hero {
        padding-top: 65px;
    }


    .hero-layout {
        grid-template-columns: 1fr;
    }


    .hero-main {
        max-width: 700px;
    }


    .hero-profile {
        max-width: 440px;
    }


    .hero-bottom {
        grid-template-columns: 1fr;
        gap: 15px;
    }


    .section {
        padding: 85px 0;
    }


    .section-heading {
        grid-template-columns: 1fr;
        gap: 20px;
    }


    .about-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }


    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .contact-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }


    .footer-main {
        grid-template-columns: 1fr;
        gap: 45px;
    }

}


@media (max-width: 600px) {

    .container {
        width: calc(100% - 28px);
    }


    .theme-button {
        width: 36px;
        height: 36px;
    }


    .hero {
        padding: 50px 0 35px;
    }


    .hero-label {
        margin-top: 30px;
    }


    .hero h1 {
        font-size: clamp(42px, 14vw, 64px);
    }


    .hero-text {
        font-size: 15px;
    }


    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }


    .button {
        width: 100%;
    }


    .social-row {
        gap: 16px;
    }


    .profile-details h2 {
        font-size: 22px;
    }


    .section {
        padding: 70px 0;
    }


    .section-heading h2 {
        font-size: 37px;
    }


    .about-lead p {
        font-size: 23px;
    }


    .skills-grid {
        grid-template-columns: 1fr;
    }


    .skill-card {
        min-height: 175px;
    }


    .project {
        grid-template-columns: 1fr;
        gap: 15px;
    }


    .project-id {
        margin-bottom: -5px;
    }


    .project-button {
        justify-self: start;
    }


    .education-item {
        grid-template-columns: 1fr;
        gap: 9px;
    }


    .certificate-grid {
        grid-template-columns: 1fr;
    }


    .contact-section {
        padding: 75px 0;
    }


    .contact-info h2 {
        font-size: 43px;
    }


    .contact-form {
        padding: 20px;
    }


    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }


    .footer-main {
        padding: 45px 0;
    }


    .footer-nav {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }


    .footer-bottom {
        grid-template-columns: 1fr;
        gap: 10px;

        padding: 20px 0;
    }


    .footer-bottom span:nth-child(2) {
        text-align: left;
    }


    .footer-bottom a {
        justify-self: start;
    }

}


@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }

}