:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --java: #ED1B24;
    --python: #3776ab;
    --csharp: #178600;
    --javascript: #f7df1e;
    --sql: #00758f;
    --spring: #6db33f;
    --django: #092e20;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--primary);
    color: var(--text);
    overflow-x: hidden;
    direction: ltr;
}

/* Section Indicators */
.section-indicators {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.section-indicator {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.3s ease;
    transform: scale(0.8);
}

.section-indicator.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.section-indicator::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.8) 0%, rgba(255, 147, 0, 0.3) 70%, transparent 100%);
    box-shadow:
        0 0 20px rgba(255, 204, 0, 0.8),
        0 0 40px rgba(255, 147, 0, 0.6),
        0 0 60px rgba(255, 102, 0, 0.4);
    animation: flame-pulse 1.5s ease-in-out infinite;
    z-index: -1;
}

.section-indicator:hover::before {
    box-shadow:
        0 0 30px rgba(255, 204, 0, 1),
        0 0 50px rgba(255, 147, 0, 0.8),
        0 0 70px rgba(255, 102, 0, 0.6);
    animation: flame-pulse-hover 1s ease-in-out infinite;
}

@keyframes flame-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes flame-pulse-hover {
    0%, 100% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.section-indicator span {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    padding: 0.2rem;
}

.section-indicator:hover span {
    text-shadow:
        0 0 10px var(--text),
        0 0 20px rgba(255, 204, 0, 0.8),
        0 0 30px rgba(255, 147, 0, 0.6);
    transform: scale(1.05);
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
}

.profile-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    position: relative;
    z-index: 3;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.tech-orbits {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.orbit {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed;
    animation: orbit-rotate linear infinite;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    will-change: transform;
}

.orbit span {
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    color: inherit;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(30, 41, 59, 0.7) 70%);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    text-shadow:
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px rgba(255, 204, 0, 0.8),
        0 0 40px rgba(255, 147, 0, 0.6);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, text-shadow 0.3s ease;
    animation:
        sun-glow 1.5s ease-in-out infinite,
        sun-shimmer 3s ease-in-out infinite,
        keep-upright linear infinite;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

@keyframes sun-glow {
    0%, 100% {
        text-shadow:
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px rgba(255, 204, 0, 0.8),
            0 0 40px rgba(255, 147, 0, 0.6);
        opacity: 0.9;
    }
    50% {
        text-shadow:
            0 0 15px currentColor,
            0 0 30px currentColor,
            0 0 50px rgba(255, 204, 0, 1),
            0 0 60px rgba(255, 147, 0, 0.8);
        opacity: 1;
    }
}

@keyframes sun-shimmer {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
    25% {
        transform: translateX(-50%) translateY(-2px);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
    50% {
        transform: translateX(-50%) translateY(0);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
    75% {
        transform: translateX(-50%) translateY(2px);
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(30, 41, 59, 0.7) 70%);
    }
}

.label-wrapper {
    position: absolute;
    top: -1.2rem;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center;
    will-change: transform;
}

.orbit.java {
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    border-color: var(--java);
    color: var(--java);
    animation-duration: 20s;
}

.orbit.python {
    width: 170%;
    height: 170%;
    top: -35%;
    left: -35%;
    border-color: var(--python);
    color: var(--python);
    animation-duration: 25s;
    animation-direction: reverse;
}

.orbit.csharp {
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    border-color: var(--csharp);
    color: var(--csharp);
    animation-duration: 30s;
}

.orbit.javascript {
    width: 230%;
    height: 230%;
    top: -65%;
    left: -65%;
    border-color: var(--javascript);
    color: var(--javascript);
    animation-duration: 35s;
    animation-direction: reverse;
}

.orbit.sql {
    width: 260%;
    height: 260%;
    top: -80%;
    left: -80%;
    border-color: var(--sql);
    color: var(--sql);
    animation-duration: 40s;
}

.orbit.spring {
    width: 290%;
    height: 290%;
    top: -95%;
    left: -95%;
    border-color: var(--spring);
    color: var(--spring);
    animation-duration: 45s;
    animation-direction: reverse;
}

@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbit span {
    animation: keep-upright linear infinite;
    animation-duration: inherit;
}

@keyframes keep-upright {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(-360deg); }
}

.orbit:hover {
    border-style: solid;
    box-shadow: 0 0 15px var(--accent);
    opacity: 1;
}

.orbit:hover span {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(30, 41, 59, 0.9) 70%);
    transform: translateX(-50%) scale(1.1);
    text-shadow:
        0 0 20px currentColor,
        0 0 40px currentColor,
        0 0 60px rgba(255, 204, 0, 1),
        0 0 80px rgba(255, 147, 0, 0.9);
    border-color: rgba(255, 204, 0, 0.5);
    opacity: 1;
    animation: sun-glow-hover 1s ease-in-out infinite;
}

@keyframes sun-glow-hover {
    0%, 100% {
        text-shadow:
            0 0 20px currentColor,
            0 0 40px currentColor,
            0 0 60px rgba(255, 204, 0, 1),
            0 0 80px rgba(255, 147, 0, 0.9);
        opacity: 0.9;
    }
    50% {
        text-shadow:
            0 0 30px currentColor,
            0 0 50px currentColor,
            0 0 80px rgba(255, 204, 0, 1),
            0 0 100px rgba(255, 147, 0, 1);
        opacity: 1;
    }
}

.title-container {
    text-align: center;
}

.main-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

.title-line {
    display: block;
    position: relative;
}

.title-line:first-child::after {
    content: '';
    position: absolute;
    right: -0.5em;
    bottom: 0;
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.dynamic-title {
    position: relative;
    height: 3.5rem;
    margin: 0 auto;
    overflow: hidden;
}

.title-mask {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.title-slider {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.title-segment {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.title-segment.active {
color: var(--text);
}

.title-segment.java-backend::before {
    background: var(--java);
}
.title-segment.full-stack::before {
    background: var(--accent);
}
.title-segment.ai::before {
    background: var(--python);
}

.title-segment::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.title-underline {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
    margin: 0 auto;
    transition: width 1s ease;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    position: relative;
}

.contact-link:hover {
    color: var(--text);
    background: rgba(30, 41, 59, 0.5);
    transform: translateY(-3px);
}

.contact-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 2rem;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.contact-link:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.contact-link i {
    font-size: 1.2rem;
    transition: text-shadow 0.3s ease;
}

.contact-link:hover i {
    text-shadow:
        0 0 10px var(--accent),
        0 0 20px rgba(255, 204, 0, 0.8);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    z-index: 10;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.5);
    color: var(--text-light);
    transition: all 0.3s ease;
    position: relative;
}

.social-link:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px);
    box-shadow:
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.social-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
}

.arrow-down {
    width: 1rem;
    height: 1rem;
    border-right: 2px solid var(--text-light);
    border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg);
    margin-top: 0.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

.section {
    padding: 5rem 0;
    position: relative;
}

.dark-section {
    background-color: var(--secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-text {
    font-size: 1rem;
    line-height: 1.5;
}

.about-text h3 {
    margin-top: 1.5rem;
    color: var(--accent);
    font-size: 1.3rem;
}

.education-list {
    list-style: none;
    margin-top: 1rem;
}

.education-list li {
    margin-bottom: 1.2rem;
    background: var(--secondary);
    padding: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.education-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.education-list strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
}

.education-list span {
    color: var(--text-light);
    font-size: 0.85rem;
}

.education-detail {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 2px solid var(--accent);
}

.toggle-details {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.toggle-details:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.toggle-details::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.toggle-details:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.skills-container h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-category h4 {
    color: var(--text);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.icon-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.icon-list li {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.icon-list li:hover {
    transform: translateY(-3px);
    background: var(--accent);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.icon-list li::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.icon-list li:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.icon-list li i {
    font-size: 24px;
    color: var(--text);
    transition: text-shadow 0.3s ease;
}

.icon-list li:hover i {
    color: white;
    text-shadow:
        0 0 10px white,
        0 0 20px rgba(255, 204, 0, 0.8);
}

.icon-list li::after {
    content: attr(title);
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: var(--text);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.icon-list li:hover::after {
    opacity: 1;
    visibility: visible;
}

.project-card {
    background-color: var(--primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 204, 0, 0.6);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-details {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-details h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.3rem;
}

.project-details p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.project-tech span:hover {
    background-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
    box-shadow:
        0 0 10px rgba(255, 204, 0, 0.6),
        0 0 15px rgba(255, 147, 0, 0.4);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.project-duration {
    color: var(--text-light);
    font-size: 0.9rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
}

.btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-info ul {
    list-style: none;
    margin-bottom: 2rem;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
}

.contact-info i {
    color: var(--accent);
    width: 1.5rem;
    text-align: center;
    transition: text-shadow 0.3s ease;
}

.contact-info i:hover {
    text-shadow:
        0 0 10px var(--accent),
        0 0 20px rgba(255, 204, 0, 0.8);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary);
    border: 1px solid var(--secondary);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.form-group input::before,
.form-group textarea::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.8) 0%, rgba(255, 147, 0, 0.3) 70%, transparent 100%);
    box-shadow:
        0 0 20px rgba(255, 204, 0, 0.8),
        0 0 40px rgba(255, 147, 0, 0.6),
        0 0 60px rgba(255, 102, 0, 0.4);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-group input:hover::before,
.form-group textarea:hover::before,
.form-group input:focus::before,
.form-group textarea:focus::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border: 1px solid var(--secondary);
    transform: scale(1.02); 
    box-shadow:
        0 0 15px rgba(255, 204, 0, 0.6),
        0 0 25px rgba(255, 147, 0, 0.4);
}

/* Handle browser autofill to prevent blue background */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--secondary) inset;
    -webkit-text-fill-color: var(--text);
    border: 1px solid var(--secondary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.form-message.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

footer {
    background-color: var(--secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
}

.back-to-top {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    left: auto !important;
    width: 3rem;
    height: 3rem;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    position: relative;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.back-to-top::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.back-to-top:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

.thank-you-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 2;
}

.thank-you-container h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.5rem;
    position: relative;
}

.thank-you-container h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
}

.thank-you-container p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.thank-you-container .btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    background-color: var(--accent);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.thank-you-container .btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow:
        0 5px 15px rgba(59, 130, 246, 0.3),
        0 0 15px rgba(255, 204, 0, 0.8),
        0 0 25px rgba(255, 147, 0, 0.6);
}

.thank-you-container .btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.thank-you-container .btn:hover::before {
    opacity: 1;
    animation: flame-pulse 1.5s ease-in-out infinite;
}

/* Arabic Font and RTL Support */
html[lang="ar"] {
    font-family: 'Noto Naskh Arabic', sans-serif;
    direction: rtl;
}

html[lang="ar"] body {
    direction: rtl;
}

html[lang="ar"] .container {
    text-align: right;
}

html[lang="ar"] .section-title::after {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

html[lang="ar"] .contact-links,
html[lang="ar"] .social-links {
    flex-direction: row-reverse;
}

html[lang="ar"] .contact-link,
html[lang="ar"] .social-link {
    flex-direction: row-reverse;
    gap: 0.5rem;
}

html[lang="ar"] .contact-info li {
    flex-direction: row-reverse;
    text-align: right;
}

html[lang="ar"] .about-content {
    display: grid;
    grid-template-columns: 1fr;
    text-align: right;
}

html[lang="ar"] .education-list li {
    text-align: right;
}

html[lang="ar"] .education-detail {
    border-left: none;
    border-right: 2px solid var(--accent);
    padding-left: 0;
    padding-right: 1.2rem;
}

html[lang="ar"] .skills-grid {
    text-align: right;
}

html[lang="ar"] .project-details {
    text-align: right;
}

html[lang="ar"] .project-meta {
    flex-direction: row-reverse;
}

html[lang="ar"] .form-group input,
html[lang="ar"] .form-group textarea {
    text-align: right;
}

html[lang="ar"] .back-to-top {
    right: auto !important;
    left: 2rem !important;
}

html[lang="ar"] .section-indicators {
    right: auto;
    left: 2rem;
}

html[lang="ar"] .section-indicator span {
    text-align: center;
}

html[lang="ar"] .title-container {
    text-align: right;
}

html[lang="ar"] .title-segment {
    text-align: right;
}

html[lang="ar"] .title-segment::before {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[lang="ar"] .main-title .title-line::after {
    right: auto;
    left: -0.5em;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        overflow-x: hidden;
    }

    .section-indicators {
        right: 0.3rem;
        gap: 0.4rem;
        transform: translateY(-50%) scale(0.7);
    }

    .section-indicator {
        width: 36px;
        height: 36px;
    }

    .section-indicator span {
        font-size: 0.55rem;
        line-height: 1;
        padding: 0.1rem;
    }

    .section-indicator::before {
        box-shadow:
            0 0 8px rgba(255, 204, 0, 0.8),
            0 0 15px rgba(255, 147, 0, 0.6);
    }

    .section-indicator:hover::before {
        box-shadow:
            0 0 12px rgba(255, 204, 0, 1),
            0 0 20px rgba(255, 147, 0, 0.8);
    }

    .section-indicator:hover span {
        text-shadow:
            0 0 5px var(--text),
            0 0 10px rgba(255, 204, 0, 0.8);
        transform: scale(1.03);
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 1rem 0.5rem;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-content {
        gap: 1.5rem;
        padding: 1rem 0.5rem;
        max-width: 100%;
    }

    .profile-container {
        width: 160px;
        height: 160px;
        margin-bottom: 1rem;
    }

    .profile-image {
        border-width: 2px;
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    }

    .orbit {
        font-size: 0.55rem;
        border-width: 1px;
        animation-duration: 15s;
    }

    .orbit span {
        font-size: 0.55rem;
        padding: 0.2rem 0.4rem;
        top: -0.7rem;
        border-width: 1px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(30, 41, 59, 0.6) 70%);
        text-shadow:
            0 0 5px currentColor,
            0 0 10px rgba(255, 204, 0, 0.6);
        animation: sun-glow 2s ease-in-out infinite;
    }

    .orbit.java {
        width: 120%;
        height: 120%;
        top: -10%;
        left: -10%;
    }

    .orbit.python {
        width: 135%;
        height: 135%;
        top: -17.5%;
        left: -17.5%;
    }

    .orbit.csharp {
        width: 150%;
        height: 150%;
        top: -25%;
        left: -25%;
    }

    .orbit.javascript {
        width: 165%;
        height: 165%;
        top: -32.5%;
        left: -32.5%;
    }

    .orbit.sql {
        width: 180%;
        height: 180%;
        top: -40%;
        left: -40%;
    }

    .orbit.spring {
        width: 195%;
        height: 195%;
        top: -47.5%;
        left: -47.5%;
    }

    .orbit:hover {
        box-shadow: none;
    }

    .orbit:hover span {
        transform: translateX(-50%);
        text-shadow:
            0 0 10px currentColor,
            0 0 20px rgba(255, 204, 0, 0.8);
    }

    .main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        line-height: 1.2;
    }

    .dynamic-title {
        height: 3.2rem; 
        max-width: 80vw; 
        overflow: hidden;
        margin: 0 auto;
        position: relative;
    }

    .title-mask {
        max-width: 100%;
        height: 3.2rem; 
        overflow: hidden;
    }

    .title-slider {
        width: 100%;
        height: auto; 
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 0.8s ease-in-out; 
    }

    .title-segment {
        font-size: clamp(0.6rem, 2.5vw, 0.8rem); 
        height: 3.2rem; 
        padding: 0 0.3rem; 
        letter-spacing: 0.02em; 
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        line-height: 3.2rem; 
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-light); 
    }

    .title-segment.active {
        color: var(--text); 
    }

    .title-segment::before {
        content: '';
        width: 0.2rem; 
        height: 0.2rem;
        margin-right: 0.2rem;
        border-radius: 50%;
        position: static; 
    }

    .title-segment.java-backend::before {
        background: var(--java);
    }
    .title-segment.full-stack::before {
        background: var(--accent);
    }
    .title-segment.ai::before {
        background: var(--python);
    }

    .title-underline {
        height: 1px; /* Thin underline */
        background: linear-gradient(90deg, var(--java), var(--spring), var(--python));
        width: 0;
        margin: 0 auto;
        transition: width 0.8s ease;
    }

    /* Turkish-specific adjustment */
    html[lang="tr"] .title-segment {
        font-size: clamp(0.55rem, 2.3vw, 0.75rem); 
    }

    .contact-links {
        gap: 0.5rem;
        max-width: 90vw;
    }

    .contact-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        border-radius: 1.5rem;
    }

    .contact-link::before {
        border-radius: 1.5rem;
    }

    .contact-link i {
        font-size: 1rem;
    }

    .contact-link:hover i {
        text-shadow:
            0 0 5px var(--accent),
            0 0 10px rgba(255, 204, 0, 0.6);
    }

    .social-links {
        gap: 0.8rem;
        margin-top: 1rem;
    }

    .social-link {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.1rem;
    }

    .social-link:hover {
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.8),
            0 0 15px rgba(255, 147, 0, 0.6);
    }

    .scroll-indicator {
        bottom: 0.8rem;
        font-size: 0.65rem;
    }

    .arrow-down {
        width: 0.7rem;
        height: 0.7rem;
        border-width: 1px;
    }

    .section {
        padding: 2.5rem 0;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 0.8rem;
        max-width: 100%;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .section-title::after {
        width: 60px;
        height: 2px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .about-text {
        font-size: 0.85rem;
    }

    .about-text h3 {
        font-size: 1rem;
    }

    .education-list li {
        padding: 0.7rem;
        margin-bottom: 0.7rem;
    }

    .education-list strong {
        font-size: 0.95rem;
    }

    .education-list span {
        font-size: 0.75rem;
    }

    .education-detail {
        font-size: 0.75rem;
        padding-left: 0.8rem;
    }

    .toggle-details {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .toggle-details:hover {
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.8),
            0 0 15px rgba(255, 147, 0, 0.6);
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .skills-container h3 {
        font-size: 1rem;
    }

    .skill-category h4 {
        font-size: 0.95rem;
    }

    .icon-list {
        justify-content: center;
        gap: 0.5rem;
    }

    .icon-list li {
        width: 34px;
        height: 34px;
    }

    .icon-list li i {
        font-size: 18px;
    }

    .icon-list li:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    .icon-list li::after {
        font-size: 0.65rem;
        top: -1.6rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .project-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        max-width: 100%;
    }

    .project-card:hover {
        box-shadow:
            0 10px 20px rgba(0, 0, 0, 0.2),
            0 0 15px rgba(255, 204, 0, 0.6);
    }

    .project-image {
        height: 140px;
    }

    .project-details {
        padding: 0.8rem;
    }

    .project-details h3 {
        font-size: 1rem;
    }

    .project-details p {
        font-size: 0.85rem;
    }

    .project-tech span {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .project-tech span:hover {
        box-shadow:
            0 0 5px rgba(255, 204, 0, 0.6),
            0 0 10px rgba(255, 147, 0, 0.4);
    }

    .project-duration {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info h3 {
        font-size: 1.2rem;
    }

    .contact-info li {
        font-size: 0.85rem;
        gap: 0.7rem;
    }

    .contact-info i {
        font-size: 1.1rem;
    }

    .contact-info i:hover {
        text-shadow:
            0 0 5px var(--accent),
            0 0 10px rgba(255, 204, 0, 0.6);
    }

    .contact-form {
        gap: 0.8rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .form-group input::before,
    .form-group textarea::before {
        border-radius: 4px;
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.8),
            0 0 20px rgba(255, 147, 0, 0.6);
    }

    .form-group input:focus,
    .form-group textarea:focus {
        border: 1px solid var(--secondary);
        transform: scale(1.02);
        box-shadow:
            0 0 10px rgba(255, 204, 0, 0.6),
            0 0 15px rgba(255, 147, 0, 0.4);
    }

    .form-group input:-webkit-autofill,
    .form-group input:-webkit-autofill:hover,
    .form-group input:-webkit-autofill:focus,
    .form-group textarea:-webkit-autofill,
    .form-group textarea:-webkit-autofill:hover,
    .form-group textarea:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px var(--secondary) inset;
        -webkit-text-fill-color: var(--text);
        border: 1px solid var(--secondary);
    }

    .form-group textarea {
        min-height: 100px;
    }

    .form-message {
        font-size: 0.85rem;
        padding: 0.7rem;
    }

    footer {
        padding: 1.2rem 0;
        font-size: 0.85rem;
    }

    .back-to-top {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.1rem;
        bottom: 0.8rem !important;
        right: 0.8rem !important;
        left: auto !important;
    }

    .back-to-top:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    .thank-you-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 1.2rem;
        text-align: center;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .thank-you-container h2 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
        margin-bottom: 1rem;
    }

    .thank-you-container p {
        font-size: 0.85rem;
        max-width: 95%;
        margin-bottom: 1.5rem;
    }

    .thank-you-container .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .thank-you-container .btn:hover {
        box-shadow:
            0 3px 10px rgba(59, 130, 246, 0.2),
            0 0 10px rgba(255, 204, 0, 0.8);
    }

    html[lang="ar"] .section-indicators {
        left: 0.3rem;
    }

    html[lang="ar"] .back-to-top {
        left: 0.8rem !important;
    }
}

/* Language Toggle Styling */
.language-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

html[lang="ar"] .language-toggle {
    right: auto;
    left: 1rem;
}

#language-select {
    padding: 0.5rem;
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-family: 'Space Grotesk', 'Noto Naskh Arabic', sans-serif;
    cursor: pointer;
}

#language-select:focus {
    outline: none;
    border-color: var(--accent-dark);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Base container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

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

/* Nest Hub (1280x600) and Nest Hub Max (1280x800) specific fixes */
@media (max-width: 1280px) and (max-height: 800px) {
  /* Adjust layout for smaller height screens */
  body {
    overflow-x: hidden;
  }
  
  .hero {
    padding: 40px 20px !important;
    min-height: auto !important;
  }
  
  .profile-container {
    transform: scale(0.9);
    transform-origin: top center;
  }
  
  .projects-grid, 
  .contact-container {
    gap: 1rem !important;
  }
  
  .section {
    padding: 40px 0 !important;
  }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .contact-container { grid-template-columns: 1fr; }
}

/* Tablet / small laptops (769px – 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .contact-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Mid-desktop (1200px – 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .contact-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Large desktop (1400px and up) */
@media (min-width: 1400px) {
  .contact-container { grid-template-columns: 2fr 3fr; gap: 3rem; }
}

/* Additional fixes for very short screens (Nest Hub) */
@media (max-height: 650px) {
  .hero-content {
    padding-top: 20px !important;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .title-container {
    margin: 15px 0 !important;
  }
  
  .section-title {
    margin-bottom: 20px !important;
  }
}

/* Prevent horizontal scrolling on all devices */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}