:root{
  --bg: #f9f9f9;
  --text: #222;
  --brand: #6a81a2;
  --muted: #555;          
  --focus-color: #abc8e7f1; 
  --accent: #0d2695e4;
  --container-width: 900px;
}

/* ===== Reset / base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

p, li {
  margin-bottom: 1rem; 
}

h1,h2,h3 {
  font-weight: 700;
  margin-top: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

/* container */
.container{
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* skip link */
.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  background: #fff;
  padding: .5rem 1rem;
  border-radius: 6px;
  z-index: 9999;
}
.skip-link:focus{
  left: 1rem;
  top: 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
  
/* ======== NAVBAR ======== */
.site-header{
  background: rgba(20,20,20,0.92);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1100;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}
.navbar{
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  height: 56px;
}
.brand{
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding-left: 0;
}
.nav-toggle{
  display: none; 
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.nav-toggle:focus{ outline: 3px solid var(--focus-color); outline-offset: 3px; }
  
/* Nav links */
.nav-links{
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}
.nav-links a{
  color: #ddd;
  text-decoration: none;
  transition: background 0.3s;
  padding: .4rem .6rem;
  border-radius: 6px;
}
.nav-links a:hover{
  background: rgba(255,255,255,0.1);
}
.nav-links a.active,
.nav-links a:focus {
    background: transparent;
    color: var(--brand);
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(34,122,255,0.12);
}

/* ensure header doesn't overlap */
html { scroll-padding-top: 70px; }
  
/* make the nav container responsive */
@media (max-width: 768px){
  .nav-toggle{ display: block; }
  .nav-links{
    display: none;
    position: absolute;
    top: 64px;
    right: 1rem;
    flex-direction: column;
    background: #272727;
    padding: 0.75rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    min-width: 200px;
  }
  .nav-links.show{ display: flex; }
  .nav-links a{ color: #fff; }
}

/* ======== HERO ======== */
.hero {
  min-height: 70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, #608dff 3%, #b2c9dd 60%);
  text-align:center;
  padding: 3rem 1rem;
  color: #081424;
  position: relative;
  overflow: hidden;
}
.hero-inner{ 
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;                     
  padding-top: 10px;
}
.profile-pic {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.95);
  box-shadow: 0 14px 30px rgba(14,40,60,0.18);
  object-fit: cover;
  margin-bottom: 0.9rem;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

@media (hover: hover) and (min-width: 700px) {
  .profile-pic:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 20px 40px rgba(14,40,60,0.22); }
}
  
.hero h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem); 
  line-height: 1.05;
  margin: 0.15rem 0 0.2rem;
  font-weight: 800;
  color: #07121a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.hero .name { 
  background: linear-gradient(90deg, #07085b 0%, #192d93ee 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}  
.subtitle {
  margin: 0.4rem 0 1rem;
  font-size: 1.5rem;
  color: rgba(4,20,30,0.6);
  font-weight: 600;
  letter-spacing: 0.5px;
}
  
.cta {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: #fff;
  color: var(--brand);
  letter-spacing: 0.5px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(34,122,255,0.14);
  text-decoration: none;
  font-weight: 700;
  transition: transform 200ms ease, box-shadow 200ms ease;
  border: none;
  text-decoration: none;
}
  
.cta:hover{
  transform: translateY(-5px); 
  box-shadow: 0 20px 44px rgba(34,122,255,0.18); 
}
.cta:focus{ outline: 3px solid rgba(34,122,255,0.16); outline-offset: 3px; }

.hero::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(0,0,0,0.04));
  transform: skewY(-1.5deg);
  pointer-events: none;
}

/* ======== SECTIONS ======== */
section {padding: 4.5rem 0;}
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.25rem; }
section:nth-of-type(even) {
  background: rgba(0,0,0,0.02); 
}

h2 {
  margin-bottom: 1.5rem;
  margin-top: 1.25rem 
}
  
