/* ====== GLOBAL RESET ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #1a1a1a; /* Soft charcoal */
  color: #ccc; /* Softer text */
  line-height: 1.6;
}

ul, ol { list-style: none; padding-left: 0; }
a, a:visited, a:active { text-decoration: none; color: inherit; }

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ====== NAVIGATION (Sticky with soft gradient) ====== */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #1a1a1a;
  padding: 0.9rem 0;
}

nav::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(to top, rgba(216, 122, 74, 0.6), rgba(26, 26, 26, 0));
}

nav ul { 
  display: flex; 
  justify-content: center; 
  align-items: center;
  gap: clamp(1rem, 4vw, 2rem);
}

nav li { list-style: none; }

nav a {
  color: #e5e5e5;
  font-weight: 600;
  padding: 0.25rem 0.1rem;
  transition: color 0.25s ease;
}

nav a:hover { color: #d87a4a; }

/* ====== HERO ====== */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
  color: #d87a4a; /* Muted orange */
}

.hero p {
  max-width: 640px;
  margin-bottom: 2rem;
  color: #cfcfcf;
}

/* ====== BUTTON ====== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: #d87a4a;
  color: #1a1a1a;
  border-radius: 8px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.btn:hover {
  background: #e18d5f;
  transform: translateY(-1px);
}

/* ====== GRIDS ====== */
.grid { display: grid; gap: 1.5rem; }

/* ====== GALLERY ====== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}


/* ====== PROJECT CARDS ====== */
.projects {
  padding: 2rem 0;
}

.projects h1 {
  margin-bottom: 1rem;
  color: #d87a4a;
}

.project {
  margin-bottom: 2.5rem;
}

.project h2 {
  color: #e18d5f;
  margin-bottom: 0.5rem;
}

.project p {
  margin-bottom: 1rem;
  color: #ccc;
}

pre {
  background: #111; /* darker than main background */
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border-left: 4px solid #d87a4a;
}

code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.95rem;
  color: #f5f5f5;
  white-space: pre-wrap;
}


/* ====== FOOTER (Pinned with soft gradient) ====== */
footer {
  margin-top: auto;
  background: #1a1a1a;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #999;
  position: relative;
}

footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(to bottom, rgba(216, 122, 74, 0.6), rgba(26, 26, 26, 0));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* ====== PROJECT CARDS (collapsible) ====== */
.projects {
  padding: 2rem 0;
}

.projects h1 {
  margin-bottom: 1rem;
  color: #d87a4a;
}

.project {
  margin-bottom: 1.5rem;
  background: #222;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.project summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: #e18d5f;
  list-style: none;
  margin-bottom: 0.5rem;
}

.project summary::marker {
  display: none; /* remove default triangle */
}

.project summary::after {
  content: "➕";
  float: right;
  transition: transform 0.2s ease;
}

.project[open] summary::after {
  content: "➖";
}

.project p {
  margin-bottom: 1rem;
  color: #ccc;
}

/* ====== ABOUT PAGE ====== */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0;
}

.about-text h1 {
  color: #d87a4a;
  margin-bottom: 1rem;
}

.about-text p {
  color: #ccc;
  font-size: 1.1rem;
}

.about-image img {
  width: 100%;
  max-width: 350px;   /* keeps image controlled */
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

.about-details {
  padding: 2rem 0;
}

.about-details h2 {
  color: #e18d5f;
  margin-bottom: 1rem;
}

.about-details p {
  margin-bottom: 1rem;
  color: #ccc;
  max-width: 800px;
}

/* ====== TIMELINE ====== */
.timeline {
  padding: 3rem 0;
  position: relative;
}

.timeline h2 {
  color: #e18d5f;
  margin-bottom: 2rem;
  text-align: center;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(216, 122, 74, 0.6);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  background: #d87a4a;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-content {
  background: #111;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  max-width: 45%;
  border-left: 3px solid #d87a4a;
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  color: #e18d5f;
}

.timeline-content p {
  color: #ccc;
  font-size: 0.95rem;
}

/* Alternate left/right */
.timeline-item:nth-child(odd) .timeline-content {
  margin-left: calc(55%);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: calc(55%);
  text-align: right;
  border-left: none;
  border-right: 3px solid #d87a4a;
}
