/*
=============================================
PERSONAL PORTFOLIO - MINIMALIST DESIGN
=============================================
Features:
- Dark/Light mode toggle
- Clean, minimal aesthetic
- Fully responsive
- Scalable structure

TABLE OF CONTENTS:
1. CSS Variables (Theming)
2. Reset & Base Styles
3. Typography
4. Navigation
5. Hero Section
6. About Section
7. Timeline (Experience & Education)
8. Certifications Grid
9. Projects Grid
10. Contact Section
11. Footer
12. Utilities & Animations
13. Responsive Design
=============================================
*/

:root {
    /* 
    LIGHT MODE COLORS (Default)
    Change these to customize your light theme
    */
    --bg-primary: #fafafa;           /* Main background */
    --bg-secondary: #ffffff;         /* Card/section backgrounds */
    --bg-tertiary: #f5f5f5;          /* Subtle background variations */
    
    --text-primary: #171717;         /* Main text color */
    --text-secondary: #525252;       /* Secondary text */
    --text-muted: #737373;           /* Muted/subtle text */
    
    --accent-color: #171717;         /* Primary accent (minimalist = dark) */
    --accent-hover: #404040;         /* Accent hover state */
    
    --border-color: #e5e5e5;         /* Borders and dividers */
    --border-light: #f0f0f0;         /* Lighter borders */
    
    /* Shadows - subtle for minimalist look */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    
    /* Spacing scale */
    --space-xs: 0.25rem;     /* 4px */
    --space-sm: 0.5rem;      /* 8px */
    --space-md: 1rem;        /* 16px */
    --space-lg: 1.5rem;      /* 24px */
    --space-xl: 2rem;        /* 32px */
    --space-2xl: 3rem;       /* 48px */
    --space-3xl: 4rem;       /* 64px */
    --space-4xl: 6rem;       /* 96px */
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Layout */
    --max-width: 1100px;
    --nav-height: 72px;
}

/* 
=============================================
DARK MODE COLORS
=============================================
*/
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #171717;
    --bg-tertiary: #1f1f1f;
    
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    
    --accent-color: #fafafa;
    --accent-hover: #d4d4d4;
    
    --border-color: #262626;
    --border-light: #1f1f1f;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* 
=============================================
2. RESET & BASE STYLES
=============================================
*/

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), 
                color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* 
=============================================
3. TYPOGRAPHY
=============================================
*/

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

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

p {
    color: var(--text-secondary);
}

/* 
=============================================
4. NAVIGATION
=============================================
*/

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color var(--transition-base),
                border-color var(--transition-base);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width var(--transition-base);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: background-color var(--transition-fast),
                color var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Show/hide sun and moon icons based on theme */
.icon-sun { display: none; }
.icon-moon { display: block; }

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform var(--transition-base),
                opacity var(--transition-base);
}

/* 
=============================================
5. HERO SECTION
=============================================
*/

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4xl) var(--space-xl);
    padding-top: calc(var(--nav-height) + var(--space-4xl));
}

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

/* Profile Picture - Round Frame */
.profile-picture-wrapper {
    margin-bottom: var(--space-xl);
    display: flex;
    justify-content: center;
}

.profile-picture,
.profile-picture-placeholder {
    width: 250px;
    height: 250px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: border-color var(--transition-base),
                transform var(--transition-base);
    
    /* SHARPNESS: These properties prevent blurry scaling */
    image-rendering: -webkit-optimize-contrast; /* Chrome, Safari */
    image-rendering: crisp-edges;               /* Firefox */
    -ms-interpolation-mode: nearest-neighbor;   /* IE (legacy) */
    
    /* Prevent subpixel rendering issues */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.profile-picture-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.profile-picture:hover,
.profile-picture-placeholder:hover {
    transform: scale(1.02) translateZ(0);
    border-color: var(--text-muted);
}

.hero-title {
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.hero-description {
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* 
=============================================
6. SECTIONS (General)
=============================================
*/

.section {
    padding: var(--space-4xl) var(--space-xl);
}

.section-alt {
    background-color: var(--bg-secondary);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--text-primary);
    margin: var(--space-md) auto 0;
}

/* 
=============================================
7. ABOUT SECTION
=============================================
*/

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: var(--space-lg);
    font-size: 1.0625rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-xl);
}

.skill-tag {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* 
=============================================
8. TIMELINE (Experience & Education)
=============================================
*/

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: var(--space-xl);
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* The circular marker */
.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-xl) - 5px);
    top: var(--space-xs);
    width: 11px;
    height: 11px;
    border-radius: var(--radius-full);
    background-color: var(--bg-primary);
    border: 2px solid var(--text-primary);
    transition: background-color var(--transition-base),
                transform var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
    background-color: var(--text-primary);
    transform: scale(1.2);
}

.timeline-content {
    padding-left: var(--space-lg);
}

.timeline-date {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.timeline-title {
    margin-bottom: var(--space-xs);
}

.timeline-company {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.timeline-description {
    margin-bottom: var(--space-md);
}

.timeline-highlights {
    padding-left: var(--space-lg);
}

.timeline-highlights li {
    position: relative;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-sm);
}

.timeline-highlights li::before {
    content: '–';
    position: absolute;
    left: calc(-1 * var(--space-md));
    color: var(--text-muted);
}

/* 
=============================================
9. CERTIFICATIONS GRID
=============================================
*/

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.certification-card {
    padding: var(--space-xl);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: border-color var(--transition-base),
                transform var(--transition-base),
                box-shadow var(--transition-base);
}

[data-theme="dark"] .certification-card {
    background-color: var(--bg-tertiary);
}

.certification-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.certification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .certification-icon {
    background-color: var(--bg-secondary);
}

.certification-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.certification-issuer {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.certification-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.certification-link {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.certification-link:hover {
    border-color: var(--text-primary);
}

/* 
=============================================
10. PROJECTS GRID
=============================================
*/

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-base),
                transform var(--transition-base),
                box-shadow var(--transition-base);
}

.project-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 200px;
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

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

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

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.project-info {
    padding: var(--space-lg);
}

.project-title {
    margin-bottom: var(--space-sm);
}

.project-description {
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.project-links {
    display: flex;
    gap: var(--space-lg);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.project-link:hover {
    color: var(--text-primary);
}

/* 
=============================================
11. CONTACT SECTION
=============================================
*/

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.0625rem;
    margin-bottom: var(--space-xl);
}

.contact-email {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    color: var(--text-primary);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--text-primary);
    margin-bottom: var(--space-2xl);
    transition: opacity var(--transition-fast);
}

.contact-email:hover {
    opacity: 0.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.social-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* 
=============================================
12. FOOTER
=============================================
*/

.footer {
    padding: var(--space-xl);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 
=============================================
13. UTILITIES & ANIMATIONS
=============================================
*/

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Selection color */
::selection {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* 
=============================================
14. RESPONSIVE DESIGN
=============================================
*/

/* Tablet */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        padding: var(--space-lg);
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        gap: var(--space-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Animate hamburger to X */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .timeline {
        padding-left: var(--space-lg);
    }
    
    .timeline-marker {
        left: calc(-1 * var(--space-lg) - 5px);
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --nav-height: 64px;
    }
    
    .navbar {
        padding: 0 var(--space-md);
    }
    
    .section {
        padding: var(--space-3xl) var(--space-md);
    }
    
    .hero {
        padding: var(--space-3xl) var(--space-md);
        padding-top: calc(var(--nav-height) + var(--space-3xl));
    }
    
    .profile-picture,
    .profile-picture-placeholder {
        width: 140px;
        height: 140px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-content {
        padding-left: var(--space-md);
    }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}