@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #f8fafc;
  --text-color: #334155;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border-color: rgba(226, 232, 240, 0.8);
  --title-color: #0f172a;
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --accent-color: #0ea5e9;
  --metric-bg: rgba(248, 250, 252, 0.6);
  --main-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(12px);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light-theme) {
    --bg-color: #0b1120;
    --text-color: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.65);
    --border-color: rgba(148, 163, 184, 0.1);
    --title-color: #f8fafc;
    --primary-color: #38bdf8;
    --primary-hover: #7dd3fc;
    --sidebar-bg: rgba(30, 41, 59, 0.65);
    --accent-color: #2dd4bf;
    --metric-bg: rgba(15, 23, 42, 0.6);
    --main-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --hover-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    --glass-blur: blur(12px);
  }
}

:root.dark-theme {
  --bg-color: #0b1120;
  --text-color: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.65);
  --border-color: rgba(148, 163, 184, 0.1);
  --title-color: #f8fafc;
  --primary-color: #38bdf8;
  --primary-hover: #7dd3fc;
  --sidebar-bg: rgba(30, 41, 59, 0.65);
  --accent-color: #2dd4bf;
  --metric-bg: rgba(15, 23, 42, 0.6);
  --main-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --hover-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(12px);
}

:root.light-theme {
  --bg-color: #f8fafc;
  --text-color: #334155;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border-color: rgba(226, 232, 240, 0.8);
  --title-color: #0f172a;
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --accent-color: #0ea5e9;
  --metric-bg: rgba(248, 250, 252, 0.6);
  --main-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(12px);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(45, 212, 191, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

.font-code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

strong {
  font-weight: bold;
  color: var(--title-color);
}

em {
  color: var(--text-color);
  opacity: 0.8;
  font-weight: 500;
}

/* ============================= */
/* Headings                      */
/* ============================= */

h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--title-color);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.8rem;
  color: var(--title-color);
}

h3 {
  font-size: 1.375rem;
  margin-bottom: 0.6rem;
  color: var(--title-color);
  margin-top: 25px;
}

/* ============================= */
/* Lists                         */
/* ============================= */

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ============================= */
/* Links                         */
/* ============================= */

a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* ============================= */
/* Spacing helpers               */
/* ============================= */

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* ============================= */
/* Global layout                 */
/* ============================= */

html {
  overflow-y: scroll;
}

.main-content {
  display: flex;
  max-width: 1200px;
  margin: 20px auto;
  min-height: 70vh;
  gap: 20px;
}

.content-area {
  flex-grow: 1;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 20px;
  box-sizing: border-box;
  box-shadow: var(--main-shadow);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

/* ============================= */
/* Top banner / nav              */
/* ============================= */

.top-banner {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
}

.top-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-nav a {
  color: var(--title-color);
  text-decoration: none;
  padding: 8px 15px;
  font-weight: 550;
  transition: all 0.2s ease;
}

.top-nav a:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
  border-radius: 6px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 1.1rem;
  color: var(--title-color);
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--primary-color) !important;
  background-color: transparent !important;
  transform: rotate(15deg);
}

/* ============================= */
/* Sidebar                       */
/* ============================= */

