/* ==========================================================================
   DESIGN SYSTEM & THEME TOKENS
   ========================================================================== */

:root {
  --font-display: 'Cormorant Garamond', 'Cinzel', 'Playfair Display', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

  /* Tamil Heritage Accent Hues */
  --terracotta-clay: #A44C34;     /* Terracotta/Semman Red */
  --brass-gold: #C5A880;          /* Zari Gold / Brass Lamp color */

  /* Light Theme: Sandalwood paste off-white canvas with Terracotta accents */
  --bg-base-light: #FDFBF7;
  --bg-card-light: #FFFFFF;
  --bg-card-glass-light: rgba(253, 251, 247, 0.75);
  --border-card-light: rgba(164, 76, 52, 0.12);
  --text-main-light: #2A1D1A;     /* Deepest clay charcoal */
  --text-muted-light: #685955;
  --color-primary-light: var(--terracotta-clay);
  --color-secondary-light: var(--brass-gold);
  --kolam-opacity-light: 0.12;

  /* Dark Theme: Ancient Temple Granite canvas with Brass Lamp Gold accents */
  --bg-base-dark: #121311;        /* Ancient temple black granite stone */
  --bg-card-dark: #191B18;
  --bg-card-glass-dark: rgba(18, 19, 17, 0.75);
  --border-card-dark: rgba(255, 255, 255, 0.06);
  --text-main-dark: #F5F3EE;       /* Sandalwood cream-white */
  --text-muted-dark: #8C887F;
  --color-primary-dark: var(--brass-gold);       /* Accents turn to glowing brass lamp gold */
  --color-secondary-dark: var(--terracotta-clay);
  --kolam-opacity-dark: 0.15;     /* Glowing brass lamp Kolam in the dark */

  /* Default theme assignments */
  --color-primary: var(--color-primary-light);
  --color-secondary: var(--color-secondary-light);
  --bg-base: var(--bg-base-light);
  --bg-card: var(--bg-card-light);
  --bg-card-glass: var(--bg-card-glass-light);
  --border-card: var(--border-card-light);
  --text-main: var(--text-main-light);
  --text-muted: var(--text-muted-light);
  --kolam-opacity: var(--kolam-opacity-light);
  --kolam-image: url('assets/kolam_light.png?v=3');
  --card-shadow: 0 8px 30px 0 rgba(164, 76, 52, 0.02);

  color-scheme: light dark;
}

/* Native dark-mode light-dark() support */
@supports (color: light-dark(white, black)) {
  :root {
    --color-primary: light-dark(var(--color-primary-light), var(--color-primary-dark));
    --color-secondary: light-dark(var(--color-secondary-light), var(--color-secondary-dark));
    --bg-base: light-dark(var(--bg-base-light), var(--bg-base-dark));
    --bg-card: light-dark(var(--bg-card-light), var(--bg-card-dark));
    --bg-card-glass: light-dark(var(--bg-card-glass-light), var(--bg-card-glass-dark));
    --border-card: light-dark(var(--border-card-light), var(--border-card-dark));
    --text-main: light-dark(var(--text-main-light), var(--text-main-dark));
    --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
    --kolam-opacity: light-dark(var(--kolam-opacity-light), var(--kolam-opacity-dark));
    --kolam-image: light-dark(url('assets/kolam_light.png?v=3'), url('assets/kolam_dark.png?v=3'));
    --card-shadow: light-dark(0 8px 30px 0 rgba(164, 76, 52, 0.02), 0 8px 30px 0 rgba(0, 0, 0, 0.3));
  }
}

/* Manual class settings for reliable JS overrides */
html[data-theme="dark"] {
  --color-primary: var(--color-primary-dark);
  --color-secondary: var(--color-secondary-dark);
  --bg-base: var(--bg-base-dark);
  --bg-card: var(--bg-card-dark);
  --bg-card-glass: var(--bg-card-glass-dark);
  --border-card: var(--border-card-dark);
  --text-main: var(--text-main-dark);
  --text-muted: var(--text-muted-dark);
  --kolam-opacity: var(--kolam-opacity-dark);
  --kolam-image: url('assets/kolam_dark.png?v=3');
  --card-shadow: 0 8px 30px 0 rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] {
  --color-primary: var(--color-primary-light);
  --color-secondary: var(--color-secondary-light);
  --bg-base: var(--bg-base-light);
  --bg-card: var(--bg-card-light);
  --bg-card-glass: var(--bg-card-glass-light);
  --border-card: var(--border-card-light);
  --text-main: var(--text-main-light);
  --text-muted: var(--text-muted-light);
  --kolam-opacity: var(--kolam-opacity-light);
  --kolam-image: url('assets/kolam_light.png?v=3');
  --card-shadow: 0 8px 30px 0 rgba(164, 76, 52, 0.02);
}

