*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette (phillybirdhouse.com) */
  --paper:        #f4f0e6;
  --ink:          #161616;
  --signal:       #ddf226;
  --signal-hover: #e7fa49;
  --brick:        #a95539;

  /* Brand type */
  --font-display: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-sans:    Arial, Helvetica, sans-serif;
  --font-mono:    'Courier New', monospace;

  /* Portfolio roles mapped onto the brand */
  --bg:           var(--paper);
  --sidebar-bg:   var(--ink);
  --dark:         var(--ink);
  --mid:          #59574e;
  --muted:        #68645a;
  --on-ink-muted: #cbc8bd;
  --ink-raised:   #292923;
  --ink-line:     #65654d;
  --accent:       var(--signal);
  --accent-light: var(--ink-raised);
  --card-bg:      #faf8f2;
  --card-border:  #d6d2c7;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 3px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  font-weight: 300;
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* ── SIDEBAR ── */
aside {
  width: 20%;
  min-width: 256px;   /* room for the name, tabs and email on one line each */
  flex-shrink: 0;
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--ink);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 1.2rem;
  height: 100%;
}

/* Avatar */
.avatar-wrap {
  width: 160px;
  height: 160px;
  position: relative;
  margin-bottom: 0.25rem;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ink-raised);
  border: 2px solid var(--signal);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-placeholder svg {
  width: 56px;
  height: 56px;
  fill: var(--muted);
}

/* Name & title */
.sidebar-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--paper);
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--signal);
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.divider {
  width: 32px;
  height: 1px;
  background: var(--signal);
}

.location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--on-ink-muted);
  font-size: 0.9rem;
  font-weight: 300;
}

.location svg { stroke: var(--signal); flex-shrink: 0; }

.resume-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  background: var(--accent);
  border: none;
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.25rem;
}

.resume-btn:hover {
  background: var(--signal-hover);
  transform: translateY(-1px);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  margin-top: 2.5rem;
}

.sidebar-nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 0.6rem 1rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav a:hover {
  color: var(--signal);
  background: var(--ink-raised);
}

.sidebar-nav a.active {
  color: var(--ink);
  background: var(--signal);
}

.sidebar-spacer {
  flex: 1;
}

/* ── MAIN ── */
main {
  flex: 1;
  min-width: 0;
  padding: 3rem 4rem;
  position: relative;
  z-index: 1;
}

/* Hero */
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--muted);
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.hero-body {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--mid);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* Shared text styles (Resume fallback, Contact) */
.experience-desc {
  text-align: center;
  font-size: 1rem;
  color: var(--mid);
  font-weight: 300;
  line-height: 1.7;
}

.about-intro {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 1rem;
  font-size: 1.1rem;
  color: var(--mid);
  line-height: 1.7;
}

/* About — editorial feature */
.about-feature {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.af-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--card-border);
}

.af-eyebrow {
  font: 0.85rem var(--font-mono);
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.af-headline {
  font: 700 clamp(2.75rem, 5.2vw, 4.6rem)/1.02 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.af-mark {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: none;
}

.af-art {
  margin: 0;
  display: flex;
  justify-content: center;
}

.af-art svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.af-ring { fill: none; stroke: var(--card-border); stroke-width: 2; }
.af-core { fill: var(--paper); stroke: var(--ink); stroke-width: 4; }
.af-wave { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.af-dot  { fill: var(--signal); stroke: var(--ink); stroke-width: 2; }

.af-intro {
  max-width: 36em;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
}

.af-intro strong {
  font-weight: 700;
  background: linear-gradient(transparent 58%, rgba(221, 242, 38, 0.6) 58%);
}

.af-label {
  font: 700 1.6rem/1.1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1.5rem;
}

.af-practice {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.af-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.9rem;
  background: var(--signal);
  color: var(--ink);
  font: 700 0.9rem var(--font-display);
}

.af-practice h4 {
  font: 600 1.3rem/1.15 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.45rem;
}

.af-practice p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--mid);
}

.af-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

.af-invite {
  font: 700 1.45rem/1.25 var(--font-display);
  letter-spacing: 0;
  color: var(--ink);
}

@media (max-width: 960px) {
  .af-hero { grid-template-columns: minmax(0, 1fr) 170px; gap: 1.25rem; }
  .af-practice { grid-template-columns: 1fr; gap: 1.4rem; }
  .af-practice li { display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); }
  .af-practice li > :not(.af-num) { grid-column: 2; }
  .af-num { grid-row: span 2; margin: 0.1rem 0 0; }
}

