:root {
    --background: #f4efe4;
    --text: #1e2633;
    --accent: #a93a32;
    --white: #fffdf7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.6;
}

a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

header, main, footer {
    width: min(1040px, calc(100% - 40px));
    margin-inline: auto;
}

header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

nav { display: flex; gap: 28px; }
nav a { font-size: 15px; text-underline-offset: 5px; }
nav a:hover { color: var(--accent); }

.hero {
    min-height: calc(100svh - 72px);
    display: grid;
    grid-template-columns: 1fr 340px;
    align-items: center;
    gap: 72px;
    padding: 40px 0 64px;
}

.label {
    margin: 0 0 12px;
    color: var(--accent);
    font-family: "Courier New", monospace;
    font-size: 14px;
    font-weight: 700;
}

h1, h2, p { margin-top: 0; }
h1 {
    margin-bottom: 24px;
    font-size: clamp(58px, 8vw, 92px);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.05em;
}

.intro { max-width: 500px; margin-bottom: 32px; font-size: 20px; }
.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    background: var(--text);
    color: var(--white);
    font-family: "Courier New", monospace;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.button:hover { background: var(--accent); }

.profile-photo {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    border: 8px solid var(--white);
    box-shadow: 8px 8px 0 var(--text);
}

.about, .details, .projects, .contact {
    padding: 80px 0;
}

h2 { margin-bottom: 20px; font-size: clamp(36px, 5vw, 54px); font-weight: 400; line-height: 1; }
.about { max-width: 760px; }
.about p { max-width: 720px; margin-bottom: 18px; }
.about p:last-child { margin-bottom: 0; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-top: 24px; }
.detail-block h2 { margin-bottom: 28px; }
.detail-block h3 { margin: 0 0 8px; font-size: 22px; font-weight: 400; line-height: 1.35; }
.detail-block p { margin: 0; color: #414651; font-family: "Courier New", monospace; font-size: 14px; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.skills li { padding: 7px 11px; border: 1px solid var(--text); background: var(--white); font-family: "Courier New", monospace; font-size: 12px; font-weight: 700; }
.projects { padding-top: 32px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { min-height: 260px; display: flex; flex-direction: column; padding: 26px; background: var(--white); border: 1px solid var(--text); text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: 5px 5px 0 var(--text); }
.project-card h3 { margin: 0 0 16px; font-size: 27px; font-weight: 400; }
.project-card p { margin-bottom: 24px; color: #414651; font-size: 16px; }
.project-card span { margin-top: auto; color: var(--accent); font-family: "Courier New", monospace; font-size: 12px; font-weight: 700; }
.contact { max-width: 760px; padding-top: 32px; }
.social-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.social-links a { min-height: 44px; display: inline-flex; align-items: center; font-family: "Courier New", monospace; font-size: 14px; font-weight: 700; text-underline-offset: 5px; }
.social-links a:hover { color: var(--accent); }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 40px 0; font-family: "Courier New", monospace; font-size: 12px; }
footer a { font-weight: 700; text-underline-offset: 4px; }
footer a:hover { color: var(--accent); }

@media (max-width: 720px) {
    header, main, footer { width: min(100% - 32px, 1040px); }
    nav { gap: 16px; }
    .hero { min-height: auto; grid-template-columns: 1fr; gap: 40px; padding: 56px 0 72px; }
    h1 { font-size: clamp(52px, 17vw, 72px); }
    .profile-photo { width: min(100%, 340px); max-height: 320px; margin-inline: auto; }
    .about, .details, .projects, .contact { padding: 64px 0; }
    .details { grid-template-columns: 1fr; gap: 56px; padding-top: 8px; }
    .projects, .contact { padding-top: 16px; }
    .project-grid { grid-template-columns: 1fr; }
    .project-card { min-height: 220px; }
    footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