/* ==========================================================================
   RESET & SETUP
   ========================================================================== */

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  padding: 1rem 1rem;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.portfolio-container {
  max-width: 900px;
  margin: 6.25rem auto 0 auto; /* Generous gap below the fixed floating nav pill */
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   VISUAL EFFECTS (GLASSMORPHISM, GLOWS, KEYFRAMES)
   ========================================================================== */

.glass-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.kolam-bg {
  position: fixed;
  width: 15vw;
  height: 15vw;
  max-width: 150px;
  max-height: 150px;
  z-index: 1; /* Above body background, below app content */
  pointer-events: none;
  opacity: var(--kolam-opacity);
  background-image: var(--kolam-image);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity 0.4s ease;
}

.kolam-top-left {
  top: 0;
  left: 0;
}

.kolam-top-right {
  top: 0;
  right: 0;
  transform: scaleX(-1);
}

.kolam-bottom-left {
  bottom: 0;
  left: 0;
  transform: scaleY(-1);
}

.kolam-bottom-right {
  bottom: 0;
  right: 0;
  transform: scale(-1);
}

/* Elegant Dual Zari Line Divider */
.zari-divider {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 99px;
  margin: 0;
  opacity: 0.85;
  box-shadow: 0 1px 2px rgba(165, 71, 42, 0.05);
}


/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

.app-container {
  max-width: 1100px;
  margin: 3rem auto 0 auto; /* Generous gap below the fixed floating nav pill */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 5; /* Keep content cards above background Kolam watermarks */
}

/* ==========================================================================
   HERO / HEADER SECTION
   ========================================================================== */

.hero-header {
  padding: 1.5rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.tamil-greeting {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  transition: opacity 0.35s ease;
}

.profile-title h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-main) 40%, var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-top: 0.2rem;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.03);
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  margin-top: 0.6rem;
}
[data-theme="dark"] .location-badge {
  background: rgba(255, 255, 255, 0.05);
}

.location-badge i {
  width: 14px;
  height: 14px;
}

.header-controls {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 101; /* Keep above fixed navigation elements */
}

.control-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.control-btn:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  background: var(--bg-base);
}

.control-btn i {
  width: 18px;
  height: 18px;
}

/* Sun/Moon visibility depending on data-theme */
[data-theme="light"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: none; }

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px dashed var(--border-card);
  border-bottom: 1px dashed var(--border-card);
}

.contact-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  color: var(--color-primary);
  transform: translateX(4px);
}

.contact-link i {
  width: 16px;
  height: 16px;
}

