:root {
    --bg: #0d1117;
    --fg: #c9d1d9;
    --accent: #00b7ff;
    --card: #161b22;
    --button: linear-gradient(to right, #00b7ff, #705df2);
}

body.light {
    --bg: #ffffff;
    --fg: #1f1f1f;
    --accent: #007acc;
    --card: #f2f2f2;
    --button: linear-gradient(to right, #007acc, #005ca9);
}

/*body */
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Helvetica Now Text', 'Inter', -apple-system, sans-serif;
    transition: background 0.3s, color 0.3s;
}

/* Styles for animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform; 
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Elements Reset when Scrolling Up */
.page-container {
    scroll-snap-stop: always;
}

/* Delay classes for staggered animations */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }

/* Font Use: Helvetica Now Text Bold */
.section-heading, h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Now Text Bold', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
}

/* Page by Page View and Arrow */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.page-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
}

.scroll-page {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}


/* Progress indicator */
.progress-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    pointer-events: none;
}

.progress-dots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Light mode styles */
body.light .progress-dot {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.4);
}

/* High contrast for blue repository section */
body:not(.light) .repo-right .progress-dot {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 0, 0, 0.5);
}

.progress-dot:hover {
    transform: scale(1.3);
    background-color: var(--accent);
}

.progress-dot.active {
    background-color: var(--accent);
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--accent);
}


/* Hero Section */
.hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    contain: layout paint;
}

.hero img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    margin-bottom: 1rem;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
}

.hero img:hover {
    animation: gentleScale 0.3s ease-out forwards;
}

@keyframes gentleScale {
    to { transform: scale(1.1); }
}

.hero h2 {
    font-size: 2rem;
    margin: 0.2rem 0;
}

.hero h3 {
    font-weight: 500;
    margin: 0.3rem 0;
    font-size: 1.2rem;
    color: var(--accent);
}

.hero p {
    font-size: 0.95rem;
    margin: 0.3rem 0;
    color: #888;
}

/* Prevent Overscrolling */
.page-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    overscroll-behavior: none;
    overscroll-behavior-y: contain;
}

/* Hero Social Icons */
.hero-social-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 0.6rem;
    z-index: 10;
}

.hero-social-icons a {
    color: var(--fg);
    background: var(--card);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent);
}

