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

:root {
    --bg-primary: #1a0f2e;
    --bg-secondary: #2a1f3d;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --accent: #ff6b9d;
    --border: #8b7fb8;
    --transition: all 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'VT323', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg-secondary);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-button {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.6rem 1rem;
    transition: var(--transition);
    font-family: 'VT323', monospace;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.lang-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.2), transparent);
    transition: left 0.5s ease;
}

.lang-button:hover::before {
    left: 100%;
}

.lang-button .fi,
.lang-option .fi {
    font-size: 1.3rem;
    line-height: 1;
}

.lang-label {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.lang-arrow {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.language-selector.active .lang-arrow {
    transform: rotate(180deg);
    color: var(--accent);
}

.lang-button:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
}

.language-selector:hover .lang-arrow {
    transform: translateY(3px);
    color: var(--accent);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-top: none;
    display: none;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.lang-dropdown.active {
    display: flex;
    animation: dropdownSlide 0.3s ease forwards;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.7rem 1rem;
    transition: var(--transition);
    font-family: 'VT323', monospace;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.lang-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.lang-option:hover::before {
    transform: scaleY(1);
}

.lang-option:hover {
    background: var(--bg-primary);
    color: var(--accent);
    padding-left: 1.5rem;
}

.lang-option:hover .fi {
    transform: scale(1.2);
}

.logo-box {
    width: 30px;
    height: 30px;
    background: var(--accent);
    border: 2px solid var(--text-primary);
    animation: logoRotate 4s linear infinite, logoPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

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

@keyframes logoPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.8);
    }
}

.site-name {
    font-size: 2rem;
    letter-spacing: 2px;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
}

.nav-icon {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.nav-icon:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* Main Container */
.main-container {
    height: calc(100vh - 70px);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* CRT Scanline Effect */
.main-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.05) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 2rem;
}

.main-title {
    font-size: 4.5rem;
    letter-spacing: 6px;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 0px rgba(255, 107, 157, 0.3);
    animation: fadeInTitle 1.5s ease-out, floatTitle 4s ease-in-out infinite;
    position: relative;
    font-weight: bold;
}

.main-title::before,
.main-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.main-title::before {
    color: rgba(255, 107, 157, 0.3);
    transform: translate(-2px, 2px);
    z-index: -1;
}

.main-title::after {
    color: rgba(139, 127, 184, 0.3);
    transform: translate(2px, -2px);
    z-index: -2;
}

@keyframes floatTitle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.title-decoration .line {
    width: 200px;
    height: 2px;
    background: var(--border);
}

.diamond {
    font-size: 1.5rem;
    color: var(--border);
}

/* Profile Section */
.profile-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    margin-top: 8rem;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.profile-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-right: 1rem;
}

.arrow-top {
    font-size: 1.8rem;
    color: var(--text-primary);
    animation: arrowSlide 1.5s ease-in-out infinite;
}

@keyframes arrowSlide {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(8px);
    }
}

