/* Mariia Si portfolio — approved style guide */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

/* Shared colours make the site easy to update. */
:root {
  --background: #121826;
  --background-secondary: #24324A;
  --accent: #C78672;
  --accent-secondary: #8FA3BF;
  --text: #F7F7F5;
  --text-secondary: #C8CDD5;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  background: radial-gradient(circle at top right, #24324A, transparent 55%), var(--background);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

h1 {
  margin: 48px 0 24px;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
}
h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
}
p { max-width: 70ch; margin: 0 0 20px; color: var(--text-secondary); }
a, a:visited { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent-secondary);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; height: auto; }

/* Only navigation lists use this layout. */
body > ul, .menu > ul, nav > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 32px;
  padding: 12px;
  list-style: none;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body > ul li a, .menu > ul li a, nav > ul li a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
body > ul li a:hover, .menu > ul li a:hover, nav > ul li a:hover,
nav a[aria-current='page'] {
  background: var(--background-secondary);
  color: var(--accent);
}
.push-right { margin-left: auto; }
#clock {
  min-width: 80px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  text-align: center;
}

.container { display: flex; flex-wrap: wrap; gap: 24px; }
.skills { display: flex; flex-wrap: wrap; gap: 24px; }
.card {
  flex: 1 1 250px;
  min-width: 0;
  padding: 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card:hover { border-color: var(--accent-secondary); }
.skill-tag { font-family: 'IBM Plex Mono', monospace; color: var(--accent-secondary); }

/* Contact form uses the same colours as the other pages. */
.contact-container {
  width: 100%;
  max-width: 600px;
  margin: 32px 0;
  padding: 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}
.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--accent-secondary);
  border-radius: 8px;
  background: var(--background);
  color: var(--text);
  font: inherit;
}
.form-group textarea { resize: vertical; min-height: 150px; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-secondary); opacity: 1; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.submit-btn, .button {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--background);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.submit-btn { width: 100%; }
.button:visited { color: var(--background); }
.submit-btn:hover, .button:hover { background: var(--text); color: var(--background); }

/* Keep small screens readable without a complicated menu script. */
@media (max-width: 600px) {
  body { padding: 16px; }
  h1 { margin-top: 32px; }
  body > ul, .menu > ul, nav > ul { padding: 8px; gap: 2px; }
  body > ul li a, .menu > ul li a, nav > ul li a { padding: 10px; font-size: 0.9rem; }
  .card, .contact-container { padding: 24px; }
  .card { flex-basis: 100%; }
}

/* Content pages */
.skip-link { position: absolute; top: 8px; left: 16px; padding: 8px 16px; background: var(--text); color: var(--background); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.page-intro { font-size: 1.125rem; max-width: 65ch; }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 32px 0; }
.content-grid h2 { font-size: 1.35rem; }
.content-grid .card p:last-child { margin-bottom: 0; }
.card-label { display: block; margin-bottom: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--accent-secondary); font-size: 0.875rem; }
.project { margin: 32px 0; }
.project h2 { font-size: 1.65rem; }
.project p { max-width: 75ch; }
.rack-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.rack-comparison figure { margin: 0; }
.rack-comparison img { width: 100%; height: 480px; object-fit: contain; background: var(--background); border-radius: 8px; }
.rack-comparison figcaption { margin-top: 12px; color: var(--text-secondary); font-size: 0.9rem; }
.outside-work { margin: 40px 0; }
.outside-work h2 { font-size: 1.35rem; }
footer { margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--glass-border); color: var(--text-secondary); font-size: 0.875rem; }
@media (max-width: 900px) { .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .content-grid, .rack-comparison { grid-template-columns: 1fr; }
  .rack-comparison img { height: auto; }
}

