/* ==========================================================================
   Eva Frankova — Photography Portfolio
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
    --color-bg: #f5f3ef;
    --color-bg-alt: #eae7e1;
    --color-bg-warm: #f0ebe3;
    --color-bg-dark: #141414;
    --color-bg-card: #fff;
    --color-text: #1e1e1e;
    --color-text-light: #5a5a5a;
    --color-text-muted: #8a8580;
    --color-text-inv: #f0eeeb;
    --color-accent: #8b7355;
    --color-accent-hover: #a68a6a;
    --color-accent-light: rgba(139, 115, 85, 0.1);
    --color-border: #ddd8d0;
    --color-danger: #c0392b;

    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --nav-height: 72px;
    --container-width: 1200px;
    --container-narrow: 640px;
    --radius: 6px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-hover: 0 12px 48px rgba(0,0,0,0.15);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
}

/* ---------- Container ---------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    height: var(--nav-height);
    transition: background var(--transition), box-shadow var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav--scrolled {
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.2);
}

.nav__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: 0.02em;
    position: relative;
}

.nav__logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.nav__logo:hover {
    color: #fff;
}

.nav__logo:hover::after {
    width: 100%;
}

.nav__links {
    list-style: none;
    display: flex;
    gap: 4px;
}

.nav__links a {
    display: block;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    position: relative;
}

.nav__links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav__links a.is-active {
    color: #fff;
}

.nav__links a.is-active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 1px;
}

/* Mobile toggle */
.nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}

.nav__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text-inv);
    position: absolute;
    left: 0;
    transition: all 0.25s ease;
}

.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 9px; }
.nav__toggle span:nth-child(3) { top: 18px; }

.nav__toggle.is-open span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav__toggle.is-open span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 70vh;
    min-height: 450px;
    max-height: 720px;
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    transform: scale(1.03);
}

.hero__slide.is-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 1.5s ease, transform 8s ease-out;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.55) 100%
    );
    text-align: center;
    padding: 24px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 7vw, 5rem);
    color: #fff;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.hero__divider {
    width: 48px;
    height: 2px;
    background: var(--color-accent);
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.hero__scroll::after {
    content: '';
    width: 3px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.3; }
}

/* ---------- Sections ---------- */
.section {
    padding: 96px 0;
    position: relative;
}

.section--alt {
    background: var(--color-bg-alt);
}

.section--warm {
    background: var(--color-bg-warm);
}

.section--page {
    padding-top: calc(var(--nav-height) + 24px);
}

.section--dark {
    background: var(--color-bg-dark);
    color: var(--color-text-inv);
}

.section__header {
    text-align: center;
    margin-bottom: 56px;
}

.section__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.section__title {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 56px;
    position: relative;
}

.section__title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--color-accent);
    margin: 20px auto 0;
}

.section__subtitle {
    font-size: 1.5rem;
    margin-bottom: 28px;
    margin-top: 56px;
    color: var(--color-text);
    position: relative;
    padding-left: 20px;
}

.section__subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--color-accent);
    border-radius: 2px;
}

.section__subtitle:first-of-type {
    margin-top: 0;
}

/* ---------- About ---------- */
.about {
    display: flex;
    align-items: center;
    gap: 56px;
    background: var(--color-bg-card);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
}

.about__image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 6px var(--color-accent);
}

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

.about__text h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.about__text p {
    color: var(--color-text-light);
    max-width: 560px;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ---------- Grid ---------- */
.grid {
    display: grid;
    gap: 24px;
}

.grid--categories {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.grid--photos,
.grid--gallery {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid--tech {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
}

/* ---------- Category Card ---------- */
.category-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-dark);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, opacity var(--transition);
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.7;
}

.category-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%
    );
    padding: 32px;
    text-align: center;
    transition: background var(--transition);
}

.category-card:hover .category-card__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.3) 60%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.category-card__overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 6px;
    transform: translateY(0);
    transition: transform var(--transition);
}

.category-card:hover .category-card__overlay h3 {
    transform: translateY(-4px);
}

.category-card__overlay span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- Photo Thumbnails ---------- */
.photo-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.photo-thumb:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.photo-thumb:hover img {
    transform: scale(1.06);
}

/* ---------- Tech Card ---------- */
.tech-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.tech-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.tech-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fff;
    padding: 20px;
}

.tech-card h3 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 14px 16px 18px;
    color: var(--color-text);
    border-top: 1px solid var(--color-border);
}

/* ---------- Photo Viewer ---------- */
.photo-viewer {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 60vh;
}

.photo-viewer__image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-viewer__image img {
    max-height: 75vh;
    border-radius: var(--radius);
    cursor: zoom-in;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.photo-viewer__nav {
    flex-shrink: 0;
    width: 52px;
    display: flex;
    justify-content: center;
}

.photo-viewer__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-inv);
    font-size: 1.3rem;
    transition: all var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.photo-viewer__arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* ---------- Page Header ---------- */
