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

body {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    background-color: #0a0a0a;
    line-height: 1.8;
    overflow-x: hidden;
}

.hero {
    background-image: url('./images/hero-bg-optimized.webp');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    color: #fff;
}

@media (min-width: 769px) {
    .hero {
        background-attachment: fixed;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        height: 80vh;
        background-position: center;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 100vh;
        background-position: center;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: #ffd700;
}

.hero-tagline {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 30px;
    font-style: italic;
}

.dynamic-skill {
    font-weight: bold;
    color: #ffd700;
}

.hero-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.hero-buttons .btn {
    font-size: 1rem;
    margin: 0 10px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #ffd700;
    color: #333;
    border: 2px solid transparent;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    width: auto;
    min-width: 200px;
    padding: 12px 20px;
    text-align: center;
}

.hero-buttons .btn:hover {
    border: 2px solid #ffd700;
    background-color: transparent;
    color: #ffd700;
    transform: translateY(-2px);
}

.hero-buttons .btn-alt {
    background-color: #ffd700;
    color: #333;
}

.hero-buttons .btn-alt:hover {
    border: 2px solid #ffd700;
    background-color: transparent;
    color: #ffd700;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons .btn {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 75%;
    }
}

.blinking-cursor {
    font-weight: bold;
    font-size: 1.8rem;
    color: #ffd700;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.gradinar-section {
    background-color: #0a0a0a;
    color: #fff;
    padding: 100px 20px;
}

.gradinar-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.gradinar-text {
    flex: 1;
    min-width: 280px;
    text-align: left;
}

.gradinar-title {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.gradinar-subtitle {
    font-size: 1.4rem;
    color: #ccc;
    margin-bottom: 25px;
}

.gradinar-description {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 30px;
    line-height: 1.8;
}

.gradinar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gradinar-buttons .btn {
    background-color: #ffd700;
    color: #222;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s all ease;
}

.gradinar-buttons .btn:hover {
    background: transparent;
    border: 2px solid #ffd700;
    color: #ffd700;
}

.gradinar-buttons .btn-alt {
    background: transparent;
    border: 2px solid #ffd700;
    color: #ffd700;
}

.gradinar-buttons .btn-alt:hover {
    background-color: #ffd700;
    color: #222;
}

.gradinar-image {
    flex: 1;
    text-align: center;
    min-width: 280px;
}

.gradinar-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .gradinar-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .gradinar-text {
        text-align: center;
    }
}

