/* --- Variables & Reset --- */
:root {
    --primary-color: #D4C5B0; /* Beige from CV */
    --primary-dark: #b09f88;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --accent: #C0392B; /* Subtle red for accents like the ribbon */
    --font-heading: 'Lato', sans-serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 70px; /* Accounts for your 70px navbar + 20px breathing room */
    scroll-behavior: smooth; /* Gives a nice smooth scroll effect natively */
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

.subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* --- Layout Utilities --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 30px 0; }
.section-light { background-color: var(--bg-light); }
.section-white { background-color: var(--white); }
.section-dark { background-color: #222; color: #fff; }

.section-header { text-align: center; margin-bottom: 60px; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--text-dark);
    color: var(--white);
}
.btn-primary:hover { background-color: var(--primary-dark); }

.btn-outline {
    border: 2px solid var(--text-dark);
    margin-left: 10px;
}
.btn-outline:hover { background-color: var(--text-dark); color: var(--white); }

/* Custom Hero Buttons (from screenshot) */
.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-hero {
    background-color: var(--white);
    color: var(--text-dark);
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    font-weight: 400;
    padding: 10px 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}



.btn-hero:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transform: translateY(-2px);
    color: var(--text-dark);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu { display: flex; gap: 30px; }
.nav-menu a { font-weight: 400; font-size: 0.95rem; }
.nav-menu a:hover { color: var(--primary-dark); }

.btn-contact {
    border: 1px solid var(--text-dark);
    padding: 8px 20px;
    border-radius: 20px;
}

.menu-toggle { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--text-dark); transition: 0.3s; }

/* --- Hero Section --- */
.hero {
    /* REDUCED VERTICAL PADDING HERE */
    padding-top: 85px; 
    padding-bottom: 40px;
    background-color: #F4F0EB; /* Very light beige */
}

/* Pushes the first section down to clear the 70px fixed navbar, plus your 30px gap */
.page-top {
    padding-top: 60px; 
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hero-text { flex: 3; } /* Gives the text twice as much horizontal space */
.hero-text p { text-align: justify; } /* Added for better readability and alignment */

.hero-image { flex: 1; text-align: left; } /* Changed to left so image aligns with logo and portfolio */

.hero-image img {
    width: 180px;  /* Makes the image itself smaller */
    height: 180px; /* Keeps it a perfect circle */
  /*  object-fit: cover;*/
    object-fit: contain;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.5); /* Makes the white circle thinner */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Softened the shadow for the smaller size */
}

/* --- Blog Section --- */
.section-blog { background-color: var(--white); border-bottom: 1px solid #eee; }
.blog-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 40px;
    border-left: 5px solid var(--primary-dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px; /* Added spacing between posts */
}
.blog-date {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* --- About Section --- */
.row { display: flex; gap: 50px; }
.col-half { flex: 1; }

.skills-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}
.skills-list li::before {
    content: '•';
    color: var(--primary-dark);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.interests-box {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}
.interests-box h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* --- Timeline (Experience) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #eee;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--white);
    border: 4px solid var(--primary-dark);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after { left: -8px; }

.timeline-date {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
}
/* --- Move Portfolio Up --- */
#portfolio {
    padding-top: 30px; /* Reduces the gap at the top. Change to 10px or 20px if you want it even closer! */
}

#what-i-do {
    padding-top: 30px; /* This matches the spacing you liked for the Portfolio section */
}
/* --- Academic Grid & Portfolio --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}  /* for 2 per row papers */

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px; /* Slightly rounder for a modern look */
    border: 1px solid #EAEAEA; /* Crisp, subtle border */
    box-shadow: 0 4px 10px rgba(0,0,0,0.02); /* Very soft resting shadow */
    transition: all 0.3s ease; /* Smoother transition */
    display: flex;
    flex-direction: column;
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.08); /* Stronger, softer shadow on hover */
    border-color: var(--primary-color); /* Subtle border color change on hover */
}
.card h3 { 
    font-size: 1.25rem; 
    border-bottom: 2px solid #f4f0eb; 
    padding-bottom: 15px; 
    margin-bottom: 15px;
    /*margin-top: auto; /* Pushes content to align nicely */
}

/* --- Portfolio Card Image Container --- */
.portfolio-card .card-preview {
    width: 100%;
height: auto; /* Change from 180px to auto */
    border-radius: 6px; /* Rounds the inner image slightly */
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #F9F9F9;
    border: 1px solid #F0F0F0; /* Adds definition if your image background is white */
}

.portfolio-card .card-preview img {
    width: 100%;
height: auto; /* Change from 100% to auto */
    object-fit: cover; /* This will work perfectly with your Canva/Figma exports */
    display: block;
    transition: transform 0.5s ease;
}

/* Optional: Slight zoom effect on the image when hovering over the card */
.portfolio-card:hover .card-preview img {
    transform: scale(1.03);
}

/* --- Contact --- */
.contact-wrapper {
    display: flex;
    gap: 50px;
}
.contact-info { flex: 1; }
.contact-form { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.section-dark h2, .section-dark p { color: #fff; }
.section-dark p { color: #ccc; }

.contact-item { margin-bottom: 20px; display: flex; align-items: center; gap: 15px; }
.contact-item i { color: var(--primary-color); font-size: 1.2rem; }

input, textarea {
    padding: 15px;
    border-radius: 5px;
    border: none;
    font-family: var(--font-body);
}
textarea { resize: vertical; }

/* --- Footer --- */
footer {
    background: #111;
    color: #666;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        padding: 20px 0;
    }
    .nav-menu.active { left: 0; }
    
    .hero-content { flex-direction: column; text-align: center; }
    .hero-image { text-align: center; }
    .hero-text p { text-align: center; } /* Overrides justification for mobile layout */
    .hero-buttons { justify-content: center; } /* Centers buttons on mobile */
    .hero-image img { width: 150px; height: 150px; } /* Slightly scaled down for small screens */
    
    .row { flex-direction: column; }
    
    /* --- Grid Layout Fixes --- */
    /* This forces the grids into a single column so they shrink nicely and don't overflow the phone screen */
    .grid-2, .grid-3 {
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    .card {
        padding: 20px; /* Reduced padding on mobile to save screen real estate */
    }
    
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(odd) { text-align: left; }
    .timeline-item:nth-child(even) { left: 0; } 
    .timeline-item:nth-child(odd)::after, .timeline-item:nth-child(even)::after { left: 23px; }
    
    .contact-wrapper { flex-direction: column; }

    /* Adjust heading sizes for better mobile readability */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}