/* Custom Properties (Design System) */
:root {
    --navy: #1E2D40;
    --yellow: #F5C518;
    
    /* Light Theme Defaults */
    --bg-color: #FFFFFF;
    --bg-light: #F5F6F8;
    --card-bg: #FFFFFF;
    --text-dark: #212529;
    --text-muted: #6C757D;
    --text-light: #FFFFFF;
    --border-color: #eaeaea;
    --input-border: #ddd;
    
    --font-main: 'Poppins', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

[data-theme="dark"] {
    --navy: #0B1120;
    --yellow: #F5C518;
    
    --bg-color: #0F172A;
    --bg-light: #1E293B;
    --card-bg: #1E293B;
    --text-dark: #F8FAFC;
    --text-muted: #94A3B8;
    --text-light: #F8FAFC;
    --border-color: #334155;
    --input-border: #334155;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* Typography */
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.8rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-weight: 600; }

.section-title {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--yellow);
    border-radius: 2px;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.grid {
    display: grid;
    gap: 24px;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-right: 1rem;
    transition: color var(--transition-fast);
}

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

@media (max-width: 767px) {
    .theme-toggle {
        margin-right: 1rem;
        margin-left: auto;
    }
    .hamburger {
        margin-left: 0;
    }
    .navbar {
        display: flex;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--yellow);
    color: #1E2D40; /* Always dark for contrast against yellow */
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #dfb312;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--text-light);
    color: var(--navy);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border-color: var(--text-dark);
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background-color: var(--text-dark);
    color: var(--bg-color);
}

/* Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-medium), padding var(--transition-medium);
    background-color: transparent;
    padding: 20px 0;
}

.header.scrolled {
    background-color: var(--navy);
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo span {
    color: var(--yellow);
}

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

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--yellow);
    transition: width var(--transition-medium);
}

.nav-link:hover::after, .nav-link:focus::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all var(--transition-medium);
    background-color: var(--text-light);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--navy);
    color: var(--text-light);
    overflow: hidden;
}

.hero-bg-animated {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(30, 45, 64, 1) 0%, rgba(15, 25, 40, 1) 100%);
    z-index: 1;
}

[data-theme="dark"] .hero-bg-animated {
    background: radial-gradient(circle at center, rgba(15, 23, 42, 1) 0%, rgba(11, 17, 32, 1) 100%);
}

.hero-bg-animated::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: radial-gradient(var(--yellow) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero .title {
    color: var(--yellow);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero .tagline {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
.about-content {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 3rem;
}

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

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--yellow);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin: 0 auto;
    background-color: var(--bg-light);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Skills Section */
.skills-container {
    display: grid;
    gap: 3rem;
}

.category-title {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background-color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), background-color var(--transition-medium), border-color var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--yellow);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), background-color var(--transition-medium);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.project-content {
    padding: 2rem;
}

.project-title {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.project-category {
    display: inline-block;
    color: var(--yellow);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-desc {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

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

.project-tags span {
    background-color: var(--bg-light);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--text-dark);
    opacity: 0.2;
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px 30px;
    position: relative;
    background-color: inherit;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    left: 12px;
    background-color: var(--yellow);
    border: 3px solid var(--navy);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: background-color var(--transition-medium);
}

.timeline-content h3 {
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    display: inline-block;
    background-color: var(--navy);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Certifications */
.cert-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid var(--yellow);
    transition: background-color var(--transition-medium);
}

.cert-icon {
    font-size: 2.5rem;
}

.cert-info h3 {
    color: var(--text-dark);
}

.cert-info p {
    color: var(--text-muted);
}

/* Contact Section */
.contact-container {
    grid-template-columns: 1fr;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: background-color var(--transition-medium);
}

.contact-info {
    background-color: var(--navy);
    color: var(--text-light);
    padding: 3rem 2rem;
}

.contact-info h3 {
    color: var(--yellow);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-list {
    margin-bottom: 3rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.2rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-light);
    transition: all var(--transition-medium);
}

.social-links a:hover {
    background-color: var(--yellow);
    color: var(--navy);
    transform: translateY(-3px);
}

.contact-form {
    padding: 3rem 2rem;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color var(--transition-fast), background-color var(--transition-medium), color var(--transition-medium);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--yellow);
}

.submit-btn {
    width: 100%;
    border: none;
    font-size: 1.05rem;
}

/* Footer */
.footer {
    background-color: var(--navy);
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Media Queries */
@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 2fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.2rem; }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--navy);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        display: flex;
        justify-content: center;
        z-index: -1;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 2rem;
    }
    
    .nav-link {
        font-size: 1.5rem;
    }
}
