/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* VARIABLES */
:root {
  --bg: #ffffff;
  --text: #111111;
  --text-secondary: #f5f5f5;
  --muted-bg: #f2f2f2;
  --card-bg: #ffffff;
  --border: #dddddd;
  --accent: #4f6df5;
  --accent-hover: #3f5be0;
}

body.dark-mode {
  --bg: #111111;
  --text: #f5f5f5;
  --muted-bg: #1c1c1c;
  --card-bg: #222222;
  --border: #333333;
  --accent: #7c93ff;
}

/* BASE */
html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* LAYOUT */
.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

.header {
  padding: 1.5rem 0;
}

.navbar {
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* BUTTONS */
.contact-btn,
.primary-btn {
  background: var(--accent);
  color: var(--text-secondary);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  display: inline-block;
  transition: background 0.25s ease, transform 0.15s ease;
}
.contact-btn:hover,
.primary-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-link {
    background: transparent;
    border: 1px solid var(--accent);
}
.btn-link:hover {
    background: var(--accent);
    color: var(--text);
    border: 1px solid var(--accent);
}

/* HERO */
.hero {
  text-align: center;
  padding: 4rem 0 6rem;
}

.profile-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 500;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.hero-text {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* SECTIONS */
.knowledge-section,
.skills-section {
  background: var(--muted-bg);
  padding: 5rem 0;
  transition: background 0.25s ease;
}

.section-label {
  margin-bottom: 0.5rem;
  color: #777;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

/* GRID */
.knowledge-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.large-card {
  grid-row: span 2;
}

/* CARD */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  min-height: 180px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.card img {
  margin-top: 1rem;
}

/* PROJECTS */
.projects-section {
  padding: 5rem 0;
  text-align: center;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: start;
}
.project-card {
  text-align: center;
  margin-bottom: 20px;
}

.project-card img {
  width: 100%;
  height: 300px;
  display: block;
  border-radius: 12px;
}

/* SKILLS */
.skills-card {
  max-width: 500px;
}

.skills-card ul li {
  margin-bottom: 0.5rem;
}
/* CONTACT */
.contact-section {
  padding: 5rem 0;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-card a {
    margin-top: 50px;
  color: var(--accent);
}


/* MOBILE */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .project-list {
    grid-template-columns: 1fr;
  }
}

/* DARK MODE SWITCH */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
}

.toggle-track {
  width: 58px;
  height: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 4px;
}

.toggle-thumb {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.25s ease;
}

body.dark-mode .toggle-thumb {
  transform: translateX(26px);
}

/* MOBILE */
@media (max-width: 768px) {
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .large-card {
    grid-row: auto;
  }
}