:root {
    --primary-color: #83A5D4;
    --secondary-color: #C8102E;
    --bg-color: #010030;
    --profile-glow: rgba(131, 165, 212, 0.45);
    --profile-border: #83A5D4;
    --glass-bg: rgba(200, 16, 46, 0.08);
    --glass-border: rgba(200, 16, 46, 0.45);
    --max-width: 1100px;
    --space-1: 0.5rem;
    --space-2: 0.875rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4.5rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.875rem;
    --radius-full: 999px;
    --transition-fast: 200ms ease;
}

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: 24px;
    color: var(--primary-color);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.5;
    background:
        radial-gradient(circle at 50% 70%, rgba(200, 16, 46, 0.18), transparent 28%),
        radial-gradient(circle at 15% 15%, rgba(200, 16, 46, 0.10), transparent 26%),
        linear-gradient(135deg, #010030 0%, #010030 55%, #07164a 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

img {
    display: block;
    max-width: 100%;
}

header,
main,
footer {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
}

h1,
h2,
h3 {
    color: var(--primary-color);
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: -0.04em;
}

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

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    color: var(--primary-color);
    font-size: 1.05rem;
}

a {
    color: inherit;
}

.darkerText {
    color: var(--secondary-color);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.logo {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

nav a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

nav a:hover {
    opacity: 0.7;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 4px;
}

main,
section,
.nameContainer {
    display: flex;
    flex-direction: column;
}

main {
    gap: var(--space-6);
    padding-bottom: var(--space-6);
}

section {
    gap: var(--space-5);
}

.nameContainer {
    gap: var(--space-1);
}

.statsContainer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
}

.imgContainer {
    width: 114px;
    height: 114px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--profile-border);
    border-radius: 50%;
    box-shadow: 0 0 24px var(--profile-glow);
}

