/*
 * Author: Amey Thakur
 * GitHub: https://github.com/amey-thakur
 * Date: 2026-02-17
 * License: MIT
 * Description: Main stylesheet for the portfolio website.
 */

:root {
    /* Colors - Ethereal Lab Theme */
    --bg-color: #f8f9fa;
    /* Soft White */
    --text-color: #2c3e50;
    /* Deep Charcoal */
    --accent-color: #0d9488;
    /* Teal/Emerald - Pharmacy & Nature */
    --accent-light: #ccfbf1;
    /* Soft Teal Background */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --dark-bg: #111827;
    /* For footer */
    --white: #ffffff;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-speed: 0.4s;
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

h1,
h2,
h3,
h4,
.logo,
.section-title {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) var(--ease-out);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background-color: var(--text-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background var(--transition-speed);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.dot {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.dot::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    z-index: 10;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links.active {
    transform: translateX(0);
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s;
}

/* Hamburger Toggle Animation */
.hamburger.toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.toggle span:nth-child(2) {
    opacity: 0;
}

.hamburger.toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 70% 30%, var(--accent-light) 0%, transparent 60%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
}

.subtitle {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-text h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text .highlight {
    font-style: italic;
    color: var(--accent-color);
    position: relative;
    z-index: 1;
}

.hero-text .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: rgba(13, 148, 136, 0.2);
    z-index: -1;
}

.description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-graphic {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: conic-gradient(from 180deg at 50% 50%, var(--accent-light) 0deg, white 360deg);
    filter: blur(40px);
    opacity: 0.6;
    animation: rotate 20s linear infinite;
}

/* Scroll Mouse Animation */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-down:hover {
    opacity: 1;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-color);
    border-radius: 20px;
    position: relative;
    margin-bottom: 5px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

.arrow-span span {
    display: block;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--text-color);
    border-right: 2px solid var(--text-color);
    transform: rotate(45deg);
    margin: -4px;
    animation: scrollArrow 1.5s infinite;
}

.arrow-span span:nth-child(2) {
    animation-delay: 0.2s;
}

.arrow-span span:nth-child(3) {
    animation-delay: 0.4s;
}

/* About Section */
.about-section {
    background-color: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 15px solid var(--accent-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.img-wrapper img {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

.img-wrapper:hover img {
    transform: scale(1);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    margin-top: 10px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

.bio p {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.05rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-color);
}

.vibe-tags {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}


.tag {
    display: inline-block;
    /* Ensure transforms work */
    background-color: var(--accent-light);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    transform: translateY(-3px);
    background-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(13, 148, 136, 0.2);
}

/* Education Section */
.education-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #fff 100%);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    /* Adjust for mobile/desktop */
    height: 100%;
    width: 2px;
    background-color: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px var(--accent-color);
    z-index: 1;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-5px);
}

.card-glass h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-glass h4 {
    font-family: var(--font-body);
    font-weight: 500;
    color: #666;
    margin-bottom: 1rem;
}

/* Research Section */
.research-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.card-research {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.card-research:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--accent-light);
    padding: 2rem;
    position: relative;
}

.icon-bg {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.1;
}

.badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.card-body {
    padding: 2rem;
}

.d-list {
    margin-top: 1rem;
}

.d-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.d-list i {
    color: var(--accent-color);
    font-size: 0.8rem;
}

/* Skills Section */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.skill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-pill {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: default;
}

.skill-pill:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Interests Section */
.interests-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 200px;
}

.interest-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    background-color: var(--accent-light);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.interest-item:hover i {
    transform: rotate(360deg);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-color);
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: space-between;
}

.contact-info {
    flex: 1 1 300px;
}

