/* === THEME VARIABLES === */
:root {
  --accent: #f39c12;
  --bg: #ffffff;
  --text: #1a1a1a;
  --card: #ffffff;
  --muted: #555;
  --shadow: rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --bg: #1a1a2e;
  --text: #eaeaea;
  --card: #2c2c44;
  --muted: #aaa;
  --shadow: rgba(0,0,0,0.3);
}

/* Global */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}
section { padding: 4rem 1rem; max-width: 1000px; margin: auto; }
h2 {
  margin-bottom: 2rem;
  font-size: 1.9rem;
  color: var(--text);
  border-left: 5px solid var(--accent);
  padding-left: 0.7rem;
  font-weight: 700;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 1rem; right: 1rem;
  background: var(--accent);
  border: none;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
  z-index: 1000;
}

/* Hero */
.hero {
  background: var(--card);
  padding: 5rem 1rem;
  box-shadow: 0 2px 6px var(--shadow);
}
.hero-inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2rem;
  max-width: 1100px;
  margin: auto;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.highlight {
  color: var(--accent);
}
.role {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  min-height: 2rem;
}
.summary {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.hero-cta { margin-top: 1.5rem; }


/* === PROFILE PICTURE === */
.hero-photo .photo-frame {
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ffcc70);
  display: inline-block;
}
.hero-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: 50% 15%; /* move face slightly up */
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  margin: 0 auto;
}
.hero-photo img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* Responsive Layout */
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .hero-text {
    max-width: 55%;
  }
}

/* Profile Picture Styling */
.hero-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: 50% 20%; /* 👈 shift face down (X% Y%) */
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-photo img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* Responsive Hero */
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .hero-text {
    max-width: 55%;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  margin: 0.4rem;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #d35400; }
.btn.secondary { border: 2px solid var(--accent); color: var(--accent); }
.btn.secondary:hover { background: var(--accent); color: #fff; }

/* Prev / Next buttons for projects slider */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 6px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: opacity 0.15s ease;
}
.slide-btn:hover,
.slide-btn:focus { opacity: 0.95; outline: none; }
.slide-btn:active { transform: translateY(-50%) scale(0.98); }

.slide-btn.prev { left: 8px; }
.slide-btn.next { right: 8px; }

/* hide buttons on very small screens (keep UI simple) */
@media (max-width: 560px) {
  .slide-btn { display: none; }
}


/* Skills */
.skills-grid {
  display: flex; flex-wrap: wrap; gap: 0.8rem;
}
.badge {
  background: var(--card);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px var(--shadow);
  font-size: 0.9rem;
}
/* Education Section */
.education-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}
.edu-item h3 {
  margin-bottom: 0.3rem;
  color: var(--text);
}
.edu-school {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.edu-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Projects slider (replaces .projects-grid) */
.projects-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 1rem;
  padding-bottom: 0.5rem; /* keep small space for shadows */
}

.projects-track {
  display: flex;
  gap: 2rem; /* keeps your existing gap value */
  transition: transform 0.55s cubic-bezier(.22,.9,.33,1);
  will-change: transform;
  padding-left: 0.25rem; /* small offset to center first card visually */
}

/* keep your .project-card visual styles, but add a sizing rule so cards become horizontal slides */
.project-card {
  flex: 0 0 320px;     /* fixed slide width — adjust to show more/less on screen */
  max-width: 320px;
  box-sizing: border-box;

  background: var(--card);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 12px var(--shadow);
}
.project-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}
.project-card .desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.tags {
  margin-bottom: 1rem;
}
.tags span {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  margin: 0.2rem;
}
.impact {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}

/* Contact */
.contact-links {
  display: flex; flex-wrap: wrap;
  gap: 1rem; margin-top: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Blog Section */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.blog-card {
  background: var(--card);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 12px var(--shadow);
}
.blog-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}
.blog-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.blog-card p {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.read-more:hover {
  text-decoration: underline;
}

/* Responsive adjustments for project slide widths */
@media (max-width: 900px) {
  .project-card { flex: 0 0 280px; max-width: 280px; }
}
@media (max-width: 560px) {
  .project-card { flex: 0 0 220px; max-width: 220px; padding: 1rem; }
  .theme-toggle { top: 0.6rem; right: 0.6rem; }
}

/* Mobile: make each project card take full width of the slider */
@media (max-width: 600px) {
  .projects-track {
    padding-left: 0;
  }

  .project-card {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 1.2rem;
  }
}
