:root {
    --background: #ffffff;
    --surface: #ffffff;
    --preview: #f1f1ef;
    --text: #111111;
    --muted: #666666;
    --soft-muted: #8a8a8a;
    --border: #e2e2e2;
    --page-width: 880px;
    --transition: 180ms ease;
}

/* Reset */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
summary,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}

/* Page width */

.page-shell,
.site-footer {
    width: min(calc(100% - 48px), var(--page-width));
    margin-inline: auto;
}

/* Shared typography */

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--text);
    letter-spacing: -0.045em;
}

h1 {
    font-weight: 600;
}

h2 {
    margin-bottom: 20px;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.15;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
}

p {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--soft-muted);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.text-link {
    display: inline-block;
    border-bottom: 1px solid transparent;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    transition:
        border-color var(--transition),
        transform var(--transition);
}

.text-link:hover {
    border-bottom-color: var(--text);
    transform: translateY(-1px);
}

/* Introduction */

.hero {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 55px;
    align-items: center;
    padding: 60px 0 45px;
}

.portrait-photo {
    display: block;
    width: 200px;
    height: 200px;
    justify-self: start;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 30%;
    filter: grayscale(100%);
}

.hero h1 {
    max-width: 470px;
    margin-bottom: 17px;
    font-size: clamp(2.2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.04;
}

.hero-description {
    max-width: 500px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.65;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
}

.hero-links .text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text);
    border-radius: 6px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    transition:
        background-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

.hero-links .text-link:hover {
    border-color: var(--text);
    background: var(--text);
    color: #ffffff;
    transform: translateY(-2px);
}

/* General sections */

.section {
    border-top: 1px solid var(--border);
    padding: 78px 0;
}

/* General sections */

.section {
    border-top: 1px solid var(--border);
    padding: 78px 0;
}

/* About and experience */

.about-experience {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    gap: 105px;
    padding-top: 45px;
    padding-bottom: 55px;
}

.about-column {
    max-width: 450px;
}

.about-column h2,
.experience-column h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-column>p {
    margin-bottom: 17px;
    font-size: 0.91rem;
    line-height: 1.7;
}

.about-column .text-link {
    margin-top: 3px;
}

.experience-column h2 {
    margin-bottom: 24px;
}

.experience-column h2 {
    margin-bottom: 20px;
}

.experience-item {
    padding-bottom: 13px;
}

.experience-item+.experience-item {
    padding-top: 0;
}

.experience-item h3 {
    margin-bottom: 2px;
    font-size: 0.88rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.organization,
.date {
    margin-bottom: 0;
    font-size: 0.74rem;
    line-height: 1.4;
}

.date {
    color: var(--soft-muted);
}

.organization,
.date {
    margin-bottom: 0;
    font-size: 0.76rem;
    line-height: 1.5;
}

.date {
    color: var(--soft-muted);
}

/* Skills and tools */

.skills-section {
    padding-top: 55px;
    padding-bottom: 65px;
}

.skills-heading {
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.skill-group {
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 22px 24px;
    background: var(--surface);
}

.skill-group-label {
    margin-bottom: 22px;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}


/* Skill logos */

.skill-logo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 10px;
}

.skill-logo-grid.compact {
    margin-bottom: 22px;
}

.skill-logo {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.skill-logo img,
.text-icon {
    width: 34px;
    height: 34px;
}

.skill-logo img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.88;
}

.skill-logo>span:last-child {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 500;
    line-height: 1.3;
}


/* SQL text icon */

.text-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfcfcf;
    border-radius: 7px;
    color: var(--text);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}


/* Supporting skills */

.skill-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.7;
}

.skill-text+.skill-text {
    margin-top: 10px;
}

.skill-text strong {
    color: var(--text);
    font-weight: 600;
}

.skill-text.developing {
    color: var(--soft-muted);
}


/* Skills tablet layout */