.hero-social-icons a:hover {
    color: white;
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(88, 166, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-social-icons {
        top: 15px;
        right: 15px;
        gap: 0.5rem;
    }
    
    .hero-social-icons a {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}


/* To prevent flash/slight shake on transition to different modes */
.no-transitions * {
  transition: none !important;
  animation: none !important;
}

 
/* About Section */
.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.about-section h3 {
    color: var(--accent);
    font-size: 1.6rem;
    margin-bottom: 3.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.about-section .subsection {
    margin-bottom: 1.4rem;
    text-align: left;
    max-width: 850px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Smaller paragraph text - preserves heading/subheading size */
.about-section .subsection p {
    font-size: 0.95rem;
}

.about-section .subsection p {
    font-size: 0.95rem; 
    line-height: 1.3;
}

/* Visible state */
.about-section h3.visible,
.about-section .subsection.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-section a {
    color: var(--accent); 
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

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

/* Subtle underline effect on hover */
.about-section a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.about-section a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}


/* General sections */ 
.section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: left;
}
  
.section-heading {
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}


/* Navigation bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar h1 {
    margin: 0;
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent);
}

.theme-toggle i {
    font-size: 1.4rem;
    padding: 0.3rem;
}
  
.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}


/* Repository Section */
.repo-section {
    display: flex;
    flex-direction: row; 
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
}

/* Left and right panel styling */
.repo-left, .repo-right {
    width: 50%;
    height: 100%;
    padding: 4rem 4rem;
    box-sizing: border-box;
}

/* Left panel - Dark background, accent text */
.repo-left {
    background-color: #0d1116; 
    color: var(--accent);
    display: flex;
    margin: 0 0 0.2rem 0;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Left panel typography */
.repo-left h2,
.repo-left p {
    margin: 0;
}

/*.repo-left h2 - underline */
.repo-left h2 {
    position: relative;
    display: inline-flex; 
    margin-bottom: 1rem;
    width: fit-content;
}

.repo-left h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.3rem;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.repo-left p {
    margin: 0;
    color:#ffffff;
}

/* Right panel - default background */
.repo-right {
    background: #58a6ff; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Right panel - light mode override */
body.light .repo-right {
    background: #f2f2f2 !important;
}

/* Right panel typography */
.repo-right h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

/* Repository card container */
.repo-cards {
    width: 90%;
    max-height: 85%;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Reposiroty card images */
.repo-cards img {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.repo-cards img:hover {
    transform: scale(1.03);
}

/* Custom scrollbar styling */
.repo-cards::-webkit-scrollbar {
    width: 8px;
}

.repo-cards::-webkit-scrollbar-thumb {
    background-color: #1a1b27;
    border-radius: 6px;
}

/* Responsive styling (mobile) */
@media (max-width: 768px) {
    .repo-section {
        flex-direction: column;
    }
    
    .repo-left, .repo-right {
        width: 100%;
        height: auto;
    }
    
    .repo-cards {
        max-height: 300px;
    }
}


/* Skills Section */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 0.5rem auto 2rem auto;
    max-width: 920px;
    padding: 1rem;
    perspective: 1000px;
}

.skills-grid img {
    background: var(--card);
    padding: 0.4rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    filter: blur(0);
    opacity: 0.95;
    transform: scale(1);
    position: relative;
    z-index: 1;
}

/* Visible state */
.skills-grid img.visible {
    opacity: 0.95;
    transform: rotateY(0) scale(1);
}

/* Hovered Item */
.skills-grid img:hover {
    transform: scale(2);
    z-index: 10;
    filter: blur(0);
    opacity: 1;
    background: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(2) rotateY(0) !important;
}

/* Non-Hovered Items When One is Hovered */
.skills-grid:has(img:hover) img:not(:hover) {
    filter: blur(3px);
    opacity: 0.6;
    transform: scale(0.9);
    transition: all 0.3s ease-out;
}

/* Mobile Adaptation */
@media (max-width: 768px) {
    .skills-grid img:hover {
        transform: scale(1.6);
    }
    
    .skills-grid:has(img:hover) img:not(:hover) {
        filter: blur(2px);
        transform: scale(0.95);
    }
}


/* Code Section */
.code-content-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.code-column {
    flex: 1;
    min-width: 0;
}

.content-column {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* Compact Code Container */
.code-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--code-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--code-border);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--code-header-bg);
    border-bottom: 1px solid var(--code-border);
}

.code-block {
    flex-grow: 1;
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    background: transparent;
    color: var(--code-text) !important;
}

/* Improved Color Scheme */
:root {
    --code-bg: #161b22;
    --code-header-bg: #0d1117;
    --code-border: #30363d;
    --code-text: #e6edf3;
}

/* Light theme variables */
body.light {
    --code-bg: #f6f8fa;
    --code-header-bg: #ffffff;
    --code-border: #d1d9e0;
    --code-text: #1f2328;
}

/* Light theme code block - more specific selectors */
body.light .code-block,
body.light .code-container .code-block,
body.light .horizontal-code-container .code-block {
    color: #1f2328 !important;
    background: transparent !important;
}

/* Ensure code containers also update their backgrounds */
body.light .code-container,
body.light .horizontal-code-container {
    background: var(--code-bg);
    border-color: var(--code-border);
}

body.light .code-header,
body.light .horizontal-code-container .code-header {
    background: var(--code-header-bg);
    border-bottom-color: var(--code-border);
}

/* Additional specificity for any Prism.js syntax highlighting that might override */
body.light .code-block code,
body.light .code-block pre,
body.light .code-block *:not(.token) {
    color: #1f2328 !important;
}

/* Dark theme specificity */
body:not(.light) .code-block,
body:not(.light) .code-container .code-block,
body:not(.light) .horizontal-code-container .code-block {
    color: #e6edf3 !important;
}

body:not(.light) .code-block code,
body:not(.light) .code-block pre,
body:not(.light) .code-block *:not(.token) {
    color: #e6edf3 !important;
}

/* Outlier Detection section*/
.horizontal-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 98%;
    box-sizing: border-box;
    padding-left: 0;
}

.code-iqr-container {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.code-iqr-container > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}


/* Horizontal Code Container */
.horizontal-code-container {
    flex: 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--code-bg);
    border-radius: 12px;
    border: 1px solid var(--code-border);
    overflow: hidden;
    box-sizing: border-box;
}

.horizontal-code-container .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: var(--code-header-bg);
    border-bottom: 1px solid var(--code-border);
}

.horizontal-code-container .language-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
}

.horizontal-code-container .code-block {
    height: 100%;
    padding: 1rem;
    font-size: 0.82rem;
    line-height: 1.4;
    margin: 0;
    background: transparent;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: var(--code-text);
    overflow-x: auto;
}

/* IQR Method Container */
.code-description {
    flex: 3;
    background: var(--card);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--code-border);
    box-sizing: border-box;
}

.code-description h3 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.code-description ul {
    padding-left: 1.25rem;
    margin: 1rem 0;
}

.code-description li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Demo Container */
.interactive-demo, .demo-container {
    width: 100%;
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--code-border);
    box-sizing: border-box;
}

.demo-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