.contact-form {
    flex: 1.5 1 400px;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

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

.social-links a {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: color 0.3s;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
    background: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 1rem;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.credits {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        top: 10px;
    }

    100% {
        opacity: 0;
        top: 30px;
    }
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

/* Reveal Classes (Used by JS) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1.5s forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Precision */
@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 1.5rem;
        /* More precise padding for mobile */
    }

    .container {
        padding: 0 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        /* Slightly wider for better touch targets on small phones */
        max-width: 300px;
        background-color: rgba(255, 255, 255, 0.98);
        /* Less transparent for readability */
        flex-direction: column;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        padding-top: 4rem;
        /* Initial spacing offset */
    }

    .hero-text h1 {
        font-size: 2.8rem;
        /* Adjusted opacity/size for mobile legibility */
        line-height: 1.2;
    }

    .description {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        display: none;
    }

    .scroll-down {
        bottom: 1rem;
        transform: translateX(-50%) scale(0.8);
    }

    .about-image {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .profile-frame {
        width: 250px;
        height: 250px;
        overflow: hidden;
        border-radius: 50%;
        border: 4px solid var(--accent-light);
        box-shadow: 0 0 30px rgba(13, 148, 136, 0.3);
    }

    .profile-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.05);
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .profile-frame:hover .profile-img {
        transform: scale(1);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Force 2x2 Grid for Mobile Badges */
    .vibe-tags {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        justify-items: center;
        margin: 1.5rem auto 0;
        max-width: 100%;
    }

    .tag {
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
        /* Slightly smaller for mobile fit */
        padding: 0.4rem 0.2rem;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 25px;
        /* Tighter padding */
    }

    .timeline-item::before {
        left: -9px;
        width: 18px;
        /* Slightly smaller dots */
        height: 18px;
    }

    .timeline-content {
        padding: 1.5rem;
        /* Less padding inside cards */
    }

    .interests-grid {
        gap: 2rem;
    }

    .interest-item {
        width: 140px;
        /* Smaller items for grid flow */
    }

    .interest-item i {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .contact-wrapper {
        gap: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-wrapper {
        grid-template-columns: 1fr;
        /* Full width list on small screens */
    }
}

/* Form Notification */
.form-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.form-notification.error {
    background-color: #ef4444;
}

/* PWA Install Button */
.pwa-install-btn {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s ease;
    align-items: center;
    gap: 0.5rem;
}

.pwa-install-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.pwa-install-btn i {
    font-size: 1.2rem;
}

/* PWA Toast Message */
.pwa-toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 2001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pwa-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 80px;
    /* Slide up */
}

/* Mobile adjustments for PWA button */
@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        opacity: 0.9;
        /* Make it slightly transparent */
    }

    .pwa-install-btn:hover {
        opacity: 1;
    }

    .music-btn {
        bottom: 1rem;
        left: 1rem;
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        opacity: 0.6;
        background-color: rgba(255, 255, 255, 0.5);
        /* Less intrusive background */
        border: none;
    }
}

/* Music Control Button */
.music-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 1.2rem;
}

.music-btn:hover {
    transform: scale(1.1);
    background-color: var(--accent-light);
    color: var(--accent-color);
}

.music-btn.playing {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    animation: pulse-music 2s infinite;
}

@keyframes pulse-music {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(13, 148, 136, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0);
    }
}

/* Cinematic Effects handled via JS Web Animations API for performance */

/* 
 * ==========================================
 * Print Layout Configuration
 * ==========================================
 * Defines print-specific overrides for A4 paper size.
 * Includes adjustments for grid layouts, visibility,
 * and typography to ensure clean output.
 */
