*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #1e2330;
    --text: #e8eaed;
    --text-muted: #8b93a5;
    --accent: #4d8ef0;
    --border: #2d3447;
    --card-bg: #252c3d;
    --nav-height: 120px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-img {
    height: 100px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    flex: 1;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-contact {
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.btn-contact:hover { opacity: 0.85; }

.lang-switcher {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lang-switcher a { transition: color 0.2s; }
.lang-switcher a:hover,
.lang-switcher a.active { color: var(--accent); font-weight: 600; }

/* --- MAIN --- */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    padding-top: calc(var(--nav-height) + 60px);
}

/* --- HERO --- */
.hero {
    padding: 60px 0 80px;
    border-bottom: 1px solid var(--border);
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hero-name {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-btn {
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #fff;
    background: var(--accent);
    transition: opacity 0.2s;
    min-width: 220px;
}

.hero-btn:hover { opacity: 0.85; }

/* --- ABOUT --- */
.about-bio {
    padding: 60px 0 48px;
    border-bottom: 1px solid var(--border);
}

.about-bio h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 28px;
}

.bio-text p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-gallery {
    padding: 60px 0;
}

.about-gallery h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 32px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-img-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-img-wrap img:hover { transform: scale(1.03); }

.gallery-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; }
}

/* --- PROJECTS --- */
.projects-section {
    padding: 60px 0;
}

.projects-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--accent); }

.project-card.hidden { display: none; }

.project-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg);
}

.project-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.project-img-wrap img:hover { transform: scale(1.03); }

.project-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tag {
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.project-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.project-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* --- BLOG --- */
.blog-section {
    padding: 60px 0;
}

.blog-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-card {
    display: flex;
    gap: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
    text-decoration: none;
}

.blog-card:hover { border-color: var(--accent); }

.blog-thumbnail {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg);
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.blog-card:hover .blog-thumbnail img { transform: scale(1.04); }

.blog-content {
    flex: 1;
    padding: 20px 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.blog-card-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    align-self: flex-end;
}

@media (max-width: 600px) {
    .blog-card { flex-direction: column; }
    .blog-thumbnail { width: 100%; aspect-ratio: 16/9; }
    .blog-content { padding: 16px; }
    .blog-card-date { align-self: flex-start; }
}

/* --- CONTACT --- */
.contact-section {
    padding: 60px 0;
    max-width: 620px;
}

.contact-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 36px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-send-btn {
    padding: 12px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-start;
    transition: opacity 0.2s;
}

.contact-send-btn:hover { opacity: 0.85; }

.contact-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.contact-alert-success {
    background: #0f2d1a;
    border: 1px solid #22c55e;
    color: #86efac;
}

.contact-alert-error {
    background: #2d0f0f;
    border: 1px solid #e05252;
    color: #f87171;
}

/* --- BLOG POST --- */
.post-article {
    max-width: 760px;
    padding: 60px 0;
}

.post-hero-img {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 36px;
    border: 1px solid var(--border);
}

.post-hero-img img {
    width: 100%;
    height: auto;
    display: block;
}

.post-header {
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-header h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-meta-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
}

.post-content p {
    margin-bottom: 20px;
}

.post-back {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-back a {
    color: var(--accent);
    font-size: 0.9rem;
}

.post-back a:hover { text-decoration: underline; }

/* --- LATEST POSTS --- */
.latest-posts {
    padding: 60px 0;
}

.latest-posts h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 32px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s;
}

.post-card:hover { border-color: var(--accent); }

.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
}

.read-more {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.read-more:hover { text-decoration: underline; }
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.post-card:hover {
    border-color: var(--accent);
}

.post-card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg);
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.04);
}

.post-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.post-card-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

.post-card-body .read-more {
    margin-top: auto;
}
.post-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.post-interactions {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.post-reactions {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
}

.reaction-btn {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.reaction-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.post-comments h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    font: inherit;
}

.comment-form button {
    align-self: flex-start;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.comment-header span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.comment-item p {
    color: var(--text-muted);
    line-height: 1.7;
}

.no-comments {
    color: var(--text-muted);
}
/* --- FOOTER --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-name { font-size: 2rem; }
}

@media (max-width: 480px) {
    .posts-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}