/* ========================================
   Variables & Reset
   ======================================== */

:root {
    --primary-color: #084B83;
    --secondary-color: #42bfdd;
    --accent-color: #42bfdd;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a202c;
    --border-color: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 3px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #084B83 0%, #42bfdd 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    background-size: 50px 50px;
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.highlight {
    background: linear-gradient(135deg, #42bfdd 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: white;
    font-size: 2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.9s both;
}

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

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

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

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
}

/* ========================================
   About Section
   ======================================== */

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    position: relative;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.about-text {
    padding: 1rem 0;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.skills h3 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.skill-item i {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-item span {
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.skill-title {
    font-weight: 600;
}

.skill-desc {
    font-size: 0.85rem;
    color: #777;
    margin-top: 4px;
    line-height: 1.3;
}

/* ========================================
   Experience Section - Timeline
   ======================================== */

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 100px;
}

.timeline-dot {
    position: absolute;
    left: 40px;
    top: 8px;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.timeline-date {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.timeline-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================
   Projects Section
   ======================================== */

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

.projects-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.project-image-icon {
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image-icon i {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
}

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem;
}

.project-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: rgba(8, 75, 131, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* ========================================
   Contact Section
   ======================================== */

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.contact-item a,
.contact-item p {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.social-links-contact a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: white;
    border-radius: 12px;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links-contact a:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 75, 131, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
    cursor: pointer;
    border: none;
    background: var(--gradient);
    color: white;
    font-size: 1rem;
}

.contact-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer i {
    color: #f56565;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid-3 {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-dot {
        left: 10px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

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

    .timeline-content {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* ========================================
   Project Detail Pages
   ======================================== */

.project-hero {
    padding: 140px 0 60px;
    background: var(--gradient);
    color: white;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link:hover {
    color: white;
    transform: translateX(-5px);
}

.project-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.project-hero-content .project-date {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.project-hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.project-hero .tags .tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.project-hero-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: center;
}

.project-hero-image img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-detail {
    padding: 4rem 0;
}

.detail-section {
    margin-bottom: 3.5rem;
}

.detail-section h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
}

.detail-section h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.detail-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.detail-section li {
    margin-bottom: 0.5rem;
}

.detail-section code {
    background: var(--bg-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-color);
}

.detail-section pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.detail-section pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.meta-item {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Detail Tables */

.detail-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.detail-table thead {
    background: var(--primary-color);
    color: white;
}

.detail-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.detail-table td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.detail-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Stats Grid */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Highlight Box */

.highlight-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 1.5rem;
}

.highlight-box p {
    margin-bottom: 0;
}

.highlight-stat {
    text-align: center;
    margin-bottom: 1rem;
}

.highlight-stat .stat-value {
    font-size: 3rem;
}

/* Pipeline */

.pipeline {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 2rem 0;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.pipeline-step {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    min-width: 150px;
    text-align: center;
}

.pipeline-step strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pipeline-step p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.pipeline-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.pipeline-arrow {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.pipeline-vertical {
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
}

.pipeline-vertical .pipeline-step {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.pipeline-vertical .pipeline-num {
    flex-shrink: 0;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.pipeline-vertical .pipeline-arrow {
    display: none;
}

/* Skills List (Dofus Trading) */

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.skill-pill:hover {
    border-color: var(--secondary-color);
    background: var(--bg-secondary);
}

.skill-pill i {
    color: var(--primary-color);
}

/* Project card link */

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card-link .project-card {
    cursor: pointer;
}

/* Responsive - Project Detail */

@media (max-width: 768px) {
    .project-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-hero-content h1 {
        font-size: 2rem;
    }

    .project-hero-subtitle {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline:not(.pipeline-vertical) {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
        justify-content: center;
    }

    .detail-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* ========================================
   Theme Toggle Button
   ======================================== */

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: var(--transition);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

/* ========================================
   Inline SVG Icon Styles
   ======================================== */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.social-links .icon,
.social-links-contact .icon {
    font-size: 1.5rem;
}

.social-links .icon svg,
.social-links-contact .icon svg {
    fill: currentColor;
}

.scroll-down .icon {
    font-size: 2rem;
}

.contact-item .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-item .icon svg {
    fill: var(--primary-color);
}

.skill-item .icon {
    font-size: 2.5rem;
}

.skill-item .icon svg {
    fill: var(--primary-color);
}

.project-image-icon .icon {
    font-size: 4rem;
}

.project-image-icon .icon svg {
    fill: white;
    opacity: 0.9;
}

.back-link .icon svg,
.pipeline-arrow .icon svg {
    fill: currentColor;
}

.skill-pill .icon {
    font-size: 1rem;
}

.skill-pill .icon svg {
    fill: var(--primary-color);
}

.footer .icon svg {
    fill: #f56565;
}

/* ========================================
   Dark Mode
   ======================================== */

[data-theme="dark"] {
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-dark: #0d1117;
    --border-color: #4a5568;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 32, 44, 0.95);
}

[data-theme="dark"] .nav-menu {
    background-color: #1a202c;
}

[data-theme="dark"] .skill-item {
    background: #2d3748;
}

[data-theme="dark"] .timeline-dot {
    background: #2d3748;
}

[data-theme="dark"] .timeline-content {
    background: #2d3748;
}

[data-theme="dark"] .project-card {
    background: #2d3748;
}

[data-theme="dark"] .contact-form {
    background: #2d3748;
}

[data-theme="dark"] .stat-card {
    background: #2d3748;
}

[data-theme="dark"] .pipeline-step {
    background: #2d3748;
}

[data-theme="dark"] .skill-pill {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .highlight-box {
    background: #2d3748;
}

[data-theme="dark"] .detail-section code {
    background: #2d3748;
    color: var(--secondary-color);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #2d3748;
    color: var(--text-primary);
    border-color: #4a5568;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(66, 191, 221, 0.15);
}

[data-theme="dark"] .detail-table td {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .detail-table tbody tr:hover {
    background: #374151;
}

[data-theme="dark"] .tag {
    background: rgba(66, 191, 221, 0.15);
}

[data-theme="dark"] .project-date {
    background: rgba(66, 191, 221, 0.15);
}

[data-theme="dark"] .skill-desc {
    color: #a0aec0;
}
