/* =========================================================
   Dharshana Devi — Portfolio
   Design tokens
   ========================================================= */
:root {
  --cream: #f2f1e8;
  --ink: #1a261d;
  --dark-bg: #1c2824;
  --dark-bg-2: #223129;
  --lime: #d9f26c;
  --coral: #dd606a;
  --muted: #6b7066;
  --muted-light: #a9b2a4;
  --line: #d8d4c5;
  --line-dark: #3a473f;
  --card-bg: #e8e3d3;

  --font-display: 'Archivo', sans-serif;
  --font-accent: 'Playfair Display', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;

  --container: 1320px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* =========================================================
   Navbar
   ========================================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.logo .dot { color: var(--coral); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
}

.nav-links button:hover { opacity: 1; }

.nav-links button.active {
  opacity: 1;
  border-bottom-color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
}
.nav-cta:hover { text-decoration: underline; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 6px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links button { display: block; width: 100%; padding: 16px 40px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links .mobile-only-cta { display: block; }
}
.mobile-only-cta { display: none; }

/* =========================================================
   Sections / eyebrow / headings
   ========================================================= */
.page-section { display: block; scroll-margin-top: 78px; }

.section-pad { padding: 96px 0; }
@media (max-width: 640px) { .section-pad { padding: 64px 0; } }

.section-dark { background: var(--dark-bg); color: var(--cream); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 18px;
}
.section-dark .eyebrow { color: var(--lime); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

.accent-italic {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
}

.headline {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 780px;
}

.lede {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 22px;
}
.section-dark .lede { color: var(--muted-light); }

hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0 0;
}
.section-dark hr.rule { border-top-color: var(--line-dark); }

/* =========================================================
   Home
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding-top: 60px;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 22px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  box-shadow: 6px 6px 0 var(--coral);
  transform: translate(-3px, -3px);
}

.link-underline {
  font-weight: 700;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.link-underline:hover { color: var(--coral); }

.hero-graphic {
  position: relative;
  justify-self: center;
  width: 300px;
  height: 340px;
}
.hero-graphic .backer {
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: 6px;
  transform: rotate(2deg);
}
.hero-graphic .card {
  position: absolute;
  inset: 0;
  background: var(--lime);
  border-radius: 6px;
  transform: rotate(-4deg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-graphic .icon-circle {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  align-self: center;
  margin-top: 10px;
}
.hero-graphic .avail-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero-graphic .stack-lines {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

/* =========================================================
   Skills
   ========================================================= */
.skill-row {
  display: grid;
  grid-template-columns: 50px 260px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
@media (max-width: 720px) {
  .skill-row { grid-template-columns: 32px 1fr; }
  .skill-row .skill-list { grid-column: 1 / -1; margin-top: 4px; }
}
.skill-row .index {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.85rem;
}
.skill-row .title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}
.skill-row .skill-list {
  color: var(--muted);
  font-size: 0.98rem;
}

/* =========================================================
   Credentials tabs
   ========================================================= */
.tabs {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 44px;
}
.tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted-light);
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.tab-panel { display: none; padding-top: 44px; }
.tab-panel.active { display: block; }

/* Internships */
.timeline-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line-dark);
}
.timeline-entry:last-child { border-bottom: none; }
@media (max-width: 760px) {
  .timeline-entry { grid-template-columns: 1fr; gap: 8px; }
}
.timeline-entry .date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted-light);
}
.timeline-entry .company {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--lime);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timeline-entry .role {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.timeline-entry .desc {
  color: var(--muted-light);
  max-width: 640px;
  margin-bottom: 18px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line-dark);
  padding: 10px 16px;
  border-radius: 3px;
  background: none;
  color: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pill:hover { border-color: var(--lime); color: var(--lime); }

/* Projects grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line-dark);
  margin-top: 4px;
}
@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .project-grid { grid-template-columns: 1fr; }
}
.project-card {
  background: var(--card-bg);
  padding: 22px 26px 26px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.project-card .index {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.85rem;
}
.project-card .stub {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(26,38,29,0.14);
  letter-spacing: 0.04em;
  margin: 6px 0 14px;
}
.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.project-card .subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.case-link {
  font-weight: 700;
  font-size: 0.92rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  text-align: left;
  padding: 0;
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
}
.case-link:hover { color: var(--coral); border-color: var(--coral); }

/* Simple list rows (workshops / certifications / training) */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-dark);
}
.list-row:last-child { border-bottom: none; }
.list-row .num {
  font-family: var(--font-mono);
  color: var(--muted-light);
  font-size: 0.85rem;
  width: 30px;
  flex-shrink: 0;
}
.list-row .info { flex: 1; }
.list-row .info h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 4px;
}
.list-row .info p {
  margin: 0;
  color: var(--muted-light);
  font-size: 0.92rem;
}
.detail-link {
  font-weight: 700;
  font-size: 0.92rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cream);
  white-space: nowrap;
  border-bottom: 1px solid var(--cream);
}
.detail-link:hover { color: var(--lime); border-color: var(--lime); }

@media (max-width: 640px) {
  .list-row { flex-wrap: wrap; }
  .list-row .info { order: 2; width: 100%; }
  .detail-link { order: 3; }
}

/* =========================================================
   Modal
   ========================================================= */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 20, 0.55);
  z-index: 900;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}
.modal-backdrop-custom.open { display: flex; }

.modal-box {
  background: var(--cream);
  max-width: 760px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  animation: modal-in 0.18s ease;
  color: var(--ink);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  z-index: 2;
}
.modal-body {
  padding: 48px 40px 40px;
}
.modal-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 20px;
}
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.modal-tags span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 3px;
  color: var(--ink);
}
.modal-desc p {
  color: var(--ink);
  opacity: 0.85;
  margin: 0 0 10px;
  line-height: 1.6;
}
.modal-desc ul {
  margin: 0 0 10px;
  padding-left: 20px;
}
.modal-desc li {
  color: var(--ink);
  opacity: 0.85;
  margin-bottom: 8px;
  line-height: 1.55;
}
.modal-subhead {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  margin: 26px 0 10px;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 50px;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-fallback {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--muted);
}
.contact-fallback button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0;
}
.contact-fallback button:hover { color: var(--coral); border-color: var(--coral); }
.copied-msg {
  color: var(--coral);
  font-weight: 700;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.copied-msg.show { opacity: 1; }

.contact-info p {
  margin: 0 0 14px;
  font-size: 1.05rem;
}
.contact-info a.strong { font-weight: 700; }
.contact-info .muted-line { color: var(--muted); font-size: 0.95rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer .copy {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
  flex: 1;
}
.back-top {
  font-weight: 700;
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
}
.back-top:hover { color: var(--coral); }

@media (max-width: 640px) {
  .site-footer .wrap { flex-direction: column; text-align: center; }
}