.profile-avatar-container {
    border: 3px solid var(--text-primary);
    background: var(--bg-secondary);
    padding: 0.2rem;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    display: block;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 3px dashed var(--border);
    background: transparent;
    position: relative;
    min-width: 480px;
    max-width: max-content;
    min-height: 80px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.arrow-to-photo {
    position: absolute;
    top: rem;
    left: -1.6rem;
    font-size: 1.8rem;
    color: var(--text-primary);

    background: var(--bg-primary);
    padding: 0 0.3rem;
}

.arrow-to-photo2 {
    position: absolute;
    top: rem;
    right: 0.4rem;
    font-size: 1.8rem;
    color: var(--text-primary);
    animation: arrowPulse 1.5s ease-in-out infinite;
    background: var(--bg-primary);
    padding: 0 0.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.arrow-to-photo2:hover {
    transform: scale(1.2);
    color: var(--accent);
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-name {
    font-size: 1.6rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.profile-message {
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: nowrap;
}

.face-wrapper {
    position: relative;
    display: inline-block;
}

.cursor-blink {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    animation: blink 0.8s step-start infinite, arrowBounce 1.2s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.face {
    display: inline-block;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    align-self: flex-start;
    padding-top: 0.5rem;
}

.character-spells-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.spell-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spell {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.spell svg {
    width: 1em;
    height: 1em;
    font-size: 1.2rem;
}

.spell-separator {
    display: none;
}

.spell-container p {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* File Tab */
.file-tab {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-bottom: none;
    font-size: 1.3rem;
    margin-bottom: 0;
}

.file-name {
    color: var(--text-primary);
}

.file-info,
.file-status {
    color: var(--text-secondary);
}

/* Navigation Grid */
.nav-grid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem 1rem;
    border: 2px solid var(--border);
    border-top: none;
    background: rgba(42, 31, 61, 0.5);
}

.nav-card {
    padding: 2rem 1.5rem;
    background: transparent;
    border: 3px solid var(--text-primary);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    position: relative;
    overflow: hidden;
    animation: slideInCard 0.6s ease-out backwards;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-card:hover::before {
    left: 100%;
}

.nav-card:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.4);
}

.nav-card:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-card:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-card:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-card:nth-child(4) {
    animation-delay: 0.4s;
}

.nav-card:nth-child(5) {
    animation-delay: 0.5s;
}

.nav-card:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-card-icon {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-icon {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-10deg);
    }
    75% {
        transform: translateY(-5px) rotate(10deg);
    }
}

.nav-card-text {
    flex: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-window {
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 3px solid var(--border);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.4s ease-out, modalGlow 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 107, 157, 0.5);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg-primary);
}

.modal-title {
    font-size: 2rem;
    letter-spacing: 2px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    font-family: 'VT323', monospace;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.modal-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Content Sections */
.hidden-templates {
    display: none;
}

.section-heading {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-align: center;
    letter-spacing: 3px;
}

.content-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.content-text p {
    margin-bottom: 1rem;
}

/* About Me Layout */
.about-container {
    display: flex;
    gap: 2.5rem;
    border: 3px solid var(--border);
    background: var(--bg-primary);
    padding: 1.5rem;
}

.about-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 0 0 220px;
}

.character-sprite {
    border: 3px solid var(--border);
    padding: 1rem;
    background: var(--bg-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-sprite img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 2px solid var(--text-primary);
}

.character-stats {
    border: 3px solid var(--border);
    padding: 1rem;
    background: var(--bg-secondary);
}

.stat-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.stat-line:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--text-primary);
}

.stat-dots {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

.stat-value {
    color: var(--text-secondary);
    margin-left: auto;
}

.about-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.presentation-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.presentation-text {
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.presentation-text p {
    margin-bottom: 1.2rem;
}

.presentation-text p:last-child {
    margin-bottom: 0;
}

/* Tools Section */
.tools-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tools-category {
    border: 2px solid var(--border);
    padding: 1rem;
}

.tools-label {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.tools-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tool-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.tool-icon i {
    font-size: 2.5rem;
}

.tool-icon:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

/* Skills Tabs */
.skills-tabs-container {
    border: 3px solid var(--border);
    background: var(--bg-primary);
    margin-top: 1rem;
}

.skills-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: var(--bg-secondary);
}

.skills-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-right: 2px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 1.6rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.skills-tab:last-child {
    border-right: none;
}

.skills-tab:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.skills-tab.active {
    background: var(--bg-primary);
    color: var(--accent);
    border-bottom: 3px solid var(--accent);
}

.skills-tab-content-area {
    padding: 1.5rem;
}

.skills-tab-content {
    display: none;
}

.skills-tab-content.active {
    display: block;
}

/* Skills Categories */
.skills-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skills-category {
    background: var(--bg-primary);
    border: 3px solid var(--border);
    padding: 1.5rem;
    transition: var(--transition);
}

.skills-category:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(139, 127, 184, 0.3);
}

.category-title {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    letter-spacing: 2px;
}

.category-title i {
    font-size: 1.6rem;
}

/* Skills List */
.skills-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    transition: var(--transition);
    aspect-ratio: 1;
}

.skill-item:hover {
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.skill-item i {
    font-size: 3rem;
    animation: skillIconFloat 3s ease-in-out infinite;
}

.skill-item:nth-child(1) i { animation-delay: 0s; }
.skill-item:nth-child(2) i { animation-delay: 0.2s; }
.skill-item:nth-child(3) i { animation-delay: 0.4s; }
.skill-item:nth-child(4) i { animation-delay: 0.6s; }
.skill-item:nth-child(5) i { animation-delay: 0.8s; }
.skill-item:nth-child(6) i { animation-delay: 1s; }

@keyframes skillIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.skill-name {
    font-size: 1.5rem;
}

.skill-bar {
    height: 20px;
    background: rgba(139, 127, 184, 0.3);
    border: 2px solid var(--border);
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 1s ease-out;
}

.skill-percent {
    font-size: 1.3rem;
    text-align: right;
    color: var(--text-secondary);
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-item {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 0;
    background: var(--bg-primary);
    border: 3px solid var(--border);
    transition: var(--transition);
    animation: projectFadeIn 0.6s ease-out backwards;
    overflow: hidden;
    height: 350px;
}

.project-item:nth-child(1) {
    animation-delay: 0.1s;
}

.project-item:nth-child(2) {
    animation-delay: 0.2s;
}

.project-item:nth-child(3) {
    animation-delay: 0.3s;
}

.project-item:nth-child(4) {
    animation-delay: 0.4s;
}

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

.project-item:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(139, 127, 184, 0.4);
}

.project-preview {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-secondary);
    border-right: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-iframe {
    width: 1920px;
    height: 1080px;
    border: none;
    transform: scale(0.25);
    pointer-events: none;
    position: absolute;
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-header i {
    font-size: 2rem;
    color: var(--accent);
    animation: projectIconPulse 2s ease-in-out infinite;
}

@keyframes projectIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.project-header h3 {
    font-size: 2rem;
    letter-spacing: 2px;
}

.project-desc {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: transparent;
    border: 2px solid var(--border);
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.project-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
    width: fit-content;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.project-link:hover::after {
    width: 100%;
}

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

/* Contact Grid */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.6rem;
    transition: var(--transition);
}

.contact-item i {
    font-size: 2rem;
    color: var(--accent);
}

.contact-item:hover {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.contact-arrow {
    margin-left: auto;
    font-size: 2rem;
}

/* Scrollbar */
.main-container::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.main-container::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.main-container::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border: 2px solid var(--bg-primary);
}

.main-container::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
        letter-spacing: 6px;
    }

    .title-decoration .line {
        width: 100px;
    }

    .profile-section {
        flex-wrap: wrap;
        margin-top: 5rem;
        gap: 1.5rem;
    }

    .profile-avatar-wrapper {
        margin-right: 0.5rem;
    }

    .arrow-top {
        font-size: 1.5rem;
    }

    .arrow-to-photo {
        font-size: 1.5rem;
        top: -1rem;
    }

    .arrow-to-photo2 {
        font-size: 1.5rem;
        top: -1rem;
    }

    .profile-avatar-container {
        border: 2px solid var(--text-primary);
    }

    .profile-avatar {
        width: 85px;
        height: 85px;
    }

    .profile-card {
        width: 380px;
        min-height: 70px;
        padding: 0.8rem 1.2rem;
    }

    .profile-name {
        font-size: 1.4rem;
    }

    .profile-message {
        font-size: 1.2rem;
    }

    .line-numbers {
        flex-direction: row;
        gap: 1rem;
        padding-top: 0;
    }

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

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

    .skills-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .skill-item {
        padding: 1.2rem;
    }

    .skill-item i {
        font-size: 2.5rem;
    }

    .category-title {
        font-size: 1.6rem;
    }

    .nav-card {
        font-size: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .nav-card-icon {
        font-size: 2rem;
    }

    .about-container {
        flex-direction: column;
    }

    .about-left {
        flex-direction: row;
        gap: 1rem;
        width: 100%;
        min-width: auto;
    }

    .character-sprite {
        flex: 0 0 auto;
    }

    .character-stats {
        flex: 1;
    }

    .tool-icon {
        width: 45px;
        height: 45px;
    }

    .tool-icon i {
        font-size: 2rem;
    }

    .project-item {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 400px;
    }

    .project-preview {
        height: 250px;
        border-right: none;
        border-bottom: 2px solid var(--border);
    }

    .project-iframe {
        transform: scale(0.2);
    }

    .project-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }

    .site-name {
        font-size: 1.5rem;
    }

    .main-container {
        padding: 1rem;
    }

    .main-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .profile-section {
        margin-top: 3rem;
        flex-direction: column;
        gap: 1rem;
    }

    .profile-avatar-wrapper {
        margin-right: 0;
    }

    .arrow-top {
        font-size: 1.3rem;
    }

    .arrow-to-photo {
        font-size: 1.3rem;
        top: -0.9rem;
    }

    .arrow-to-photo2 {
        font-size: 1.3rem;
        top: -0.9rem;
    }

    .profile-avatar-container {
        border: 2px solid var(--text-primary);
    }

    .profile-avatar {
        width: 75px;
        height: 75px;
    }

    .profile-card {
        width: 90%;
        max-width: 320px;
        min-height: 65px;
        padding: 0.8rem 1rem;
    }

    .profile-name {
        font-size: 1.3rem;
    }

    .profile-message {
        font-size: 1.1rem;
    }

    .line-numbers {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        padding-top: 0;
        font-size: 1rem;
    }

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

    .skills-categories {
        gap: 1rem;
    }

    .skills-category {
        padding: 1rem;
    }

    .skills-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .skill-item {
        padding: 0.8rem;
    }

    .skill-item i {
        font-size: 2rem;
    }

    .category-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }

    .category-title i {
        font-size: 1.3rem;
    }

    .about-left {
        flex-direction: column;
    }

    .character-sprite img {
        width: 100px;
        height: 100px;
    }

    .stat-line {
        font-size: 1.2rem;
    }

    .presentation-text {
        font-size: 1.2rem;
    }

    .tool-icon {
        width: 40px;
        height: 40px;
    }

    .tool-icon i {
        font-size: 1.8rem;
    }

    .tools-label {
        font-size: 1.1rem;
    }

    .skills-tab {
        font-size: 1.3rem;
        padding: 0.8rem 1rem;
    }

    .modal-window {
        width: 98%;
        max-width: none;
        max-height: 95vh;
    }

    .project-item {
        min-height: 350px;
    }

    .project-preview {
        height: 180px;
    }

    .project-iframe {
        transform: scale(0.15);
    }

    .project-content {
        padding: 1rem;
    }

    .project-header h3 {
        font-size: 1.6rem;
    }

    .project-desc {
        font-size: 1.2rem;
    }

    .project-link {
        font-size: 1.3rem;
    }
}