textarea#data-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--code-border);
    background: var(--bg);
    color: var(--fg);
    font-family: 'SFMono-Regular', Consolas, monospace;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.demo-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--button);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
    width: fit-content;
}

.demo-button:hover {
    transform: translateY(-2px);
}

.demo-results {
    background: rgba(88, 166, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    white-space: pre-wrap;
    min-height: 100px;
    border: 1px solid var(--code-border);
    margin-top: 1rem;
    box-sizing: border-box;
}

.result-group {
    margin-bottom: 0.75rem;
}

.result-group label {
    font-weight: 600;
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.result-group span {
    display: block;
    padding-left: 0.5rem;
}

.outlier-value {
    color: #ff7b72;
    font-weight: 600;
}

.success {
    color: #3fb950;
}

.error {
    color: #ff7b72;
}

.stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--code-border);
}

.stats span {
    font-size: clamp(0.8rem, 1vw, 1rem);
    opacity: 0.9;
}

.scroll-page.outlier-page {
    align-items: flex-start;
    padding: 0;
    justify-content: flex-start;
    overflow-y: auto;
    box-sizing: border-box;
    margin: 0;  
    max-width: none; 
    width: 100vw; 
    overflow-x: hidden;
    position: static;
    z-index: auto;
}

.scroll-page.outlier-page > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Loading spinner */
.fa-spinner {
    margin-right: 0.5rem;
}

/* Modal Container*/
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: var(--card);
    padding: 1.5rem 2.5rem; 
    border-radius: 12px;
    max-width: 350px;
    width: 60%;
    min-height: 200px; 
    max-height: 65vh; 
    position: relative;
    border: 1px solid var(--code-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1;
}

.demo-results {
    flex-grow: 1;
    overflow-y: auto;
    width: 100%;
    max-height: 50vh;
    padding: 0.5rem 0 !important; 
    line-height: 1.2 !important;
}

/* Target ONLY the spacing */
#modal-results.demo-results {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0.60 !important;
}

#modal-results .result-group {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Dotted line after the first result-group (Outliers Found) */
#modal-results .result-group:first-child {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px dashed var(--code-border);
}

#modal-results .result-group label,
#modal-results .result-group span {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0.60 !important;
}

#modal-results .stats {
    margin-top: 0.5rem !important;
    padding-top: 0.5rem !important;
    border-top: 1px dashed var(--code-border);
}

#modal-results {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: inherit;
    color: inherit;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--fg);
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.close-modal:hover {
    color: var(--accent);
}

/* Info Tooltip Styles */
.info-tooltip {
    position: relative;
    display: inline-block;
}

.info-icon {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.info-icon:hover {
    color: var(--fg);
}

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

.tooltip-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 300px;
    background: var(--card);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
}

.info-tooltip:hover .tooltip-content {
    display: block;
}

.tooltip-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tooltip-content a {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}

.tooltip-content a:hover {
  text-decoration: underline;
}

/* Copy button colors to match theme */
.copy-button {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    transition: color 0.2s;
}

.copy-button:hover {
    color: var(--accent-light);
}

.copy-button .fa-check {
    color: var(--success);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .code-iqr-container {
        flex-direction: column;
    }
    
    .demo-controls {
        flex-direction: column;
    }
    
    .demo-button {
        align-self: flex-start;
        padding: 0.75rem 1.5rem;
    }
    
    .horizontal-code-container, 
    .code-description {
        width: 100%;
    }
    
    /* Modal-specific responsive rules */
    .modal-content {
        max-width: 95vw;
        padding: 1.25rem;
        max-height: 70vh; 
    }
    
    .demo-results {
        max-height: 55vh; 
    }
    
    .modal-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

/* Additional breakpoint for very small devices */
@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
        max-height: 80vh; 
    }
    
    .demo-results {
        max-height: 65vh;
        padding: 0.25rem;
    }
    
    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.3rem;
    }
}


/* Personal Interests Section */
.interests-section {
    background: var(--bg);
    color: var(--fg);
    padding: 2rem 1rem;
    scroll-snap-align: start;
    text-align: center;
    min-height: 100vh;
    position: relative;
    box-sizing: border-box;
}

.interests-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.interests-intro {
    margin: 0.5rem auto 1.5rem;
    font-size: 0.95rem;
    line-height: 1.3;
    max-width: 800px;
}

/* Hobbies Grid */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.4rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.6rem 0.4rem;
    border-radius: 8px;
    background: var(--card);
}

.hobby-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hobby-item img {
    width: 34px;
    height: 34px;
    margin-bottom: 0.4rem;
    object-fit: contain;
}

.hobby-item span {
    font-size: 0.8rem;
    color: var(--fg);
    text-align: center;
    line-height: 1.3;
}

/* Additional Info Section */
.additional-info {
    margin: 1.5rem auto 0; 
    max-width: 1200px;
    width: 100%;
    padding: 0 1rem;
}