.about p, .experience ul, .contact ul { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.about .skills ul,
.about .interests ul {
  list-style: disc;
  padding-left: 2rem; 
  margin: 1rem 0 1.5rem 0; 
}

.about .skills li,
.about .interests li {
  margin-bottom: 0.8rem; 
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
  position: relative;
}
.about h3 {
  margin: 2rem 0 1rem 0; 
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
}
  
.about .personal-info,
.about .interests,
.about .skills {
  margin-bottom: 2rem; 
}
/* ======== EXPERIENCE ======== */
.experience.container {
  max-width: var(--container-width); 
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.background-grid {
  list-style: disc;
  padding-left: 1.1rem;        
  margin: 0.5rem 0 0 0;       
  display: grid;               
  grid-template-columns: repeat(2, minmax(0, 1fr)); 
  gap: 0.75rem 2rem;          
  align-items: start;
  max-width: 900px;           
}
.experience-item {
  margin-bottom: 2.5rem; 
  padding: 1.5rem;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  border-left: 4px solid var(--brand);
}
  
.experience-item h4 {
  margin-bottom: 0.5rem;
  color: var(--accent);
}
  
.experience-item .company,
.experience-item .institution,
.experience-item .duration {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-style: italic;
}
  
.experience-item ul {
  padding-left: 1.5rem; 
  margin-top: 1rem;
}
  
.experience-item li {
  margin-bottom: 0.5rem; 
}  

/* ======== PROJECTS ======== */
.project-list {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.project-card{
  background: #d7e9f5f7;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow:  0 2px 8px rgba(0,0,0,0.1);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
}
.project-card:focus-within, .project-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.project-card h3{ margin-bottom: .5rem; color: var(--accent); font-size: 1.15rem; font-weight: 600; }
.project-card p {
  display: -webkit-box;
  -webkit-line-clamp: 4; 
  -webkit-box-orient: vertical;
  overflow: hidden;
}
  
.project-links a {
  display:inline-block; 
  margin-top: .5rem; 
  color: var(--brand);
  padding: .25rem .3rem; 
  border-radius:6px; 
}
  
/* ======== CONTACT ======== */
.contact-list{ list-style: none; padding: 0;}
.contact-list li{ margin-bottom: 0.8rem; padding-left: 0.5rem;}
.contact-list a{ color: var(--brand); text-decoration: none; }
.inline-btn{
  margin-left: .5rem;
  padding: .25rem .45rem;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.07);
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
}
.inline-btn:focus{ outline: 3px solid var(--focus-color); outline-offset: 3px; }  

/* ===== Footer ===== */
.site-footer{ padding: 2rem 0; text-align: center; color: var(--muted); border-top: 1px solid rgba(0,0,0,0.04); font-size: 0.9rem; letter-spacing: 0.3px;}

/* ===== Focus states for keyboard users ===== */
a:focus, button:focus, .project-card:focus{
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ===== Misc utilities ===== */
.hidden { display: none !important; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  * { transition: none !important; animation: none !important; }
}
  
/* ===== Dark mode (optional) ===== */
@media (prefers-color-scheme: dark){
  :root{
    --bg: #08080a;
    --text: #eaeaea;
    --muted: #cfcfcf;
    --header-bg: #050505;
    --card-shadow: none;
  }
  body{ background: var(--bg); color: var(--text); }
  .project-card{ background:#0f0f11; border: 1px solid rgba(255,255,255,0.03); }
  .nav-links{ background: #0b0b0b; }
  .cta{ background: rgba(255,255,255,0.06); color: var(--brand); border: 1px solid rgba(255,255,255,0.03); }
}

/* ======== RESPONSIVE ======== */
@media (max-width: 720px){
  .hero h1{ font-size: 1.6rem; }
  .profile-pic{ width: 120px; height: 120px; border-width: 4px; }
  .nav-links{ right: .6rem; top: 56px; }
  .project-card{ padding: .8rem; }
  .cta { padding: 0.6rem 1.1rem; border-radius: 12px; }
}