/* ==========================================
   MODERN PORTFOLIO CSS
   Stormy Morning Palette
   ========================================== */

/* ==========================================
   CSS Variables - Light Mode
   ========================================== */
:root {
    /* Stormy Morning Colors */
    --color-slate: #6A89A7;      /* Main blue-grey */
    --color-light-blue: #BDDFC;  /* Light blue */
    --color-sky: #88BDF2;         /* Sky blue */
    --color-dark-slate: #384959;  /* Dark slate */
    
    /* Primary Palette */
    --primary-color: #88BDF2;
    --secondary-color: #6A89A7;
    --accent-color: #BDDFC;
    --dark-accent: #384959;
    
    /* Text Colors - Light Mode */
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    
    /* Background Colors - Light Mode */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    
    /* Greys */
    --grey-50: #f9fafb;
    --grey-100: #f3f4f6;
    --grey-200: #e5e7eb;
    --grey-300: #d1d5db;
    --grey-400: #9ca3af;
    --grey-500: #6b7280;
    --grey-600: #4b5563;
    --grey-700: #374151;
    --grey-800: #1f2937;
    --grey-900: #111827;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #88BDF2 0%, #6A89A7 100%);
    --gradient-accent: linear-gradient(135deg, #BDDFC 0%, #88BDF2 100%);
    --gradient-dark: linear-gradient(135deg, #6A89A7 0%, #384959 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================
   Dark Mode Variables
   ========================================== */
[data-theme="dark"] {
    /* Text Colors - Dark Mode */
    --text-dark: #f8f9fa;
    --text-medium: #d1d5db;
    --text-light: #9ca3af;
    
    /* Background Colors - Dark Mode */
    --bg-white: #111827;
    --bg-light: #1f2937;
    --bg-card: #1f2937;
    --border-color: #374151;
    
    /* Adjusted colors for dark mode */
    --primary-color: #88BDF2;
    --secondary-color: #BDDFC;
    
    /* Shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

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

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

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.8;
}

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

/* ==========================================
   Utility Classes
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--gradient-dark);
}

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

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

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-base);
}

[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.95);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-medium);
    position: relative;
    padding: 0.5rem 0;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--text-dark);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: rotate(15deg);
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.hero .container {
    width: 100%;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 0.8s ease;
}

.hero-greeting {
    color: var(--secondary-color);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.hero-title {
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.hero-description {
    max-width: 540px;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-top: var(--spacing-lg);
}

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

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    list-style: none;
    margin-top: 2rem;
}

.skills-grid li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.skills-grid i {
    color: var(--primary-color);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================
   Experience Section
   ========================================== */
.experience {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.timeline {
    max-width: 900px;
    margin: var(--spacing-lg) auto 0;
    position: relative;
}

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

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

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

.timeline-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.timeline-content:hover {
    box-shadow: var(--shadow-xl);
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.timeline-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

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

.timeline-description {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-white);
    color: var(--secondary-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================
   Projects Section
   ========================================== */
.projects {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.project-card.featured {
    grid-column: span 1;
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(136, 189, 242, 0.95) 0%, rgba(106, 137, 167, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-accent);
    font-size: 1.25rem;
    transition: var(--transition-base);
}

.project-link:hover {
    transform: scale(1.1);
    background: var(--dark-accent);
    color: white;
}

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

.project-type {
    color: var(--secondary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: var(--bg-light);
    color: var(--text-medium);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.project-tech span:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Small project cards without images */
.project-card:not(.featured) .project-image {
    display: none;
}

.project-card:not(.featured) {
    padding: 2rem;
}

.project-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-links a {
    color: var(--text-light);
    font-size: 1.25rem;
    transition: var(--transition-base);
}

.project-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.view-more {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.contact-text {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.25rem;
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.25rem;
    color: white;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.contact-item a {
    color: var(--text-medium);
    transition: var(--transition-base);
}

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

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
    background: var(--bg-white);
    color: var(--text-dark);
}

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

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

.contact-form .btn {
    width: 100%;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--dark-accent);
    color: white;
    padding: 2rem 0;
}

[data-theme="dark"] .footer {
    background: #0a0f16;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
}

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

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

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

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition-base);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        left: 6px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .navbar,
    .hamburger,
    .theme-toggle,
    .footer {
        display: none;
    }
    
    .hero {
        padding-top: 0;
    }
}