:root {
    --bg: #f5f3ee;
    --surface: #ffffff;
    --text: #17202a;
    --muted: #5e6872;
    --line: #ddd9d1;
    --accent: #5b3cc4;
    --accent-dark: #432a99;
    --dark: #171b24;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 76px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245,243,238,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -.04em;
}
.logo span { color: var(--accent); }
nav { display: flex; gap: 28px; }
nav a { text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 600; }
nav a:hover { color: var(--accent); }

.hero {
    min-height: calc(100vh - 76px);
    padding: 90px 7%;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 70px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}
.hero-content { max-width: 760px; }
.eyebrow {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; line-height: 1.08; }
h1 { font-size: clamp(3rem, 6vw, 5.6rem); letter-spacing: -.055em; }
h1 span { color: var(--accent); }
.hero-description { max-width: 650px; margin-top: 28px; color: var(--muted); font-size: 1.12rem; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border: 1px solid #bdb8af; background: transparent; }
.button-secondary:hover { border-color: var(--accent); color: var(--accent); }
.social-links { display: flex; gap: 18px; margin-top: 28px; }
.social-links a { color: var(--muted); font-size: 1.25rem; text-decoration: none; }
.social-links a:hover { color: var(--accent); }

.hero-profile { justify-self: end; width: min(100%, 340px); }
.photo-frame { background: var(--surface); }
.photo-frame img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center top; }
.profile-caption { margin-top: 16px; color: var(--muted); font-size: .92rem; }
.profile-caption strong { color: var(--text); font-family: 'Space Grotesk', sans-serif; font-weight: 600; }

.section { padding: 110px 7%; }
.section-heading { max-width: 760px; }
.section-heading h2 { font-size: clamp(2.3rem, 4vw, 4rem); letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--muted); margin-top: 20px; max-width: 650px; }
.centered { text-align: center; margin: 0 auto 55px; }
.centered > p:last-child { margin-left: auto; margin-right: auto; }

.about { background: var(--surface); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; margin-top: 65px; }
.about-text p { color: var(--muted); font-size: 1.08rem; margin-bottom: 22px; max-width: 720px; }
.about-side { display: flex; flex-direction: column; height: 100%; }
.fact-list { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 45px 1fr; gap: 15px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.fact > span { color: var(--accent); font-weight: 700; font-size: .82rem; }
.fact strong { display: block; font-family: 'Space Grotesk', sans-serif; }
.fact p { color: var(--muted); margin-top: 3px; font-size: .94rem; }

.about-carousel { margin-bottom: 28px; flex: 1; display: flex; flex-direction: column; min-height: 220px; }
.carousel-track { position: relative; flex: 1; min-height: 220px; overflow: hidden; background: var(--surface); }
.carousel-track img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.carousel-track img.active { opacity: 1; }
.carousel-dots { display: flex; gap: 8px; margin-top: 14px; justify-content: center; }
.carousel-dots button { width: 7px; height: 7px; border-radius: 50%; border: none; background: var(--line); padding: 0; cursor: pointer; }
.carousel-dots button.active { background: var(--accent); width: 18px; border-radius: 4px; transition: width .25s ease; }
.project-upcoming { border: 1px dashed var(--line); background: transparent; min-height: auto; }
.project-upcoming .project-content { padding: 40px 48px; }
.project-upcoming h3 { color: var(--muted); font-size: 1.4rem; }
.project-upcoming .project-number { color: var(--muted); }

.technologies { border-bottom: 1px solid var(--line); }
.tech-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tech-item { min-height: 125px; display: flex; align-items: center; justify-content: center; gap: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.tech-item i { font-size: 1.8rem; color: var(--accent); }

.projects { background: #ebe8e1; }
.project-list { display: grid; gap: 24px; margin-top: 65px; }
.project-card { display: block; min-height: 300px; background: var(--surface); border: 1px solid var(--line); }
.project-content { max-width: 900px; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.project-number { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.project-content h3 { font-size: 1.85rem; margin: 13px 0 17px; letter-spacing: -.03em; }
.project-content p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0; }
.tags span { border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.project-actions { display: flex; gap: 20px; margin-top: 4px; }
.project-actions a { color: var(--accent); font-weight: 700; text-decoration: none; }
.project-actions a:hover { text-decoration: underline; }


.project-placeholder { min-height: 150px; display: flex; align-items: center; justify-content: space-between; padding: 30px 42px; background: var(--dark); color: white; }
.project-placeholder span { font-family: 'Space Grotesk', sans-serif; font-size: 4rem; opacity: .35; }
.project-placeholder i { font-size: 2rem; color: #b8b1d6; }

.contact { padding-top: 80px; }
.contact-box { max-width: 900px; margin: auto; padding: 70px; background: var(--dark); color: white; }
.contact-box h2 { max-width: 720px; font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -.045em; }
.contact-box > p:not(.eyebrow) { max-width: 650px; margin-top: 22px; color: #c6c9cf; }
.contact-box .button-secondary { border-color: #555b66; color: white; }
.contact-box .button-secondary:hover { border-color: #b8b1d6; color: white; }

footer { padding: 28px 7%; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (max-width: 900px) {
    .site-header { padding: 15px 6%; flex-direction: column; gap: 10px; }
    nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
    .hero { grid-template-columns: 1fr; padding: 70px 6%; gap: 55px; }
    .hero-profile { justify-self: center; width: min(100%, 330px); }
    .section { padding: 80px 6%; }
    .about-grid { grid-template-columns: 1fr; gap: 45px; }
    .tech-list { grid-template-columns: repeat(2, 1fr); }
    .project-content { padding: 32px; }
    .contact-box { padding: 45px 30px; }
}

@media (max-width: 520px) {
    h1 { font-size: 2.75rem; }
    .hero-description { font-size: 1rem; }
    .tech-list { grid-template-columns: 1fr; }
    .project-content h3 { font-size: 1.5rem; }
    .project-actions { flex-direction: column; gap: 8px; }
    footer { flex-direction: column; }
}
