/* ========================================
   PORTFOLIO WEBSITE - MODERN DESIGN
   Contemporary & Vibrant Aesthetic
   ======================================== */

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

:root {
    /* Light Mode (Default) */
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-1: #e94560;
    --accent-2: #00d4ff;
    --accent-3: #ffd60a;
    --text-dark: #1a1a2e;
    --text-light: #666666;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-soft: #e0e6ed;
    --success: #06d6a0;
    --spacing-unit: 1rem;
}

[data-theme="dark"] {
    /* Dark Mode */
    --primary-color: #0f0f1e;
    --secondary-color: #1a1a2e;
    --accent-1: #e94560;
    --accent-2: #00d4ff;
    --accent-3: #ffd60a;
    --text-dark: #e8e8e8;
    --text-light: #a0a0a0;
    --bg-light: #0f0f1e;
    --bg-white: #1a1a2e;
    --border-soft: #2a2a3e;
    --success: #06d6a0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-weight: 400;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
    background-color: var(--bg-white);
    color: var(--text-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid var(--accent-2);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-1);
    letter-spacing: -1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-1);
    transition: width 0.3s ease;
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.4rem;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: block;
}

.nav-menu ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-1);
    transition: width 0.3s ease;
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.15);
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 var(--spacing-unit);
}

.container {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border-top: 4px solid var(--accent-2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================
   HERO SECTION (HOME PAGE)
   ======================================== */

.hero {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 6rem 3rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    color: var(--bg-white);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
}

/* Dark mode hero text - ensure readability */
[data-theme="dark"] .hero h1 {
    color: #ffffff;
}

[data-theme="dark"] .hero p {
    color: rgba(255, 255, 255, 0.95);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background-color: var(--accent-1);
    color: var(--bg-white);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-1);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

/* ========================================
   PROFILE SECTION
   ======================================== */

.profile-section {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 6rem;
    align-items: start;
    margin-bottom: 3rem;
}

.profile-section > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-photo {
    max-width: 250px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(233, 69, 96, 0.2);
    border: 4px solid var(--accent-2);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.profile-info h2 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 0;
}

.profile-title {
    color: var(--accent-1);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.contact-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-soft);
}

.contact-info p {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

.contact-info a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* General paragraph links */
p a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

p a:hover {
    color: var(--accent-1);
    text-decoration: underline;
}

/* Light mode paragraph links */
[data-theme="light"] p a {
    color: var(--accent-1);
}

[data-theme="light"] p a:hover {
    color: var(--accent-2);
}

/* Project Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */

h1 {
    color: var(--text-dark);
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    border-bottom: none;
    padding-bottom: 0;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-1);
    border-radius: 2px;
}

h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.skill-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-1);
    transition: all 0.3s ease;
    border-top: 1px solid var(--border-soft);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.15);
}

.skill-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.skill-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ========================================
   PROJECT CARDS
   ======================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

.project-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-2);
}

.project-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    margin-top: 0;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.project-type {
    display: inline-block;
    background: var(--accent-1);
    color: var(--bg-white);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    flex: 1;
}

.project-tech {
    color: var(--accent-1);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-links a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.project-links a:hover {
    text-decoration: underline;
}

.card-link-text {
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ========================================
   INTERNSHIP SECTION
   ======================================== */

.internship-header {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-2);
    border-top: 1px solid var(--border-soft);
}

.internship-header h2 {
    margin-top: 0;
}

.internship-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.detail-item {
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    border-left: 3px solid var(--accent-1);
    transition: all 0.3s ease;
}

.detail-item:hover {
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.1);
}

.detail-label {
    color: var(--accent-1);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ========================================
   LISTS & MEDIA
   ======================================== */

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--primary-color);
    color: var(--bg-white);
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 3px solid var(--accent-2);
}