@media (max-width: 800px) {

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-logo-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .skill-logo-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* Skills mobile layout */

@media (max-width: 600px) {

    .skills-section {
        padding-top: 50px;
        padding-bottom: 55px;
    }

    .skill-group {
        padding: 22px;
    }

    .skill-logo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .skill-logo-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Portfolio heading */

#portfolio {
    padding-top: 55px;
    padding-bottom: 65px;
}

.section-heading {
    margin-bottom: 38px;
}

.section-heading h2 {
    margin-bottom: 9px;
    font-size: 1.8rem;
}

.section-heading>p {
    max-width: 470px;
    margin-bottom: 0;
    font-size: 0.86rem;
    line-height: 1.6;
}

/* Project layout */

.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.project-card {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    flex-direction: column;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.project-card:hover {
    border-color: #cccccc;
    transform: translateY(-3px);
    box-shadow: 0 15px 38px rgba(0, 0, 0, 0.06);
}

/* Featured project */

.featured-project {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 0.92fr 1.08fr;
}

.featured-project .project-content {
    min-height: 250px;
    padding: 32px 38px;
}

.featured-project .project-visual {
    min-height: 250px;
}

/* Project content */

.project-content {
    display: flex;
    min-height: 275px;
    padding: 28px;
    flex-direction: column;
}

.project-status {
    margin-bottom: 12px;
    color: var(--soft-muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.project-content h3 {
    margin-bottom: 13px;
    font-size: 1.15rem;
}

.featured-project .project-content h3 {
    font-size: 1.4rem;
}

.project-content>p:not(.project-status):not(.technology) {
    margin-bottom: 17px;
    font-size: 0.82rem;
    line-height: 1.65;
}

.technology {
    margin-bottom: 18px;
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.6;
}

.project-links {
    margin-bottom: 17px;
}

.project-links .text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text);
    border-radius: 6px;
    padding: 8px 13px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

.project-links .text-link:hover {
    background: var(--text);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Project preview areas */

.project-visual {
    position: relative;
    display: flex;
    min-height: 145px;
    padding: 28px 32px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 9px;
    overflow: hidden;
    color: var(--text);
    isolation: isolate;
}

/* Simulated application window */

.project-visual::before {
    position: absolute;
    z-index: -1;
    top: 20px;
    right: 20px;
    bottom: -8px;
    left: 20px;
    border: 1px solid #dddddd;
    border-radius: 9px 9px 0 0;
    background:
        linear-gradient(to bottom,
            #e8e8e8 0,
            #e8e8e8 22px,
            #ffffff 22px,
            #ffffff 100%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
    content: "";
}

.project-visual::after {
    position: absolute;
    z-index: -1;
    top: 28px;
    left: 31px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #bcbcbc;
    box-shadow:
        9px 0 #c7c7c7,
        18px 0 #d1d1d1;
    content: "";
}

.project-visual span {
    display: inline-flex;
    margin-left: 18px;
    border: 1px solid #d8d8d8;
    border-radius: 5px;
    padding: 6px 10px;
    background: #f7f7f7;
    color: #555555;
    font-size: 0.66rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Email performance metrics */

.email-visual {
    background: #edf0f2;
}

.metric-row {
    display: grid;
    z-index: 1;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.metric {
    text-align: center;
}

.metric strong {
    display: block;
    margin-bottom: 3px;
    font-size: 1rem;
    font-weight: 600;
}

.email-visual .metric span {
    display: block;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 500;
}

/* Workflow project previews */

.order-visual {
    background: #eeefed;
}

.job-visual {
    background: #f0eeec;
}

.workflow-row {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
    grid-template-columns:
        minmax(0, 1.25fr) auto minmax(0, 1fr) auto minmax(0, 0.85fr) auto minmax(0, 1.15fr);
    align-items: center;
    gap: 8px;
}

.workflow-step {
    min-width: 0;
    text-align: center;
}

.workflow-step strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Override the generic .project-visual span style */
.project-visual .workflow-step span {
    display: block;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 500;
    line-height: 1.35;
}

.workflow-arrow {
    color: var(--soft-muted);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
}

/* Keep workflow centered inside the simulated window */
.job-visual,
.order-visual {
    align-items: center;
    justify-content: center;
}

/* Mobile workflow */
@media (max-width: 600px) {
    .workflow-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .workflow-step strong {
        font-size: 0.76rem;
    }

    .project-visual .workflow-step span {
        font-size: 0.62rem;
    }
}

/* Expandable project information */

details {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

summary {
    cursor: pointer;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    list-style-position: outside;
}

summary:hover {
    color: var(--muted);
}

details p {
    margin: 13px 0 0;
    font-size: 0.76rem;
    line-height: 1.6;
}

/* Project overview outline buttons */

details.project-overview {
    border-top: 0;
    padding-top: 0;
}

details.project-overview summary {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text);
    border-radius: 6px;
    padding: 8px 13px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    list-style: none;
    transition:
        background-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

details.project-overview summary::-webkit-details-marker {
    display: none;
}

details.project-overview summary::marker {
    content: "";
}

details.project-overview summary:hover {
    background: var(--text);
    color: #ffffff;
    transform: translateY(-1px);
}

details.project-overview p {
    margin-top: 13px;
}

/* Contact */

.contact-section {
    max-width: none;
    padding-top: 95px;
    padding-bottom: 85px;
}

.contact-section h2 {
    max-width: 570px;
    margin-bottom: 18px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.06;
}

.contact-section>p:not(.eyebrow) {
    max-width: 520px;
    margin-bottom: 26px;
    font-size: 0.9rem;
    line-height: 1.65;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.contact-links a {
    border: 1px solid var(--text);
    padding: 9px 15px;
    font-size: 0.74rem;
    font-weight: 600;
    transition:
        background-color var(--transition),
        color var(--transition),
        transform var(--transition);
}

.contact-links a:hover {
    background: var(--text);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Footer */

.site-footer {
    display: flex;
    border-top: 1px solid var(--border);
    padding: 25px 0 38px;
    justify-content: space-between;
    gap: 24px;
}

.site-footer p {
    margin: 0;
    color: var(--soft-muted);
    font-size: 0.65rem;
}

/* Tablet */

@media (max-width: 800px) {

    .page-shell,
    .site-footer {
        width: min(calc(100% - 40px), var(--page-width));
    }

    .hero {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 36px;
        padding: 60px 0 65px;
    }

    .portrait-photo {
        width: 140px;
        height: 140px;
    }

    .hero h1 {
        font-size: clamp(2.15rem, 7vw, 2.8rem);
    }

    .about-experience {
        gap: 55px;
    }

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

    .featured-project .project-content {
        min-height: auto;
    }

    .project-visual,
    .featured-project .project-visual {
        min-height: 180px;
        padding: 24px;
    }
}

/* Mobile */

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .page-shell,
    .site-footer {
        width: calc(100% - 32px);
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 27px;
        padding: 45px 0 55px;
    }

    .portrait-photo {
        width: 115px;
        height: 115px;
    }

    .hero h1 {
        max-width: 430px;
        font-size: clamp(2.2rem, 11vw, 2.85rem);
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .about-experience {
        grid-template-columns: 1fr;
        gap: 55px;
        padding-top: 35px;
        padding-bottom: 70px;
    }

    #portfolio {
        padding-top: 55px;
    }

    .section {
        padding-bottom: 55px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

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

    .featured-project {
        grid-column: auto;
    }

    .project-content,
    .featured-project .project-content {
        min-height: auto;
        padding: 24px;
    }

    .project-visual,
    .featured-project .project-visual {
        min-height: 220px;
        padding: 28px;
    }

    .contact-section {
        padding-top: 70px;
        padding-bottom: 65px;
    }

    .contact-section h2 {
        font-size: clamp(2rem, 10vw, 2.6rem);
    }

    .contact-links {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-links a {
        text-align: center;
    }

    .site-footer {
        padding: 23px 0 30px;
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }
}