@media (max-width: 600px) {
  .af-hero { grid-template-columns: 1fr; padding-bottom: 2rem; }
  .af-art { justify-content: flex-start; }
  .af-art svg { max-width: 130px; }
  .af-invite { font-size: 1.25rem; }
  .about-feature { gap: 2rem; }
}

/* Projects */
#projects.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: rgba(22,22,22,0.2);
  box-shadow: 0 4px 24px rgba(22,22,22,0.06);
}

.project-video {
  display: flex;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--card-border);
}

.project-video iframe {
  width: 100%;
  max-width: 680px;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
}

.project-body {
  padding: 1.75rem 2rem;
  display: flow-root;   /* contains the floated screenshot */
}

/* Screenshot floats left; the first paragraph wraps beside it, the rest flows below */
.project-shot {
  float: left;
  width: 44%;
  margin: 0.35rem 1.75rem 1rem 0;
  border: 1px solid var(--ink);
  line-height: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-shot:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--signal);
}

.project-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* keep the button under everything, aligned right, never squeezed beside the picture */
.project-body .demo-btn {
  display: flex;
  width: fit-content;
  margin-left: auto;
  clear: both;
}

@media (max-width: 600px) {
  .project-shot {
    float: none;
    display: block;
    width: 100%;
    margin: 0.25rem 0 1.25rem;
  }
}

.project-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin: 0.3rem 0 0.6rem;
}

.project-desc {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--mid);
  margin-bottom: 1.25rem;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--ink);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.demo-btn:hover {
  background: var(--signal-hover);
  transform: translateY(-1px);
}

/* Section */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--muted);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--dark);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
  text-align: center;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 2px;
  padding: 1.75rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(22,22,22,0.2);
  transform: translateY(-2px);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
  color: var(--dark);
}

.card p {
  font-size: 0.87rem;
  color: var(--mid);
  line-height: 1.75;
  font-weight: 300;
}

.card-placeholder {
  width: 100%;
  height: 150px;
  background: var(--bg);
  border-radius: 2px;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px dashed var(--card-border);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  aside {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.5rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--signal);
    min-height: unset;
  }

  .sidebar-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }

  .avatar-wrap {
    width: 56px;
    height: 56px;
  }

  .sidebar-name {
    font-size: 1.5rem;
  }

  .sidebar-title,
  .location,
  .divider,
  .sidebar-spacer {
    display: none;
  }

  .resume-btn {
    font-size: 0.68rem;
    padding: 0.5rem 1rem;
  }

  .sidebar-nav {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    gap: 0.4rem;
  }

  .sidebar-nav a {
    font-size: 1.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 2px;
    background: var(--accent-light);
    color: var(--paper);
    width: auto;
  }

  .sidebar-nav a.active {
    background: var(--signal);
    color: var(--ink);
  }

  main {
    padding: 2rem 1.25rem;
    width: 100%;
  }

  .project-video iframe {
    max-width: 100%;
  }

  .project-card {
    margin: 0 0 1.25rem;
  }
}
/* ── RESUME SECTION ─────────────────────────────────────────*/

/* Wrapper: centers content and stacks preview above button */
.resume-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 780px;
  margin: 0 auto;
}

/* PDF iframe — sized to show a full page at comfortable reading width */
.resume-preview {
  width: 100%;
  height: 900px;              /* adjust if your resume is taller/shorter */
  border: 0.5px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);        /* matches card background */
}

/* Download button — styled to sit quietly below the preview */
.resume-download {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  font-family: var(--font-sans, sans-serif);  /* matches your sans usage */
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--ink);
  background: var(--signal);
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.resume-download:hover {
  background: var(--signal-hover);
}

/* Responsive: shrink iframe height on smaller screens */
@media (max-width: 700px) {
  .resume-preview {
    height: 600px;
  }
}

/* ── CONTACT SECTION ────────────────────────────────────────*/

.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 560px;    /* narrower than resume — forms read better constrained */
  margin: 0 auto;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Label + input stacked as a unit */
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-label {
  font-family: var(--font-sans, sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-input,
.contact-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--card-bg);           /* matches card background */
  border: 0.5px solid var(--card-border);  /* matches card border */
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: var(--brick);
}

.contact-textarea {
  resize: vertical;              /* let the user resize vertically only */
  min-height: 130px;
}

/* Align the button to the right so it feels like a form action, not a heading */
.contact-submit {
  align-self: flex-end;
}

/* Success message shown after submission */
.contact-success {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: #f5f9d4;
  border: 0.5px solid var(--signal);
  border-radius: 6px;
  text-align: center;
}

@media (max-width: 700px) {
  .contact-submit {
    align-self: stretch;         /* full-width button on mobile */
  }
}