/*-----------------------------------*\
  #style.css - Minimalist Redesign
\*-----------------------------------*/

/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9f9;
  --text-primary: #111111;
  --text-secondary: #555555;
  --border-color: #eaeaea;
  --border-light: #f0f0f0;
  --accent-color: #fa0000; /* Red accent inspired by Arpit's site */
  
  --shadow-color: rgba(0, 0, 0, 0.08);

  /* Typography */
  --ff-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --ff-secondary: Georgia, serif;
  --ff-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius: 8px;
  --transition: all 0.2s ease;
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: #333333;
  --border-light: #222222;
  --accent-color: #ff4d4d;
  
  --shadow-color: rgba(0, 0, 0, 0.5);
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: var(--ff-main);
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition), color var(--transition);
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 4rem 0;
}

/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 1rem 0;
  transition: background-color var(--transition), border-color var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Groups the mobile theme-toggle + hamburger on the right on mobile */
.header-mobile-controls {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 767px) {
  .header-mobile-controls {
    display: flex;
  }
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--ff-secondary);
  font-style: italic;
  color: var(--text-primary);
}

/* ---- Hamburger Button ---- */
.nav-toggle-btn {
  display: none; /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 300;
  transition: background-color var(--transition);
}

.nav-toggle-btn:hover {
  background-color: var(--bg-secondary);
}

.nav-toggle-btn .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* Animate bars to X when open */
.nav-toggle-btn.is-open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle-btn.is-open .bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-toggle-btn.is-open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Desktop Nav ---- */
.navbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 3px;
  text-decoration: none;
}

/* Animated underline on hover */
.navbar-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.navbar-link:hover::after {
  width: 100%;
}

.navbar-link:hover {
  color: var(--text-primary);
}

/* ---- Mobile Nav overlay ---- */
@media (max-width: 767px) {
  .nav-toggle-btn {
    display: flex;
  }

  .navbar {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background-color: var(--bg-primary);
    z-index: 250;

    /* hidden state */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .navbar.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .navbar-link {
    font-size: 1.4rem;
  }

  /* Keep theme toggle visible alongside hamburger on mobile */
  .navbar .theme-toggle {
    margin-top: 1rem;
  }

  /* Hide the theme toggle inside nav on mobile; show standalone one */
  .navbar .theme-toggle { display: none; }
}

/* Desktop: hide standalone mobile toggle */
@media (min-width: 768px) {
  .mobile-theme-toggle { display: none !important; }
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color var(--transition);
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
}

/* Default: dark theme — show moon, hide sun */
#sun-icon { display: none; }
#moon-icon { display: block; }
#sun-icon-mobile { display: none; }
#moon-icon-mobile { display: block; }

[data-theme="dark"] #sun-icon,
[data-theme="dark"] #sun-icon-mobile { display: none; }
[data-theme="dark"] #moon-icon,
[data-theme="dark"] #moon-icon-mobile { display: block; }

[data-theme="light"] #sun-icon,
[data-theme="light"] #sun-icon-mobile { display: block; }
[data-theme="light"] #moon-icon,
[data-theme="light"] #moon-icon-mobile { display: none; }



/*-----------------------------------*\
  #HERO / ABOUT
\*-----------------------------------*/

.hero {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 5rem;
  }
}

.hero .container {
  display: flex;
  flex-direction: column-reverse; /* image on top on mobile */
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero .container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 1.9rem;
  font-family: var(--ff-secondary);
  font-style: italic;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

.hero-text {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.hero-text a {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.hero-text a:hover {
  text-decoration-color: var(--accent-color);
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 160px;
  height: 160px;
  border-radius: 1.5rem;
  object-fit: cover;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-image {
    width: 220px;
    height: auto;
    max-width: 250px;
  }
}


.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.social-pill:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

/*-----------------------------------*\
  #SECTION HEADERS
\*-----------------------------------*/
.section-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
}

/*-----------------------------------*\
  #EXPERIENCE / TIMELINE
\*-----------------------------------*/

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--border-color);
  margin-left: 0.5rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0 2.5rem 1.75rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-color);
  border: 2px solid var(--bg-primary);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.timeline-period {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.timeline-location {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--accent-color);
  font-weight: 600;
}

.timeline-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
}

.timeline-bullets {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.timeline-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.stack-tag {
  font-size: 0.7rem;
  font-family: var(--ff-mono);
  font-weight: 700;
  background: rgba(250, 0, 0, 0.1);
  color: var(--accent-color);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(250, 0, 0, 0.2);
}

/*-----------------------------------*\
  #PORTFOLIO
\*-----------------------------------*/

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.portfolio-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 24px var(--shadow-color);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--ff-mono);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
[data-theme="dark"] .card-tag {
  background: rgba(255, 255, 255, 0.1);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.portfolio-card:hover .card-title {
  color: var(--accent-color);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-links {
  display: flex;
  gap: 1rem;
  border-top: 1px dashed var(--border-light);
  padding-top: 0.75rem;
  font-size: 0.85rem;
  font-family: var(--ff-mono);
  font-weight: 600;
}

.card-link-placeholder {
  font-size: 0.8rem;
  font-family: var(--ff-mono);
  color: var(--text-secondary);
  font-style: italic;
}


/*-----------------------------------*\
  #SKILLS & CONTACT (MINIMALIST)
\*-----------------------------------*/

.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skills-group-title {
  font-size: 0.75rem;
  font-family: var(--ff-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 500px;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-color);
}

textarea.input-field {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: opacity var(--transition);
  text-align: center;
}

.btn-submit:hover {
  opacity: 0.9;
}

/*-----------------------------------*\
  #ACTIVE NAV & LOGO LINK
\*-----------------------------------*/

.logo-link {
  text-decoration: none;
  color: inherit;
}

.navbar-link.is-active {
  color: var(--accent-color);
  font-weight: 700;
}

/* Permanent underline for active page */
.navbar-link.is-active::after {
  width: 100%;
}

/*-----------------------------------*\
  #PAGE HEADER (inner pages)
\*-----------------------------------*/

.page-section {
  padding-top: 3rem;
}

.page-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.page-title {
  font-size: 2rem;
  font-family: var(--ff-secondary);
  font-style: italic;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/*-----------------------------------*\
  #HERO QUICK-LINK CARDS
\*-----------------------------------*/

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: all var(--transition);
  text-decoration: none;
}

.quick-link-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.quick-link-label {
  font-size: 0.8rem;
  font-family: var(--ff-mono);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-link-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-link-arrow {
  color: var(--accent-color);
  font-size: 0.95rem;
  margin-left: auto;
}

/*-----------------------------------*\
  #CONTACT PAGE LAYOUT
\*-----------------------------------*/

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.contact-section-title {
  font-size: 1rem;
  font-family: var(--ff-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-info-label {
  font-size: 0.75rem;
  font-family: var(--ff-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.contact-info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-info-link {
  font-size: 0.95rem;
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition);
}

.contact-info-link:hover {
  text-decoration-color: var(--accent-color);
  color: var(--accent-color);
}

/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}
