/* Theme variables */
:root{
  --bg: #f5f8fb;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #546170;
  --accent: #2b9cff;
  --accent-2: #6dd3b6;
  --accent-bg: #2b9cff;
  --card-shadow: 0 8px 20px rgba(15,23,42,0.06);
  --radius: 12px;
  --glass: rgba(255,255,255,0.6);
}

:root[data-theme="dark"]{
  --bg: #0b1220;
  --surface: #0f1724;
  --text: #d7e6f2;
  --muted: #9fb4c8;
  --accent: #5fb0ff;
  --accent-2: #7ee1c9;
  --accent-bg: #1d7fe4;
  --card-shadow: 0 8px 30px rgba(0,0,0,0.6);
  --glass: rgba(255,255,255,0.03);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
}

/* Utility container */
.container{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding:28px;
}

/* Header */
.site-header{
  background:linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.05));
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter: blur(6px);
  border-bottom:1px solid rgba(0,0,0,0.04);
}
.header-inner{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:space-between; /* Changed color to opal */
}
.logo{
  font-weight:700;
  font-size:1.1rem;
  color:var(--text);
  text-decoration:none;
}
.header-controls{display:flex;gap:8px;align-items:center}

/* Nav */
.main-nav{display:block}
.nav-list{display:flex;gap:18px;list-style:none;margin:0;padding:0}
.nav-list a{color:var(--muted);text-decoration:none;font-weight:600;font-size:1.2rem}
.nav-list a:hover{color:var(--accent)}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:10px;
  border:0;
  background:var(--surface);
  color:var(--text);
  cursor:pointer;
  text-decoration:none;
  font-weight:600;
  box-shadow:var(--card-shadow);
  transition:transform .16s ease, box-shadow .16s ease;
}
.btn:hover{transform:translateY(-3px)}
.btn.primary{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:white;box-shadow:none}
.btn.outline{background:transparent;border:1px solid rgba(0,0,0,0.06)}

.icon-btn{padding:8px 10px;font-size:1.0rem;background:transparent;box-shadow:none}

/* mobile */
.mobile-only{display:none}

/* Hero */
.hero{
  display:grid;
  grid-template-columns:1fr 240px;
  gap:28px;
  align-items:center;
  padding-top:48px;
  padding-bottom:48px;
}
.hero .lead{color:var(--muted);max-width:56ch}
.accent{color:var(--accent)}
.avatar {
  width: 220px;
  height: 220px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image fills the frame while maintaining aspect ratio */
}
.hero-aside{display:flex;justify-content:center}

/* Additional styles for enhanced sections */

/* Hero enhancements */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

/* About section */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat strong {
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 700;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Skills categories */
.skills-category {
  margin-bottom: 28px;
}

.skills-category h3 {
  text-align: center;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Project placeholder for demo */
.project-placeholder {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  border-radius: 8px 8px 0 0;
}

/* Timeline for experience */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 120px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  position: relative;
}

.timeline-date {
  flex: 0 0 100px;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  text-align: right;
}

.timeline-content {
  flex: 1;
  background: var(--surface);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--surface);
}

.timeline-content h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.1rem;
}

.timeline-content .company {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-content p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Sections */
.section{padding-top:34px;padding-bottom:34px}
.section h2{text-align:center;margin:0 0 16px;font-size:1.5rem;color:var(--text)}

/* Skills */
.skills-grid{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.skill{background:var(--surface);padding:8px 12px;border-radius:999px;color:var(--muted);font-weight:600;box-shadow:var(--card-shadow)}

/* Projects grid */
.project-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:20px;
  margin-top:18px;
}
.project-card{
  background:var(--surface);
  border-radius:12px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease;
  box-shadow:var(--card-shadow);
}
.project-card:hover{transform:translateY(-8px)}
.project-media{height:140px}
.project-body{padding:16px;display:flex;flex-direction:column;gap:12px}
.project-body h3{margin:0;font-size:1.05rem;color:var(--text)}
.project-body p{margin:0;color:var(--muted);font-size:0.95rem}
.tags{display:flex;gap:8px;flex-wrap:wrap}
.tag{background:var(--glass);padding:6px 8px;border-radius:8px;color:var(--muted);font-weight:700;font-size:0.8rem}

/* project CTA alignment */
.project-ctas{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}

/* Contact row */
.contact-row{display:flex;gap:16px;align-items:center;justify-content:center;margin-top:12px}
.socials a{margin-left:8px;color:var(--muted);text-decoration:none;font-weight:700}

/* Footer */
.site-footer{padding:18px 0;background:transparent;text-align:center;color:var(--muted);border-top:1px solid rgba(0,0,0,0.04)}

/* Mobile styles */
@media (max-width:880px){
  .hero{grid-template-columns:1fr; text-align:center}
  .hero-aside{order:-1}
  .nav-list{display:none}
  .mobile-only{display:inline-flex}
  #mobile-menu{position:fixed;inset:0;background:var(--surface);padding:24px;z-index:60;display:flex;flex-direction:column;gap:18px}
  .mobile-nav-list{list-style:none;padding:0;margin:24px 0 0 0;display:flex;flex-direction:column;gap:12px}
  .mobile-nav-list a{text-decoration:none;color:var(--text);font-size:1.1rem}

  .cta-row {
    justify-content: center;
  }

  .stats-row {
    gap: 20px;
  }

  .timeline::before {
    left: 80px;
  }

  .timeline-date {
    flex: 0 0 70px;
    font-size: 0.8rem;
  }
}

/* small tweaks */
@media (max-width:420px){
  .container{padding:18px}
  .avatar{width:160px;height:160px}

  .cta-row {
    flex-direction: column;
    align-items: center;
  }

  .stats-row {
    flex-direction: column;
    gap: 16px;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-date {
    flex: none;
    text-align: left;
  }

  .timeline-content::before {
    display: none;
  }
}
