/* =========================
   Variables & Theme
   ========================= */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --background-color: #ffffff;
    --accent-color: #dbeafe;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.1);
    --link-color: #2563eb;
    --link-hover: #1e40af;
}

[data-theme="dark"], body.dark-mode {
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --text-color: #e5e7eb;
    --background-color: #111827;
    --accent-color: #1e3a8a;
    --nav-bg: rgba(17, 24, 39, 0.95);
    --card-bg: #1f2937;
    --card-border: rgba(255, 255, 255, 0.1);
    --link-color: #90cdf4;
    --link-hover: #fbbf24;
}

/* =========================
   Reset & Base
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s, color 0.3s;
}

/* =========================
   Navigation
   ========================= */
nav {
    position: fixed;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--link-hover);
}

/* =========================
   Hero Section
   ========================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--background-color) 100%);
    padding: 2rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-primary, .cta-secondary {
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.cta-primary {
    background-color: var(--primary-color);
    color: white;
}

.cta-secondary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.cta-primary:hover, .cta-secondary:hover {
    transform: translateY(-2px);
}

/* =========================
   Carousel
   ========================= */
/* =========================
   Full-width Hero Carousel (Rectangle)
   ========================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.carousel {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    border: none;
    border-radius: 0;           /* ← removes circle */
    box-shadow: none;
}

.carousel-image.active {
    opacity: 1;
    z-index: 1;
}

.carousel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2;
    transition: background 0.4s ease;
}

/* Light mode: lighter overlay so dark text stays readable */
[data-theme="light"] .carousel::before,
body.light-mode .carousel::before {
    background: rgba(255, 255, 255, 0.7);
}

/* Bigger, cleaner buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(37, 99, 235, 0.7);
    backdrop-filter: blur(8px);
    border: none;
    color: white;
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: rgba(37, 99, 235, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 30px; }
.carousel-btn.next { right: 30px; }

/* Center content on top of images */
.hero-content {
    position: relative;
    z-index: 4;
    padding: 2rem;
    max-width: 900px;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.tagline {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-content h1,
.hero-content .tagline {
    color: white !important;
    text-shadow: 0 4px 16px rgba(0,0,0,0.7);
}

/* Light mode override — keep text dark when background is light */
[data-theme="light"] .hero-content h1,
[data-theme="light"] .hero-content .tagline,
body.light-mode .hero-content h1,
body.light-mode .hero-content .tagline {
    color: #1e293b !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* =========================
   Sections
   ========================= */
section {
    padding: 5rem 2rem;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.about-content, .projects-grid, .skills-grid, .contact-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--card-border);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s;
}

.project-card h3 a:hover {
    color: var(--link-hover);
}

/* =========================
   Contact & Footer
   ========================= */
.contact-content {
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--link-hover);
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--accent-color);
}

/* =========================
   Theme Toggle
   ========================= */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.theme-toggle:hover {
    color: var(--primary-color);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    .nav-links {
        display: none;
    }
}

/* =========================
   Dark Mode Specific
   ========================= */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #fff;
}

body.dark-mode a,
body.dark-mode .project-card h3 a,
body.dark-mode .contact-item a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: 500;
}

body.dark-mode a:hover,
body.dark-mode .project-card h3 a:hover,
body.dark-mode .contact-item a:hover {
    color: var(--link-hover);
}


/* Modern round avatar in navbar – perfect size & responsive */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.avatar {
    width: 47px;           /* perfect size for nav */
    height: 47px;
    border-radius: 50%;     /* perfect circle */
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

/* Fallback initials if image fails to load */
.avatar-fallback {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    display: none;
}

/* Show fallback only if image fails */
.avatar:not(:valid) ~ .avatar-fallback,
.avatar[src=""] ~ .avatar-fallback,
.avatar:error ~ .avatar-fallback {
    display: flex;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .avatar, .avatar-fallback {
        width: 38px;
        height: 38px;
    }
}
/* =========================
   End of File
   ========================= */