.tech-stack {
    padding: 60px 20px;
    background: #141414;
    color: #fff;
    text-align: center;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tech-card {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    background: #ffd700;
    color: #0a0a0a;
}

.tech-card .tech-icon {
    width: 48px;
    height: 48px;
    font-size: 3rem;
    margin-bottom: 15px;
    fill: #ffd700;
    transition: color 0.3s ease;
    justify-self: center;
}

.tech-card .tech-icon svg {
    width: 48px;
    height: 48px;
}

.tech-card:hover .tech-icon {
    fill: #0a0a0a;
}

.tech-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tech-card p {
    font-size: 1rem;
    color: #ccc;
}

.tech-card:hover p {
    color: #0a0a0a;
}

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

@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.projects {
    padding: 60px 20px;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    color: #ffd700;
}

.section-description {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 40px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.project-image img {
    padding-top: 20px;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

.project-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 20px;
    text-align: left;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffd700;
}

.project-content p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 20px;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-btn,
.project-btn-alt {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.project-btn {
    background-color: #222;
    color: #ffd700;
}

.project-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.project-btn-alt {
    background-color: transparent;
    border: 2px solid #ffd700;
}

.project-btn-alt:hover {
    background-color: #ffd700;
    color: #0a0a0a;
    transform: translateY(-2px);
}

.project-btn svg {
    width: 24px;
    height: 24px;
    fill: #ffd700;
    margin-right: 8px;
    font-size: 1.2rem;
}

.project-btn i,
.project-btn-alt i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.partners {
    padding: 60px 20px;
    background: #141414;
    color: #fff;
    text-align: center;
}

.partners .section-title {
    margin-bottom: 16px;
}

.partners .section-description {
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.partners-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.partner-card {
    background: #222;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
    background: #252525;
}

.partner-logo img {
    max-width: 160px;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.partner-content {
    flex: 1;
}

.partner-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffd700;
    margin-bottom: 6px;
}

.partner-name {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #ffd700;
    font-family: 'Playfair Display', serif;
}

.partner-role {
    font-size: 1rem;
    font-style: italic;
    color: #ccc;
    margin-bottom: 10px;
}

.partner-description {
    font-size: 0.98rem;
    color: #e0e0e0;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .partner-card {
        flex-direction: column;
        text-align: center;
    }

    .partner-content {
        text-align: center;
    }

    .partner-logo img {
        max-width: 140px;
    }
}

.experience {
    padding: 60px 20px;
    background: #0a0a0a;
    color: #fff;
    text-align: center;
}

.education {
    padding: 60px 20px;
    background: #141414;
    color: #fff;
    text-align: center;
}

.timeline {
    position: relative;
    margin: 0 auto;
    padding: 20px 0;
    max-width: 800px;
}

.section-description,
.timeline-content p {
    color: #e0e0e0;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #ffd700;
    transform: translateX(-50%);
}

.timeline-start-marker {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffd700;
    transform: translateX(-50%) translateY(-10px);
    z-index: 2;
}

.timeline-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-right: 50px;
}

.timeline-item:nth-child(odd) .timeline-content {
    padding-left: 50px;
}

.timeline-icon {
    background: var(--portfolio-gold);
    color: #111;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 1;
    font-size: 1.5rem;
    border: 4px solid var(--portfolio-surface);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
}

.timeline-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
}

.timeline-company {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 10px;
    font-style: italic;
}

.timeline-content p {
    font-size: 1rem;
    color: #ddd;
}

.timeline-content {
    background: #222;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 45%;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffd700;
}

.timeline-institution {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 5px;
    font-style: italic;
}

.timeline-duration {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 10px;
    font-style: italic;
}

.timeline-content p {
    font-size: 1rem;
    color: #ddd;
}

@media (max-width: 768px) {
    .timeline:before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    [data-aos^=fade][data-aos^=fade] {
        transform: translateX(0) translateY(0);
    }

    .timeline-item:nth-child(even) {
        flex-direction: column;
        text-align: left;
    }

    .timeline-item .timeline-content {
        width: 100%;
        padding-left: 40px;
    }

    .timeline-item .timeline-icon {
        left: 10px;
    }

    .timeline-start-marker {
        left: 20px;
    }
}

.contact {
    padding: 60px 20px;
    background: #0a0a0a;
    color: #fff;
    text-align: center;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-form {
    flex: 1;
    max-width: 500px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px 15px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background: #222;
    color: #fff;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #ccc;
}

.contact-form button {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    background-color: rgba(34,34,34, 0.9);
    color: #ffd700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease;
}

.contact-form button:hover {
    background-color: rgba(51,51,51, 0.9);
    transform: translateY(-2px);
}

.contact-info {
    flex: 1;
    max-width: 400px;
    text-align: left;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.contact-info p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 10px;
}

.contact-info a {
    color: #ffd700;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.5rem;
    color: #ffd700;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

.social-links a:hover {
    transform: scale(1.1);
    color: #e6b800;
}

@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .contact-form,
    .contact-info {
        max-width: 100%;
    }

    .contact-info {
        text-align: center;
    }
}

.footer {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 40px 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.footer-section .social {
    justify-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-links a {
    font-size: 1.5rem;
    color: #ffd700;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
    color: #e6b800;
}

.footer-section p {
    margin: 5px 0;
    color: #e0e0e0;
}

.footer-section p:last-child {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #aaa;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-section {
        min-width: 100%;
    }
}

.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.language-button {
    padding: 8px 16px;
    cursor: pointer;
    background-color: #222;
    color: #ffd700;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.language-button:hover {
    background-color: #333;
}

@media (max-width: 768px) {
    .language-switcher {
        top: 15px;
        right: 15px;
        flex-direction: column;
    }

    .language-button {
        padding: 6px 12px;
        margin-left: 0;
        margin-top: 5px;
        font-size: 0.9rem;
    }
}

.github {
    padding: 60px 20px;
    background: #141414;
    text-align: center;
}

.github-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.repo-card {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.repo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.repo-stats {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ffd700;
}

.repo-card a {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    color: #ffd700;
    font-weight: bold;
    border: 2px solid #ffd700;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.repo-card a:hover {
    background: #ffd700;
    color: #222;
}

.fade-up, .fade-right, .fade-left {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.active, .fade-right.active, .fade-left.active {
    opacity: 1;
    transform: translate(0);
}

.fade-up {
    transform: translateY(20px);
}
.fade-right {
    transform: translateX(-20px);
}
.fade-left {
    transform: translateX(20px);
}

/* Portfolio refresh */
:root {
    --portfolio-black: #080808;
    --portfolio-surface: #111;
    --portfolio-surface-2: #171717;
    --portfolio-card: #202020;
    --portfolio-gold: #ffd700;
    --portfolio-gold-soft: #eac449;
    --portfolio-ai: #76e3ff;
    --portfolio-muted: #cfcfcf;
    --portfolio-dim: #929292;
    --portfolio-line: rgba(255, 215, 0, 0.2);
}

html[data-theme-effective="light"] {
    --portfolio-black: #f8f4ea;
    --portfolio-surface: #fffaf0;
    --portfolio-surface-2: #f0eadf;
    --portfolio-card: #fffdf7;
    --portfolio-gold: #b98100;
    --portfolio-gold-soft: #9f710b;
    --portfolio-ai: #087f9e;
    --portfolio-muted: #3f4448;
    --portfolio-dim: #62686e;
    --portfolio-line: rgba(185, 129, 0, 0.26);
}

body {
    background:
        radial-gradient(circle at 78% 2%, rgba(255, 215, 0, 0.08), transparent 28rem),
        var(--portfolio-black);
}

html[data-theme-effective="light"] body {
    color: #171717;
    background:
        radial-gradient(circle at 78% 2%, rgba(185, 129, 0, 0.12), transparent 28rem),
        var(--portfolio-black);
}

.site-header {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(1120px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(14, 14, 14, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

html[data-theme-effective="light"] .site-header {
    border-color: rgba(32, 32, 32, 0.1);
    background: rgba(255, 250, 240, 0.82);
    box-shadow: 0 18px 50px rgba(90, 70, 30, 0.14);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

html[data-theme-effective="light"] .site-brand {
    color: #171717;
}

.site-brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    background: var(--portfolio-gold);
    color: #171717;
    font-weight: 900;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: 0.88rem;
    font-weight: 700;
}

.site-nav a {
    color: var(--portfolio-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--portfolio-gold);
}

.site-header .language-switcher {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.theme-button {
    min-width: 44px;
    padding: 6px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--portfolio-muted);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    transition: background 0.2s ease, color 0.2s ease;
}

.theme-button:hover,
.theme-button.active {
    background: var(--portfolio-gold);
    color: #171717;
}

html[data-theme-effective="light"] .theme-switcher {
    border-color: rgba(32, 32, 32, 0.1);
    background: rgba(255, 255, 255, 0.46);
}

.site-header .language-button {
    padding: 7px 10px;
    border: 1px solid var(--portfolio-line);
    border-radius: 6px;
    background: #181818;
    font-size: 0.78rem;
    font-weight: 900;
}

html[data-theme-effective="light"] .site-header .language-button {
    background: #fffdf7;
    color: var(--portfolio-gold);
}

.hero {
    min-height: 100vh;
    height: auto;
    justify-content: stretch;
    align-items: center;
    padding: 112px 20px 54px;
    background:
        linear-gradient(90deg, rgba(8, 8, 8, 0.96) 0%, rgba(8, 8, 8, 0.82) 48%, rgba(8, 8, 8, 0.6) 100%),
        radial-gradient(circle at 76% 24%, rgba(255, 215, 0, 0.18), transparent 28rem),
        url('./images/hero-bg-optimized.webp') center / cover no-repeat;
}

html[data-theme-effective="light"] .hero {
    color: #171717;
    background:
        linear-gradient(90deg, rgba(248, 244, 234, 0.96) 0%, rgba(248, 244, 234, 0.84) 48%, rgba(248, 244, 234, 0.68) 100%),
        radial-gradient(circle at 76% 24%, rgba(185, 129, 0, 0.18), transparent 28rem),
        url('./images/hero-bg-optimized.webp') center / cover no-repeat;
}

.hero::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.42;
    mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

html[data-theme-effective="light"] .hero::before {
    opacity: 0.28;
    background:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.hero-shell {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 36px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--portfolio-ai);
    font-size: 0.88rem;
    font-weight: 800;
}

.hero-kicker::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--portfolio-ai);
    box-shadow: 0 0 0 6px rgba(118, 227, 255, 0.14);
}

.hero-title {
    max-width: 720px;
    margin-bottom: 18px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 0.96;
}

html[data-theme-effective="light"] .hero-title {
    text-shadow: 0 12px 35px rgba(255, 255, 255, 0.6);
}

.hero-subtitle {
    min-height: 2.4rem;
    font-size: clamp(1.2rem, 2.5vw, 1.75rem);
}

.hero-tagline {
    max-width: 660px;
    margin-top: 10px;
    color: var(--portfolio-muted);
    font-style: normal;
}

.hero-buttons {
    justify-content: flex-start;
    gap: 12px;
}

.hero-buttons .btn {
    min-width: 165px;
    margin: 0;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.hero-buttons .btn-alt {
    background: rgba(20, 20, 20, 0.68);
    border-color: var(--portfolio-line);
    color: var(--portfolio-gold);
}

html[data-theme-effective="light"] .hero-buttons .btn-alt {
    background: rgba(255, 253, 247, 0.78);
}

.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 690px;
    margin-top: 32px;
}

.hero-proof div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    background: rgba(24, 24, 24, 0.7);
}

html[data-theme-effective="light"] .hero-proof div {
    border-color: rgba(32, 32, 32, 0.09);
    background: rgba(255, 253, 247, 0.72);
}

.hero-proof strong,
.hero-proof span {
    display: block;
}

.hero-proof strong {
    color: var(--portfolio-gold);
    font-size: 1.12rem;
    line-height: 1.2;
}

.hero-proof span {
    margin-top: 7px;
    color: var(--portfolio-dim);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
}

.hero-feature {
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.24);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(31, 31, 31, 0.96), rgba(14, 14, 14, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

html[data-theme-effective="light"] .hero-feature {
    border-color: rgba(185, 129, 0, 0.25);
    background: linear-gradient(145deg, rgba(255, 253, 247, 0.96), rgba(240, 234, 223, 0.98));
    box-shadow: 0 30px 90px rgba(90, 70, 30, 0.18);
}

.hero-feature-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--portfolio-dim);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

html[data-theme-effective="light"] .hero-feature-header {
    border-bottom-color: rgba(32, 32, 32, 0.08);
}

.hero-feature-body {
    padding: 24px;
    text-align: left;
}

.hero-feature-body img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    margin-bottom: 18px;
    border-radius: 18px;
    background: #f5f0da;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.hero-feature-eyebrow {
    margin-bottom: 6px;
    color: var(--portfolio-ai);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.hero-feature-body h2 {
    margin-bottom: 10px;
    color: var(--portfolio-gold);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.2rem;
}

.hero-feature-body p:not(.hero-feature-eyebrow) {
    color: var(--portfolio-muted);
    line-height: 1.65;
}

.hero-feature-body .project-btn-alt {
    margin-top: 18px;
}

.tech-stack,
.partners,
.education,
.github {
    background: var(--portfolio-surface);
}

.projects,
.experience,
.contact,
.footer {
    background: var(--portfolio-surface-2);
}

html[data-theme-effective="light"] .gradinar-section,
html[data-theme-effective="light"] .tech-stack,
html[data-theme-effective="light"] .projects,
html[data-theme-effective="light"] .partners,
html[data-theme-effective="light"] .experience,
html[data-theme-effective="light"] .education,
html[data-theme-effective="light"] .contact,
html[data-theme-effective="light"] .footer,
html[data-theme-effective="light"] .github {
    color: #171717;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
}

.section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.section-description {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.project-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.project-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    background: var(--portfolio-card);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme-effective="light"] .project-card,
html[data-theme-effective="light"] .tech-card,
html[data-theme-effective="light"] .timeline-content,
html[data-theme-effective="light"] .partner-card,
html[data-theme-effective="light"] .repo-card {
    border-color: rgba(32, 32, 32, 0.09);
    box-shadow: 0 10px 28px rgba(90, 70, 30, 0.12);
}

.project-card:first-child {
    border-color: rgba(255, 215, 0, 0.26);
    background:
        linear-gradient(145deg, rgba(255, 215, 0, 0.1), transparent 55%),
        var(--portfolio-card);
}

.project-image {
    display: grid;
    place-items: center;
    min-height: 170px;
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background:
        radial-gradient(circle at 70% 30%, rgba(255, 215, 0, 0.14), transparent 34%),
        #151515;
}

html[data-theme-effective="light"] .project-image {
    border-bottom-color: rgba(32, 32, 32, 0.08);
    background:
        radial-gradient(circle at 70% 30%, rgba(185, 129, 0, 0.14), transparent 34%),
        #f0eadf;
}

.project-image img {
    padding-top: 0;
    max-height: 135px;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.38));
}

.project-content {
    padding: 20px;
}

.project-label {
    margin-bottom: 10px;
    color: var(--portfolio-ai);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 18px 0;
}

.project-stack span {
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    background: #171717;
    color: #dcdcdc;
    font-size: 0.72rem;
    font-weight: 800;
}

html[data-theme-effective="light"] .project-stack span {
    border-color: rgba(32, 32, 32, 0.08);
    background: #f8f4ea;
    color: #383838;
}

html[data-theme-effective="light"] .tech-card,
html[data-theme-effective="light"] .timeline-content,
html[data-theme-effective="light"] .partner-card,
html[data-theme-effective="light"] .contact-form input,
html[data-theme-effective="light"] .contact-form textarea {
    background: var(--portfolio-card);
    color: #171717;
}

html[data-theme-effective="light"] .section-description,
html[data-theme-effective="light"] .project-content p,
html[data-theme-effective="light"] .tech-card p,
html[data-theme-effective="light"] .timeline-content p,
html[data-theme-effective="light"] .partner-description,
html[data-theme-effective="light"] .partner-role,
html[data-theme-effective="light"] .contact-info p,
html[data-theme-effective="light"] .footer-section p {
    color: var(--portfolio-muted);
}

.tech-card,
.timeline-content,
.partner-card,
.contact-form input,
.contact-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 900px) {
    .site-header {
        align-items: flex-start;
    }

    .site-nav {
        display: none;
    }

    .hero-shell,
    .hero-proof {
        grid-template-columns: 1fr;
    }

    .hero-content {
        text-align: center;
    }

    .hero-kicker,
    .hero-buttons {
        justify-content: center;
    }

    .hero-feature-body {
        text-align: center;
    }
}

@media (max-width: 520px) {
    .site-header {
        top: 10px;
        width: calc(100% - 20px);
        padding: 10px;
    }

    .site-brand span:last-child {
        display: none;
    }

    .header-controls {
        gap: 6px;
    }

    .theme-switcher {
        max-width: 122px;
        overflow: hidden;
    }

    .theme-button {
        min-width: auto;
        padding: 6px;
        font-size: 0.68rem;
    }

    .hero {
        padding: 96px 16px 40px;
    }

    .hero-title {
        font-size: 2.65rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* Responsive polish and complete theme surfaces */
.project-actions {
    align-items: center;
    gap: 8px;
}

.project-btn,
.project-btn-alt {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.project-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex: 0 0 16px;
}

.gradinar-buttons .btn,
.contact-form button {
    border: 2px solid transparent;
}

html[data-theme-effective="light"] body {
    color: #171717;
    background-color: var(--portfolio-black);
}

html[data-theme-effective="light"] .hero-title,
html[data-theme-effective="light"] .tech-card h3,
html[data-theme-effective="light"] .timeline-content h3,
html[data-theme-effective="light"] .contact-info h3,
html[data-theme-effective="light"] .footer-section h3 {
    color: #171717;
}

html[data-theme-effective="light"] .hero-title .highlight,
html[data-theme-effective="light"] .hero-subtitle,
html[data-theme-effective="light"] .dynamic-skill,
html[data-theme-effective="light"] .section-title,
html[data-theme-effective="light"] .gradinar-title,
html[data-theme-effective="light"] .project-content h3,
html[data-theme-effective="light"] .partner-label,
html[data-theme-effective="light"] .partner-name,
html[data-theme-effective="light"] .timeline-company,
html[data-theme-effective="light"] .timeline-institution,
html[data-theme-effective="light"] .timeline-duration,
html[data-theme-effective="light"] .repo-stats,
html[data-theme-effective="light"] .contact-info a,
html[data-theme-effective="light"] .social-links a {
    color: var(--portfolio-gold);
}

html[data-theme-effective="light"] .hero-tagline,
html[data-theme-effective="light"] .gradinar-subtitle,
html[data-theme-effective="light"] .gradinar-description,
html[data-theme-effective="light"] .section-description,
html[data-theme-effective="light"] .project-content p,
html[data-theme-effective="light"] .tech-card p,
html[data-theme-effective="light"] .partner-role,
html[data-theme-effective="light"] .partner-description,
html[data-theme-effective="light"] .timeline-content p,
html[data-theme-effective="light"] .contact-info p,
html[data-theme-effective="light"] .footer-section p,
html[data-theme-effective="light"] .footer-section ul li a {
    color: var(--portfolio-muted);
}

html[data-theme-effective="light"] .tech-stack,
html[data-theme-effective="light"] .partners,
html[data-theme-effective="light"] .education,
html[data-theme-effective="light"] .github {
    background: var(--portfolio-surface);
}

html[data-theme-effective="light"] .gradinar-section,
html[data-theme-effective="light"] .projects,
html[data-theme-effective="light"] .experience,
html[data-theme-effective="light"] .contact,
html[data-theme-effective="light"] .footer {
    background: var(--portfolio-surface-2);
}

html[data-theme-effective="light"] .tech-card,
html[data-theme-effective="light"] .project-card,
html[data-theme-effective="light"] .timeline-content,
html[data-theme-effective="light"] .partner-card,
html[data-theme-effective="light"] .repo-card {
    background: var(--portfolio-card);
}

html[data-theme-effective="light"] .tech-card:hover,
html[data-theme-effective="light"] .partner-card:hover,
html[data-theme-effective="light"] .repo-card:hover {
    background: #fff6df;
}

html[data-theme-effective="light"] .tech-card:hover h3,
html[data-theme-effective="light"] .tech-card:hover p {
    color: #171717;
}

html[data-theme-effective="light"] .tech-card .tech-icon {
    fill: var(--portfolio-gold);
}

html[data-theme-effective="light"] .tech-card:hover .tech-icon {
    fill: #171717;
}

html[data-theme-effective="light"] .hero-buttons .btn.primary,
html[data-theme-effective="light"] .hero-buttons .btn:not(.btn-alt),
html[data-theme-effective="light"] .gradinar-buttons .btn,
html[data-theme-effective="light"] .contact-form button,
html[data-theme-effective="light"] .project-btn:hover,
html[data-theme-effective="light"] .project-btn-alt:hover,
html[data-theme-effective="light"] .repo-card a:hover {
    background: var(--portfolio-gold);
    color: #171717;
    border-color: var(--portfolio-gold);
}

html[data-theme-effective="light"] .hero-buttons .btn:hover,
html[data-theme-effective="light"] .gradinar-buttons .btn:hover,
html[data-theme-effective="light"] .contact-form button:hover {
    background: #171717;
    color: #fffaf0;
    border-color: #171717;
}

html[data-theme-effective="light"] .project-btn,
html[data-theme-effective="light"] .project-btn-alt,
html[data-theme-effective="light"] .repo-card a,
html[data-theme-effective="light"] .gradinar-buttons .btn-alt {
    background: #fffdf7;
    color: var(--portfolio-gold);
    border-color: var(--portfolio-line);
}

html[data-theme-effective="light"] .project-btn svg {
    fill: var(--portfolio-gold);
}

html[data-theme-effective="light"] .project-btn:hover svg {
    fill: #171717;
}

html[data-theme-effective="light"] .contact-form input,
html[data-theme-effective="light"] .contact-form textarea {
    background: #fffdf7;
    color: #171717;
    border: 1px solid rgba(32, 32, 32, 0.11);
}

html[data-theme-effective="light"] .contact-form input::placeholder,
html[data-theme-effective="light"] .contact-form textarea::placeholder {
    color: #72777d;
}

html[data-theme-effective="light"] .timeline:before,
html[data-theme-effective="light"] .timeline-start-marker,
html[data-theme-effective="light"] .timeline-icon {
    background: var(--portfolio-gold);
}

html[data-theme-effective="light"] .timeline-icon {
    color: #fffaf0;
    border-color: var(--portfolio-surface);
    box-shadow: 0 8px 20px rgba(90, 70, 30, 0.18);
}

html[data-theme-effective="light"] .footer-section ul li a:hover,
html[data-theme-effective="light"] .social-links a:hover {
    color: var(--portfolio-gold-soft);
}

@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-controls {
        margin-left: auto;
    }

    .project-actions {
        gap: 7px;
    }

    .project-btn,
    .project-btn-alt {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        padding: 8px 9px;
        font-size: 0.72rem;
    }
}

@media (max-width: 420px) {
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .theme-switcher {
        max-width: none;
    }

    .project-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .project-btn,
    .project-btn-alt {
        width: 100%;
    }
}

/* Keep content readable before JavaScript and avoid shifting hero text. */
.fade-up, .fade-right, .fade-left { opacity: 1; transform: none; }
.hero .fade-in { opacity: 1; animation: none; }
.hero-subtitle { min-height: 3.6em; }
@media (max-width: 420px) {
    .hero { padding-top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
