/* ===== CSS Variables ===== */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6c757d;
    --accent-primary: #0066cc;
    --accent-secondary: #00b4d8;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --code-bg: #f8f9fa;
    --navbar-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1f2937;
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --accent-primary: #58a6ff;
    --accent-secondary: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --border-color: #30363d;
    --card-bg: #161b22;
    --code-bg: #0d1117;
    --navbar-bg: rgba(13, 17, 23, 0.95);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Snowfall Effect ===== */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    transition: opacity 0.5s ease;
}

.snowflakes.hidden {
    opacity: 0;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.6rem;
    opacity: 0.9;
    animation: fall linear infinite;
    user-select: none;
}

[data-theme="dark"] .snowflake {
    color: #d4f1ff;
}

.snowflake:nth-child(1) {
    left: 10%;
    animation-duration: 10s;
    animation-delay: 0s;
    font-size: 0.5rem;
}

.snowflake:nth-child(2) {
    left: 20%;
    animation-duration: 12s;
    animation-delay: 2s;
    font-size: 0.7rem;
}

.snowflake:nth-child(3) {
    left: 30%;
    animation-duration: 8s;
    animation-delay: 4s;
    font-size: 0.4rem;
}

.snowflake:nth-child(4) {
    left: 40%;
    animation-duration: 14s;
    animation-delay: 1s;
    font-size: 0.6rem;
}

.snowflake:nth-child(5) {
    left: 50%;
    animation-duration: 11s;
    animation-delay: 3s;
    font-size: 0.5rem;
}

.snowflake:nth-child(6) {
    left: 60%;
    animation-duration: 9s;
    animation-delay: 5s;
    font-size: 0.7rem;
}

.snowflake:nth-child(7) {
    left: 70%;
    animation-duration: 13s;
    animation-delay: 0s;
    font-size: 0.4rem;
}

.snowflake:nth-child(8) {
    left: 80%;
    animation-duration: 10s;
    animation-delay: 2.5s;
    font-size: 0.6rem;
}

.snowflake:nth-child(9) {
    left: 90%;
    animation-duration: 15s;
    animation-delay: 1.5s;
    font-size: 0.7rem;
}

.snowflake:nth-child(10) {
    left: 15%;
    animation-duration: 12s;
    animation-delay: 4.5s;
    font-size: 0.5rem;
}

.snowflake:nth-child(11) {
    left: 35%;
    animation-duration: 11s;
    animation-delay: 3.5s;
    font-size: 0.6rem;
}

.snowflake:nth-child(12) {
    left: 55%;
    animation-duration: 9s;
    animation-delay: 2s;
    font-size: 0.5rem;
}

.snowflake:nth-child(13) {
    left: 5%;
    animation-duration: 11s;
    animation-delay: 6s;
    font-size: 0.6rem;
}

.snowflake:nth-child(14) {
    left: 25%;
    animation-duration: 13s;
    animation-delay: 3s;
    font-size: 0.4rem;
}

.snowflake:nth-child(15) {
    left: 45%;
    animation-duration: 10s;
    animation-delay: 7s;
    font-size: 0.7rem;
}

.snowflake:nth-child(16) {
    left: 65%;
    animation-duration: 12s;
    animation-delay: 1s;
    font-size: 0.5rem;
}

.snowflake:nth-child(17) {
    left: 75%;
    animation-duration: 14s;
    animation-delay: 4s;
    font-size: 0.6rem;
}

.snowflake:nth-child(18) {
    left: 85%;
    animation-duration: 9s;
    animation-delay: 6.5s;
    font-size: 0.4rem;
}

.snowflake:nth-child(19) {
    left: 95%;
    animation-duration: 11s;
    animation-delay: 2.5s;
    font-size: 0.7rem;
}

.snowflake:nth-child(20) {
    left: 50%;
    animation-duration: 13s;
    animation-delay: 5.5s;
    font-size: 0.5rem;
}

@keyframes fall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }
    100% {
        top: 110%;
        transform: translateX(100px) rotate(360deg);
    }
}