.page-header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-title {
    font-size: 2.4rem;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--color-accent);
    margin-top: 12px;
}

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.back-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.section--dark .back-link {
    color: rgba(240, 238, 235, 0.5);
}

.section--dark .back-link:hover {
    color: var(--color-text-inv);
    background: rgba(255,255,255,0.08);
}

/* ---------- Page Header with Actions ---------- */
.page-header__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ---------- Photo Viewer Admin ---------- */
.photo-viewer__admin {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.btn-icon--danger:hover {
    background: rgba(192, 57, 43, 0.2);
    border-color: rgba(192, 57, 43, 0.4);
    color: #e74c3c;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.btn--sm {
    padding: 7px 16px;
    font-size: 0.8rem;
}

.btn--outline {
    background: transparent;
    color: var(--color-accent);
}

.btn--outline:hover {
    background: var(--color-accent);
    color: #fff;
}

.btn--danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.btn--danger:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

/* ---------- Forms ---------- */
.form-wrap {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-md);
}

.form-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.form-wrap th,
.form-wrap td {
    vertical-align: middle;
    padding: 8px 0;
}

.form-wrap th {
    text-align: left;
    padding-right: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    width: 1%;
}

.form-wrap th label {
    display: block;
    margin: 0;
    line-height: 40px;
}

.form-wrap label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.form-wrap label > span:first-child {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    min-width: 80px;
}

.form-wrap label > input,
.form-wrap label > textarea,
.form-wrap label > select {
    flex: 1;
}

.form-wrap input[type="text"],
.form-wrap input[type="email"],
.form-wrap input[type="password"],
.form-wrap textarea,
.form-wrap select {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-wrap input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text-light);
    background: var(--color-bg);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--transition);
}

.form-wrap input[type="file"]:hover {
    border-color: var(--color-accent);
}

.form-wrap input:focus,
.form-wrap textarea:focus,
.form-wrap select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-wrap textarea {
    min-height: 120px;
    resize: vertical;
}

.form-wrap input[type="submit"] {
    display: inline-block;
    width: auto;
    padding: 12px 40px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 4px;
}

.form-wrap input[type="submit"]:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

/* ---------- Flash Messages ---------- */
.flash {
    max-width: var(--container-width);
    margin: 0 auto 16px;
    padding: 16px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 400;
    border-left: 4px solid;
}

.flash--success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.flash--error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.flash--info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.6rem;
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--color-bg-dark);
    color: rgba(240, 238, 235, 0.4);
    text-align: center;
    padding: 40px 0;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer a {
    color: rgba(240, 238, 235, 0.6);
    transition: color var(--transition);
}

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

/* ---------- Error Pages ---------- */
.error-page {
    text-align: center;
    padding: calc(var(--nav-height) + 80px) 24px 80px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.error-page p {
    color: var(--color-text-light);
    margin-bottom: 28px;
    font-size: 1.1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    .nav__toggle {
        display: block;
    }

    .nav__links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(20, 20, 20, 0.97);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.35s ease, opacity 0.35s ease;
        pointer-events: none;
    }

    .nav__links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav__links a {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .hero {
        height: 70vh;
        min-height: 400px;
    }

    .hero__title {
        font-size: 2.4rem;
    }

    .section {
        padding: 56px 0;
    }

    .section--page {
        padding-top: calc(var(--nav-height) + 16px);
    }

    .section__title {
        font-size: 1.8rem;
        margin-bottom: 36px;
    }

    .about {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .about::before {
        width: 100%;
        height: 3px;
        bottom: auto;
    }

    .about__image {
        width: 160px;
        height: 160px;
    }

    .about__text p {
        max-width: 100%;
    }

    .grid--categories {
        grid-template-columns: 1fr;
    }

    .grid--photos,
    .grid--gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .grid--tech {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .photo-viewer {
        flex-direction: column;
        gap: 12px;
    }

    .photo-viewer__nav {
        width: auto;
    }

    .photo-viewer__image img {
        max-height: 50vh;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .form-wrap {
        padding: 24px;
    }

    .section__subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .grid--photos,
    .grid--gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hero {
        height: 60vh;
    }

    .about {
        padding: 24px 20px;
    }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.grid > *:nth-child(1) { animation-delay: 0.05s; }
.grid > *:nth-child(2) { animation-delay: 0.1s; }
.grid > *:nth-child(3) { animation-delay: 0.15s; }
.grid > *:nth-child(4) { animation-delay: 0.2s; }
.grid > *:nth-child(5) { animation-delay: 0.25s; }
.grid > *:nth-child(6) { animation-delay: 0.3s; }
.grid > *:nth-child(7) { animation-delay: 0.35s; }
.grid > *:nth-child(8) { animation-delay: 0.4s; }
.grid > *:nth-child(9) { animation-delay: 0.45s; }
.grid > *:nth-child(10) { animation-delay: 0.5s; }
.grid > *:nth-child(11) { animation-delay: 0.55s; }
.grid > *:nth-child(12) { animation-delay: 0.6s; }
