/* ============================================================
   redbdesign.com — ph_styles_v2.css
   Modern dark/red aesthetic
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --black:      #1a1a1a;
  --surface:    #f5f3ef;
  --surface2:   #edeae4;
  --border:     #d8d4cc;
  --red:        #e63946;
  --red-dim:    #c0202e;
  --white:      #ffffff;
  --text:       #1a1a1a;
  --grey:       #666;
  --grey-light: #888;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'DM Sans', Helvetica, sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --site-max:   1100px;
  --radius:     6px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: .75; }

/* ── Nav ──────────────────────────────────────────────────── */
#ph_nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
#ph_logo a { display: flex; align-items: center; }
#ph_logo {
  width: 36px; /* always holds space so nav links don't shift */
  height: 36px;
  flex-shrink: 0;
}
#ph {
  width: 36px; height: 36px; border-radius: 50%;
  opacity: 0;
  transition: opacity .4s ease, transform .6s ease;
  display: block;
}
#ph.logo-visible { opacity: 1; }
#ph:hover { transform: rotate(360deg); }

ul.ph_topMenu {
  list-style: none;
  display: flex;
  gap: 32px;
}
ul.ph_topMenu li a {
  color: var(--grey);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
ul.ph_topMenu li a:hover {
  color: var(--black);
  opacity: 1;
  border-bottom-color: var(--red);
}

/* ── Page offset for fixed nav ────────────────────────────── */
body > div[id] { scroll-margin-top: 64px; }

/* ── Section shared ───────────────────────────────────────── */
.ph_section {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 96px 40px;
}
.ph_section-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--red);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.ph_section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 40px;
}

/* ── Divider ──────────────────────────────────────────────── */
.ph_divider {
  border: none;
  border-top: 1px solid var(--border);
}

/* ── ABOUT ────────────────────────────────────────────────── */
#About {
  padding-top: 80px;
  padding-bottom: 32px;
  background: var(--white);
}
.ph_siteTitle {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--black);
  margin-bottom: 28px;
}
.ph_siteTitle span.red { color: var(--red); }

.about_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 48px;
}

/* ── About layout ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "photo photo"
    "text skills";
  column-gap: 48px;
  row-gap: 32px;
  margin-top: 28px;
  align-items: start;
}
.about-photo { grid-area: photo; }
.about-text  { grid-area: text; }
.graphBlock  { grid-area: skills; padding-top: 0; }

img.phMain {
  width: 85%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,.40);
}
.about-text strong {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--red);
  letter-spacing: .2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}
.bio {
  color: var(--grey);
  font-size: 1.05rem;
  line-height: 1.7;
}
/* Skills hidden — bio spans full width below image */
.about-grid-simple {
  display: grid;
  grid-template-areas:
    "photo"
    "text";
  margin-top: 28px;
}
.about-grid-simple .about-photo { grid-area: photo; }
.about-grid-simple .about-text-full {
  grid-area: text;
  padding-top: 32px;
  max-width: 720px;
}
.about-text-full strong {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--red);
  letter-spacing: .2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}
  padding: 20px 0;
}
.skills-hidden-text p {
  color: var(--grey);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
}
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--red);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Social links in contact */
.socialContainer {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  flex-direction: row;
  margin-bottom: 32px;
}
.contactItem {
  display: inline-flex;
  align-items: center;
}
.contactItem a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  font-size: .95rem;
  transition: color var(--transition);
  margin-right:30px;
}
.contactItem a:hover { color: var(--black); opacity: 1; }
.socialIconImg { width: 22px; height: 22px; display: inline-block; }

/* Contact form — existing markup */
.contactContainer { max-width: 560px; }
.ph_contact p { margin-bottom: 14px; }
.ph_contact label {
  display: block;
  font-size: .8rem;
  color: var(--grey);
  margin-bottom: 4px;
  font-weight: 500;
}
input.c_form, textarea.c_form {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .95rem;
  transition: border-color var(--transition);
}
input.c_form:focus, textarea.c_form:focus {
  outline: none;
  border-color: var(--red);
}
textarea.c_form { height: 140px; resize: vertical; }
input.formSanity {
  padding: 12px 28px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}
