/* Advanced Civil Engineering Portfolio CSS */
:root {
    --primary: #0f172a; /* Very Dark Navy/Slate for maximum contrast */
    --secondary: #0ea5e9; /* Vibrant Sky Blue for excellent readability */
    --accent: #f59e0b; /* Amber for subtle highlights */
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 700; margin: 0 0 15px 0; color: var(--primary); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 90px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: #e67e22; transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }

/* --- Sidebar Layout --- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    transition: all ease-in-out 0.5s;
    z-index: 9997;
    background: var(--primary);
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
}
#header .profile img { margin: 15px auto; display: block; width: 120px; height: 120px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.2); transition: var(--transition); object-fit: cover; }
#header .profile img:hover { border-color: var(--secondary); transform: scale(1.05); }
#header .profile h1 { font-size: 24px; margin: 0; padding: 0; font-weight: 700; text-align: center; color: var(--text-light); }
#header .profile h1 a { color: var(--text-light); text-decoration: none; transition: var(--transition); }
#header .profile h1 a:hover { color: var(--secondary); }
#header .social-links { text-align: center; margin-top: 15px; }
#header .social-links a { font-size: 16px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); color: var(--text-light); line-height: 1; margin-right: 4px; border-radius: 50%; width: 36px; height: 36px; transition: var(--transition); text-decoration: none; }
#header .social-links a:hover { background: var(--secondary); color: #fff; transform: translateY(-3px); box-shadow: 0 4px 10px rgba(14, 165, 233, 0.4); text-decoration: none; }

.nav-menu { padding: 30px 0 0 0; }
.nav-menu * { margin: 0; padding: 0; list-style: none; }
.nav-menu > ul > li { position: relative; white-space: nowrap; }
.nav-menu a { display: flex; align-items: center; color: #cbd5e1; padding: 12px 15px; margin-bottom: 8px; transition: var(--transition); font-size: 15px; border-radius: 8px; font-weight: 500; text-decoration: none; margin: 0 15px 8px 15px;}
.nav-menu a i { font-size: 20px; padding-right: 8px; color: #94a3b8; width: 30px; text-align: center; transition: var(--transition); }
.nav-menu a:hover, .nav-menu .active > a { color: #fff; background: var(--secondary); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }
.nav-menu a:hover i, .nav-menu .active > a i { color: #fff; }

#main { margin-left: 300px; }

/* Hero */
.hero {
    min-height: 40vh;
    background: url('https://images.unsplash.com/photo-1541888086425-d81bb19240f5?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
    position: relative;
    padding-left: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 15, 30, 0.85); z-index: 1; }
.hero-container { position: relative; z-index: 2; color: #fff; padding: 0 50px; width: 100%; max-width: 900px; }
.hero h1 { font-size: 64px; font-weight: 800; margin-bottom: 10px; line-height: 1.1; color: #fff; }
.hero h1 span { color: var(--secondary); }
.hero h2 { font-size: 30px; font-weight: 300; margin-bottom: 20px; color: #cbd5e1; }
.hero p { font-size: 24px; margin-bottom: 30px; color: #f8fafc; max-width: 600px; }
.hero-btns { display: flex; gap: 15px; }

/* Section Title */
.section-title { font-size: 32px; font-weight: bold; margin-bottom: 20px; padding-bottom: 20px; position: relative; color: var(--primary); }
.section-title::after { content: ''; position: absolute; display: block; width: 50px; height: 3px; background: var(--secondary); bottom: 0; left: 0; }

/* Animations */
.animate-up { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.animate-up.show { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
.about-text ul { list-style: none; padding: 0; }
.about-text ul li { margin-bottom: 20px; display: flex; align-items: center; }
.about-text ul i { font-size: 16px; margin-right: 10px; color: var(--secondary); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.skill-item { margin-bottom: 0px; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.progress-bar { width: 100%; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress { height: 100%; background: var(--secondary); border-radius: 4px; transition: width 1.5s ease-in-out; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 40px; }
.service-card { background: var(--bg-white); padding: 40px 20px; text-align: center; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: var(--transition); border-bottom: 3px solid transparent; }
.service-card:hover { transform: translateY(-10px); border-bottom-color: var(--secondary); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1); }
.service-card i { font-size: 40px; color: var(--secondary); margin-bottom: 20px; }
.service-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 15px; font-weight: 700; }
.service-card p { color: #64748b; font-size: 14px; line-height: 1.6; }

/* Resume (Experience/Education) */
.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.timeline { border-left: 2px solid var(--secondary); padding-left: 20px; position: relative; margin-top: 20px; }
.timeline-item { margin-bottom: 40px; position: relative; }
.timeline-dot { position: absolute; left: -29px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-white); border: 2px solid var(--secondary); }
.timeline-date { display: inline-block; padding: 4px 12px; background: #dbeafe; color: var(--secondary); font-size: 12px; font-weight: 700; margin-bottom: 10px; border-radius: 4px; }
.timeline-item h4 { font-size: 18px; color: var(--primary); margin-bottom: 5px; font-weight: 700; text-transform: uppercase; }
.timeline-item h5 { font-size: 16px; color: var(--text-dark); font-weight: 400; margin-bottom: 15px; }

/* Portfolio */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.portfolio-item { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.portfolio-img { height: 250px; background-size: cover; background-position: center; transition: var(--transition); }
.portfolio-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 54, 93, 0.9); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: var(--transition); text-align: center; padding: 20px; box-sizing: border-box; }
.portfolio-overlay h3 { color: #fff; font-size: 22px; margin-bottom: 10px; transform: translateY(20px); transition: var(--transition); }
.portfolio-overlay p { color: var(--accent); font-weight: 600; transform: translateY(20px); transition: var(--transition); transition-delay: 0.1s; }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-item:hover .portfolio-img { transform: scale(1.1); }
.portfolio-item:hover .portfolio-overlay h3, .portfolio-item:hover .portfolio-overlay p, .portfolio-item:hover .portfolio-overlay i { transform: translateY(0); }

/* Portfolio Modal */
.portfolio-modal { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(15, 23, 42, 0.9); backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s ease; }
.portfolio-modal.show { display: flex; opacity: 1; align-items: center; justify-content: center; }
.modal-content { background-color: #fff; margin: auto; padding: 0; border: 1px solid #888; width: 90%; max-width: 800px; border-radius: 8px; position: relative; transform: translateY(-50px); transition: transform 0.3s ease; box-shadow: 0 15px 50px rgba(0,0,0,0.3); }
.portfolio-modal.show .modal-content { transform: translateY(0); }
.close-modal { color: #fff; position: absolute; top: 15px; right: 20px; font-size: 35px; font-weight: bold; cursor: pointer; transition: 0.3s; background: rgba(0,0,0,0.5); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10; }
.close-modal:hover, .close-modal:focus { color: var(--secondary); text-decoration: none; background: #fff; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; }
.info-box { background: var(--bg-white); padding: 20px; border-radius: 8px; text-align: center; margin-bottom: 15px; transition: var(--transition); box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.05); }
.info-box:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1); }
.info-box i { font-size: 24px; color: var(--secondary); margin-bottom: 10px; }
.info-box h4 { margin-bottom: 5px; color: var(--primary); font-size: 18px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #cbd5e1; border-radius: 4px; box-sizing: border-box; font-family: 'Inter', sans-serif; font-size: 14px; transition: var(--transition); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--secondary); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }

/* Publications */
.publications-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

/* Mobile Navigation */
.mobile-nav-toggle { 
    position: fixed; 
    right: 20px; 
    top: 20px; 
    z-index: 9998; 
    border: none; 
    background: transparent; 
    transition: var(--transition); 
    outline: none !important; 
    cursor: pointer; 
    display: none; 
    align-items: center; 
    justify-content: center; 
}
.mobile-nav-toggle i {
    transition: transform 0.3s ease;
}
.mobile-nav-toggle:hover i {
    transform: scale(1.1);
}

@media (max-width: 1199px) {
  #header { left: -300px; }
  #main { margin-left: 0; }
  .hero { padding-left: 0; }
  .mobile-nav-toggle { 
      display: block; 
      background: none; 
      color: var(--secondary); 
      border: none;
      border-radius: 0;
      width: auto; 
      height: auto; 
      font-size: 28px; 
      box-shadow: none; 
      padding: 0;
  }
  .mobile-nav-toggle:hover {
      background: none;
      color: #fff;
      box-shadow: none;
      transform: scale(1.1);
  }
  .mobile-nav-active #header { left: 0; }
}
@media (max-width: 768px) {
  .hero-container { padding: 0 20px; }
  .hero h1 { font-size: 36px; line-height: 40px; }
  .resume-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
}

/* Footer */
#footer { padding: 15px; color: var(--text-light); font-size: 14px; position: fixed; left: 0; bottom: 0; width: 300px; z-index: 9999; background: var(--primary); text-align: center; border-top: 1px solid rgba(255,255,255,0.1); box-sizing: border-box; }
#footer p { margin: 0; }
@media (max-width: 1199px) { #footer { position: static; width: auto; padding: 30px 15px; } }