footer p {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

footer a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .profile-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-photo {
        max-width: 180px;
        margin: 0 auto;
    }

    h1 {
        font-size: 2rem;
    }

    h1::after {
        width: 40px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero {
        padding: 3rem 2rem;
    }

    .projects-grid,
    .skills-container {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    main {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    /* Show hamburger menu on mobile */
    .hamburger {
        display: flex;
    }

    /* Mobile header layout */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 0.5rem var(--spacing-unit);
    }

    .logo {
        font-size: 1.4rem;
    }

    /* Mobile navigation menu */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        border-top: 2px solid var(--accent-2);
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-soft);
    }

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

    .nav-menu a {
        display: block;
        font-size: 1rem;
        padding: 0.5rem;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu a:hover {
        color: var(--accent-1);
    }

    .nav-menu li button {
        width: 100%;
        padding: 0.75rem;
        font-size: 1.2rem;
        text-align: center;
    }

    nav ul {
        gap: 0.8rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .internship-details {
        grid-template-columns: 1fr;
    }

    .profile-section {
        gap: 1.5rem;
    }

    .container {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }

    /* Mobile-specific improvements */
    .header-container {
        padding: 1rem 0.75rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    nav ul {
        gap: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav li {
        min-width: 70px;
    }

    .theme-toggle {
        font-size: 1.2rem;
        padding: 0.3rem 0.4rem;
    }

    .hero {
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .skill-card {
        padding: 1.5rem 1rem;
    }

    .skill-card h4 {
        font-size: 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    .profile-section > div:first-child {
        gap: 1rem;
    }

    .profile-photo {
        max-width: 150px;
    }

    .contact-info {
        text-align: left;
    }

    .contact-info p {
        font-size: 0.9rem;
    }

    .project-links {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .project-links a {
        flex: 1;
        min-width: 120px;
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .projects-grid {
        gap: 1rem;
    }

    .project-card {
        border-radius: 8px;
    }

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

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-type {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }

    h4 {
        font-size: 0.95rem;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Additional mobile improvements */
    
    /* Better spacing for headers */
    h1, h2, h3, h4, h5, h6 {
        word-break: break-word;
    }

    /* Improved internship details on mobile */
    .internship-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    /* Better image sizes on mobile */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Improved profile section on mobile */
    .profile-section > div {
        padding: 0;
    }

    .profile-info h2 {
        font-size: 1.5rem;
    }

    /* Better skill cards on mobile */
    .skills-container {
        gap: 1rem;
    }

    /* Improved table/list display on mobile */
    table {
        font-size: 0.85rem;
    }

    td, th {
        padding: 0.5rem;
    }

    /* Better spacing for lists on mobile */
    ul, ol {
        padding-left: 1rem;
        margin: 0.5rem 0;
    }

    li {
        margin-bottom: 0.3rem;
    }

    /* Improved form elements on mobile */
    input, textarea, select {
        font-size: 16px;
        padding: 0.75rem;
        width: 100%;
        border-radius: 6px;
    }

    /* Better link touch targets on mobile */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Improved blockquote styling on mobile */
    blockquote {
        padding: 0.75rem;
        border-left: 3px solid var(--accent-2);
        margin: 1rem 0;
        font-size: 0.9rem;
    }

    /* Better code block display on mobile */
    code {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
        word-break: break-word;
    }

    /* Improved button groups on mobile */
    .button-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .button-group button,
    .button-group a.btn {
        width: 100%;
    }

    /* Prevent text overflow on mobile */
    .project-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Improved margins and padding consistency */
    section {
        margin-bottom: 1.5rem;
    }

    /* Better visibility of interactive elements */
    a:active {
        opacity: 0.8;
    }

    button:active {
        opacity: 0.8;
    }

    /* Improved focus states for accessibility on mobile */
    a:focus,
    button:focus {
        outline: 2px solid var(--accent-2);
        outline-offset: 2px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

.text-muted {
    color: var(--text-light);
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.py-2 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-1);
}
