/* --- COLOR THEMES --- */
:root {
  --bg: #ffffff;
  --text: #111;
  --code-text: #6fb3ff; /* lighter blue for dark mode */
  --card-bg: #f5f5f5;
  --accent: #0a84ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --text: #f2f2f2;
    --card-bg: #1a1a1a;
    --accent: #4dabff;
  }
}

/* --- GLOBAL STYLES --- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
line-height: 1.6;
  max-width: 900px;
  margin: auto;
  padding: 2rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-size: 1rem;
}

nav .menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-right a,
.nav-right span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-right a:hover,
.nav-right span:hover {
  background: var(--card-bg);
  color: var(--accent);
}

.navbar {
  display: flex;
  align-items: center;        /* vertically center everything */
  justify-content: space-between;  /* pfp on left, links on right */
  width: 100%;
  padding: 0.5rem 0;
}

.nav-right {
  display: flex;
  align-items: center;        /* vertically aligns text and dropdowns */
  gap: 1.2rem;                /* spacing between nav items */
}

.center {
  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: center;
}

.pfp-img {
  width: 48px;           /* adjust size */
  height: 48px;          /* must match width for perfect circle */
  border-radius: 50%;    /* makes it a circle */
  object-fit: cover;     /* no stretching */
  border: 2px solid var(--accent);  /* optional outline */
  transition: transform 1s ease;
}

.self-img {
  width: 40%;           /* adjust size */
  height: 40%;          /* must match width for perfect circle */
  border-radius: 10%;    
  object-fit: cover;     /* no stretching */
  border: 2px solid var(--accent);  /* optional outline */
}

.home-link:hover {
  transform: scale(1.08);
}

.pfp-link {
  display: inline-block;
}

/* --- DROPDOWN NAVBAR --- */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;    /* vertically center the dropdown trigger */
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  min-width: 300px;
  right: 0;              /* makes dropdown align right */
  top: 100%;
  flex-direction: column;
}

.dropdown:hover .dropdown-content {
  display: flex;
}

.reviews {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.reviews h2 {
  font-size: 2rem;
  margin-bottom: 25px;
}

.review-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--card-bg, #1e1e1e);
  color: var(--text, #f0f0f0);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.stars {
  color: gold;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.quote {
  font-style: italic;
  margin-bottom: 10px;
}

.author {
  opacity: 0.8;
  font-size: 0.9rem;
}

.contact-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 30px auto;
}

.contact-card {
  padding: 20px;
  background: var(--card-bg, #1c1c1c);
  color: var(--text, #f0f0f0);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}

.contact-card h3 {
  margin-bottom: 8px;
}

.contact-link {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent, #00b4ff);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

/* Grid Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* Project Cards */
.project-card {
  display: block;
  background: var(--card-bg, #1f1f1f);
  color: var(--text, #eaeaea);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

/* Hover Effects */
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: var(--accent, #00b4ff);
}

/* Title */
.project-card h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent, #00b4ff);
}

/* Description text */
.project-card p {
  margin: 0;
  opacity: 0.85;
  line-height: 1.4;
}

/* Writeup List Grid */
.writeup-list {
  max-width: 900px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Writeup Cards — Now matches site aesthetic */
.writeup-card {
  display: block;
  background: var(--card-bg);
  color: var(--text);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* Hover Styling */
.writeup-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-color: var(--accent);
}

/* Date text inside card */
.writeup-card .date {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 5px;
}

/* Title styling inside card */
.writeup-card h2 {
  margin: 0 0 6px 0;
  font-size: 1.25rem;
  color: var(--accent);
}

/* --- DETAILS DROPDOWN (Projects on page) --- */
details {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
summary {
  cursor: pointer;
  font-weight: bold;
}

.spin-slow {
  animation: spin 12s linear infinite; /* Adjust speed by changing 12s */
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --- CODE BLOCKS & INLINE CODE --- */

/* Inline code */
code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2em 0.4em;
  border-radius: 6px;
  font-size: 0.75em;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  border: 1px solid rgba(255,255,255,0.12);
}

/* Dark mode inline code adjustment */
@media (prefers-color-scheme: light) {
  code {
    background: #f4f4f4;
    border: 1px solid #ddd;
  }
}

/* Fenced code blocks */
pre {
  background: var(--card-bg);
  color: var(--text);
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  margin: 1.5rem 0;
}

/* Inner code tag inside <pre> */
pre code {
  background: none;   /* prevents double background */
  padding: 0;
  border: none;
  font-size: 0.75rem;
  color: var(--text);
}

