/* ========= Base Reset ========= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: "Segoe UI", Roboto, sans-serif;
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

/* ========= Theme Variables ========= */
:root {
  --bg: #ffffff;
  --text: #222222;
  --primary: #0077cc;
  --secondary: #555555;
  --card-bg: #f9f9f9;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #f0f0f0;
  --primary: #4da3ff;
  --secondary: #cccccc;
  --card-bg: #1e1e1e;
}

/* ========= Layout ========= */
.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

/* ========= Header ========= */
.site-header {
  background: var(--card-bg);
  padding: 1rem 0;
  border-bottom: 1px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand h1 {
  font-size: 1.5rem;
  color: var(--primary);
}

.subtitle {
  font-size: 0.9rem;
  color: var(--secondary);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  transition: background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary);
  color: #fff;
}

/* ========= Theme Toggle ========= */
#theme-toggle {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
#theme-toggle:hover {
  background: #005fa3;
}

/* ========= Sections ========= */
section h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  color: var(--primary);
}

section {
  margin-bottom: 2.5rem;
}

/* ========= About ========= */
.about-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.about-flex img {
  border-radius: 50%;
  max-width: 250px;
  height: auto;
}

/* ========= Skills ========= */
.skills-section ul {
  list-style: square;
  margin-left: 1.5rem;
}
.skill-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ========= Projects ========= */
.projects-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.projects-section th,
.projects-section td {
  border: 1px solid #ccc;
  padding: 0.6rem;
  text-align: left;
}
.projects-section img {
  max-width: 100%;
  height: auto;
  margin-right: 1rem;
  border-radius: 8px;
}

/* ========= Contact Form ========= */
form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
input, textarea, select, button {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
button[type="submit"] {
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}
button[type="submit"]:hover {
  background: #005fa3;
}

/* ========= Footer ========= */
.site-footer {
  text-align: center;
  padding: 1rem;
  background: var(--card-bg);
  border-top: 1px solid #ccc;
  margin-top: 2rem;
}

/* ========= Responsive ========= */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  .about-flex {
    flex-direction: column;
    text-align: center;
  }
}
/* ===== Hero Section ===== */
.home-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 0;
}

.hero-text h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-text p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.highlight {
  color: var(--primary);
  font-weight: bold;
}

.hero-buttons {
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  margin-right: 0.8rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: #005fa3;
}

.btn.secondary {
  background: var(--secondary);
  color: #fff;
}
.btn.secondary:hover {
  background: #333;
}

.hero-image img {
  max-width: 280px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===== Socials ===== */
.socials {
  text-align: center;
  margin: 2rem 0;
}
.social-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}
.social-links a {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
}
.social-links a:hover {
  text-decoration: underline;
}
/* Page Transition */
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Section title */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #3ea6ff;
    margin-bottom: 30px;
}

/* Skills container */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

/* Skill card */
.skill-card {
    flex: 1 1 250px;   /* responsive minimum width */
    max-width: 280px;  /* prevents oversized cards */
    height: 250px;     /* equal height */
    background: #1e1e1e;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Skill logo */
.skill-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Skill text */
.skill-card h3 {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.skill-card p {
    font-size: 1rem;
    color: #3ea6ff;
    font-weight: bold;
}