input.formSanity:hover { opacity: .85; }
.respnseMsg { color: var(--red); font-size: .9rem; margin-bottom: 10px; min-height: 20px; }
/* Skills bars */
.skills_title {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--red);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 36px 0 16px;
}
.barContainer {
  margin-bottom: 10px;
}
.barContainer {
  margin-bottom: 10px;
  border-radius: 2px;
  /* No background track — clean look */
}
.barFill {
  background: #ccc;
  border-radius: 2px;
  padding: 5px 10px;
  position: relative;
  width: 30% !important;
  transition: width 1.4s cubic-bezier(.4,0,.2,1), background .4s ease;
  cursor: default;
  min-width: 60px;
  overflow: visible;
}
.percent {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .72rem;
  color: #fff;
  font-family: var(--font-mono);
  opacity: 0;
  transition: none;
}

.graphBlock:hover .percent {
  opacity: 1;
}

/* When mouse enters graphBlock: all bars expand and go blue, percentages appear */
.graphBlock:hover .barFill {
  width: var(--bar-width) !important;
  background: linear-gradient(90deg, #1f7cbb, #47acfe);
}
.graphBlock:hover .percent {
  opacity: 1;
}
.tagLBL {
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-mono);
  display: inline;
}
.percent {
  position: absolute;
  right: -38px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .72rem;
  color: var(--grey);
  font-family: var(--font-mono);
}

/* ── PORTFOLIO ────────────────────────────────────────────── */
#Portfolio {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Filter tabs */
.port_filters {
  display: flex;
  gap: 4px;
  margin-bottom: 40px;
}
.port_filter {
  padding: 7px 20px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--grey);
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.port_filter:hover { color: var(--black); border-color: #999; }
.port_filter.active { background: var(--red); border-color: var(--red); color: #fff; }

/* Grid — image only, tight */
.port_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  grid-auto-flow: dense;
}
.port_item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border-radius: 6px;
  background: var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.port_item * { pointer-events: none; }
.port_item:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  transform: translateY(-2px);
}
.port_item.port_featured { 
	/* outline: 2px solid var(--red); */
	display:none;
	}
.port_thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .4s ease, filter .4s ease;
}
.port_item:hover .port_thumb {
  transform: scale(1.05);
  filter: brightness(.7);
}
/* Hide all port_info in grid — shown in lightbox only */
.port_info { display: none; }

/* ── Lightbox ─────────────────────────────────────────────── */
#ph_lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.80);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#ph_lightbox.open { display: flex; }

#ph_lightbox_inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#ph_lightbox img {
  max-height: 75vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

#ph_lightbox_caption {
  text-align: center;
  color: #fff;
  min-height: 48px;
}
#ph_lightbox_caption h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 4px;
}
#ph_lightbox_caption p {
  font-size: .9rem;
  color: #aaa;
}

/* Prev / Next */
.ph_lb_arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1001;
}
.ph_lb_arrow:hover { background: rgba(255,255,255,.25); }
#ph_lb_prev { left: 16px; }
#ph_lb_next { right: 16px; }

/* Close */
#ph_lb_close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  opacity: .7;
  transition: opacity .2s;
}
#ph_lb_close:hover { opacity: 1; }

/* Counter */
#ph_lb_counter {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #aaa;
  font-family: var(--font-mono);
  font-size: .75rem;
  z-index: 1001;
}

.port_pdf_badge { display: none; } /* hidden in grid, shown in lightbox caption */
.port_featured { 
	/*outline: 2px solid var(--red); */
	display:none;
	}