/* ===== Snowflake Toggle Button ===== */
.snowflake-toggle {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snowflake-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.snowflake-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snowflake-on-icon {
    display: block;
}

.snowflake-off-icon {
    display: none;
}

.snowflake-toggle.snow-off .snowflake-on-icon {
    display: none;
}

.snowflake-toggle.snow-off .snowflake-off-icon {
    display: block;
}

.snowflake-toggle.snow-off {
    opacity: 0.6;
}

.snowflake-toggle.snow-off:hover {
    opacity: 1;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    position: fixed;
    top: 150px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* ===== Navigation Bar ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 999;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 2rem;
    animation: float 5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Snowflake Toggle Button ===== */
.snowflake-toggle {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snowflake-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.snowflake-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snowflake-on-icon {
    display: block;
}

.snowflake-off-icon {
    display: none;
}

.snowflake-toggle.snow-off .snowflake-on-icon {
    display: none;
}

.snowflake-toggle.snow-off .snowflake-off-icon {
    display: block;
}

.snowflake-toggle.snow-off {
    opacity: 0.6;
}

.snowflake-toggle.snow-off:hover {
    opacity: 1;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    padding: 80px 20px 20px 20px;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: auto;
}

#particles-js canvas {
    display: block;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.05;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 1s ease-out;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 0.2rem;
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.1em;
    animation: typing 1.5s steps(18, end) forwards;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.typing-subtitle {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    animation: typing2 1s steps(22, end) 1.7s forwards,
               fadeInText 0.3s 1.7s forwards;
    color: #ff6b00;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.6),
                 0 0 40px rgba(255, 107, 0, 0.4),
                 0 0 60px rgba(255, 107, 0, 0.2);
}

[data-theme="dark"] .typing-subtitle {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                 0 0 40px rgba(255, 215, 0, 0.5),
                 0 0 60px rgba(255, 215, 0, 0.3);
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

@keyframes typing {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

@keyframes typing2 {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

@keyframes blink-caret {
    0%, 100% {
        border-color: transparent;
    }
    50% {
        border-color: #00d4ff;
    }
}

@keyframes textGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6))
                drop-shadow(0 0 40px rgba(0, 212, 255, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 35px rgba(0, 212, 255, 0.9))
                drop-shadow(0 0 60px rgba(0, 212, 255, 0.5));
    }
}

@keyframes subtitleGlow {
    0% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.4),
                     0 0 30px rgba(0, 212, 255, 0.2);
    }
    100% {
        text-shadow: 0 0 25px rgba(255, 255, 255, 0.7),
                     0 0 50px rgba(0, 212, 255, 0.4);
    }
}

@keyframes fadeInText {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 150px;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ===== Section Styles ===== */
section {
    padding: 6rem 0;
    position: relative;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.team,
.achievements {
    z-index: 10;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.skills-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.skills-list li {
    padding: 0.8rem 1.2rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
    border-image: var(--accent-gradient) 1;
    transition: all 0.3s ease;
}

.skills-list li:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.code-window {
    background: var(--code-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.code-window:hover {
    transform: scale(1.02);
}

.window-header {
    background: var(--bg-tertiary);
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.keyword { color: #ff79c6; }
.class-name { color: #50fa7b; }
.function { color: #8be9fd; }
.string { color: #f1fa8c; }

/* ===== Team Section ===== */
.team {
    padding: 6rem 0;
}

/* Leader Row - Centered */
.leader-row {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

/* Members Row - 3 cards side by side */
.members-row {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.team-card {
    perspective: 1000px;
    width: 320px;
    max-width: 100%;
    height: 510px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 auto;
    position: relative;
}

.team-card[data-aos] {
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card[data-aos].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

/* Force leader card to be visible immediately */
.leader-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Flip when hovering the image, keep flipped while on card */
.team-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-sizing: border-box;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: var(--accent-gradient);
    opacity: 0.1;
    z-index: 0;
}

.card-front {
    justify-content: space-between;
}

.card-back {
    background: var(--accent-gradient);
    color: white;
    transform: rotateY(180deg);
    padding: 2rem 1.5rem;
    justify-content: flex-start;
}

.member-image-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    z-index: 1;
}

.member-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.team-card:hover .member-image {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fallback-avatar {
    position: absolute;
    top: 0;
    left: 0;
}

.team-card:hover .member-avatar {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.leader-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.member-name {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: bold;
    z-index: 1;
}

.member-role {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    z-index: 1;
}

.member-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    z-index: 1;
}

.specialty-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.specialty-tag:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: auto;
    padding-top: 1rem;
    z-index: 10;
    position: relative;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-back h4 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    text-align: center;
}

.member-bio {
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    opacity: 0.95;
    flex-shrink: 0;
}

.expertise-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
    overflow-y: auto;
    max-height: 220px;
    padding-right: 5px;
}

.expertise-list::-webkit-scrollbar {
    width: 4px;
}

.expertise-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.expertise-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.expertise-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.expertise-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    font-size: 0.82rem;
    text-align: left;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.expertise-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

/* ===== Creation History Section ===== */
.history {
    background: var(--bg-primary);
}

.history-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.history-text h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
}

.history-text h3:first-child {
    margin-top: 0;
}

.history-text h3::before {
    content: '▶';
    position: absolute;
    left: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.history-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.history-list {
    list-style: none;
    margin: 1rem 0 1.5rem 0;
}

.history-list li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid;
    border-image: var(--accent-gradient) 1;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.history-list li:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.history-list strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.history-visual {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
}

.history-stats-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

.history-stats-box h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.history-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.history-stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.history-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.history-stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
}

.history-quote {
    background: var(--accent-gradient);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.history-quote blockquote {
    margin: 0;
    color: white;
}

.history-quote p {
    font-size: 1.1rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 1rem;
}

.history-quote cite {
    display: block;
    text-align: right;
    font-size: 0.95rem;
    font-style: normal;
    opacity: 0.9;
    font-weight: 600;
}

/* ===== Achievements Section ===== */
.achievements {
    background: var(--bg-secondary);
}

.formation-section-top {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.formation-section-top .timeline {
    padding-left: 50px;
}

.formation-section-top .timeline::before {
    left: -40px;
    width: 2px;
}

.formation-section-top .timeline-marker {
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg-secondary);
    left: -45px;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.formation-section-top .timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 3px var(--bg-secondary), 0 0 6px var(--accent-primary);
}

.achievements-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.achievement-column {
    position: relative;
}

.column-title {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
}

.achievement-column .timeline {
    padding-left: 50px;
}

.achievement-column .timeline::before {
    left: -40px;
    width: 2px;
}

.achievement-column .timeline-marker {
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg-secondary);
    left: -45px;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.achievement-column .timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 3px var(--bg-secondary), 0 0 6px var(--accent-primary);
}

.event-group {
    margin: 0.8rem 0;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-color);
}

.event-round {
    margin-bottom: 0.8rem;
}

.event-round:last-child {
    margin-bottom: 0;
}

.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-gradient);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border: 2px solid var(--bg-secondary);
    border-radius: 50%;
    position: absolute;
    left: -31px;
    top: 5px;
    box-shadow: 0 0 0 3px var(--bg-secondary);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.4);
    box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 8px var(--accent-primary);
}

.timeline-content {
    padding: 0;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
}

.timeline-content h3,
.timeline-content h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.timeline-date {
    color: var(--accent-primary);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

/* ===== Contact Section ===== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.contact-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon svg {
    transform: scale(1.1);
}

.contact-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer-tagline {
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .members-row {
        gap: 2rem;
    }

    .team-card {
        width: 90%;
        max-width: 320px;
        height: auto;
        min-height: 500px;
    }

    #inferiorak{
        min-height: 560px;
    }

    .achievements-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: var(--navbar-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        border-left: 2px solid var(--border-color);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        display: block;
        font-size: 1.1rem;
    }

    .nav-link::after {
        display: none;
    }

    .theme-toggle {
        top: 120px;
        left: 20px;
        width: 40px;
        height: 40px;
    }

    .theme-toggle:hover {
        transform: scale(1.1) rotate(15deg);
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

    .snowflake-toggle {
        top: 60px;
        left: 20px;
        width: 40px;
        height: 40px;
    }

    .snowflake-toggle:hover {
        transform: scale(1.1) rotate(15deg);
    }

    .snowflake-toggle svg {
        width: 20px;
        height: 20px;
    }

    .hero-content {
        padding-top: 60px;
    }

    .navbar .container {
        padding: 0.8rem 15px;
    }

    .nav-brand {
        font-size: 0.9rem;
    }

    .brand-name {
        font-size: 0.9rem;
    }

    .logo-icon {
        font-size: 1rem;
    }

    .logo-icon img {
        width: 28px;
        height: 28px;
    }

    .nav-menu {
        gap: 0.8rem;
        font-size: 0.85rem;
    }

    .hero {
        padding-top: 60px;
        min-height: 90vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    .hero-stats {
        gap: 1rem;
        padding: 0 1rem;
    }

    .animated-team-name {
        font-size: 2.5rem;
    }

    .animated-tagline {
        font-size: 1.2rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }

    .history-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .history-visual {
        position: static;
    }

    .achievements-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Keep team cards in row on tablet */
    .members-row {
        gap: 2rem;
        justify-content: center;
    }
    
    .team-card {
        width: 280px;
    }
}

/* Medium tablets and small laptops (600px - 900px) */
@media (max-width: 900px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .achievements-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small tablets (600px - 768px) */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .typing-text {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }

    .achievements-columns {
        grid-template-columns: 1fr;
    }
    
    .members-row {
        gap: 1.5rem;
    }
    
    .team-card {
        width: 260px;
    }
}

/* Large phones (375px - 480px) */
@media (max-width: 480px) {
    .nav-brand {
        font-size: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .hero-content {
        padding-top: 50px;
    }

    .hero-title {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        min-width: 200px;
        width: 100%;
        max-width: 280px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .achievements-columns {
        grid-template-columns: 1fr;
    }

    .team {
        padding: 3rem 0.5rem;
    }

    .container {
        padding: 0 0.5rem;
    }

    .leader-row,
    .members-row {
        padding: 0;
        gap: 1.5rem;
    }

    .team-card {
        width: 100%;
        max-width: 300px;
        height: 470px;
    }

    .card-front,
    .card-back {
        padding: 1.5rem 1rem;
    }

    .card-inner {
        width: 100%;
        height: 100%;
    }

    .member-image-container {
        width: 90px;
        height: 90px;
        margin-bottom: 1rem;
    }

    .member-avatar {
        width: 90px;
        height: 90px;
        font-size: 2.5rem;
    }

    .member-name {
        font-size: 1.2rem;
    }

    .member-role {
        font-size: 0.82rem;
    }

    .specialty-tag {
        font-size: 0.68rem;
        padding: 0.3rem 0.6rem;
    }

    .card-back h4 {
        font-size: 1.2rem;
    }

    .member-bio {
        font-size: 0.85rem;
    }

    .expertise-item {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }

    /* Stack team members vertically only on small mobile */
    .members-row {
        flex-direction: column;
        align-items: center;
    }

    .team-card {
        width: 100%;
        max-width: 320px;
    }

    .code-window {
        font-size: 0.85rem;
    }

    .window-content {
        padding: 1rem;
    }
}

/* Extra small phones (max-width: 375px) */
@media (max-width: 375px) {
    .nav-brand {
        font-size: 0.75rem;
    }

    .brand-name {
        font-size: 0.75rem;
    }

    .logo-icon img {
        width: 24px;
        height: 24px;
    }

    .hamburger span {
        width: 20px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .typing-text {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-tagline {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .member-name {
        font-size: 1rem;
    }

    .member-role {
        font-size: 0.8rem;
    }

    .contact-item {
        padding: 1rem;
    }

    .contact-item h4 {
        font-size: 0.9rem;
    }

    .contact-item p {
        font-size: 0.75rem;
    }
}

/* Large screens (min-width: 1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 5rem;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .about-content,
    .history-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .achievements-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* Ultra-wide screens (min-width: 1920px) */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }

    .hero-title {
        font-size: 6rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .section-title {
        font-size: 4rem;
    }

    section {
        padding: 8rem 0;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }

    .team-card {
        min-height: 470px;
    }

    .card-back {
        padding: 1.2rem 1rem;
    }

    .expertise-list {
        max-height: 150px;
    }

    .achievements-columns {
        grid-template-columns: 1fr;
    }
}

/* ===== Smooth Animations ===== */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll animations */
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}