.info-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.7rem;
}

.info-column {
    flex: 1;
    min-width: 280px;
    background: var(--card);
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

/* Make all columns align with hobbies grid */
.info-column:nth-child(1) {
    flex: 1.2;
}

.info-column:nth-child(2) {
    flex: 1.4;
}

.info-column:nth-child(3) {
    flex: 1.2;
}

.info-column:hover {
    transform: translateY(-5px);
}

.info-column h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-column h4 i {
    font-size: 1rem;
}

.info-content {
    text-align: left;
}

.multilingual {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.languages-list {
    list-style-type: none;
    padding-left: 0;
}

.languages-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.3rem;
}

.languages-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.info-column ul {
    padding-left: 1.2rem;
    margin: 0;
}

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

/* Light Mode Adjustments */
body.light .hobby-item,
body.light .info-column {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .hobbies-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 650px;
    }
}

@media (max-width: 1200px) {
    .hobbies-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 440px;
    }
}

@media (max-width: 900px) {
    .info-column {
        min-width: 45%;
    }
    
    .interests-section {
        min-height: fit-content;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .hobbies-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 330px;
    }

    .hobby-item img {
        width: 32px;
        height: 32px;
    }

    .hobby-item span {
        font-size: 0.78rem;
    }

    .info-column {
        min-width: 100%;
    }

    .interests-intro {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .interests-container {
        max-width: 100%;
    }

    .additional-info {
        max-width: 100%;
    }
    
    .interests-section {
        min-height: fit-content;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hobbies-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 220px;
    }

    .hobby-item span {
        font-size: 0.75rem;
    }

    .info-column {
        padding: 1.2rem;
    }
}


/* Remove focus outline but keep accessibility for keyboard users */
button:focus:not(:focus-visible) {
    outline: none;
}

/* Custom focus style for keyboard users */
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* Contact Section Styles */
.contact-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem 2rem;
    box-sizing: border-box;
    position: relative;
    text-align: center;
}

.collaborate-content,
.contact-content {
    width: 100%;
    max-width: 800px;
    margin: 0;
    padding: 0;
    text-align: center;
}

.section-heading {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 0.5rem !important;
    line-height: 1.2;
    display: inline-block;
}

.contact-content .section-heading {
    display: none;
}

.subheading {
    font-size: 1rem;
    color: var(--fg);
    line-height: 1.5;
    margin-bottom: 1rem !important; 
    padding: 0;
}

.contact-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem !important; 
    padding: 0;
}

.contact-icons a {
    color: var(--accent);
    font-size: 2rem;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, color 0.2s;
}

.contact-icons a:hover {
    transform: scale(1.1);
    color: white;
}

.contact-content button {
    background: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 0.75rem !important;
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.contact-content button:hover {
    transform: perspective(1px) rotate(1deg) scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Rules to adjust spacing */
.collaborate-content .subheading {
    margin-bottom: 0.5rem !important;
}

.contact-icons {
    margin-top: 0.25rem !important;
}

.contact-content button {
    margin-top: 0.9rem !important;
}

/* Copyright */
.copyright-watermark {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--fg);
    opacity: 0.15;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s, color 0.3s;
  }

/* Light mode adjustment */
body.light .copyright-watermark {
    opacity: 0.6;
}

/* Footer only for last page */
.scroll-page:last-child::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3rem;
    background: var(--bg);
    border-top: 1px solid #333;
    scroll-snap-align: end;
    z-index: 10;
}

/* Prevent overscroll without breaking snap */
.page-container {
    overscroll-behavior-y: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-section {
        padding: 2rem 1rem;
    }
    
    .contact-icons {
        gap: 1.5rem;
    }
}


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

.modal-content {
    background: var(--card);
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: fadeIn 0.4s ease-out;
    color: var(--fg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
  
.modal-content,
.modal-content input,
.modal-content textarea {
    box-sizing: border-box;
}
    
.modal-content input, 
.modal-content textarea {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--accent); 
    background: var(--bg); 
    color: var(--fg);
    transition: all 0.3s ease;
}

.modal-content input:focus, 
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3);
}

.modal-content button {
    background: var(--button);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 0.5rem;
}

.modal-content button:hover {
    transform: rotate(1deg) scale(1.05);
    filter: brightness(1.1); 
}

.close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    color: var(--fg);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--accent); 
}

/* Success/error messages should also respect theme */
.modal-content div {
    color: var(--fg);
}

/* Time for theme color changes in the background */
body {
    transition: background 0.4s ease, color 0.4s ease;
}
  
/* For accessibility while maintaining the site's visual style */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* WCAG (Web Content Accessibility Guidelines) */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* Contact button fade in effects  */
@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

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


/* For keyboard users */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
