:root {
    --base: #faf8f5;
    --surface: #f3eee8;
    --line: #e2d9d0;
    --ink: #211d1a;
    --muted: #6b615a;
    --terracotta: #b84a2e;
    --radius: 6px;
    --maxw: 1080px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--base);
    color: var(--ink);
    font-family: "Work Sans", system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 1.75rem);
    font-weight: 600;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 0.5rem;
}

a {
    color: var(--terracotta);
    text-decoration: none;
    border-bottom: 1px solid rgba(184, 74, 46, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: #8f3722;
    border-color: #8f3722;
}

:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 3px;
}

ul {
    margin: 0;
    padding-left: 1.1rem;
}

li {
    margin-bottom: 0.25rem;
}

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.location-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--terracotta);
}

.location-label svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ---------- nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 60px;
}

.brand {
    font-family: "Eczar", system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    border: 0;
}

.brand span {
    color: var(--terracotta);
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: -0.5rem;
    z-index: 100;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

.nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.nav-links.active {
    display: flex;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    border: 0;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--terracotta);
}

/* ---------- sections ---------- */
section {
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 75px;
}

.section-head {
    margin-bottom: 0.75rem;
}

.section-head h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
    line-height: 1.2;
}

.hero {
    position: relative;
    border-top: 0;
    padding: 1.5rem 0 1.75rem;
    overflow: hidden;
    max-width: var(--maxw);
    margin: 0 auto;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('../motifs/red-kamal.png');
    transition: background-image 1s ease-in-out;
    background-repeat: repeat;
    background-size: 200px;
    opacity: 0.7;
    mask-image: linear-gradient(to right, transparent 0%, transparent 40%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 40%, black 100%);
    pointer-events: none;
    z-index: 0;
}

.hero .wrap {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin: 0.2rem 0 0.1rem;
}

.hero-title {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 600;
    color: var(--terracotta);
    margin-bottom: 0.4rem;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.hero-location svg {
    width: 16px;
    height: 16px;
    fill: var(--terracotta);
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ink);
    color: var(--base);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 0;
    margin-top: 1.25rem;
    transition: transform 0.2s, background 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--terracotta);
    color: #fff;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* ---------- about ---------- */
/* ---------- timeline ---------- */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin-left: 0.5rem;
    border-left: 2px solid var(--line);
}

.job {
    position: relative;
    padding-bottom: 2rem;
}

.job:last-child {
    padding-bottom: 0;
}

.job::before {
    content: "";
    position: absolute;
    left: calc(-3rem - 23px);
    top: -0.25rem;
    width: 44px;
    height: 44px;
    background-image: url('../icons/cognizant-logo.svg');
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--base);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: 0 0 0 6px var(--base);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin: 0.15rem 0 0.5rem;
}

.job-body {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.job-body:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 74, 46, 0.5);
    box-shadow: 0 14px 30px -20px rgba(33, 29, 26, 0.7);
}

/* ---------- skills list ---------- */
.skills-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.skill-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.skill-row dt {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.95rem;
}

.skill-row dd {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ---------- education ---------- */
.edu-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.edu-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.edu-item:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 74, 46, 0.4);
    box-shadow: 0 12px 24px -12px rgba(33, 29, 26, 0.5);
}

.edu-logo-wrapper {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edu-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.edu-content h3 {
    margin: 0 0 0.15rem;
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1.3;
}

.edu-college {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.edu-degree {
    font-weight: 500;
    color: var(--ink);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.edu-date {
    color: var(--terracotta);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}


@media (max-width: 640px) {
    .edu-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }
}

/* ---------- cards / grids ---------- */
.grid {
    display: grid;
    gap: 0.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(184, 74, 46, 0.5);
    box-shadow: 0 14px 30px -20px rgba(33, 29, 26, 0.7);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.chip {
    border: 1px solid var(--line);
    background: var(--base);
    border-radius: var(--radius);
    padding: 0.28rem 0.62rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink);
}

.project-impact {
    display: inline-block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terracotta);
}

.card p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.93rem;
}

/* ---------- contact ---------- */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 1.25rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--muted);
    flex-shrink: 0;
    object-fit: contain;
}

.contact-list a {
    font-size: 1rem;
}

footer {
    border-top: 1px solid var(--line);
    padding: 0.75rem 0 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- motion ---------- */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (min-width: 768px) {
    .wrap {
        padding: 0 2rem;
    }

    section {
        padding: 2rem 0;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
        position: static;
        width: auto;
        background: none;
        flex-direction: row;
        gap: 1.5rem;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .nav-links a {
        padding: 0;
        font-size: 0.78rem;
    }

    .skill-row {
        grid-template-columns: 140px 1fr;
        gap: 1rem;
        align-items: baseline;
    }

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

    .timeline {
        padding-left: 4rem;
        margin-left: 1rem;
    }

    .job::before {
        left: calc(-4rem - 23px);
    }

    .job-body {
        padding: 1.1rem;
    }

    .contact-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .hero {
        padding: 2rem 0 2.25rem;
    }

}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .card:hover,
    .job-body:hover {
        transform: none;
    }
}