@import './prose.css';

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 17.5px;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    color-scheme: dark light;
}

/* Custom Selection */
::selection {
    background-color: var(--primary-color);
    color: #ffffff;
}

[data-theme="light"] ::selection {
    background-color: var(--primary-color);
    color: #ffffff;
}

[data-theme="dark"] ::selection {
    background-color: var(--primary-color);
    color: #0a0b0e;
}

body {
    font-family: 'Lexend', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    /* min-height removed */
    font-weight: 400;
    font-smooth: antialiased;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Premium Matte Film Grain Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: -1;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 6px;
    background: var(--primary-color);
    color: #000000;
    padding: 8px 12px;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s ease;
    opacity: 0;
}

.skip-link:focus {
    top: 6px;
    opacity: 1;
}

/* Header layout is now component-scoped in Header.astro */

/* .main-title removed — brand is in Header.astro */

/* .nav layout is now component-scoped in Navigation.astro */

/* .nav-links is now component-scoped in Navigation.astro */

/* UI Component text selection prevention */
.nav-link,
.control-btn,
.theme-btn,
.submit-btn,
.timezone-toggle,
.brand,
.social-link,
.tech-tag {
    user-select: none;
    -webkit-user-select: none;
}

/* Rhythm Fix: Disable interactions during theme toggle to fix visual bugs */
html.theme-transitioning {
    pointer-events: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.25);
    transform: rotate(0deg);
}

.nav-links .nav-link:nth-child(2) {
    transform: rotate(0.5deg);
}

/* Theme toggle styles are now component-scoped in ThemeToggle.astro */

/* Navigation animations */
.nav-link::before {
    content: '';
    position: absolute;
    left: var(--ripple-x, 50%);
    top: var(--ripple-y, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.15);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
}

.nav-link.is-animating {
    letter-spacing: 0.18em;
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(var(--primary-rgb), 0.35);
}

.nav-link.is-animating::before {
    width: 220px;
    height: 220px;
    animation: navRipple 520ms ease-out forwards;
}

.nav-link.is-animating::after {
    animation: navUnderlineFlash 520ms ease-out forwards;
}

@keyframes navRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.9;
    }

    60% {
        opacity: 0.35;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes navUnderlineFlash {
    0% {
        width: 0;
    }

    35% {
        width: 100%;
    }

    60% {
        width: 35%;
    }

    100% {
        width: 100%;
    }
}

.page-404 .section {
    text-align: center;
}

.page-404 .error-content {
    max-width: 600px;
    margin: 0 auto;
}

.page-404 .error-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.page-404 .error-code {
    font-family: 'Lexend', sans-serif;
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    margin: 0;
}

.page-404 .error-emoji {
    width: 6rem;
    height: 6rem;
    border: 3px dotted var(--primary-color);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    transform: rotate(10deg);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.page-404 .about-content p {
    text-align: center;
    margin-bottom: 1rem;
}

.page-404 .notfound-options {
    margin: 2rem 0;
}

.page-404 .notfound-options h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-transform: lowercase;
    letter-spacing: -0.02em;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

@media (max-width: 600px) {
    .nav-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.nav-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: transparent;
    border: 3px dotted var(--border-color);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    width: 100%;
    position: relative;
}

@media (max-width: 360px) {
    .nav-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }
}

.nav-card:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translate(-4px, -4px);
    box-shadow: 6px 6px 0 rgba(var(--primary-rgb), 0.2);
    border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px;
}

.nav-icon {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    background: transparent;
    border-radius: 50% 40% 60% 40% / 40% 50% 40% 60%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lexend', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: lowercase;
    border: 3px dotted rgba(var(--primary-rgb), 0.5);
    transform: rotate(-6deg);
    transition: all 0.3s ease;
}

.nav-card:hover .nav-icon {
    transform: rotate(6deg) scale(1.1);
    border-color: var(--primary-color);
}

.nav-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nav-title {
    font-family: 'Lexend', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.nav-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 404 overrides moved to global */
.page-404 .nav-grid {
    max-width: 500px;
}

.page-404 .contact-note {
    margin-top: 2rem;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.page-404 .contact-note p {
    text-align: center;
}

@media (max-width: 768px) {
    .page-404 .error-visual {
        flex-direction: column;
        gap: 1rem;
    }

    .page-404 .error-code {
        font-size: 5rem;
    }

    .page-404 .error-emoji {
        width: 4rem;
        height: 4rem;
        font-size: 1.8rem;
    }

    .page-404 .nav-grid {
        grid-template-columns: 1fr;
    }

    .page-404 .nav-card {
        padding: 1rem;
    }
}

.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem 1rem;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    position: relative;
    z-index: 10;
}

.content-wrapper {
    background: transparent;
    max-width: 100%;
}

.section-heading {
    font-family: 'Lexend', sans-serif;
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
    text-align: left;
    line-height: 1.2;
}

.section-heading::before {
    content: '✦';
    margin-right: 0.6rem;
    font-size: 1.1rem;
    vertical-align: middle;
    opacity: 0.8;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2.5rem;
    height: 2px;
    background: var(--primary-color);
    border-radius: 0px;
}

#time-greeting {
    color: var(--text-primary);
    font-weight: 400;
}

.strikethrough {
    text-decoration: line-through;
    color: #666;
    opacity: 0.7;
}

