:root {
    color-scheme: light;
    --font-sans: "Manrope", "Helvetica Neue", Helvetica, sans-serif;
    --font-display: "Playfair Display", "Times New Roman", serif;
    --color-bg: #f3ece3;
    --color-surface: #fff9f0;
    --color-ink: #1d1b19;
    --color-ink-muted: #5f5b55;
    --color-cream: #fdf7ee;
    --color-navy: #0f161f;
    --color-navy-deep: #0b1118;
    --color-accent: #d4a259;
    --color-accent-strong: #b88437;
    --color-border: #e7dccf;
    --shadow-soft: 0 12px 30px rgba(15, 18, 22, 0.12);
    --shadow-strong: 0 24px 60px rgba(15, 18, 22, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-ink);
    background:
        radial-gradient(900px 420px at 12% 0%, rgba(212, 162, 89, 0.18), transparent 60%),
        linear-gradient(180deg, #f6f0e6 0%, #f3ece3 100%);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--color-ink);
    letter-spacing: 0.01em;
}

a {
    color: var(--color-accent-strong);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: var(--color-accent);
}

header {
    background: linear-gradient(180deg, #2a2f36 0%, #1f252c 55%, #181d24 100%);
    color: var(--color-cream);
    position: relative;
    padding-bottom: 40px;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 400px at 80% 10%, rgba(212, 162, 89, 0.25), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

main {
    max-width: 1140px;
    margin: -60px auto 80px;
    background: linear-gradient(180deg, #fff9f0 0%, #f6efe4 100%);
    padding: clamp(28px, 4vw, 56px) clamp(22px, 6vw, 80px);
    border-radius: 28px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-strong);
    position: relative;
    z-index: 2;
    animation: rise-in 0.8s ease-out both;
}

.nav-bar {
    position: sticky;
    top: 0;
    z-index: 20;
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px clamp(18px, 5vw, 60px);
    gap: 16px;
    background: rgba(24, 30, 38, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.menu,
.auth,
.home {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.menu-container a {
    color: var(--color-cream);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu-container i {
    font-size: 1rem;
}

.menu-container a:hover {
    color: #1b1b1b;
    background: var(--color-accent);
    transform: translateY(-1px);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.lang-switch a {
    padding: 4px 10px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(253, 247, 238, 0.7);
    border-radius: 999px;
}

.lang-switch a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-cream);
    transform: none;
}

.lang-switch a.active {
    background: var(--color-accent);
    color: #1b1b1b;
}

.menu-centered {
    justify-content: center;
}

.hero {
    position: relative;
    min-height: clamp(320px, 55vh, 620px);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 20, 26, 0.55) 0%, rgba(16, 20, 26, 0.12) 45%, rgba(16, 20, 26, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    filter: saturate(1.05);
}

.hero-banner {
    object-position: 18% center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: none;
    z-index: 1;
}

.hero-text {
    position: absolute;
    top: clamp(18px, 4vw, 40px);
    right: clamp(20px, 6vw, 60px);
    z-index: 2;
    text-align: right;
    max-width: min(520px, 50%);
    animation: rise-in 1s ease-out both;
}

.hero-text h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.2vw, 2.8rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(253, 247, 238, 0.82);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.hero-text::after {
    content: "";
    display: block;
    height: 4px;
    width: 120px;
    margin: 16px 0 0 auto;
    border-radius: 999px;
    background: var(--color-accent);
}

.title {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    margin-top: -24px;
    margin-bottom: 24px;
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, rgba(42, 47, 54, 0.55) 0%, rgba(42, 47, 54, 0.18) 45%, rgba(42, 47, 54, 0) 100%);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}


.section-title {
    margin: 0;
    padding: 10px 26px;
    background: var(--color-surface);
    color: var(--color-ink);
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-soft);
}

.title .menu-container {
    background: var(--color-surface);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    padding: 6px 18px;
    border-bottom: none;
    backdrop-filter: none;
    position: static;
}

.title .menu-container a {
    color: var(--color-ink);
    background: transparent;
}

.title .menu-container a:hover {
    background: var(--color-accent);
    color: #1b1b1b;
}

.experience {
    display: grid;
    gap: 22px;
}

.job {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 24px;
    background: var(--color-surface);
    border-radius: 18px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: rise-in 0.6s ease-out both;
}

.job:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.job-details {
    min-width: 0;
}

.job-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-ink);
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
}

.job-title a {
    color: inherit;
}

.job-title a:hover {
    color: var(--color-accent-strong);
}

.job-position {
    font-weight: 600;
    color: var(--color-ink-muted);
}

.job-date {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink-muted);
}

.job-description {
    margin: 16px 0 0;
    color: var(--color-ink);
}

.job-logo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    background: #fff;
}

.portfolio {
    display: grid;
    gap: 24px;
}

.construction-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: rgba(95, 91, 85, 0.7);
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 24px;
    background: var(--color-surface);
    border-radius: 18px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    animation: rise-in 0.6s ease-out both;
}

.project-details {
    min-width: 0;
}

.project-title {
    font-family: var(--font-display);
    color: var(--color-accent-strong);
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    margin-bottom: 10px;
}

.project-description,
.project-tasks {
    margin: 8px 0;
    color: var(--color-ink);
}

.project-tasks {
    list-style: disc;
    margin-left: 20px;
    padding-left: 6px;
}

.project-screenshot {
    width: 260px;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.about {
    display: grid;
    gap: 26px;
}

.about-content {
    position: relative;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 249, 240, 0.9) 100%);
    border-radius: 18px;
    border: 1px solid rgba(231, 220, 207, 0.9);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    animation: rise-in 0.6s ease-out both;
}

