/* Reset and Base Styles */
*, *:before, *:after { 
  -webkit-box-sizing: border-box; 
  -moz-box-sizing: border-box; 
  box-sizing: border-box;
}

body { 
  margin: 0;
  padding: 0;
  background: #eee;
  font-family: Roboto, 'Helvetica Neue', Helvetica, sans-serif;
}

/* Top Header Styles (Used on all pages) */
#top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  transition: left 0.3s ease;
}

/* When sidebar navigation exists, adjust header */
body.has-sidebar #top-header {
  left: 4rem;
}

body.has-sidebar nav:hover ~ #top-header {
  left: 10rem;
}

#top-header h2 {
  margin: 0;
  font-family: Raleway, Roboto, sans-serif;
  color: #555;
  font-size: 1.5rem;
}

#top-header .header-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

#top-header .header-links a {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#top-header .header-links a:hover {
  color: #1EA5CE;
}

#top-header .header-links a i {
  font-size: 1rem;
}

/* Navigation Styles (For pages with sidebar) */
nav { 
    position: fixed; 
    height: 100vh; 
    width: 4rem; 
    background: #29465B; 
    overflow: hidden;
    transition: width 0.3s ease;
    z-index: 1000;
}

/* expanded state — triggered by class instead of hover */
nav.expanded { 
    width: 10rem;
}

/* keep hover for touch/fallback */
nav:hover { 
    width: 10rem;
}

nav.pinned { 
  width: 10rem;
}

nav #logo {
  background: #1EA5CE;
  height: 3.75rem;
  line-height: 4rem;
  padding-left: 0.7rem;
  color: #fff;
  font-weight: bold;
}

nav a { 
  color: #EEE; 
  text-decoration: none; 
  display: table; 
  width: 10rem;
}

nav a.active .fa {
  border-left: 3px solid #1EA5CE;
  border-right: 3px solid transparent;
}

nav a:hover { 
  background: #181a1d; 
  color: #BEE0ff;
}

nav a .fa { 
  width: 4rem;
  display: table-cell;
  font-size: 2rem; 
  padding: 1rem 0;
  text-align: center;
}

nav a .label { 
  display: table-cell;
  vertical-align: middle;
}

/* Content Section (For pages with sidebar) */
body.has-sidebar section {
  padding: 5rem 5rem 2rem 9rem;
  min-height: 100vh;
}

/* Content Section (For pages without sidebar) */
body:not(.has-sidebar) section {
  padding: 5rem 2rem 2rem 2rem;
  min-height: 100vh;
}

section h1 { 
  font-family: Raleway, Roboto, sans-serif; 
  font-size: 2.2rem;
  margin-top: 0;
  color: #333;
}

section p {
  line-height: 1.6;
  color: #555;
}

/* Portfolio Section Styles */
.portfolio-item {
  margin-bottom: 2rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.portfolio-descriptions {
  color: #ff6600;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
  display: inline-block;
}

.portfolio-descriptions:hover {
  color: #015454;
}

.collapsible {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid #ff6600;
}

/* Contact Form Styles */
#contact-form {
  max-width: 600px;
  margin: 2rem 0;
}

#contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: bold;
}

#contact-form input[type=text],
#contact-form input[type=email],
#contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-family: Roboto, sans-serif;
  transition: border-color 0.3s ease;
}

#contact-form input[type=text]:focus,
#contact-form input[type=email]:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: #015454;
}

#contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

#contact-form input[type=submit] {
  background: #ff6600;
  color: #fff;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s ease;
}

#contact-form input[type=submit]:hover {
  background: #e55a00;
}

.form-message {
  margin-top: 1rem;
  font-weight: bold;
}

/* Sidebar collapsed state */
#navbar {
    transition: width 0.3s ease;
}

#navbar.collapsed .label { display: none; }
#navbar.collapsed { width: 60px; }
#navbar.collapsed #logo {
    display: none;
}

.sidebar-toggle {
    display: block;  /* always visible */
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #555;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle:hover { background: #f0f0f0; }