.imgContainer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.stats > div {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.stats > div > div {
    display: grid;
    min-width: 40px;
    place-items: center;
}

.stats i,
.stats p {
    color: var(--secondary-color);
}

.stats i {
    font-size: 1.4rem;
}

.aboutMe {
    max-width: 80%;
    line-height: 1.6;
}

.projectContainer {
    gap: var(--space-5);
}

.sectionHeader {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.projectItem {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.projectItem > div:first-child {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-2);
}

.projectItem > div:last-child {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
}

.projectItem > div:last-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.linkContainer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.linkItem {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.linkItem:not(.linkItem--disabled):hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

.linkItem--disabled {
    cursor: default;
    opacity: 0.6;
}

.expandable-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.expandable-section[hidden] {
    display: none;
}

.projectItem--placeholder {
    opacity: 0.92;
}

.project-visual {
    display: grid;
    min-height: 100%;
    place-items: stretch;
}

.placeholder-visual {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 180px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background:
        linear-gradient(135deg, rgba(131, 165, 212, 0.22), rgba(1, 0, 48, 0.65)),
        radial-gradient(circle at 20% 20%, rgba(200, 16, 46, 0.36), transparent 35%);
    color: var(--primary-color);
}

.placeholder-visual::before,
.placeholder-visual::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.placeholder-visual::before {
    inset: 14% 8%;
    border: 1px solid rgba(131, 165, 212, 0.35);
    border-radius: 0.75rem;
}

.placeholder-visual::after {
    width: 36%;
    height: 140%;
    top: -18%;
    right: -10%;
    border-left: 1px solid rgba(200, 16, 46, 0.4);
    transform: rotate(24deg);
}

.placeholder-badge,
.inventory-title,
.finance-total {
    position: relative;
    z-index: 1;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 900;
    letter-spacing: 0.14em;
}

.placeholder-bars {
    position: relative;
    z-index: 1;
    display: flex;
    height: 76px;
    align-items: end;
    gap: 7px;
}

.placeholder-bars i,
.finance-chart i {
    display: block;
    width: 12px;
    border-radius: 999px 999px 2px 2px;
    background: var(--secondary-color);
    box-shadow: 0 0 16px rgba(200, 16, 46, 0.35);
}

.placeholder-bars i:nth-child(1) { height: 30%; }
.placeholder-bars i:nth-child(2) { height: 75%; }
.placeholder-bars i:nth-child(3) { height: 50%; }
.placeholder-bars i:nth-child(4) { height: 100%; }

.placeholder-visual--car {
    flex-direction: column;
    gap: 0.4rem;
}

.placeholder-visual--car > i {
    position: relative;
    z-index: 1;
    color: var(--secondary-color);
    font-size: clamp(2.4rem, 8vw, 4rem);
}

.placeholder-visual--car > span,
.placeholder-visual--car > small {
    position: relative;
    z-index: 1;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.placeholder-visual--car > small {
    color: rgba(131, 165, 212, 0.82);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.placeholder-visual--events {
    gap: 1rem;
}

.placeholder-calendar {
    position: relative;
    z-index: 1;
    display: grid;
    width: 70px;
    height: 76px;
    place-items: center;
    padding: 0.25rem;
    border: 1px solid var(--secondary-color);
    border-radius: 0.5rem;
    background: rgba(1, 0, 48, 0.72);
    color: var(--secondary-color);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.1em;
}

.placeholder-calendar strong {
    color: var(--primary-color);
    font-size: 2rem;
}

.placeholder-visual--events > span:last-child {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.placeholder-visual--events b {
    font-size: 1.05rem;
}

.placeholder-visual--events small {
    color: rgba(131, 165, 212, 0.82);
}

.placeholder-visual--inventory {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.6rem;
    padding-inline: 2rem;
}

.inventory-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.7fr 0.8fr 0.4fr;
    gap: 0.4rem;
}

.inventory-row i {
    min-height: 14px;
    border-radius: 999px;
    background: rgba(131, 165, 212, 0.45);
}

.inventory-row i:last-child {
    background: var(--secondary-color);
}

.placeholder-visual--finance {
    flex-direction: column;
    gap: 1.2rem;
}

.finance-chart {
    position: relative;
    z-index: 1;
    display: flex;
    height: 76px;
    align-items: end;
    gap: 9px;
}

.finance-chart i { width: 16px; }
.finance-chart i:nth-child(1) { height: 26%; }
.finance-chart i:nth-child(2) { height: 55%; }
.finance-chart i:nth-child(3) { height: 46%; }
.finance-chart i:nth-child(4) { height: 82%; }
.finance-chart i:nth-child(5) { height: 100%; }

.project-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: min(100%, 460px);
    align-items: center;
    align-self: flex-start;
    gap: 0.8rem;
    min-height: 74px;
    padding: 0.55rem 0.8rem 0.55rem 0.55rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--primary-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.project-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(131, 165, 212, 0.35);
}

.project-toggle__preview {
    display: block;
    width: 90px;
    height: 58px;
    overflow: hidden;
    border: 1px solid rgba(131, 165, 212, 0.45);
    border-radius: calc(var(--radius-sm) - 2px);
    background: rgba(1, 0, 48, 0.7);
}

.project-toggle__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-toggle__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.16rem;
}

.project-toggle__label {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 850;
}

.project-toggle__hint {
    overflow: hidden;
    color: var(--secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-toggle__icon {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.project-toggle__icon.is-rotated {
    transform: rotate(180deg);
}

@media (max-width: 420px) {
    .project-toggle {
        width: 100%;
    }

    .project-toggle__preview {
        width: 76px;
        height: 54px;
    }
}

.contact {
    position: relative;
    width: 100%;
    padding: 6rem 0;
    overflow: hidden;
}

.contact h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.04em;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    max-width: 980px;
    margin-inline: auto;
}

.contact-card {
    padding: var(--space-3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.contact-card form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.contact input,
.contact select,
.contact textarea {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(1, 0, 48, 0.55);
    color: var(--primary-color);
    font: inherit;
    font-weight: 600;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contact input,
.contact select {
    min-height: 48px;
    padding: 0 1rem;
}

.contact textarea {
    min-height: 120px;
    padding: 1rem;
    resize: vertical;
}

.contact input::placeholder,
.contact textarea::placeholder {
    color: rgba(131, 165, 212, 0.75);
}

.contact select {
    color: var(--secondary-color);
    cursor: pointer;
}

.contact option {
    background: var(--bg-color);
    color: var(--secondary-color);
}

.contact input:focus,
.contact select:focus,
.contact textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(131, 165, 212, 0.25);
}

.contact button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 52px;
    border: none;
    border-radius: 10px;
    background: var(--secondary-color);
    color: var(--bg-color);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.contact button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(131, 165, 212, 0.45);
}

.form-status {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
}

.contact-info h3 {
    color: var(--secondary-color);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    letter-spacing: 0.12em;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.contact-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(131, 165, 212, 0.14);
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.contact-detail p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.contact-detail a,
.contact-detail span {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
}

.social-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.social-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.social-links a {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: var(--radius-full);
    background: var(--secondary-color);
    color: var(--bg-color);
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(131, 165, 212, 0.25);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 24px rgba(131, 165, 212, 0.45);
}

footer {
    padding-bottom: var(--space-3);
}

@media (min-width: 640px) {
    .statsContainer {
        flex-direction: row;
        align-items: center;
        gap: var(--space-4);
    }

    .stats {
        gap: 0;
    }

    .projectItem {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        gap: var(--space-5);
    }

    .projectItem > div:last-child {
        width: 30%;
        max-width: 320px;
    }
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
    }

    .input-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    body {
        gap: var(--space-5);
        padding: 18px;
    }

    header {
        align-items: flex-start;
        gap: var(--space-2);
    }

    nav {
        gap: var(--space-2);
    }

    .aboutMe {
        max-width: 100%;
    }

    .contact {
        padding: 4rem 0;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
