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

:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --navbar-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --footer-bg: #2c3e50;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-shadow-hover: rgba(0, 0, 0, 0.15);
}

html.dark-mode {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --navbar-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --footer-bg: #1a1a1a;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-shadow-hover: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 10px;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* Navbar Styles */
.navbar {
    background: var(--navbar-bg);
    padding: 0;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.navbar-logo {
    flex: 1;
}

.navbar-logo a {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-logo a:hover {
    opacity: 0.8;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 10px;
}

.navbar-menu li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.navbar-menu li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 18px;
    transition: all 0.3s;
    margin-left: 10px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s;
}

/* Header with Profile Photo */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 20px;
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.profile-photo {
    margin: 20px 0;
    position: relative;
    display: inline-block;
}

.profile-photo::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    z-index: -1;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-img:hover {
    transform: scale(1.05) rotateZ(2deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.header-text h1 {
    font-size: 42px;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-text .role {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.95;
    letter-spacing: 1px;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

main > h2:first-child {
    margin-top: 0;
}

/* Section Spacing */
section {
    margin-bottom: 40px;
}

/* Skills Section */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.skills li {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 16px;
    list-style: none;
    border-radius: 25px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skills li:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

/* Lists */
ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

ul li, ol li {
    margin-bottom: 8px;
    line-height: 1.8;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-primary);
    border-left: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px var(--card-shadow-hover);
    border-left-color: var(--primary-dark);
}

/* Cards Grid for multiple items */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cards-grid .card {
    margin-bottom: 0;
}

/* Alternative card style */
.card-highlighted {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary-color);
}

/* Footer Styles */
.footer {
    background: var(--footer-bg);
    color: white;
    margin-top: 60px;
    padding: 50px 20px 20px;
    transition: background 0.3s;
    border-top: 4px solid var(--primary-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
}

.footer-section:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    border-left-color: var(--primary-dark);
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section p {
    margin: 10px 0;
    opacity: 1;
    font-size: 14px;
    color: #ffffff;
    line-height: 1.8;
}

.footer-section p i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.footer-section ul {
    list-style: none;
    margin-left: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.footer-section ul li a::before {
    content: '→';
    margin-right: 8px;
    opacity: 0;
    transition: opacity 0.3s, margin 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    opacity: 1;
    padding-left: 8px;
}

.footer-section ul li a:hover::before {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.social-links a:hover {
    background: var(--primary-dark);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.85;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile Responsive */

/* Large Tablets & Desktops */
@media (max-width: 1024px) {
    .navbar-logo a {
        font-size: 20px;
    }

    .header-text h1 {
        font-size: 36px;
    }

    main {
        padding: 30px 20px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-logo a {
        font-size: 18px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .navbar-menu {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar-menu.active {
        max-height: 500px;
    }

    .navbar-menu li a {
        display: block;
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-menu li:last-child a {
        border-bottom: none;
    }

    .header {
        padding: 40px 15px;
    }

    .header-content {
        gap: 20px;
    }

    .header-text h1 {
        font-size: 28px;
    }

    .header-text .role {
        font-size: 16px;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    main {
        padding: 25px 15px;
    }

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

    h2 {
        font-size: 1.5rem;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    .navbar-container {
        height: 60px;
        padding: 0 10px;
    }

    .navbar-logo a {
        font-size: 16px;
    }

    .navbar-menu li a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-left: 5px;
    }

    .header {
        padding: 30px 10px;
    }

    .header-text h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    .header-text .role {
        font-size: 14px;
    }

    .profile-img {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    main {
        padding: 20px 12px;
    }

    h2 {
        font-size: 1.3rem;
        margin-top: 15px;
    }

    h3 {
        font-size: 1.1rem;
    }

    .card {
        padding: 18px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .skills {
        gap: 8px;
    }

    .skills li {
        padding: 8px 12px;
        font-size: 13px;
    }

    .footer-section h3 {
        font-size: 15px;
    }

    .footer-section p {
        font-size: 13px;
    }

    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .footer-bottom p {
        font-size: 12px;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .navbar-logo a {
        font-size: 14px;
    }

    .header-text h1 {
        font-size: 20px;
    }

    .profile-img {
        width: 90px;
        height: 90px;
        border-width: 3px;
    }

    .card {
        padding: 15px;
    }

    .footer-section {
        padding: 12px;
    }
}