.side-banner {
  width: 300px;
  min-width: 250px;
  padding: 25px;
  background-color: var(--sidebar-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--main-shadow);
  border-radius: 12px;
  text-align: center;
  align-self: flex-start;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.name {
  font-weight: 600;
  text-align: center;
  font-size: 1.1em;
  margin: 0 0 0.2em 0;
  color: var(--title-color);
}

.desc {
  font-weight: 600;
  text-align: center;
  font-size: 1.1em;
  margin: 0 0 15px 0;
  color: var(--text-color);
}

/* contact lines inside sidebar */
.location-info p {
  margin: 4px 0;
  font-size: 0.85em;
  text-align: center;
  color: var(--text-color);
  opacity: 0.85;
}

.location-info i {
  color: var(--primary-color);
  margin-right: 6px;
  width: 16px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.social-links a {
  font-size: 1.3em;
  color: var(--text-color);
  opacity: 0.8;
  transition: all 0.2s ease;
}

.social-links a:hover {
  color: var(--primary-color);
  opacity: 1;
  transform: translateY(-2px);
}

.social-links .sidebar-icon {
  width: 1.3em;
  height: 1.3em;
  color: inherit;
  margin-top: 2px;
}

/* ============================= */
/* Images / hero                 */
/* ============================= */

.banner-image {
  border-radius: 16px;
  object-fit: cover;
  display: block;
  margin: 20px auto;
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.align-left {
  float: left;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  margin: 20px auto;
}

.content-area img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
}

/* hero block wrapper (title + image aligned) */
.hero-block {
  width: 100%;
  margin: 0 0 1rem 0;
  text-align: center;
}

.hero-block h2 {
  display: block;
  border: none;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.hero-image {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* Hero image fading / blinking for Bank Branch Footfall */
.hero-block-cycle .hero-images-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 1rem auto;
}

/* Stack both images on top of each other */
.hero-block-cycle .hero-image-primary,
.hero-block-cycle .hero-image-secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  animation-duration: 6s;           /* adjust speed here */
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

/* First screenshot visible first, then fades out */
.hero-block-cycle .hero-image-primary {
  animation-name: heroFadePrimary;
}

/* Second screenshot fades in when the first fades out */
.hero-block-cycle .hero-image-secondary {
  animation-name: heroFadeSecondary;
}

/* Keyframes: alternate opacity between the two */
@keyframes heroFadePrimary {
  0%, 40%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes heroFadeSecondary {
  0%, 40%   { opacity: 0; }
  50%, 100% { opacity: 1; }
}

.hero-block-cycle .hero-image-spacer {
  display: block;
  width: 100%;
  height: auto;
  visibility: hidden;   /* keeps height */
  opacity: 0;           /* belt-and-braces: no pixels */
  border: none;
  margin: 0;
  padding: 0;
}


/* ============================= */
/* Metrics grid                  */
/* ============================= */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background-color: var(--metric-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.metric-item {
  text-align: center;
  padding: 10px;
}

.metric-value {
  font-size: 1.25em;
  font-weight: bold;
  color: #10b981;
}

/* ============================= */
/* Architecture diagram          */
/* ============================= */

/* Container (now simple, no yellow background) */
.architecture-diagram {
  text-align: center;
  margin: 2rem 0;
}

/* Optional: if you still use the flow-step / arrow chips */
.architecture-diagram .flow-step {
  display: inline-block;
  margin: 4px 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  font-size: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.architecture-diagram .arrow {
  font-size: 1.2em;
  margin: 0 6px;
  opacity: 0.9;
}

/* Image version of the architecture diagram */
.architecture-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ============================= */
/* Collapsible project sections  */
/* ============================= */

.project-details {
  margin-bottom: 2rem;
  border-radius: 12px;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--main-shadow);
  padding: 0.5rem 1.5rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-details:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

/* remove default marker */
.project-details > summary::-webkit-details-marker {
  display: none;
}

/* clickable header bar - normal text layout to avoid flex word spacing issues */
.project-details > summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.35rem;     /* bigger project titles */
  font-weight: 650;
  color: var(--title-color);
  border-bottom: 2px solid var(--primary-color);
  padding: 0.9rem 0;
  margin-bottom: 0.9rem;
  transition: color 0.2s ease;
}

.project-details > summary:hover {
  color: var(--primary-color);
}

/* arrow icon */
.project-details > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  transition: transform 0.2s ease;
}

.project-details[open] > summary::before {
  transform: rotate(90deg);
}

/* ============================= */
/* Project sections / stacks     */
/* ============================= */

.project-article {
  margin-bottom: 1.5rem;
  padding: 0 0 0.5rem 0;
}

/* Emphasized labels like "Objective:", "Stack:", "Key Features:" */
.project-article p em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-color); /* stronger blue accent */
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


/* add a bit more separation above lists that follow labels */
.project-article p em {
  display: inline-block;
  margin-bottom: 0.15rem;
}

.project-article ul {
  margin-top: 0.25rem;
}


/* first bold word in stack / feature lists */
.project-article ul li > strong {
  color: var(--title-color);        /* dark navy or white in dark mode */
  font-weight: 700;
}

.project-article p em + a,
.project-article p em + span a {
  font-weight: 600;
}

.stack-list {
  margin: 0 0 1rem 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
}

.stack-list li {
  margin-bottom: 0.15rem;
}

/* ============================= */
/* Utilities                     */
/* ============================= */

.nowrap {
  white-space: nowrap;
}

/* ============================= */
/* Responsive                    */
/* ============================= */

@media (max-width: 800px) {
  .main-content {
    flex-direction: column;
    padding: 0 10px;
  }

  .side-banner {
    width: 100%;
    box-sizing: border-box;
  }

  .content-area {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
  }

  .top-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .right-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
  .project-details > summary { font-size: 1.15rem; }
}

/* ============================= */
/* Tech Tags & Tech Stacks       */
/* ============================= */
.tech-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin: 2px 4px 2px 0;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: rgba(14, 165, 233, 0.2);
  transform: translateY(-1px);
}

.stack-list li {
  margin-bottom: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.stack-list li > strong {
  margin-right: 8px;
  color: var(--title-color);
  font-weight: 700;
}

/* ============================= */
/* Scroll Animations             */
/* ============================= */

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
