:root {
  --padX: 72px;
  --padTop: 26px;
  --hair: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

/* NOTEBOOK BACKGROUND */
body {
  margin: 0;
  font-family: "Wix Madefor Text", sans-serif;
  color: #000;
  background: repeating-linear-gradient(
    to bottom,
    #ffffff 0px,
    #ffffff 24px,
    rgba(0, 0, 0, 0.05) 25px
  );
}

/* Layout base */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* HEADER */
.topbar {
  padding: var(--padTop) var(--padX) 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

/* Brand */
.brand {
  font-size: 20px;
  text-decoration: none;
  color: #000;
}

/* Nav */
.nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
}

.nav a {
  text-decoration: none;
  color: #666;
  font-size: 14px;
}

.nav a:hover {
  color: #000;
}

/* Ring icon */
.sigil {
  margin-left: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.sigil__shape {
  width: 26px;
  height: 26px;
  display: inline-block;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.sigil__shape svg {
  width: 100%;
  height: 100%;
}

.book-icon {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* Main layout */
.layout {
  padding: 10px var(--padX) 60px;
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 90px;
}

/* SECTION LINKS */
.section-link {
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  line-height: 17px;
  color: rgb(0, 0, 0);

  text-decoration: none;
  display: block;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding: 6px 0;
}

.left a {
  font-style: italic;
}

.section-link:hover {
  opacity: 0.6;
}

.left a {
  text-decoration: none;
  color: rgb(0, 0, 0);
  font-size: 15px;
  line-height: 17px;
  display: block;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding: 6px 0;
  font-style: italic;
}

.left a:hover {
  opacity: 0.6;
}

/* Right bio */
.right {
  font-size: 13px;
  line-height: 21px;
}

.bio-image {
  text-align: center;
  margin-bottom: 20px;
}

.bio-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 3px solid #000;
}

body.dark-mode .bio-image img {
  border: 3px solid #fff !important;
}

.bio a {
  color: #0066cc;
  text-decoration: none;
}

.bio a:hover {
  text-decoration: underline;
}

.bio {
  margin-bottom: 18px;
  font-family: "Wix Madefor Text", sans-serif;
  font-size: 13px;
  line-height: 21px;
}

/* Intent note */
.intentNote {
  text-align: center;
  margin: 50px auto 30px;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* Footer */
.footer {
  border-top: 1px solid var(--hair);
  padding: 18px var(--padX) 20px;
}

.footerRow {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  justify-content: space-between;
}

/* Footer Message */
.footer-message {
  text-align: center;
  margin: 15px 0;
  font-size: 14px;
  color: #666;
}

.footer-message a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
}

.footer-message a:hover {
  text-decoration: underline;
}

.footer-message {
  font-family: "Wix Madefor Text", sans-serif;
}

/* Footer Clock */
.footer-clock {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
}

.clock-time {
  font-size: 18px;
  font-weight: 400;
  color: #000;
  font-family: "Wix Madefor Text", sans-serif;
  margin-bottom: 4px;
}

.clock-message {
  font-size: 12px;
  color: #666;
  font-style: italic;
  font-family: "Wix Madefor Text", sans-serif;
}

/* REAL TRIPLE COMMA */
.triple-comma {
  font-style: italic;
  font-size: 26px;
  letter-spacing: -2px;
  transform: perspective(200px) rotateX(8deg);
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25))
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

/* Social icons */
.social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.socialLink {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.85);
}

.socialLink svg {
  display: block;
  fill: rgb(0, 0, 0);
}

.socialLink:hover {
  border-color: rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 1);
}