.about-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px 140px at 8% 0%, rgba(212, 162, 89, 0.14), transparent 70%);
    pointer-events: none;
}

.about-content > * {
    position: relative;
    z-index: 1;
}

.about-content h3 {
    margin: 0 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(212, 162, 89, 0.18);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-ink);
}

.about-content p {
    margin: 0;
    font-size: clamp(0.98rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    color: var(--color-ink);
}

.about-content strong {
    color: var(--color-ink);
    font-weight: 600;
}

.about-content .fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(212, 162, 89, 0.18);
    color: var(--color-accent-strong);
    font-size: 0.75rem;
    vertical-align: middle;
}

.message-container {
    display: none;
    padding: 15px 18px;
    margin: 20px 0;
    border-radius: 12px;
    font-size: 16px;
    width: min(520px, 100%);
}

.message-container.success {
    background-color: #e8f5e9;
    color: #1c5d2e;
    border: 1px solid #b6e2bf;
}

.message-container.error {
    background-color: #fdecea;
    color: #8a1c1c;
    border: 1px solid #f5c2c7;
}

.message-container.warning {
    background-color: #fff4da;
    color: #7a5a17;
    border: 1px solid #f3d38b;
}

.message-container.show {
    display: block;
}

.alert-warning {
    margin-top: 20px;
    padding: 15px 18px;
    color: #7a5a17;
    border-left: 4px solid var(--color-accent);
    background-color: rgba(212, 162, 89, 0.1);
    border-radius: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.login-form {
    display: flex;
    justify-content: center;
}

.login-form .container {
    max-width: 520px;
    padding: 32px;
    background: var(--color-surface);
    border-radius: 18px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    background: rgba(212, 162, 89, 0.12);
    border-bottom: 1px solid var(--color-border);
}

.card-body {
    padding: 20px;
}

.row {
    display: grid;
    gap: 16px;
}

.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
    width: 100%;
}

.col-form-label {
    font-weight: 600;
    color: var(--color-ink-muted);
}

.text-md-end {
    text-align: left;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-0 {
    margin-bottom: 0;
}

.offset-md-4 {
    margin-left: 0;
}

.form-control,
.input-field,
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    margin-top: 6px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    font-family: var(--font-sans);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.input-field:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(212, 162, 89, 0.2);
}

.btn,
.btn-primary,
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 999px;
    background: var(--color-accent);
    color: #1b1b1b;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn-primary:hover,
.action-button:hover {
    background: var(--color-accent-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.action-button.button-create {
    display: inline-flex;
}

.checkbox-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-accent);
}

.message-box {
    margin-top: 20px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.text-success {
    color: #1c5d2e;
}

.text-danger {
    color: #8a1c1c;
}

.modal {
    display: none;
    position: fixed;
    z-index: 50;
    inset: 0;
    background-color: rgba(8, 10, 12, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.modal-content {
    background-color: var(--color-surface);
    padding: 30px;
    border-radius: 18px;
    box-shadow: var(--shadow-strong);
    width: min(420px, 90%);
}

.close {
    color: var(--color-ink-muted);
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: var(--color-accent-strong);
}

.login-form .container,
.container {
    width: min(100%, 920px);
    margin: 0 auto;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background-image:
        linear-gradient(180deg, #2a2f36 0%, #1f252c 55%, #181d24 100%),
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.08) 0,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px,
            transparent 10px
        );
    color: var(--color-cream);
    padding: 18px clamp(20px, 6vw, 60px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-left,
.footer-center,
.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-center a,
.footer-left a,
.footer-right a {
    text-decoration: none;
    color: var(--color-cream);
    font-size: 20px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-center a:hover,
.footer-left a:hover,
.footer-right a:hover {
    color: var(--color-accent);
    transform: translateY(-1px);
}

.footer-center i,
.footer-left i,
.footer-right i {
    margin-right: 6px;
    cursor: pointer;
    font-size: 22px;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 140px;
    background-color: #222;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 6px 0;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.experience .job:nth-child(2),
.portfolio .project:nth-child(2),
.about .about-content:nth-child(2) {
    animation-delay: 0.06s;
}

.experience .job:nth-child(3),
.portfolio .project:nth-child(3),
.about .about-content:nth-child(3) {
    animation-delay: 0.12s;
}

.experience .job:nth-child(4),
.portfolio .project:nth-child(4),
.about .about-content:nth-child(4) {
    animation-delay: 0.18s;
}

@media (max-width: 1000px) {
    .hero-text {
        max-width: 420px;
    }

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

    .job-logo,
    .project-screenshot {
        width: 100%;
        max-width: 260px;
    }
}

@media (max-width: 800px) {
    .hero {
        min-height: clamp(260px, 42vh, 360px);
    }

    .hero-banner {
        object-position: 10% center;
    }

    .menu-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu,
    .auth,
    .home {
        justify-content: center;
    }

    .hero-text {
        left: clamp(16px, 6vw, 24px);
        right: auto;
        text-align: left;
        max-width: 90%;
    }

    .hero-text::after {
        margin-left: 0;
    }

    main {
        margin: -40px 16px 60px;
        padding: 26px 20px;
    }
}

@media (max-width: 600px) {
    .hero {
        min-height: 240px;
    }

    .hero-banner {
        object-position: left center;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .about-content {
        padding: 20px;
    }

    .about-content h3 {
        letter-spacing: 0.16em;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