@media print {
    @page {
        margin: 1.5cm;
        size: A4;
    }

    /* 1. Reset and Visibility */
    *,
    *:before,
    *:after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-shadow: none !important;
        text-shadow: none !important;
        transition: none !important;
        animation: none !important;
        filter: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        background-color: #fff !important;
        color: #222;
        font-family: 'Inter', sans-serif;
        font-size: 10.5pt;
        line-height: 1.5;
        width: 100%;
        -webkit-font-smoothing: antialiased;
    }

    /* 2. Hide Web-Only Elements */
    .navbar,
    .scroll-down,
    .music-btn,
    .pwa-install-btn,
    .pwa-toast,
    .form-notification,
    .contact-form,
    .btn,
    .hamburger,
    footer,
    .floating-icon,
    iframe,
    .img-overlay,
    .cta-group {
        display: none !important;
    }

    /* 3. Section Layout */
    .section {
        padding: 0 !important;
        margin-bottom: 2.5rem !important;
        page-break-inside: auto;
        /* Allow page breaks to avoid truncation */
        display: block !important;
        width: 100%;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 4. Hero Section */
    .hero-section {
        height: auto !important;
        display: block !important;
        padding: 2rem 0 2rem 0 !important;
        background: radial-gradient(circle at 50% 50%, #effcf9 0%, transparent 70%) !important;
        border-bottom: 3px solid #0d9488;
        margin-bottom: 3rem;
        text-align: center;
        page-break-inside: avoid;
        /* Prevent page break inside hero section */
    }

    .hero-content {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-text {
        width: 100%;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 36pt !important;
        color: #0d9488 !important;
        font-family: 'Playfair Display', serif;
        margin: 0 0 1rem 0;
        letter-spacing: -1px;
    }

    .hero-text .subtitle {
        font-size: 14pt;
        font-weight: 600;
        color: #115e59 !important;
        text-transform: uppercase;
        letter-spacing: 4px;
        margin-bottom: 1rem;
    }

    .hero-text .description {
        font-size: 11pt;
        color: #555;
        max-width: 80%;
        margin: 0 auto;
        line-height: 1.5;
    }

    .hero-visual {
        display: none !important;
    }

    /* 5. Typography */
    h2.section-title {
        font-size: 20pt !important;
        color: #1f2937 !important;
        font-family: 'Playfair Display', serif;
        text-align: center;
        border-bottom: 2px solid #0d9488;
        padding-bottom: 0.5rem;
        margin-bottom: 2rem;
        display: block;
        width: 100%;
        page-break-after: avoid;
        /* Ensure title remains with following content */
    }

    .section-title::after {
        display: none;
    }

    /* 6. Layouts: About Section */
    .about-grid {
        display: flex !important;
        flex-direction: row;
        gap: 3rem;
        align-items: center;
        justify-content: center;
    }

    .about-image {
        display: block !important;
        width: 160px;
        flex-shrink: 0;
        margin: 0 auto;
    }

    .img-wrapper {
        border: 4px solid #ccfbf1 !important;
        border-radius: 50%;
        width: 160px;
        height: 160px;
        overflow: hidden;
        margin: 0 auto;
    }

    .img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .about-text {
        text-align: justify;
        flex: 1;
    }

    /* Badge Grid Layout */
    .vibe-tags {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        /* 2 columns */
        gap: 0.8rem;
        margin: 1.5rem auto 0 auto;
        max-width: 350px;
        /* Constrain width */
        justify-items: center;
    }

    .tag {
        background: #fff !important;
        color: #0f766e !important;
        border: 1px solid #0d9488;
        font-size: 9pt;
        padding: 0.4rem 0.8rem;
        border-radius: 50px;
        white-space: nowrap;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* 7. Education - Timeline Layout */
    .timeline {
        margin: 0 auto !important;
        max-width: 90%;
        padding-left: 2rem !important;
        /* Establish positioning context */
        background: transparent !important;
    }

    .timeline::before {
        left: 2rem !important;
        /* Vertical timeline line positioning */
        border-left: 2px solid #e5e7eb !important;
    }

    .timeline-item {
        margin-bottom: 3rem !important;
        padding-left: 2.5rem !important;
        padding-bottom: 2rem !important;
        /* Bottom padding to prevent clipping */
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        position: relative !important;
        display: block !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }

    /* Ensure visibility of animated elements */
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        clip-path: none !important;
        /* Ensure no clipping */
    }

    .timeline-item::before {
        /* Timeline dot positioning */
        content: '' !important;
        position: absolute !important;
        left: 1px !important;
        /* Center align with vertical line */
        transform: translateX(-50%) !important;
        top: 0.6rem !important;
        background: #0d9488 !important;
        border: 3px solid #fff !important;
        width: 18px !important;
        height: 18px !important;
        box-shadow: 0 0 0 1px #0d9488 !important;
        z-index: 5 !important;
        margin: 0 !important;
        /* Remove default margins */
    }

    /* Reset timeline content styles for print capability */
    .timeline-content,
    .timeline-content * {
        all: unset !important;
        display: block !important;
        /* Force block layout */
        font-family: 'Inter', sans-serif !important;
        color: #222 !important;
        text-align: left !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.4 !important;
    }

    /* Apply print-specific typography */
    .timeline-content h3 {
        font-size: 14pt !important;
        font-weight: 700 !important;
        margin-bottom: 0.2rem !important;
    }

    .timeline-content h4 {
        font-size: 11pt !important;
        color: #555 !important;
        margin-bottom: 0.5rem !important;
        font-style: italic !important;
    }

    .timeline-content p,
    .timeline-content p strong {
        font-size: 10.5pt !important;
        white-space: normal !important;
    }

    /* Prevent text modification or clipping in print */
    .card-glass p {
        widows: 3 !important;
        orphans: 3 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
        white-space: normal !important;
        /* Force text wrapping */
        text-overflow: clip !important;
        /* Disable text truncation */
        display: block !important;
        height: auto !important;
    }

    /* Ensure inline elements are visible */
    .card-glass p strong,
    .card-glass p .text-accent,
    .card-glass p span {
        display: inline !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        float: none !important;
    }

    .card-glass {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        text-align: left;
    }

    .card-glass h3 {
        font-size: 14pt;
        margin: 0;
        font-family: 'Playfair Display', serif;
    }

    .card-glass h4 {
        font-size: 11pt;
        color: #555;
        margin: 0.3rem 0;
    }

    .text-accent {
        color: #0d9488 !important;
    }

    /* 8. Research: Horizontal Card Layout */
    .research-grid {
        display: block !important;
        /* One card per row */
        width: 100%;
    }

    .card-research {
        border: 1px solid #e5e7eb !important;
        border-radius: 8px;
        page-break-inside: avoid;
        background: #fff !important;
        display: flex !important;
        /* Horizontal Flex */
        flex-direction: row !important;
        align-items: center;
        margin-bottom: 1.5rem;
        overflow: hidden;
    }

    .card-header {
        background: #f0fdfa !important;
        color: #0f766e !important;
        padding: 1.5rem;
        border-bottom: none;
        /* Removed split */
        border-right: 1px solid #e5e7eb;
        width: 30%;
        /* Fixed width for header part */
        text-align: center;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
    }

    /* Microscope Icon: Fixed & Non-overlapping */
    .card-header i.icon-bg {
        position: static !important;
        /* No absolute positioning */
        font-size: 2.5rem !important;
        color: #0d9488 !important;
        opacity: 1 !important;
        transform: none !important;
        margin-bottom: 1rem;
        display: block;
    }

    .card-header h3 {
        font-size: 13pt;
        margin: 0;
        line-height: 1.3;
    }

    .card-body {
        padding: 1.5rem;
        text-align: left;
        flex: 1;
    }

    .badge {
        display: inline-block;
        background: #fff !important;
        color: #0d9488 !important;
        border: 1px solid #0d9488;
        padding: 0.2rem 0.6rem;
        font-size: 8pt;
        margin-top: 0.5rem;
    }

    /* 9. Skills: Grid Layout */
    .skills-wrapper {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.2rem;
        page-break-inside: avoid;
    }

    .skill-category {
        border: 1px solid #e5e7eb;
        padding: 1rem;
        border-radius: 8px;
        background: #fff;
        text-align: center;
    }

    .skill-category h3 {
        font-size: 12pt;
        border-bottom: 2px solid #0d9488;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        color: #111;
        display: inline-block;
        min-width: 50%;
    }

    .skill-cloud {
        justify-content: center;
    }

    .skill-pill {
        background: #f0fdfa !important;
        color: #0f766e !important;
        font-size: 9pt;
        padding: 0.3rem 0.6rem;
        margin: 0.2rem;
        border: 1px solid #ccfbf1 !important;
    }

    /* 10. Interests: Centered Grid Layout */
    .interests-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        margin-top: 1rem;
        justify-items: center;
        /* Center items horizontally */
        align-items: center;
    }

    .interest-item {
        border: 1px solid #e5e7eb;
        padding: 1.5rem;
        border-radius: 8px;
        text-align: center;
        page-break-inside: avoid;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        /* Fill available space */
        height: 100%;
        /* Ensure uniform height */
        justify-content: center;
    }

    .interest-item i {
        display: flex !important;
        background: #f0fdfa !important;
        color: #0d9488 !important;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
        border: 1px solid #ccfbf1;
    }

    .interest-item h3 {
        margin: 0;
        font-size: 11pt;
        color: #111;
    }

    /* 11. Contact Section Layout */
    .contact-section {
        border-top: 4px double #e5e7eb;
        padding-top: 3rem !important;
        margin-top: 4rem;
        text-align: center;
        page-break-before: always !important;
        /* Force page break before contact section */
    }

    .contact-wrapper {
        display: block !important;
        page-break-inside: avoid !important;
    }

    .contact-info h2 {
        display: none;
    }

    .contact-details {
        display: flex;
        justify-content: center;
        gap: 3rem;
        flex-wrap: wrap;
    }

    .detail-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 11pt;
    }

    .detail-item i {
        color: #0d9488 !important;
    }

    /* Ensure links are clickable and visible */
    .detail-item a {
        text-decoration: underline;
        /* Visual cue */
        color: #0d9488 !important;
        font-weight: 600;
    }

    /* Social Media Links */
    .social-links {
        display: flex !important;
        /* Display social links */
        justify-content: center;
        gap: 2rem;
        margin-top: 2rem;
        border-top: 1px solid #eee;
        padding-top: 1.5rem;
        width: 100%;
    }

    .social-links a {
        color: #0d9488 !important;
        font-size: 14pt;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10pt;
    }

    .social-links a i {
        font-size: 18pt;
        margin-bottom: 0.5rem;
    }

    /* Hide URL text expansion */
    a[href^="http"]:after {
        content: "";
    }
}