/* Window Controls */
.window-controls {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

.window-control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.window-control.close {
  background-color: #ff5f57;
}

.window-control.close:hover {
  background-color: #ff3b30;
}

.window-control.minimize {
  background-color: #ffbd2e;
}

.window-control.minimize:hover {
  background-color: #ff9500;
}

.window-control.maximize {
  background-color: #28ca42;
}

.window-control.maximize:hover {
  background-color: #00a832;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 40px;
  border: none;
  border-radius: 0;
  width: auto;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  font-family: "Wix Madefor Text", sans-serif;
  position: relative;
}

.modal-body {
  padding: 0;
  font-family: "Wix Madefor Text", sans-serif;
}

.modal-body h2 {
  margin: 0 0 30px 0;
  font-size: 20px;
  color: #000;
  font-weight: 400;
  font-family: "Wix Madefor Text", sans-serif;
}

.quotes-list {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.quotes-list div {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0 0 24px 0;
  border-bottom: none;
  outline: none;
  box-shadow: none;
}

.quotes-list h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
}

.quotes-list p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #000;
  line-height: 24px;
  font-family: "Wix Madefor Text", sans-serif;
}

.awards-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.award-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 24px 0;
  transition: none;
}

.award-item:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
}

.award-item h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
}

.award-item p {
  margin: 0;
  font-size: 14px;
  color: #000;
  line-height: 24px;
  font-family: "Wix Madefor Text", sans-serif;
}

.award-item a {
  color: #0066cc;
  text-decoration: none;
}

.award-item a:hover {
  text-decoration: underline;
}

/* Projects and Hackathons Modal Styles */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-category {
  margin-bottom: 30px;
}

.project-category h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
}

.project-category::before {
  content: '';
  display: block;
  border-bottom: 2px solid #000;
  margin-bottom: 20px;
}

.project-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 30px 0;
  transition: none;
}

.project-item h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
}

.project-item p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #000;
  line-height: 24px;
  font-family: "Wix Madefor Text", sans-serif;
}

.project-item img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  border: 2px solid #000;
  margin: 0 auto 16px auto;
  display: block;
}

.project-item a {
  color: #0066cc;
  text-decoration: none;
}

.project-item a:hover {
  text-decoration: underline;
}

/* Thoughts and Writings Modal Styles */
.thoughts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.thought-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 30px 0;
  transition: none;
}

.thought-item img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  border: 2px solid #000;
  margin: 0 auto 16px auto;
  display: block;
}

.thought-item h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
}


.thought-subtitle {
  margin: 0;
  font-size: 14px;
  color: #666;
  font-style: italic;
  font-family: "Wix Madefor Text", sans-serif;
}

.project-images-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.project-images-row img {
  width: auto;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  border: 2px solid #000;
  display: block;
  transition: transform 0.2s ease;
}

.project-images-row img:hover {
  transform: scale(1.05);
}

/* Movies and Books Modal Styles */
.movies-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.movies-categories {
  display: flex;
  gap: 40px;
  justify-content: flex-start;
  align-items: flex-start;
}

.movie-category {
  flex: 1;
}

.movie-category h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
}

.movie-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.movie-item {
  margin: 0;
}

.movie-item a {
  color: #0066cc;
  text-decoration: none;
  font-size: 15px;
  font-family: "Wix Madefor Text", sans-serif;
  line-height: 24px;
}

.movie-item a:hover {
  text-decoration: underline;
}

.movie-note {
  font-size: 13px;
  color: #666;
  font-style: italic;
  font-family: "Wix Madefor Text", sans-serif;
  margin-left: 4px;
}

.books-section {
  margin-top: 20px;
}

.books-section h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: #000;
  font-weight: 600;
  font-family: "Wix Madefor Text", sans-serif;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-item {
  margin: 0;
}

.book-item p {
  margin: 0;
  font-size: 15px;
  font-family: "Wix Madefor Text", sans-serif;
  line-height: 24px;
  color: #000;
}

/* Image Modal Styles */
.image-modal-content {
  background-color: white;
  padding: 0;
}

.image-modal-body {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.image-modal-body img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: none;
  border-radius: 0;
  margin: 0;
}