.header-right-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.profile-photo-container {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-primary);
  box-shadow: 0 4px 20px rgba(164, 76, 52, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.profile-photo-container:hover {
  transform: scale(1.02);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.profile-social-link:hover {
  color: var(--color-primary);
  transform: translateX(3px);
}

.profile-social-link i {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.bio-text-flow {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1rem;
  max-width: 800px;
}

.bio-text-flow p {
  margin: 0;
}

.bio-text-flow strong {
  color: var(--color-primary);
  font-weight: 600;
}


/* ==========================================================================
   NAVIGATION & TABS
   ========================================================================== */

.nav-tabs-wrapper {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 0.2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: 390px;
  width: calc(100% - 2rem);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.nav-tabs {
  display: flex;
  list-style: none;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 0.4rem;
}

.nav-tabs li {
  flex: none;
}

.tab-btn {
  width: auto;
  background: transparent;
  border: none;
  padding: 0.45rem 0.65rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.tab-btn span {
  position: relative;
  padding-bottom: 2px;
}

.tab-btn span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 99px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--color-primary);
}

.tab-btn.active span::after {
  width: 100%; /* Spans the exact width of the text */
}

/* Hide inactive tabs in config by default */
.nav-tabs li.tab-hidden {
  display: none;
}



/* ==========================================================================
   CONTENT PANELS & COMMON STRUCTURES
   ========================================================================== */

.content-panels {
  min-height: 200px;
  padding-top: 1rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-card);
}

.section-card:last-child {
  border-bottom: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-primary);
}

.section-title i {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   ABOUT TAB STYLING
   ========================================================================== */

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Education Items */
.edu-item {
  position: relative;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-card);
}
.edu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.edu-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.edu-date {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

.edu-degree {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Skills categories */
.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-category h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  font-size: 0.85rem;
  background: rgba(99, 102, 241, 0.06);
  color: var(--color-primary);
  border: 1px solid rgba(99, 102, 241, 0.12);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.skill-tags span:hover {
  background: rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

/* Research Timeline */
.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 1.5rem;
  border-left: 2px solid var(--border-card);
}
.timeline-item:last-of-type {
  border-left: 2px solid transparent;
  padding-bottom: 0;
}

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

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-header h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-sub {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-top: 0.1rem;
  margin-bottom: 0.5rem;
}

.timeline-item ul {
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-item li {
  margin-bottom: 0.3rem;
}

/* Publications */
.pub-item {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-card);
}
.pub-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pub-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-top: 0.1rem;
}

/* Awards */
.awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.awards-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.awards-list i {
  color: var(--color-secondary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ==========================================================================
   EXPERIENCE TAB STYLING
   ========================================================================== */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  border-left: 2px solid var(--border-card);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
}

.exp-card {
  padding: 0.25rem 0;
  position: relative;
}

.exp-card::before {
  content: '';
  position: absolute;
  left: calc(-1.5rem - 6px); /* Centers dot on timeline line */
  top: 0.8rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--bg-base);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.exp-card:hover {
  transform: none;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.company-info {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.company-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.company-name {
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 500;
  display: inline-block;
}

.company-name::before {
  content: "@ ";
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 0.1rem;
}

.exp-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.exp-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.exp-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.focus-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-secondary);
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  background: rgba(197, 168, 128, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

[data-theme="dark"] .focus-text {
  background: rgba(197, 168, 128, 0.05);
  border-color: rgba(197, 168, 128, 0.1);
}

/* ==========================================================================
   PROJECTS TAB STYLING
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

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

.project-icon {
  color: var(--color-secondary);
  width: 24px;
  height: 24px;
}

.project-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.project-tech span {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.05);
  color: var(--color-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.08);
}

/* ==========================================================================
   BLOGS TAB STYLING
   ========================================================================== */

.blogs-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.blog-card {
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-card);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-category {
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-date {
  color: var(--text-muted);
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  align-self: flex-start;
  transition: transform 0.2s ease;
}

.blog-read-more:hover {
  transform: translateX(4px);
}

.blog-read-more i {
  width: 16px;
  height: 16px;
}

.contact-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--border-card);
}

.contact-card:last-child {
  border-bottom: none;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.contact-card a {
  font-size: 0.95rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.contact-card a:hover {
  opacity: 0.8;
  border-bottom: 1px solid var(--color-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.app-footer {
  text-align: center;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-card);
  margin-top: 1.25rem;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

@media (max-width: 576px) {
  body {
    padding: 1rem 0.5rem;
  }

  .header-controls {
    left: auto;
    right: 1rem;
    top: auto;
    bottom: 1.5rem;
    transform: none;
  }
  
  .hero-header {
    padding: 1rem 0;
  }

  .profile-title h1 {
    font-size: 2.2rem;
  }

  .tamil-greeting {
    font-size: 1.1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    padding: 0.5rem 0.35rem;
    font-size: 0.78rem;
    gap: 0.25rem;
  }

  .section-card {
    padding: 1rem 0;
  }
  
  .exp-card {
    padding: 0.5rem 0;
  }

  .header-main {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }

  .header-right-side {
    align-items: center;
    width: 100%;
  }

  .exp-header, .edu-header, .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.6rem 0;
  }

  .company-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
  
  .company-name::before {
    content: none; /* Hide @ on mobile when stacked */
  }

  .exp-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .focus-text {
    margin-top: 0.25rem;
  }
}

/* ==========================================================================
   PRELOADER OVERLAY & LINE DRAWING ANIMATIONS
   ========================================================================== */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s;
  color: var(--color-primary);
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-kolam {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
}

.draw-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLine 2.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.fade-dot {
  opacity: 0;
  animation: fadeInDot 0.5s ease 1.2s forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeInDot {
  to {
    opacity: 1;
  }
}

.preloader-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeInText 0.8s ease 0.4s forwards;
}

@keyframes fadeInText {
  to {
    opacity: 0.8;
  }
}

/* ==========================================================================
   PROFILE PHOTO LIGHTBOX MODAL
   ========================================================================== */
.profile-photo-container {
  cursor: pointer;
}

.photo-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 5, 5, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.photo-modal-content {
  margin: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 16px;
  border: 3px solid var(--color-primary);
  box-shadow: 0 10px 40px rgba(164, 76, 52, 0.25);
  animation: zoomInLightbox 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

@keyframes zoomInLightbox {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: var(--text-muted);
  font-size: 3rem;
  font-weight: 300;
  transition: color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

.close-modal:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

@media (max-width: 576px) {
  .close-modal {
    top: 1rem;
    right: 1.25rem;
    font-size: 2.5rem;
  }
  .photo-modal-content {
    max-width: 95vw;
    max-height: 75vh;
  }
}


