/* ============================================
   DESIGN TOKENS & CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --color-primary: #d4a5a5; /* Soft muted rose */
    --color-primary-dark: #c99a9a;
    --color-primary-light: #e8b8b8;
    --color-secondary: #e8b8b8; /* Lighter rose accent */
    --color-accent: #10b981; /* Green for highlights */
    
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-text-lighter: #9ca3af;
    
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-bg-hover: #f3f4f6;
    
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    
    /* Typography */
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Layout */
    --max-width: 1200px;
    --max-width-content: 900px;
    --nav-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    padding-top: var(--nav-height);
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

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

a:hover {
    color: var(--color-primary-dark);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: box-shadow var(--transition-base), background var(--transition-base);
    height: var(--nav-height);
}

nav.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

nav .logo {
    display: flex;
    align-items: center;
}

nav .logo img {
    height: 55px;
    width: auto;
    display: block;
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

nav .logo a {
    display: flex;
    align-items: center;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-base);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

nav ul li a {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
}

nav ul li a:hover {
    color: var(--color-primary);
    background: var(--color-bg-hover);
}

nav ul li a.active {
    color: var(--color-primary);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Mobile navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-sm);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }
    
    nav ul.active {
        transform: translateX(0);
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: var(--spacing-sm);
        width: 100%;
    }
    
    nav ul li a.active::after {
        display: none;
    }
    
    nav ul li a.active {
        background: var(--color-bg-hover);
        border-left: 3px solid var(--color-primary);
        padding-left: calc(var(--spacing-sm) - 3px);
    }
}

/* ============================================
   LAYOUT
   ============================================ */
main {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: calc(100vh - var(--nav-height) - 100px);
}

section {
    margin-bottom: var(--spacing-2xl);
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: var(--spacing-2xl) 0;
    text-align: left;
}

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

.hero h1 {
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
}

.hero p {
    font-size: 1.125rem;
    max-width: 650px;
    margin-bottom: var(--spacing-xl);
    color: var(--color-text-light);
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

/* ============================================
   BUTTONS
   ============================================ */
.button {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1.5;
}

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

.button-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.button-primary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

.button-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button-secondary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.button-ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.button-ghost:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-text-light);
    color: var(--color-text);
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.project-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

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

.project-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    font-size: 1.5rem;
}

.project-card p {
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    color: var(--color-text-light);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: auto;
}

.project-links .button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ============================================
   SKILLS GRID
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-weight: 500;
    color: var(--color-text);
    transition: all var(--transition-base);
    text-align: center;
}

.skill-chip:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   BLOG POSTS
   ============================================ */
.blog-list {
    display: grid;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.blog-post {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.blog-post:nth-child(1) { animation-delay: 0.1s; }
.blog-post:nth-child(2) { animation-delay: 0.2s; }
.blog-post:nth-child(3) { animation-delay: 0.3s; }

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.blog-post h2 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.75rem;
}

.blog-date {
    color: var(--color-text-lighter);
    font-size: 0.9rem;
    white-space: nowrap;
}

.blog-excerpt {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--color-bg);
    color: var(--color-text);
}

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

.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
}

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

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    display: none;
}

.form-error.show {
    display: block;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    color: var(--color-text);
    transition: all var(--transition-base);
    text-decoration: none;
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================
   RESUME PAGE
   ============================================ */
.resume-container {
    max-width: 900px;
    margin: 0 auto;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.resume-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.resume-section:last-child {
    border-bottom: none;
}

.resume-section h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.75rem;
}

.resume-item {
    margin-bottom: var(--spacing-lg);
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.resume-item h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.resume-item-meta {
    color: var(--color-text-lighter);
    font-size: 0.9rem;
    font-weight: 500;
}

.resume-item p {
    margin-bottom: var(--spacing-xs);
}

.resume-item ul {
    margin-left: var(--spacing-lg);
    margin-top: var(--spacing-xs);
    color: var(--color-text-light);
}

.resume-item ul li {
    margin-bottom: var(--spacing-xs);
}

/* ============================================
   FEATURED SECTION
   ============================================ */
.featured-section {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: var(--color-bg-alt);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.featured-section h2 {
    margin-bottom: var(--spacing-md);
}

.featured-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline-item h3 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.timeline-item-meta {
    color: var(--color-text-lighter);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.timeline-item p {
    margin-bottom: 0;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    font-size: 0.9rem;
    color: var(--color-text-lighter);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }
    
    main {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .hero {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .button {
        width: 100%;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .resume-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline {
        padding-left: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    nav {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    nav,
    footer,
    .button,
    .menu-toggle {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    main {
        max-width: 100%;
    }
}