.port_cat-web   { background: #dbeafe; color: #1d4ed8; }
.port_cat-print { background: #fde8e8; color: #c0392b; }
.port_cat-photo { background: #dcfce7; color: #166534; }

/* ── CLIENTS ──────────────────────────────────────────────── */
#Clients { background: var(--white); }
.clients_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.client_item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  transition: border-color var(--transition);
}
.client_item:hover { border-color: var(--red); }
.client_item img { max-height: 40px; filter: grayscale(1); transition: filter var(--transition); }
.client_item:hover img { filter: none; }
.client_name { color: var(--grey); font-size: .85rem; font-weight: 500; text-align: center; }

/* ── CONTACT ──────────────────────────────────────────────── */
#Contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.contact_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact_links { margin-top: 28px; }
.contact_link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--grey-light);
  font-size: .95rem;
  transition: color var(--transition);
}
.contact_link:hover { color: var(--white); opacity: 1; }
.contact_link img { width: 22px; height: 22px; opacity: .7; }

/* Contact form */
.contact_form { display: flex; flex-direction: column; gap: 14px; }
.contact_form input,
.contact_form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .95rem;
  transition: border-color var(--transition);
}
.contact_form input:focus,
.contact_form textarea:focus {
  outline: none;
  border-color: var(--red);
}
.contact_form textarea { height: 140px; resize: vertical; }
.contact_form button {
  padding: 13px 32px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: opacity var(--transition);
  align-self: flex-start;
}
.contact_form button:hover { opacity: .85; }
.msgResponseDiv { color: var(--grey-light); font-size: .9rem; padding: 12px 0; }
.successMsg { color: #4ade80; font-size: .95rem; }

/* ── Footer ───────────────────────────────────────────────── */
#footer {
  text-align: center;
  padding: 28px 40px;
  color: #aaa;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  border-top: 1px solid var(--border);
  background: var(--white);
}
#footer span { color: var(--red); }

/* ── Scroll-to-top ────────────────────────────────────────── */
#scroll {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 90;
}
#scroll.visible { opacity: 1; }
#scroll::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(-45deg) translate(2px, 2px);
}

/* ── Animations ───────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────── */
/* Hidden items for load-more */
.port-hidden { display: none !important; }

@media (max-width: 768px) {
  /* ── Nav ── */
  #ph_nav { padding: 0 16px; height: 52px; }
  ul.ph_topMenu { gap: 20px; }
  ul.ph_topMenu li a { font-size: .75rem; }

  /* ── Sections ── */
  .ph_section { padding: 40px 16px; }
  #About { padding-top: 68px; padding-bottom: 24px; }

  /* ── Hero ── */
  .ph_siteTitle { font-size: clamp(2rem, 10vw, 3.5rem); margin-bottom: 20px; }
  .about-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "text"
      "skills";
    row-gap: 20px;
  }
  .about-grid-simple {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "text";
    row-gap: 20px;
  }
  img.phMain { width: 100%; }

  /* ── Skills bars ── */
  .graphBlock { padding-top: 20px; }
  .barFill { min-width: 40px; }
  .percent { right: 4px; font-size: .65rem; }

  /* ── Portfolio ── */
  .ph_section-title { font-size: 1.8rem; }
  .port_filters { gap: 6px; flex-wrap: wrap; }
  .port_filter { padding: 6px 14px; font-size: .75rem; }
  .port_grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* ── Lightbox ── */
  #ph_lb_prev { left: 4px; }
  #ph_lb_next { right: 4px; }
  .ph_lb_arrow { width: 36px; height: 36px; font-size: 1.4rem; }
  #ph_lightbox_inner { padding: 0 8px; }
  #ph_lightbox_caption h3 { font-size: 1rem; }

  /* ── Contact ── */
  .contactItem { display: inline-flex; }
  .contactItem a { font-size: .85rem; }

  /* ── Portfolio ── */
  .port_grid { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* ── Footer ── */
  #footer { padding: 20px 16px; }
}