/* Home and About introductions */
.hero, .about-intro { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; margin: 40px 0; }
.hero h1, .about-intro h1 { margin-top: 0; }
.eyebrow { font-family: 'IBM Plex Mono', monospace; color: var(--accent-secondary); font-size: 0.9rem; }
.role { color: var(--text); font-weight: 600; font-size: 1.25rem; }
.profile-photo { width: 100%; max-height: 480px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 80%; border-radius: 16px; }
.about-intro .profile-photo { max-height: 340px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button.secondary, .button.secondary:visited { background: transparent; color: var(--text); border-color: var(--glass-border); }
.button.secondary:hover { background: var(--glass); border-color: var(--accent); }
.featured-projects { margin-top: 48px; }
/* Small previews open a bounded image viewer. */
.project-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.project-gallery.rack-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
.project-gallery figure { margin: 0; }
.gallery-trigger { display: block; width: 100%; padding: 0; border: 1px solid var(--glass-border); border-radius: 8px; overflow: hidden; background: var(--background); cursor: pointer; }
.gallery-trigger:hover { border-color: var(--accent); }
.gallery-trigger img { width: 100%; height: 150px; object-fit: contain; }
.rack-gallery .gallery-trigger img { height: 180px; }
.project-gallery figcaption { font-size: 0.875rem; color: var(--text-secondary); margin-top: 8px; }
.gallery-help { margin-top: 20px; font-size: 0.875rem; }
.gallery-dialog { width: min(920px, 92vw); max-height: 88vh; padding: 24px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--background); color: var(--text); overflow: auto; }
.gallery-dialog::backdrop { background: rgba(0, 0, 0, 0.75); }
.gallery-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.gallery-toolbar h2 { font-size: 1.25rem; margin: 0; }
.gallery-dialog button { padding: 8px 14px; min-height: 44px; background: var(--background-secondary); color: var(--text); border: 1px solid var(--glass-border); border-radius: 8px; font: inherit; cursor: pointer; }
.gallery-dialog button:hover { border-color: var(--accent); }
.gallery-dialog img { width: 100%; height: 55vh; object-fit: contain; }
.gallery-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.gallery-controls p { margin: 0; font-size: 0.875rem; text-align: center; }
body:has(.gallery-dialog[open]) { overflow: hidden; }
@media (max-width: 700px) {
  .hero, .about-intro { grid-template-columns: 1fr; gap: 24px; }
  .profile-photo { max-height: 380px; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-gallery.rack-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rack-gallery .gallery-trigger img { height: 150px; }
  .gallery-dialog { padding: 16px; }
  .gallery-dialog img { height: 45vh; }
  .gallery-controls { flex-wrap: wrap; }
}

/* Keep the face visible in the smaller About photo. */
.about-intro .profile-photo { object-position: 50% 50%; }
.gallery-dialog img { height: auto; max-height: 55vh; }
@media (max-width: 700px) {
  .gallery-dialog img { height: auto; max-height: 45vh; }
  .gallery-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .gallery-controls p { grid-column: 1 / -1; grid-row: 1; }
  .gallery-controls button { white-space: nowrap; }
}

/* Shared logo and language navigation. */
.site-nav { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 32px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; }
.site-nav .brand { padding: 0; flex-shrink: 0; line-height: 0; width: 170px; height: 32px; position: relative; overflow: hidden; margin-right: 16px; }
/* Display the approved PNG without its empty margins. */
.site-nav .brand img { position: absolute; width: 280px; max-width: none; height: auto; left: -14px; top: -35px; }
.site-nav ul { padding: 0; margin: 0; border: 0; background: none; }
.language-switch { display: flex; gap: 4px; margin-left: auto; }
.language-switch button { padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #F7F7F5; font: inherit; cursor: pointer; }
.language-switch button[aria-pressed="true"] { background: #24324A; border-color: #C78672; }
.language-switch button:hover { background: #24324A; }
.language-switch button:focus-visible { outline: 2px solid #C78672; outline-offset: 3px; }
@media (max-width: 1000px) {
  .site-nav { flex-wrap: wrap; }
  .site-nav .brand { order: 1; }
  .language-switch { order: 2; }
  .site-nav ul { order: 3; flex-basis: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .site-nav { padding: 10px; gap: 8px; }
  .site-nav ul a { padding: 8px 9px; font-size: .9rem; }
}

/* Place the portrait beside the introduction, before the longer description. */
.hero, .about-intro { column-gap: 40px; row-gap: 0; }
.intro-heading { grid-column: 1; }
.intro-details { grid-column: 1; }
.hero > .eyebrow { grid-column: 1; margin-top: 0; }
.hero > .profile-photo { grid-column: 2; grid-row: 1 / span 3; }
.about-intro > .profile-photo { grid-column: 2; grid-row: 1 / span 2; }
.intro-heading .role { margin-bottom: 12px; }
@media (max-width: 700px) {
  .hero, .about-intro { grid-template-columns: minmax(0, 1fr) 112px; column-gap: 18px; row-gap: 20px; align-items: center; margin-top: 28px; }
  .hero > .eyebrow { grid-column: 1 / -1; grid-row: 1; margin: 0; font-size: .8rem; }
  .intro-heading { grid-column: 1; min-width: 0; }
  .intro-heading h1 { font-size: clamp(1.65rem, 7vw, 2.4rem); line-height: 1.15; margin: 0 0 14px; }
  .intro-heading .role { font-size: .95rem; line-height: 1.5; margin: 0; }
  .hero > .profile-photo { grid-column: 2; grid-row: 2; }
  .about-intro > .profile-photo { grid-column: 2; grid-row: 1; }
  .hero > .profile-photo, .about-intro > .profile-photo { width: 112px; height: 170px; max-height: none; aspect-ratio: auto; object-position: 65% 70%; border-radius: 14px; }
  .intro-details { grid-column: 1 / -1; }
  .intro-details > p:first-child { margin-top: 0; }
  .site-nav .brand { margin-right: 0; }
}
@media (max-width: 350px) {
  .hero, .about-intro { grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; }
  .hero > .profile-photo, .about-intro > .profile-photo { width: 96px; height: 160px; }
}

/* Warm Modern: the approved colours with translucent panels and soft shapes. */
html { background: radial-gradient(ellipse at 95% 5%, rgba(199,134,114,.16), transparent 42%), radial-gradient(ellipse at 10% 85%, rgba(143,163,191,.12), transparent 50%), #121826; }
body { position: relative; isolation: isolate; background: transparent; }
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
body::before { top: -140px; right: -160px; width: 580px; height: 580px; border-radius: 45% 55% 60% 40%; background: rgba(199,134,114,.065); transform: rotate(-25deg); }
body::after { left: -180px; bottom: -300px; width: 850px; height: 650px; border-radius: 50%; background: rgba(143,163,191,.04); transform: rotate(20deg); }
.site-nav { background: rgba(12,16,24,.45); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 20px 20px 0 0; margin-bottom: 0; }
.site-nav ul { backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-nav ul a[aria-current="page"] { background: transparent; border-radius: 0; position: relative; }
.site-nav ul a[aria-current="page"]::after { content: ""; position: absolute; height: 2px; background: var(--accent); left: 14px; right: 14px; bottom: 3px; }
.page-shell { padding: 32px; background: rgba(12,16,24,.38); border: 1px solid var(--glass-border); border-top: 0; border-radius: 0 0 20px 20px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero { grid-template-columns: 1.15fr .85fr; margin: 20px 0 48px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.7rem); }
.accent-name { color: var(--accent); }
.hero .page-intro { font-size: 1rem; }
.hero .role { font-size: 1.2rem; }
.hero .eyebrow { font-size: .8rem; letter-spacing: .06em; }
.portrait-panel { grid-column: 2; grid-row: 1 / span 3; position: relative; align-self: center; padding-bottom: 40px; }
.portrait-panel .profile-photo { height: 390px; max-height: none; object-position: 65% 70%; border: 1px solid rgba(199,134,114,.45); }
.portrait-note { position: absolute; right: -12px; bottom: 0; width: 205px; padding: 16px 20px; border-radius: 14px; border: 1px solid rgba(199,134,114,.5); background: linear-gradient(135deg,rgba(143,163,191,.18),rgba(199,134,114,.14)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.note-label { color: var(--accent); font-size: .75rem; font-weight: 700; }
.portrait-note ul { list-style: none; padding: 0; margin: 6px 0 0; font-size: .875rem; line-height: 1.8; }
.portrait-note li::before { content: "◇"; color: var(--accent); margin-right: 10px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 1.6rem; }
.section-heading a { font-size: .875rem; text-decoration: none; }
.card, .contact-container { background: linear-gradient(135deg,rgba(143,163,191,.11),rgba(255,255,255,.045)); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.featured-projects .content-grid { gap: 18px; margin-bottom: 0; }
.featured-card { padding: 14px; display: flex; flex-direction: column; }
.project-preview { display: block; height: 150px; margin-bottom: 16px; border: 1px solid var(--glass-border); border-radius: 9px; overflow: hidden; background: var(--background); }
.project-preview img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .card-label { font-size: .7rem; margin-bottom: 7px; }
.featured-card h2 { font-size: 1.2rem; margin-bottom: 10px; }
.featured-card p { font-size: .875rem; margin-bottom: 14px; }
.featured-card > a:last-of-type { font-size: .8rem; margin-top: auto; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.project-tags span { font-size: .7rem; background: rgba(143,163,191,.15); border-radius: 6px; padding: 3px 7px; }
.portfolio-preview { display: grid; place-items: center; padding: 12px; background: radial-gradient(ellipse at top right,rgba(199,134,114,.3),transparent),#121826; }
.mini-browser { width: 100%; max-width: 200px; border: 1px solid var(--glass-border); border-radius: 6px; overflow: hidden; background: rgba(12,16,24,.7); }
.mini-toolbar { font-size: 8px; color: var(--accent); padding: 3px 8px; border-bottom: 1px solid var(--glass-border); }
.mini-content { padding: 10px; font-size: 13px; }
.mini-code { color: var(--accent); margin-right: 8px; }
.mini-lines { height: 15px; margin: 8px 0; width: 70%; border-top: 3px solid rgba(255,255,255,.2); border-bottom: 3px solid rgba(255,255,255,.12); }
.mini-cards { display: flex; gap: 6px; }
.mini-cards span { height: 20px; flex: 1; background: rgba(143,163,191,.15); border: 1px solid var(--glass-border); border-radius: 3px; }
@media (max-width: 700px) {
 .page-shell { padding: 22px 18px; }
 .hero { grid-template-columns: minmax(0,1fr) 112px; margin-top: 4px; margin-bottom: 32px; column-gap: 16px; }
 .hero h1 { font-size: clamp(1.65rem,7vw,2.4rem); }
 .hero .role { font-size: .9rem; }
 .portrait-panel { grid-column: 2; grid-row: 2; padding: 0; }
 .portrait-panel .profile-photo { width: 112px; height: 180px; object-position: 65% 70%; }
 .portrait-note { display: none; }
 .hero > .eyebrow { letter-spacing: 0; }
 .intro-details .actions { margin-top: 20px; }
 .featured-projects { margin-top: 32px; }
 .project-preview { height: 170px; }
 .about-intro { margin-top: 4px; }
}
@media (max-width: 350px) {
 .page-shell { padding: 18px 12px; }
 .hero, .about-intro { grid-template-columns: minmax(0,1fr) 96px; column-gap: 12px; }
 .portrait-panel .profile-photo { width: 96px; height: 170px; }
 .site-nav .brand { width: 150px; }
}
@media (max-width: 700px) {
  .portrait-panel { width: 112px; height: 180px; overflow: hidden; border-radius: 14px; border: 1px solid rgba(199,134,114,.45); }
  .portrait-panel .profile-photo { position: absolute; width: 190px; max-width: none; height: 340px; left: -55px; top: -65px; border: 0; }
  .site-nav ul a { padding: 11px 7px; font-size: .8rem; min-height: 44px; }
}
@media (max-width: 350px) { .portrait-panel { width: 96px; height: 170px; } }

/* About tells the story; Home introduces the work. */
.story-intro { max-width: 800px; margin: 20px 0 44px; }
.story-intro .eyebrow { margin-bottom: 16px; }
.story-intro h1 { margin-top: 0; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 22ch; }
.story-intro .page-intro { margin-bottom: 0; font-size: 1.05rem; }
.story-section-title { font-size: 1.4rem; }
.journey-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 0; margin: 24px 0 32px; list-style: none; }
.journey-card { position: relative; padding: 26px; }
.journey-number { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 24px; border: 1px solid rgba(199,134,114,.45); border-radius: 50%; color: var(--accent); background: rgba(199,134,114,.08); font-family: 'IBM Plex Mono', monospace; font-size: .875rem; }
.journey-card:not(:last-child)::after { content: "→"; position: absolute; right: -19px; top: 34px; color: var(--accent); font-size: 1.2rem; }
.journey-card h2 { font-size: 1.25rem; }
.journey-card p { font-size: .95rem; margin-bottom: 0; }
.story-outside { display: flex; align-items: center; gap: 24px; padding: 24px 28px; margin: 0; }
.story-outside h2 { margin-bottom: 8px; }
.story-outside p { margin: 0; }
.outside-symbol { color: var(--accent); font-size: 2rem; }
.story-actions { margin-top: 28px; }
@media (max-width: 700px) {
 .story-intro { margin-top: 4px; margin-bottom: 32px; }
 .story-intro h1 { font-size: 2.1rem; }
 .journey-grid { grid-template-columns: 1fr; gap: 22px; }
 .journey-card { padding: 24px; }
 .journey-number { margin-bottom: 16px; }
 .journey-card:not(:last-child)::after { content: "↓"; top: auto; bottom: -24px; right: 28px; }
 .story-outside { gap: 16px; padding: 22px; }
}

/* Shared page rhythm and onward navigation. */
.page-header { max-width: 800px; margin: 20px 0 40px; }
.page-header .eyebrow { margin-bottom: 16px; font-size: .8rem; letter-spacing: .04em; }
.page-header h1 { margin: 0 0 24px; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 24ch; }
.page-header .page-intro { font-size: 1.05rem; margin-bottom: 0; }
.content-grid { gap: 22px; }
.card, .contact-container { border-radius: 16px; }
.skills-grid .card { padding: 26px; display: flex; flex-direction: column; }
.skills-grid .card p { font-size: .95rem; }
.evidence-link { margin-top: auto; padding-top: 12px; font-size: .85rem; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 28px; border-top: 1px solid rgba(199,134,114,.3); background: linear-gradient(110deg,rgba(199,134,114,.09),rgba(143,163,191,.045)); border-radius: 14px; }
.next-step h2 { font-size: 1.4rem; margin-bottom: 8px; }
.next-step p { margin: 0; max-width: 55ch; font-size: .95rem; }
.next-step .button { flex-shrink: 0; text-align: center; }
.project { padding: 28px; scroll-margin-top: 24px; }
.case-details { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 24px; margin: 24px 0; }
.case-details h3 { font-size: .9rem; color: var(--accent-secondary); margin: 0 0 10px; font-weight: 600; }
.case-details p { font-size: .95rem; margin: 0; }
.project .gallery-help { border-top: 1px solid var(--glass-border); padding-top: 18px; }
.contact-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 24px; align-items: start; }
.contact-layout .contact-container { max-width: none; margin: 0; padding: 28px; }
.contact-layout h2 { font-size: 1.4rem; }
.contact-aside { padding: 28px; }
.contact-aside p { font-size: .95rem; }
.contact-aside .button { font-size: .85rem; }
.contact-aside h3 { font-size: 1rem; margin: 30px 0 14px; }
.contact-topics { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: .95rem; }
.contact-topics li + li { margin-top: 10px; }
.site-footer { display: flex; align-items: start; justify-content: space-between; gap: 28px; }
.footer-identity strong { color: var(--text); font-size: 1rem; }
.footer-identity p { margin: 8px 0 12px; font-size: .8rem; }
.footer-identity small { font-size: .75rem; }
.footer-links { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 0; list-style: none; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-footer nav ul a { padding: 0; font-size: .8rem; font-weight: 400; color: var(--text-secondary); border-radius: 0; }
.site-footer nav ul a:hover { color: var(--accent); background: transparent; }
.footer-linkedin { font-size: .85rem; }
.site-nav ul a:not([aria-current="page"]), .site-nav ul a:not([aria-current="page"]):visited { color: var(--text); }
@media (max-width: 900px) {
 .case-details { grid-template-columns: 1fr; gap: 20px; }
 .contact-layout { grid-template-columns: 1fr; }
 .next-step { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 700px) {
 .page-header { margin-top: 4px; margin-bottom: 30px; }
 .page-header h1 { font-size: 2.1rem; }
 .page-header .eyebrow { letter-spacing: 0; }
 .skills-grid .card, .project, .contact-layout .contact-container, .contact-aside { padding: 22px; }
 .next-step { padding: 22px; margin-top: 32px; gap: 18px; }
 .next-step h2 { font-size: 1.25rem; }
 .next-step .button { max-width: 100%; }
 .site-footer { flex-direction: column; gap: 22px; }
 .footer-links { align-items: flex-start; }
 .site-footer nav ul { gap: 16px; }
 .site-footer nav ul a { display: inline-block; padding: 6px 0; }
}

/* Audit adjustments: one keyboard stop per project card and readable photo overlay. */
.featured-card { padding: 0; }
.featured-card > .project-card-link { display: flex; flex-direction: column; height: 100%; padding: 14px; font: inherit; text-decoration: none; color: var(--text); border-radius: 16px; }
.project-card-link:visited { color: var(--text); }
.project-card-link:hover h2 { color: var(--accent); }
.project-card-link:focus-visible { outline: 3px solid var(--accent-secondary); outline-offset: 4px; }
.project-card-link .project-tags { margin-top: auto; padding-top: 12px; }
.mini-toolbar { display: flex; gap: 4px; min-height: 16px; align-items: center; }
.mini-toolbar span { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.portrait-note { background: linear-gradient(135deg,rgba(36,50,74,.94),rgba(18,24,38,.96)); }
#main-content:focus { outline: none; }