.name-accent {
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

.about-section {
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
}

.about-content p {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
    max-width: 100%;
    text-align: left;
}

.tech-stack {
    margin: 2rem 0 1rem;
}

.tech-stack h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
    text-align: left;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.tech-item {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.8rem;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: default;
}

.tech-item:hover {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.philosophy {
    margin: 3rem 0;
}

.philosophy h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.philosophy-list {
    list-style: none;
    padding: 0;
}

.philosophy-list li {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    text-align: center;
}

.philosophy-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.timezone-section {
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
}

.timezone-widget {
    text-align: left;
}

.time-display {
    margin-bottom: 1.5rem;
}

.current-time {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.timezone-name {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.timezone-toggle {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md, 10px);
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
}

.timezone-toggle:hover {
    background: var(--primary-color);
    color: #000000;
}

.timezone-details {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    max-width: 400px;
    margin: 0;
}

.timezone-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.projects-section {
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-item {
    padding: 2rem 0;
    border-bottom: 1px dotted var(--border-color);
    transition: all 0.2s ease;
    border-radius: 0px;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    position: relative;
}

.project-item:hover {
    background: transparent;
}

.project-item:last-child {
    border-bottom: none;
}

.project-item h3 {
    font-family: 'Lexend', sans-serif;
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.project-item:hover h3 {
    text-decoration: underline;
}

.project-item p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-start;
}

.tech-tag {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-tag:hover {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.status-tag {
    background: rgba(0, 255, 0, 0.08);
    color: #00ff00;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(0, 255, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.status-tag:hover {
    background: transparent;
    color: #00ff00;
}

.portal-heading {
    font-family: 'Lexend', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.contact-section {
    margin-bottom: 4rem;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    text-align: left;
    align-items: stretch;
}

.contact-intro p {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 500px;
}

.contact-socials {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.contact-note {
    padding: 1rem 1.5rem;
    background: transparent;
    border-left: 3px solid var(--primary-color);
    border-radius: 0px;
    text-align: left;
    max-width: 500px;
    margin: 0;
}

.contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 1rem;
    font-family: 'Lexend', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: transparent;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.02);
}

.submit-btn {
    width: 100%;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #111827;
    padding: 1rem 2.2rem;
    border-radius: var(--radius-lg, 14px);
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: lowercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.submit-btn::after {
    content: '→';
    transition: transform 0.25s ease;
}

.submit-btn:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -10px rgba(var(--primary-rgb), 0.4);
}

.submit-btn:hover::after {
    transform: translateX(4px);
}

.submit-btn:active {
    transform: translateY(0);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.is-visible {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0px;
    padding: 1.5rem;
    max-width: 420px;
    width: calc(100% - 2rem);
    text-align: left;
}

.modal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.modal-text {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer {
    margin-top: 2.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(var(--primary-rgb), 0.14);
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.footer-links span {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 0px;
    background: transparent;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(var(--primary-rgb), 0.2);
    margin-top: 3rem;
    color: #a0a0a0;
    font-size: 0.9rem;
}

.footer-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem 2rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .section-heading {
        font-size: 1.4rem;
    }

    .about-content p {
        font-size: 1rem;
        max-width: 100%;
    }

    .philosophy-list li {
        max-width: 100%;
    }

    .about-section,
    .timezone-section,
    .projects-section,
    .contact-section,
    .blogs-section,
    .blog-post,
    .page-404 {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .current-time {
        font-size: 1.5rem;
    }

    .tech-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .project-item {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .contact-label {
        min-width: auto;
    }

    .footer {
        margin-top: 1.5rem;
        padding: 1rem 0;
    }

    .footer-content {
        padding: 0 1rem;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .footer-links {
        justify-content: center;
        gap: 0.5rem;
    }

    .tech-list {
        gap: 0.6rem;
    }
}

/* Use focus-visible only so mouse clicks don't show outlines */
.nav-link:focus-visible,
.contact-link:focus-visible,
.timezone-toggle:focus-visible,
.submit-btn:focus-visible,
.nav-card:focus-visible {
    outline: 2px solid rgba(var(--primary-rgb), 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-link:focus:not(:focus-visible),
.contact-link:focus:not(:focus-visible),
.timezone-toggle:focus:not(:focus-visible),
.submit-btn:focus:not(:focus-visible),
.nav-card:focus:not(:focus-visible) {
    outline: none;
}

/* Extra bottom padding on mobile for the floating dock */
@media (max-width: 640px) {
    body {
        padding-bottom: 4.5rem;
    }
}

button:focus,
input:focus,
textarea:focus {
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.25);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.5);
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--primary-rgb), 0.25) var(--bg-primary);
}

@media (prefers-reduced-motion: reduce) {

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

.nav-link:hover {
    color: var(--primary-color);
}

/* Particles hidden as per previous feedback */

html.theme-transitioning::view-transition-old(root),
html.theme-transitioning::view-transition-new(root) {
    animation-duration: 300ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: normal;
}

html.theme-transitioning::view-transition-old(root) {
    animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both fade-out;
}

html.theme-transitioning::view-transition-new(root) {
    animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both fade-in;
}

/* Prevent CSS transitions from fighting the View Transition cross-fade */
html.theme-transitioning * {
    transition: none !important;
}

@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}



html {
    scroll-behavior: smooth;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.25);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.form-group.focused label {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.form-group.has-value label {
    color: var(--primary-color);
    font-weight: 500;
}

.form-group.focused input,
.form-group.focused textarea {
    border-color: var(--primary-color);
}

.animate-in {
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (max-width: 768px) {

    .tech-item:hover,
    .project-item:hover {
        transform: none;
    }

    .tech-item:active {
        transform: scale(0.95);
    }

    .project-item:active {
        transform: translateX(4px) scale(1.01);
    }

    .project-item:active {
        transform: translateX(4px) scale(1.01);
    }
}