/* Simple responsive styles for the portfolio */
:root{
  --accent:#2b6cb0;
  --bg:#e8f4ff;
  --panel:#ffffff;
  --text:#0f1720;
  --muted:#6b7280;
  /* Navbar / header colors (themed) */
  --header-bg: var(--accent); /* use accent color for header in light theme */
  --header-text: #ffffff; /* header link / control color in light theme */
  --header-border: rgba(0,0,0,0.06);
}

/* Dark theme overrides applied to the root when .dark-theme is present */
.dark-theme{
  --accent: #60a5fa;
  --bg:#0a1930;
  --panel:#162438;
  --text:#ffffff;
  --muted:#9aa8b8;
  /* Navbar / header colors for dark theme */
  --header-bg: #0b3a66; /* darker accent for header in dark theme */
  --header-text: #ffffff; /* light text for contrast */
  --header-border: rgba(255,255,255,0.04);
}
*{box-sizing:border-box}
.theme-toggle{border:0;background:transparent;font-size:1.05rem;cursor:pointer;padding:.25rem;border-radius:6px}
.theme-toggle:focus{outline:2px solid rgba(59,130,246,.25)}

html,body{height:100%;margin:0;font-family:Segoe UI, Roboto, Arial, sans-serif;color:var(--text);background:var(--bg);transition:background .2s,color .2s}
.container{max-width:1000px;margin:0 auto;padding:1rem}
.site-header{background:var(--header-bg);border-bottom:1px solid var(--header-border)}
.site-header .container{display:flex;align-items:center;gap:1rem;color:var(--header-text)}
.logo{font-weight:700;color:var(--accent);text-decoration:none;color:white;}
.nav{margin-left:auto;display:flex;gap:1rem}
.nav a{color:var(--header-text);text-decoration:none;padding:.5rem .25rem}
.nav-toggle{display:none;background:none;border:0;font-size:1.25rem;color:var(--header-text)}
.theme-toggle{color:var(--header-text)}
.hero{padding:4rem 0;background:linear-gradient(180deg,var(--panel),var(--bg))}
.hero h1{margin:0;font-size:2rem}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
}

/* Highlight underline and hover for the Projects heading */
.page-header h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.2px;
    transition: color .18s ease;
}
.page-header h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 6px;
    width: 36%;
    background: var(--accent);
    border-radius: 6px;
    transition: width .28s cubic-bezier(.2,.8,.2,1), background .18s;
    opacity: .95;
}
.page-header h1:hover::after {
    width: 100%;
}
.page-header h1:hover {
    color: var(--accent);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateX(-2px);
}

.btn{display:inline-block;background:var(--accent);color:#fff;padding:.5rem .9rem;border-radius:6px;text-decoration:none}
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;padding:2rem 0}
.project-card {
    background: var(--panel);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--header-border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* make cards fixed-width in the horizontal row */
    flex: 0 0 280px;
    min-width: 220px;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Project title hover effect */
.project-card h2 {
    margin: 0;
    font-size: 1.1rem;
    transition: color .18s ease, transform .18s ease;
}
.project-card:hover h2 {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Featured Project Styles */
.main-project {
    margin: 4rem 0;
}

.project-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 0;
    overflow: hidden;
}

.project-image {
    height: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-info {
    padding: 2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tags span {
    background: var(--bg);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.project-links .btn {
    transition: opacity 0.2s;
}

.project-links .btn:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .project-card.featured {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        height: 300px;
    }
}

/* Projects grid displayed as a single horizontal row of cards */
.projects-grid {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    overflow-x: auto;
    padding: 1rem 0 2rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.projects-grid::-webkit-scrollbar { height: 10px; }
.projects-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 6px; }
.projects-grid .project-card { scroll-snap-align: start; }

@media (max-width: 900px) {
    /* keep horizontal list but smaller card width */
    .projects-grid { gap: 0.75rem; }
    .projects-grid .project-card { flex: 0 0 220px; min-width: 200px; }
}

@media (max-width: 520px) {
    /* on very small screens, allow two cards per row by wrapping */
    .projects-grid { flex-wrap: wrap; justify-content: center; }
    .projects-grid .project-card { flex: 0 0 46%; min-width: 46%; }
}

/* Pet mini-cards inside featured project */
.pet-cards {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 0 0;
    flex-wrap: wrap;
}
.pet-card-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), var(--panel));
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    min-width: 160px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}
.pet-card-mini img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}
.pet-card-mini .pet-meta { display:flex; flex-direction:column; gap:4px; font-size:0.9rem; }
.pet-card-mini .pet-meta span { color: var(--muted); font-size:0.8rem; }

@media (max-width: 600px) {
    .pet-cards { justify-content: center; }
    .pet-card-mini { min-width: 44%; }
}

.site-footer{padding:1rem 0;text-align:center;color:#6b7280}
.contact-form{display:grid;gap:.75rem;max-width:600px}
.contact-form label{display:block}
.contact-form input,.contact-form textarea{width:100%;padding:.5rem;border:1px solid #d1e3fb;border-radius:6px}
.note{color:#475569;font-size:.95rem}

/* About Page Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin: 2rem 0;
}

.about-content {
    grid-column: 1;
}

.profile-image {
    grid-column: 2;
}

.about-details {
    grid-column: 1 / -1;
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.skills-section ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.skills-section li {
    background: var(--panel);
    padding: 1rem;
    border-radius: 6px;
    transition: transform 0.2s;
}

.skills-section li:hover {
    transform: translateY(-2px);
}

.education-section .edu-item {
    background: var(--panel);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.education-section h3 {
    margin: 0 0 0.5rem 0;
    color: var(--accent);
}

.experience-section {
    background: var(--panel);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Profile Image Styles */
.profile-image {
    position: sticky;
    top: 2rem;
    width: 100%;
}

.profile-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.profile-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--muted);
}

@media (max-width:700px){
  .nav{position:absolute;right:1rem;top:64px;background:#fff;padding:1rem;border-radius:8px;box-shadow:0 6px 20px rgba(12,17,35,.08);display:none;flex-direction:column}
  .nav.show{display:flex}
  .nav-toggle{display:block;margin-left:auto}
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-image {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 2rem;
  }
  
  .about-content {
    grid-column: 1;
    grid-row: 2;
  }
  
  .about-details {
    grid-column: 1;
  }
  
  .skills-section ul {
    grid-template-columns: 1fr;
  }
  
  .education-section .edu-item,
  .experience-section {
    padding: 1rem;
  }
}
