/* home.css
   Loaded only on normal.html, after base.css.
*/

/* =========================================================
   1. Sidebar (desktop only, hidden below 768px in the HTML)
   ========================================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: var(--cashmere-dark);
  border-right: 1px solid var(--border);
  gap: 32px;
  padding-top: calc(var(--nav-height) + 60px);
}

.sidebar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  transition: color 0.2s;
}

.sidebar-link span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

/* .active is added automatically by Bootstrap Scrollspy */
.sidebar-link:hover,
.sidebar-link.active {
  color: var(--accent);
}

.sidebar-link:hover span,
.sidebar-link.active span {
  background: var(--accent);
  color: var(--cashmere);
}

/* =========================================================
   2. Layout
   ========================================================= */
.main-content {
  padding-top: var(--nav-height);
}

@media (min-width: 768px) {
  .main-content {
    margin-left: var(--sidebar-width);
  }
}

.section-label {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}

/* =========================================================
   3. Hero
   ========================================================= */
.hero {
  min-height: 50vh;
  padding: 48px 16px;
}

.hero-initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--cashmere);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-title {
  font-family: var(--font-accent);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-bio {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

/* =========================================================
   4. Shared card surface (experience + projects)
   ========================================================= */
.exp-card,
.project-card,
.contact-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cashmere-dark);
}

/* =========================================================
   5. Experience
   ========================================================= */
.exp-card {
  padding: 24px;
  margin-bottom: 16px;
}

.exp-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px 16px;
}

.exp-role {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.exp-company {
  font-family: var(--font-accent);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 0;
}

.exp-date {
  font-family: var(--font-accent);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.exp-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 12px 0 0;
}

/* =========================================================
   6. Projects
   Every card has the same slots, top to bottom:
   media, body (badge, name, desc, tags), footer.
   ========================================================= */
.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Media: fixed shape so all four cards line up */
.project-media {
  aspect-ratio: 16 / 10;
  /* background: radial-gradient(ellipse 70% 80% at 50% 45%, #fffdf8 0%, var(--cashmere) 45%, rgba(var(--accent-rgb), 0.22) 100%), var(--border); */
  background: radial-gradient(ellipse 70% 80% at 50% 45%, #fffdf8 0%, var(--cashmere) 45%, #d8cfbb 100%);
  /* background: radial-gradient(ellipse at 50% 45%, var(--cashmere) 0%, var(--border) 100%); */
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Default: show the whole image (good for portrait phone shots) */
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  filter: drop-shadow(0 10px 18px rgba(38, 38, 38, 0.18));
}

/* For landscape photos: fill the frame, crop the edges */
.project-media--cover img {
  object-fit: cover;
  padding: 0;
  filter: none;
}

/* Code excerpt used as media (Plate Calculator) */
.project-media--code {
  background: var(--text-primary);
}

.project-media--code pre {
  margin: 0;
  height: 100%;
  padding: 16px 20px;
  color: var(--border);
  font-size: 12px;
  line-height: 1.6;
  overflow: hidden;
}

.project-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  margin: 10px 0 8px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1; /* pushes tags and footer to the bottom so cards align */
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--font-accent);
  font-size: 10px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 3px;
  padding: 2px 8px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.project-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.project-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* =========================================================
   7. Contact
   ========================================================= */
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.contact-item:hover {
  border-color: var(--accent);
}

.contact-label {
  font-family: var(--font-accent);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 60px;
}

.contact-value {
  font-size: 13px;
  color: var(--text-secondary);
  overflow-wrap: anywhere; /* long email wraps on small phones */
}

.form-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  background: var(--cashmere-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  padding: 10px 14px;
}

.form-control:focus {
  background: var(--cashmere-dark);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
  color: var(--text-primary);
}

.project-media img {
  /* existing rules stay */
  filter: drop-shadow(0 10px 18px rgba(38, 38, 38, 0.18));
}

/* Full-bleed photos don't need a shadow */
.project-media--cover img {
  filter: none;
}