/* --- CSS Variables --- */
:root {
    --font-primary: 'JetBrains Mono', monospace, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --background-color: #000000; /* Apple often uses dark backgrounds */
    --text-color: #ffffff;
    --text-color-secondary: #a1a1a6; /* Lighter gray for secondary text */
    --accent-color-primary: #007aff; /* Apple Blue */
    --accent-color-secondary: #34c759; /* Apple Green */
    --accent-color-tertiary: #5e5ce6; /* Apple Purple */
    --accent-color-orange: #ff9500; /* Apple Orange */
    --accent-color-red: #ff3b30; /* Apple Red */
    --container-background: rgba(28, 28, 30, 0.8); /* Dark, slightly transparent for frosted glass */
    --border-color: rgba(84, 84, 88, 0.65); /* Subtle border color */
    --border-radius-small: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 20px;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 12px 48px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #007aff, #34c759); /* Blue to Green */
    --gradient-secondary: linear-gradient(135deg, #5e5ce6, #007aff); /* Purple to Blue */
    --gradient-tertiary: linear-gradient(135deg, #ff9500, #ff3b30); /* Orange to Red */
    --gradient-dark: linear-gradient(135deg, #1c1c1e, #2c2c2e); /* Dark subtle gradient */
    --blur-effect: saturate(180%) blur(20px);
    --transition-standard: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- Global Resets & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
    letter-spacing: -0.02em; /* Slightly tighten letter spacing for JetBrains Mono */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: radial-gradient(circle at top right, rgba(94, 92, 230, 0.07) 0%, transparent 60%),
                radial-gradient(circle at bottom left, rgba(0, 122, 255, 0.07) 0%, transparent 40%);
    z-index: -1;
}

/* --- Canvas Background --- */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.75em;
    color: var(--text-color);
}

h1 { font-size: 3rem; } /* 48px */
h2 { font-size: 2rem; }   /* 32px */
h3 { font-size: 1.5rem; } /* 24px */
h4 { font-size: 1.25rem; } /* 20px */

p {
    margin-bottom: 1em;
    color: var(--text-color-secondary);
}

a, button, .button, .tech-item, .project-item, .skill-progress, .social-icon {
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

a {
    color: var(--accent-color-primary);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--accent-color-secondary);
    text-decoration: none;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* --- Utility Classes --- */
.container {
    width: 90%;
    max-width: 1200px; /* Increased max width for content */
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-color-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 122, 255, 0.1);
    padding: 0.35em 1em;
    border-radius: 50px;
}

.section-subtitle i {
    margin-right: 0.5rem;
}

.section-title {
    text-align: center;
    font-size: 2.25rem; /* 36px */
    margin-bottom: 0.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 15px;
}

.section-title::after {
    content: "";
    display: none;
}

/* Improved glassmorphism to match the reference image */
.glassmorphism {
    background: rgba(10, 20, 50, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(114, 137, 218, 0.2);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(114, 137, 218, 0.15);
    overflow: hidden;
}

/* Add shimmer effect to glass elements like architecture elements */
.glassmorphism::after,
.project-item::after,
.skills-container::after,
.about-content::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shimmer 6s linear infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

/* Base project-item styles */
.project-item {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    overflow: hidden;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(114, 137, 218, 0.3);
}

/* Fix hero section background to be the original */
#hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(52, 199, 89, 0.1));
    z-index: -1;
}

/* Project item with color variations */
.project-item:nth-child(1) {
    background: rgba(10, 20, 50, 0.15); /* Blue tint */
    border: 1px solid rgba(114, 137, 218, 0.2);
}

.project-item:nth-child(2) {
    background: rgba(20, 40, 30, 0.15); /* Green tint */
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.project-item:nth-child(3) {
    background: rgba(40, 30, 20, 0.15); /* Orange/yellow tint */
    border: 1px solid rgba(255, 149, 0, 0.2);
}

/* White dot in corner like in the image */
.project-item::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.button {
    display: inline-block;
    padding: 0.75em 1.5em;
    background-color: var(--accent-color-primary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.button i {
    margin-right: 0.5rem;
}

.button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.button:hover::before {
    opacity: 1;
}

.button:hover {
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.button-secondary {
    background-color: transparent;
    color: var(--accent-color-primary);
    border: 1px solid var(--accent-color-primary);
}

.button-secondary:hover {
    background-color: var(--accent-color-primary);
    color: #fff;
}

.button-small {
    padding: 0.5em 1em;
    font-size: 0.9rem;
}

.button-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.button-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-color);
}

/* --- Animation Classes --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotate-glow {
    0% {
        box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
        border-color: rgba(0, 122, 255, 0.3);
    }
    33% {
        box-shadow: 0 0 15px rgba(94, 92, 230, 0.2);
        border-color: rgba(94, 92, 230, 0.3);
    }
    66% {
        box-shadow: 0 0 15px rgba(52, 199, 89, 0.2);
        border-color: rgba(52, 199, 89, 0.3);
    }
    100% {
        box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
        border-color: rgba(0, 122, 255, 0.3);
    }
}

/* Animation on scroll with JavaScript IntersectionObserver */
.will-animate {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform; /* Hint browser to optimize */
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.project-item.will-animate {
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.4s ease; /* Faster animation for projects */
}

.about-content.will-animate {
    transform: scale(0.95);
}

.contact-form-container.will-animate {
    transform: translateX(-30px);
}

.contact-info.will-animate {
    transform: translateX(30px);
}

/* --- Header Styles --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

#main-header.scrolled {
    background: var(--container-background);
    backdrop-filter: var(--blur-effect);
    -webkit-backdrop-filter: var(--blur-effect);
    box-shadow: var(--shadow-soft);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.accent-dot {
    position: relative;
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--accent-color-primary);
    border-radius: 50%;
    margin-left: 2px;
    bottom: -2px;
}

.accent-dot::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-color-primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.logo::after {
    content: "";
    display: none;
}

.logo:hover::after {
    width: 0;
}

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

.nav-links ul li a {
    font-weight: 500;
    color: var(--text-color-secondary);
    position: relative;
}

.nav-links ul li a::after {
    content: "";
    display: none;
}

.nav-links ul li a:hover::after,
.nav-links ul li a.active::after {
    width: 0;
}

.nav-links ul li a:hover,
.nav-links ul li a.active {
    color: var(--accent-color-primary);
    text-decoration: none;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    position: relative;
    transition: background 0.3s ease;
    border-radius: 3px;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: "";
    width: 25px;
    height: 3px;
    background: var(--text-color);
    position: absolute;
    transition: transform 0.3s ease;
    border-radius: 3px;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* --- Hero Section --- */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: left;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.intro-badge {
    display: inline-block;
    font-size: 0.9rem;
    background: rgba(94, 92, 230, 0.15);
    color: var(--accent-color-tertiary);
    padding: 0.5em 1em;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(94, 92, 230, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 0.25em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fadeInUp 1s ease-out 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.typing-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75em;
    min-height: 2.5rem;
}

.cursor {
    display: inline-block;
    vertical-align: middle;
    width: 2px; /* Thinner cursor for monospace font */
    height: 1.1em;
    margin-left: 1px; /* Small gap after text */
    background-color: var(--accent-color-primary);
    animation: blink 1s step-end infinite;
}

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

.hero-text p.subtitle {
    font-size: 1.25rem;
    color: var(--text-color-secondary);
    margin-bottom: 2em;
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-buttons .button {
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.hero-tech-stack {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-tech-stack i {
    font-size: 2.5rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: grayscale(30%);
}

.hero-tech-stack i:hover {
    transform: translateY(-5px);
    opacity: 1;
    filter: grayscale(0%);
}

.hero-decoration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-architecture {
    position: relative;
    width: 300px;
    height: 300px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards, float 6s ease-in-out infinite;
}

.architecture-element {
    position: absolute;
    border-radius: var(--border-radius-medium);
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
    animation: float 6s ease-in-out infinite, rotate-glow 8s linear infinite;
}

.architecture-element i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    transition: all 0.5s ease;
    transform: scale(0.9);
    filter: drop-shadow(0 0 5px rgba(0, 122, 255, 0.5));
    animation: pulse 3s ease-in-out infinite;
}

.architecture-element:hover i {
    color: rgba(255, 255, 255, 0.95);
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(0, 122, 255, 0.8));
}

.architecture-element:nth-child(1) i {
    animation-delay: 0.5s;
    color: rgba(94, 92, 230, 0.8);
}

.architecture-element:nth-child(2) i {
    animation-delay: 1s;
    color: rgba(52, 199, 89, 0.8);
}

.architecture-element:nth-child(3) i {
    animation-delay: 1.5s;
    color: rgba(255, 149, 0, 0.8);
}
.architecture-element:nth-child(4) i {
    animation-delay: 2s;
    /*color: rgba(255, 149, 0, 0.8);*/
}

.architecture-element:nth-child(1) {
    width: 150px;
    height: 150px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(94, 92, 230, 0.2), rgba(0, 122, 255, 0.2));
    animation: float 5s ease-in-out infinite, rotate-glow 8s linear infinite;
}

.architecture-element:nth-child(2) {
    width: 120px;
    height: 120px;
    bottom: 30px;
    left: 20px;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.2), rgba(0, 122, 255, 0.2));
    animation: float 7s ease-in-out infinite 1s, rotate-glow 8s linear infinite 2s;
}

.architecture-element:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 40px;
    right: 20px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(255, 149, 0, 0.2));
    animation: float 6s ease-in-out infinite 0.5s, rotate-glow 8s linear infinite 4s;
}
.architecture-element:nth-child(4) {
    width: 80px;
    height: 80px;
    bottom: 180px;
    right: 180px;
    /*background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(255, 149, 0, 0.2));*/
    /*animation: float 6s ease-in-out infinite 0.5s, rotate-glow 8s linear infinite 4s;*/
}

.architecture-element::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 10px;
    left: 10px;
}

.architecture-element::after {
    content: "";
    position: absolute;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.architecture-element:nth-child(1)::after {
    width: 100px;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.architecture-element:nth-child(2)::after {
    width: 80px;
    top: -20px;
    right: -20px;
    transform: rotate(45deg);
}

/* --- Projects Section --- */
#projects {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.3);   
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    contain: layout; /* Improve performance */
}

.project-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

.project-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.project-icon i {
    color: white;
    font-size: 1.2rem;
}

.project-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop image to fit, maintaining aspect ratio */
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

.project-item:hover .project-image {
    transform: scale(1.03); /* Reduce the scale amount for better performance */
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5em;
    color: var(--text-color);
}

.project-info h3 i {
    color: var(--accent-color-primary);
    margin-right: 0.5rem;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin-bottom: 1.5em;
    min-height: 60px; /* Ensure consistent card height for text */
}

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

.tech-tags span {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 122, 255, 0.15);
    color: var(--accent-color-primary);
    padding: 0.35em 0.75em;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 122, 255, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.tech-tags span i {
    font-size: 1rem;
    margin-right: 0.4rem;
}

.tech-tags span:hover {
    background: rgba(0, 122, 255, 0.25);
    transform: translateY(-2px);
}

.project-buttons {
    display: flex;
    gap: 0.75rem;
}

.view-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

/* --- Architecture Section --- */
#architecture {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.3);
    padding: 6rem 0;
    position: relative;
}

.architecture-tabs {
    margin-top: 2rem;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-button {
    background: rgba(50, 50, 50, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-button:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--text-color);
}

.tab-button.active {
    background: var(--accent-color-primary);
    color: white;
    border-color: var(--accent-color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

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

.architecture-diagram {
    text-align: center;
}

.diagram-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-soft);
}

.architecture-description h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.architecture-description p {
    margin-bottom: 1.5rem;
}

.architecture-features {
    list-style: none;
}

.architecture-features li {
    margin-bottom: 0.75rem;
    color: var(--text-color-secondary);
    display: flex;
    align-items: flex-start;
}

.architecture-features li i {
    color: var(--accent-color-secondary);
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* --- Skills Section --- */
#skills {
    background: linear-gradient(135deg, rgba(2, 3, 10, 0.95), rgba(10, 12, 23, 0.9));
    padding: 6rem 0;
    position: relative;
}

/* Skills container with blue tint */
.skills-container {
    padding: 2.5rem;
    background: rgba(10, 20, 50, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(114, 137, 218, 0.2);
    border-radius: var(--border-radius-medium);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
    animation: rotate-glow 8s linear infinite;
    overflow: hidden;
    position: relative;
}

.skills-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.skills-column h3 {
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.skills-column h3 i {
    margin-right: 0.5rem;
}

/* New tech grid layout */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Enhanced tech items */
.tech-item {
    background: rgba(10, 12, 23, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: var(--border-radius-medium);
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.tech-item:hover {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.3);
    transform: translateY(-5px) !important;
}

.tech-item:hover .tech-icon {
    color: var(--accent-color-secondary);
    transform: scale(1.1);
}

.tech-item:hover::before {
    background: var(--gradient-secondary);
}

.tech-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transition: background 0.3s ease;
}

.tech-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color-primary);
    display: block;
    transition: color 0.3s ease, transform 0.3s ease;
}

.tech-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.tech-description {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin: 0;
}

/* Old skill-item styles - keeping for reference but will not be used */
.skill-item {
    display: none; /* Đã ẩn, không cần thiết */
}

.skill-info {
    display: none; /* Đã ẩn, không cần thiết */
}

.skill-bar {
    display: none; /* Đã ẩn, không cần thiết */
}

.skill-progress {
    display: none; /* Đã ẩn, không cần thiết */
}

.skill-percentage {
    display: none; /* Đã ẩn, không cần thiết */
}

.skills-chart-section {
    margin-top: 2rem;
    text-align: center;
}

.skills-chart-section h3 {
    margin-bottom: 2rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.hexagon-chart {
    max-width: 400px;
    margin: 0 auto;
}

.hexagon-chart canvas {
    max-width: 100%;
    height: auto;
}

.methodology-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.methodology-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
    transition: transform 0.3s ease;
}

.methodology-icon:hover {
    transform: translateY(-5px);
}

.methodology-icon i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color-primary);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.methodology-icon:hover i {
    background: var(--accent-color-primary);
    color: white;
}

.methodology-icon span {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

/* --- About Section --- */
#about {
    background: linear-gradient(135deg, rgba(10, 12, 23, 0.9), rgba(2, 3, 10, 0.95));
    padding: 6rem 0;
    position: relative;
}

/* About content with green tint */
.about-content {
    padding: 2.5rem;
    background: rgba(20, 40, 30, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: var(--border-radius-medium);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
    animation: rotate-glow 8s linear infinite;
    overflow: hidden;
    position: relative;
}

.about-text h3 {
    font-size: 1.75rem;
    color: var(--text-color);
    margin-bottom: 1em;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.about-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.about-column h4 {
    color: var(--accent-color-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.about-column h4 i {
    margin-right: 0.75rem;
}

.skills-list {
    list-style: disc;
    padding-left: 20px;
    margin: 1.5rem 0;
    columns: 2; /* For a two-column skill list on wider screens */
    gap: 10px;
}

.skills-list li {
    margin-bottom: 0.5em;
    color: var(--text-color-secondary);
}

.skills-list li::marker {
    color: var(--accent-color-primary);
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.award-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-small);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    position: relative;
}

.award-item:hover {
    transform: translateY(-2px);
    background: rgba(0, 122, 255, 0.05);
}

.award-icon {
    color: var(--accent-color-tertiary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.award-year {
    color: var(--accent-color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.award-name {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* --- Contact Section --- */
#contact {
    background: linear-gradient(135deg, rgba(2, 3, 10, 0.95), rgba(10, 12, 23, 0.9));
    padding: 6rem 0;
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form-container,
.contact-info {
    padding: 2rem;
}

.contact-form-container h3, 
.contact-info h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
}

.contact-form-container h3 i,
.contact-info h3 i {
    margin-right: 0.75rem;
    color: var(--accent-color-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color-secondary);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color-primary);
    font-size: 1rem;
}

.textarea-wrapper .input-icon {
    top: 16px;
    transform: none;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.75em 0.75em 0.75em 2.5em;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background-color: rgba(50, 50, 50, 0.5); /* Darker input fields */
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color-primary);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

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

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

.contact-info ul li i {
    color: var(--accent-color-primary);
    margin-right: 0.75rem;
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

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

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--accent-color-primary);
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
}

.availability-status {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    background: rgba(52, 199, 89, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.status-indicator.available {
    background-color: var(--accent-color-secondary);
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.2);
    animation: pulse 1.5s infinite;
}

.availability-status p {
    color: var(--accent-color-secondary);
    font-weight: 500;
    margin-bottom: 0;
}

/* --- Footer --- */
#main-footer {
    background-color: #0c0c0c; /* Dark background for footer */
    color: var(--text-color-secondary);
    padding: 3rem 0 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(84, 84, 88, 0.3);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo .logo {
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: var(--text-color-secondary);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-nav h4,
.footer-social h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul li a {
    color: var(--text-color-secondary);
    transition: color 0.3s ease;
}

.footer-nav ul li a:hover {
    color: var(--text-color);
}

.footer-social .social-links {
    margin-top: 0.5rem;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(84, 84, 88, 0.3);
    text-align: center;
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.footer-credit i {
    color: var(--accent-color-red);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

/* Tối ưu media queries bằng cách gộp các rules */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr 0.5fr;
    }
    
    .architecture-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    /* Layout changes */
    .hero-content,
    .contact-content,
    .footer-content,
    .about-columns,
    .skills-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .contact-info {
        margin-top: 0;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    /* Typography adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    .section-title { font-size: 1.8rem; }
    
    .container {
        width: 95%;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .typing-text {
        font-size: 1.5rem;
    }
    
    /* Tech grid and architecture */
    .architecture-tabs {
        overflow-x: auto;
    }
    
    .tab-navigation {
        width: max-content;
        min-width: 100%;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    /* Tech item adjustments */
    .tech-item {
        padding: 1rem;
    }
    
    .tech-name {
        font-size: 1rem;
    }
    
    .tech-description {
        font-size: 0.85rem;
    }
    
    /* Mobile navigation */
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--container-background);
        backdrop-filter: var(--blur-effect);
        -webkit-backdrop-filter: var(--blur-effect);
        padding: 1rem 0;
        display: none;
    }
    
    .nav-links.active {
        display: block;
    }
    
    .nav-links ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .methodology-icons {
        gap: 0.5rem;
    }
    
    .methodology-icon {
        width: 90px;
    }
    
    .awards-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    body {
        padding-top: 70px;
    }
    
    #hero {
        text-align: left;
        padding-top: 70px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .typing-text {
        font-size: 1.3rem;
    }
    
    .awards-grid,
    .project-buttons {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-info {
        padding: 1rem;
    }
    
    .tech-tags {
        gap: 0.35rem;
    }
    
    .tech-tags span {
        font-size: 0.75rem;
        padding: 0.2em 0.6em;
    }
    
    .methodology-icon {
        width: 70px;
    }
    
    .methodology-icon i {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }
    
    .methodology-icon span {
        font-size: 0.8rem;
    }
}

/* --- Monospace font optimizations --- */
.tech-tags span,
.typing-text,
.project-info h3,
.skill-name,
.code-snippet {
    font-feature-settings: "liga" 0; /* Disable ligatures for code/tech sections */
    letter-spacing: -0.01em; /* Subtle adjustment for tech terms */
}

.tech-tags span {
    font-size: 0.8rem; /* Slightly smaller for better fit with monospace */
}

/* Enhanced styling for code snippets */
.code-snippet {
    background: rgba(50, 50, 50, 0.5);
    padding: 1rem;
    border-radius: var(--border-radius-small);
    border-left: 3px solid var(--accent-color-primary);
    overflow-x: auto;
    font-size: 0.9rem;
}

/* Font weight adjustments for headings with monospace */
h1, h2, h3, h4 {
    letter-spacing: -0.03em; /* Tighten headings slightly more */
}

/* Global rule để đảm bảo không hiển thị underline trên toàn trang */
a, a:hover, a:focus, a:active, .button:hover, button:hover {
    text-decoration: none !important;
}

/* Footer navigation links */
.footer-nav ul li a:hover {
    color: var(--text-color);
    text-decoration: none;
}

/* Các button và nút */
.button:hover {
    transform: translateY(-2px);
    color: #fff; 
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Các item trong danh sách awards */
.award-item:hover {
    transform: translateY(-2px);
    background: rgba(0, 122, 255, 0.05);
}

/* Tech tags hover */
.tech-tags span:hover {
    background: rgba(0, 122, 255, 0.25);
    transform: translateY(-2px);
}

/* Add timeline styles for awards section */
.awards-timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 2rem;
}

.awards-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color-primary);
    opacity: 0.5;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--accent-color-primary);
    border: 2px solid var(--container-background);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.timeline-date {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 16px;
    color: var(--accent-color-primary);
}

.timeline-content {
    position: relative;
    padding: 1rem;
    background: rgba(10, 20, 50, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(114, 137, 218, 0.15);
    border-left: 2px solid var(--accent-color-primary);
    border-radius: var(--border-radius-medium);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.timeline-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.timeline-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Add hover effects for interactive feel */
.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
    background: rgba(10, 20, 50, 0.25);
    border-color: rgba(114, 137, 218, 0.3);
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.25);
}

/* Match project item hover effect to architecture element hover */
.project-item:hover img {
    filter: drop-shadow(0 0 8px rgba(0, 122, 255, 0.3));
} 