/* Mobile */
@media (max-width: 860px) {
  :root {
    --padX: 22px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .nav {
    display: flex;
    gap: 12px;
    font-size: 12px;
  }

  .topbar {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .sigil {
    margin-left: auto;
  }

  .bio-image {
    text-align: center;
    margin-bottom: 20px;
  }

  .bio-image img {
    width: 80%;
    max-width: 450px;
  }

  .bio {
    font-size: 14px;
    line-height: 22px;
  }
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-width: 95%;
    margin: 10% auto;
    max-height: 90vh;
    padding: 20px;
  }
  
  .modal-body {
    padding: 0;
  }
  
  .modal-body h2 {
    font-size: 20px;
  }
  
  .awards-list {
    gap: 12px;
  }
  
  .award-item {
    padding: 0;
  }
  
  .award-item h3 {
    font-size: 15px;
  }
  
  .award-item p {
    font-size: 13px;
  }
  
  .movies-categories {
    flex-direction: column;
    gap: 30px;
  }
}

/* Extra small mobile */
@media (max-width: 480px) {
  :root {
    --padX: 16px;
    --padTop: 16px;
  }

  .page {
    min-height: 100vh;
    overflow-x: hidden;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: var(--padTop) var(--padX) 10px;
    justify-content: space-between;
  }

  .brand {
    font-size: 18px;
    order: 1;
  }

  .nav {
    display: flex;
    gap: 8px;
    font-size: 11px;
    order: 3;
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .sigil {
    order: 2;
    margin-left: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px var(--padX) 40px;
  }

  .bio-image {
    text-align: center;
    margin-bottom: 20px;
  }

  .bio-image img {
    width: 90%;
    max-width: 400px;
  }

  .bio {
    font-size: 13px;
    line-height: 20px;
  }

  .footerRow {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 18px var(--padX) 30px;
  }

  .footer .nav {
    text-align: center;
    margin: 15px 0;
    display: block !important;
    margin-left: 0 !important;
    gap: 0 !important;
  }

  .footer .nav a {
    margin: 0 8px;
    display: inline-block;
  }
}

/* Book Icon Styles */
.book-icon {
  font-size: 18px;
  line-height: 1;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  margin-left: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.dark-mode-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  border: none;
  border-radius: 0;
  background: transparent !important;
}

.dark-mode-icon svg {
  width: 100%;
  height: 100%;
}

/* Dark Mode Styles */
body.dark-mode {
  background: #000 !important;
  color: #fff !important;
}

body.dark-mode .page {
  background: #000 !important;
}

body.dark-mode .brand {
  color: #fff !important;
}

body.dark-mode .nav a {
  color: #ccc !important;
}

body.dark-mode .nav a:hover {
  color: #fff !important;
}

body.dark-mode .section-link {
  color: #fff !important;
}

body.dark-mode .bio {
  color: #fff !important;
}

body.dark-mode .bio a {
  color: #4fc3f7 !important;
}

body.dark-mode .bio a:hover {
  color: #81d4fa !important;
}

body.dark-mode .sigil__shape svg {
  stroke: #fff !important;
}

body.dark-mode .dark-mode-icon svg {
  stroke: #fff !important;
}

body.dark-mode .modal-content {
  background: #1a1a1a !important;
  color: #fff !important;
  border: 1px solid #333 !important;
}

body.dark-mode .window-control.close {
  background: #f44336 !important;
}

body.dark-mode .window-control.maximize {
  background: #4caf50 !important;
}

body.dark-mode .modal-body h2 {
  color: #fff !important;
}

body.dark-mode .modal-body h3 {
  color: #fff !important;
}

body.dark-mode .modal-body p {
  color: #fff !important;
}

body.dark-mode .thought-item a,
body.dark-mode .project-item a,
body.dark-mode .award-item a,
body.dark-mode .movie-item a,
body.dark-mode .book-item a {
  color: #4fc3f7 !important;
}

body.dark-mode .thought-item a:hover,
body.dark-mode .project-item a:hover,
body.dark-mode .award-item a:hover,
body.dark-mode .movie-item a:hover,
body.dark-mode .book-item a:hover {
  color: #81d4fa !important;
}

body.dark-mode .thought-item p,
body.dark-mode .project-item p,
body.dark-mode .award-item p,
body.dark-mode .movie-item p,
body.dark-mode .book-item p {
  color: #fff !important;
}

body.dark-mode .thought-item h3,
body.dark-mode .project-item h3,
body.dark-mode .award-item h3,
body.dark-mode .movie-item h3,
body.dark-mode .book-item h3 {
  color: #fff !important;
}

body.dark-mode .form-group label {
  color: #fff !important;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  background: #2a2a2a !important;
  color: #fff !important;
  border-color: #555 !important;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
  border-color: #4fc3f7 !important;
}

body.dark-mode .send-button {
  background: #fff !important;
  color: #000 !important;
}

body.dark-mode .send-button:hover {
  background: #ccc !important;
}

body.dark-mode .success-message {
  background: #2e7d32 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
}

body.dark-mode .footer-message {
  color: #fff !important;
}

body.dark-mode .footer-message a {
  color: #4fc3f7 !important;
}

body.dark-mode .footer-message a:hover {
  color: #81d4fa !important;
}

body.dark-mode .footer-clock {
  border-top-color: #333 !important;
}

body.dark-mode .clock-time {
  color: #fff !important;
}

body.dark-mode .clock-message {
  color: #ccc !important;
}

body.dark-mode .intentNote {
  color: #fff !important;
}

body.dark-mode .intentNote a {
  color: #4fc3f7 !important;
}

body.dark-mode .intentNote a:hover {
  color: #81d4fa !important;
}

body.dark-mode .triple-comma {
  color: #fff !important;
}

body.dark-mode .footerRow span {
  color: #fff !important;
}

body.dark-mode .layout {
  background: #000 !important;
}

body.dark-mode main {
  background: #000 !important;
}

body.dark-mode .left {
  background: #000 !important;
}

body.dark-mode .right {
  background: #000 !important;
}

body.dark-mode img {
  border: 2px solid #fff !important;
}

body.dark-mode .bio-image img {
  border: 2px solid #fff !important;
}

body.dark-mode .thought-item img,
body.dark-mode .project-item img,
body.dark-mode .award-item img,
body.dark-mode .movie-item img,
body.dark-mode .book-item img {
  border: 2px solid #fff !important;
}

body.dark-mode .section-link {
  color: #fff !important;
}

body.dark-mode .section-link:hover {
  color: #ccc !important;
}

body.dark-mode .sigil__shape svg {
  stroke: #fff !important;
}

body.dark-mode .dark-mode-icon svg {
  stroke: #fff !important;
}

body.dark-mode .dark-mode-toggle {
  background: transparent !important;
}

body.dark-mode .sigil {
  background: transparent !important;
}

body.dark-mode .modal-body h3 {
  color: #fff !important;
}

body.dark-mode .hackathon-item h4 {
  color: #fff !important;
}

body.dark-mode .hackathon-item p {
  color: #fff !important;
}

body.dark-mode * {
  border-color: #555 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #fff !important;
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode div {
  color: #fff !important;
}

body.dark-mode a {
  color: #4fc3f7 !important;
}

body.dark-mode a:hover {
  color: #81d4fa !important;
}

body.dark-mode button {
  color: #fff !important;
  border-color: #fff !important;
}

body.dark-mode .window-control {
  border: none !important;
}

body.dark-mode .sigil__shape svg path {
  stroke: #fff !important;
}

body.dark-mode .dark-mode-icon svg path {
  stroke: #fff !important;
}

body.dark-mode .sigil__shape svg {
  stroke: #fff !important;
}

body.dark-mode .dark-mode-icon svg {
  stroke: #fff !important;
}

/* Recommendation Form Styles */
.recommend-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 15px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: #000;
  font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  font-family: "Wix Madefor Text", sans-serif;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease;
  margin-top: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 160px;
  font-family: "Wix Madefor Text", sans-serif;
  line-height: 1.5;
}

.send-button {
  background: #000;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: "Wix Madefor Text", sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
}

.send-button:hover {
  background: #333;
}

.success-message {
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 4px;
  padding: 16px;
  margin-top: 20px;
  text-align: center;
  color: #2e7d32;
}

.success-message p {
  margin: 0;
  font-weight: 500;
}
