:root {
  --step--2: clamp(0.69rem, calc(0.50rem + 0.51vw), 0.96rem);
  --step--1: clamp(0.83rem, calc(0.57rem + 0.70vw), 1.20rem);
  --step-0: clamp(1.00rem, calc(0.64rem + 0.95vw), 1.50rem);
  --step-1: clamp(1.20rem, calc(0.72rem + 1.29vw), 1.88rem);
  --step-2: clamp(1.44rem, calc(0.79rem + 1.72vw), 2.34rem);
  --step-3: clamp(1.73rem, calc(0.87rem + 2.29vw), 2.93rem);
  --step-4: clamp(2.07rem, calc(0.94rem + 3.03vw), 3.66rem);
  --maintext: #384252;
  --border: #8995AB;
  --secondary: #737F94;
  --accent: #5b0fa8;
  --text-body: #222; /* primary near-black body/heading text (sync with case-studies.css) */
  /* ---- z-index scale ----
     One ordered ladder so stacking is intentional, not ad-hoc magic numbers.
     base/raised = local component stacking; the named tiers are global. */
  --z-below: 0;
  --z-base: 1;
  --z-raised: 2;
  --z-modal: 9999;
  --z-preview-bar: 10000;
}
/* Load site fonts: Poppins for headings, Open Sans for body */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Poppins:wght@400;600;700&display=swap');

BODY {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif; 
  font-size: var(--step-0);
  margin: 0; 
  padding: 0; 
  line-height: 1.6;
  color: var(--maintext);
}
.page {
    background: #fff;
}
H1 {
  font-size: var(--step-4);
  letter-spacing: -.03em;
  margin-bottom: 0;
  font-weight: 700;
  line-height: 1.2;
}
/* Ensure headings use Poppins */
h1,h2,h3,h4,h5,h6{font-family:'Poppins', Helvetica, Arial, sans-serif}
H2 {
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  font-weight: normal; 
  margin: 0 0 1rem 0;
  color: var(--secondary);
  line-height: 1.3;
}
H3 {
  font-size: var(--step-2);
  margin: 0 0 1rem 0;
  line-height: 1.4;
}
h4 {
  font-size: var(--step-1);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}
nav {
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	margin-top: 1.25rem;
	font-size: var(--step-0);
}
B {
	color: green;
}
nav ul {
  list-style: none; 
  margin: 0; 
  padding: 0;
  display: flex;
  flex-direction: column;
}
nav a {
  text-align: center;
	text-decoration:  none; 
	color: var(--maintext); 
	display: block; 
	padding: 1.25rem; 
	transition: all .3s linear;

}
nav a:hover {
	background: green;
	color: #fff;
}

.page {  
  padding: 0;
 } 


@keyframes fadeIn {  
    from {  
      opacity: 0;
    }  
  
    to {  
      opacity: 1;
    }  
  }  


@media screen and (min-width: 769px){
	.page:not(.home-grid) {
    width: 960px; 
    margin: 0 auto;
  }
  nav ul {
    flex-direction: row;
  }
	.home .content {
		column-count: 2;
    column-gap: 40px;
	}
  
  .home .content>p:first-child {
    margin-top: 0;
  }
}

/* Homepage two-column layout */
.home-grid{display:grid;grid-template-columns:minmax(280px, 33vw) 1fr;gap:0;align-items:stretch;min-height:100vh}
.profile-col{background:#2f3640;color:#fff;padding:32px 20px;display:flex;align-items:center}
.profile-inner{padding: 32px; max-width:440px;margin:0 auto;text-align:left}
.profile-photo img{width:120px;height:120px;border-radius:50%;display:block;margin:0 auto 18px}
.profile-col h1{color:#fff;margin:0 0 8px;font-size:var(--step-3);letter-spacing:-.03em;font-weight:700;line-height:1.2}
.profile-col .profile-title{color:#d1d5db;margin-bottom:32px}
.profile-links{display:flex;flex-direction:row;gap:12px;flex-wrap:wrap}
.profile-links a{color:#fff;text-decoration:none;background:transparent;padding:6px 10px;border-radius:4px}
.projects-col{padding:48px 40px;background:#fff}
.projects-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:28px;align-items:start}
.project{background:#fff;border:1px solid #eee;padding:0;text-decoration:none;color:inherit;display:flex;flex-direction:column;overflow:hidden;position:relative;height:280px}
.project .device-frame{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);margin:0;z-index:var(--z-base)}
.project .device-frame.laptop-frame{width:364px;height:auto}
.project .device-frame.phone-frame{width:125px;height:auto;top:calc(50% + 10px)}
.project .device-frame svg{display:block;width:100%;height:auto}
.project .project-info{position:relative;z-index:var(--z-raised);background:#fff;padding:16px;margin-top:auto;border-top:1px solid #eee;text-align:center}
.project h3{margin:0 0 6px;font-size:1.1rem;color:var(--text-body)}
.project .caption{color:var(--secondary);font-size:0.9rem;margin:0;overflow-wrap:break-word;word-break:break-word;text-wrap:balance}
.project .project-bg{position:absolute;top:0;left:0;right:0;bottom:0;z-index:var(--z-below)}
.project.bg-purple .project-bg{background:linear-gradient(135deg, #6b1fb0 0%, #7c2fb8 100%)}
.project.bg-cyan .project-bg{background:linear-gradient(135deg, #00d4d4 0%, #00c4d4 100%)}
.project.bg-blue .project-bg{background:linear-gradient(135deg, #5b4dff 0%, #6b5dff 100%)}
.project.bg-green .project-bg{background:linear-gradient(135deg, #00d47e 0%, #00c46e 100%)}
.project.bg-orange .project-bg{background:linear-gradient(135deg, #ff9500 0%, #ff8500 100%)}

@media(max-width:900px){
  .home-grid{grid-template-columns:1fr;}
  .profile-col{padding:26px;text-align:center;min-height:auto}
  .profile-inner{max-width:440px;margin:0 auto}
  .projects-grid{grid-template-columns:1fr}
}

/* Utility: visually hidden (for screen-reader-only headings) */
.visually-hidden{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap;border:0
}

/* Overview list: remove default markers and lay out columns */
.overview-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:2rem}
.overview-list .ovcol{margin:0;padding:0}
.overview-list .ovcol>h3{margin-top:0;margin-bottom:0.5rem}
.overview-list .ovcol ul{margin:0;padding-left:1.25rem;list-style:circle;color:var(--secondary)}

@media screen and (min-width:769px){
  .overview-list{grid-template-columns:repeat(4,1fr);align-items:start}
}

/* Phone frames component for case study mobile screens */
.phone-frames{
  display:flex;
  gap:2rem;
  justify-content:center;
  align-items:center;
  margin:2rem 0;
  background:#eef0f6;
  padding:1.5rem;
  border-radius:10px;
}

.phone-frame{
}

.phone-frame .screen{
  width:100%;
  height:100%;
  background:#fff;
  border-radius:24px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

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

@media screen and (max-width:900px){
  .phone-frames{flex-direction:column;gap:1rem;align-items:center;padding:1rem}
  .phone-frame{width:68%;max-width:320px}
}
/* About page styles */
.content-col{padding:48px 40px;background:#fff;max-width:1200px;font-size:16px}
.content-inner{max-width:960px}
.content-inner section{margin-bottom:3rem}
.content-inner h2{font-size:2.5rem;margin-bottom:1.5rem;color:var(--text-body);font-weight:700}
.content-inner h3{font-size:1.75rem;margin-bottom:1rem;color:var(--text-body);font-weight:700}
@media(min-width:900px){
  .content-inner h2{font-size:3rem}
}

/* Three column section */
.three-column{display:grid;grid-template-columns:1fr;gap:2.5rem;margin:3rem 0}
@media screen and (min-width:769px){
  .three-column{grid-template-columns:repeat(3,1fr);gap:2rem}
}

/* What I do section with image */
.what-i-do{display:grid;grid-template-columns:1fr;gap:2rem;align-items:start;margin:3rem 0}
@media screen and (min-width:769px){
  .what-i-do{grid-template-columns:1fr 1fr;gap:3rem}
}
.what-i-do .image-content img{width:100%;height:auto;display:block;border-radius:8px}
.what-i-do .caption{font-size:var(--step--1);color:var(--secondary);font-style:italic;margin-top:0.75rem;text-align:center;overflow-wrap:break-word;word-break:break-word;text-wrap:balance}

@media(max-width:900px){
  .content-col{padding:32px 20px}
  .what-i-do{grid-template-columns:1fr}
}

/* =========================================================
   Accessibility: keyboard focus + reduced motion
   ========================================================= */

/* Visible focus ring for keyboard users only (mouse clicks stay clean).
   Uses :focus-visible so the ring shows on Tab/keyboard, not pointer focus. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Belt-and-suspenders: remove the legacy focus outline only where the browser
   supports :focus-visible, so non-supporting browsers still get a ring. */
:focus:not(:focus-visible) {
  outline: none;
}

/* Respect the OS "reduce motion" setting: near-instant transitions/animations
   and no smooth scrolling for users with vestibular sensitivity. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}
