
/* ==========================================================
   SHANKAR PORTFOLIO
   COMPLETE RESPONSIVE STYLESHEET
   Devices: 4K | Desktop | Laptop | Tablet | Mobile
========================================================== */

/* ---------- GLOBAL RESPONSIVE FIXES ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 320px;
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
}

img,
video,
iframe,
svg {
    max-width: 100%;
}

img,
video {
    height: auto;
}

button,
input,
textarea,
select {
    max-width: 100%;
    font: inherit;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

.section {
    width: 100%;
    min-width: 0;
    scroll-margin-top: 90px;
}

.home-content,
.about-grid,
.goals-content,
.project-card,
.contact-box {
    min-width: 0;
}

.home-left,
.home-right,
.project-info,
.project-preview,
.contact-content {
    min-width: 0;
    overflow-wrap: break-word;
}

/* ---------- LARGE DESKTOP: 1600px+ ---------- */

@media (min-width: 1600px) {

    .section {
        padding-left: max(7%, calc((100vw - 1450px) / 2));
        padding-right: max(7%, calc((100vw - 1450px) / 2));
    }

    .main-nav {
        padding-left: max(5%, calc((100vw - 1500px) / 2));
        padding-right: max(5%, calc((100vw - 1500px) / 2));
    }

    .home-content {
        max-width: 1450px;
        margin-inline: auto;
        gap: 90px;
    }

    .home-name {
        font-size: clamp(75px, 6vw, 110px);
    }

    .section-heading h2 {
        font-size: clamp(42px, 4vw, 65px);
    }
}

/* ---------- LAPTOPS: 1200px ---------- */

@media (max-width: 1200px) {

    .main-nav {
        padding-left: 3%;
        padding-right: 3%;
        gap: 15px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-link {
        font-size: 9px;
    }

    .nav-status {
        font-size: 8px;
    }

    .section {
        padding-left: 5%;
        padding-right: 5%;
    }

    .home-content {
        gap: 45px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-location {
        max-width: 150px;
    }
}

/* ---------- SMALL LAPTOPS / TABLETS: 900px ---------- */

@media (max-width: 900px) {

    :root {
        --nav-height: 70px;
    }

    .main-nav {
        min-height: var(--nav-height);
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 12px 4%;
        gap: 10px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 22px;
        padding: 8px 0;
        scrollbar-width: thin;
        scrollbar-color: #1679bd transparent;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        height: 3px;
    }

    .nav-links::-webkit-scrollbar-thumb {
        background: #1679bd;
        border-radius: 5px;
    }

    .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 10px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }

    .nav-status {
        margin-left: auto;
    }

    .home-section {
        min-height: auto;
        padding-top: 100px;
    }

    .home-content {
        grid-template-columns: 1fr 0.75fr;
        align-items: center;
        gap: 30px;
    }

    .home-name {
        font-size: clamp(48px, 8vw, 75px);
        overflow-wrap: anywhere;
    }

    .home-title {
        font-size: 25px;
    }

    .home-description {
        line-height: 1.8;
    }

    .home-right {
        width: 100%;
        max-width: 360px;
        margin-inline: auto;
    }

    .profile-location {
        right: -15px;
    }

    .profile-year {
        left: -15px;
    }

    .about-grid,
    .goals-content {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-preview {
        min-height: 390px;
    }

    .experience-grid,
    .certifications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-box {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- TABLETS: 768px ---------- */

@media (max-width: 768px) {

    .section {
        padding: 80px 5%;
    }

    .section-heading h2 {
        font-size: clamp(30px, 5vw, 40px);
    }

    .home-content {
        grid-template-columns: 1fr 0.85fr;
        gap: 22px;
    }

    .home-name {
        font-size: clamp(45px, 8vw, 65px);
    }

    .home-title {
        font-size: 22px;
    }

    .home-buttons {
        flex-wrap: wrap;
    }

    .education-timeline {
        max-width: 100%;
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .learning-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goals-vision {
        flex-wrap: wrap;
    }

    .vision-card {
        flex: 1 1 40%;
    }
}

/* ---------- MOBILE / SMALL TABLETS: 650px ---------- */

@media (max-width: 650px) {

    :root {
        --nav-height: 65px;
    }

    .section {
        padding: 75px 5%;
    }

    .section-heading {
        gap: 13px;
        margin-bottom: 35px;
        flex-wrap: wrap;
    }

    .section-heading h2 {
        font-size: clamp(29px, 7vw, 36px);
        line-height: 1.2;
    }

    .section-number {
        min-width: 36px;
        font-size: 10px;
    }

    /* HOME */

    .home-section {
        min-height: auto;
        padding: 65px 5% 40px;
    }

    .home-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .home-left {
        width: 100%;
        max-width: 100%;
    }

    .home-name {
        font-size: clamp(48px, 12vw, 76px);
        line-height: 1.05;
        letter-spacing: 0;
        overflow-wrap: anywhere;
    }

    .home-title {
        font-size: clamp(20px, 5vw, 25px);
        line-height: 1.4;
    }

    .home-description,
    .home-tagline {
        font-size: 13px;
        line-height: 1.9;
    }

    .home-right {
        width: min(330px, 85%);
        max-width: 100%;
        margin-inline: auto;
    }

    .profile-location {
        right: -20px;
    }

    .profile-year {
        left: -20px;
    }

    .home-buttons {
        gap: 12px;
        flex-wrap: wrap;
    }

    .home-bottom {
        margin-top: 45px;
        flex-wrap: wrap;
    }

    /* ABOUT */

    .about-grid,
    .goals-content {
        grid-template-columns: 1fr;
    }

    .about-text,
    .about-data {
        padding: 25px;
    }

    /* EDUCATION */

    .education-timeline {
        width: 100%;
    }

    .education-timeline::before {
        left: 18px;
    }

    .education-item {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .education-date {
        grid-column: 2;
        grid-row: 1;
        padding: 0 0 9px;
        text-align: left;
    }

    .education-marker {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 36px;
        height: 36px;
        margin: 0;
    }

    .education-content {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
        padding: 22px;
    }

    /* SKILLS */

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skill-card {
        min-width: 0;
    }

    /* EXPERIENCE */

    .experience-grid,
    .milestones-list {
        grid-template-columns: 1fr;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .certificate-card h3 {
        min-height: 0;
    }

    /* PROJECTS */

    .project-card {
        grid-template-columns: 1fr;
        overflow: hidden;
    }

    .project-info,
    .project-preview {
        padding: 22px;
        min-width: 0;
    }

    .project-preview {
        min-height: 330px;
    }

    .window-body {
        grid-template-columns: 80px minmax(0, 1fr);
        min-width: 0;
    }

    .preview-sidebar {
        padding: 12px 6px;
    }

    .preview-menu {
        font-size: 7px;
        overflow-wrap: anywhere;
    }

    .preview-main {
        min-width: 0;
    }

    /* LEARNING */

    .learning-list {
        grid-template-columns: 1fr;
    }

    /* CONTACT */

    .contact-box {
        grid-template-columns: 1fr;
        padding: 27px;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    /* FOOTER */

    .portfolio-footer {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ---------- SMALL MOBILE: 480px ---------- */

@media (max-width: 480px) {

    .main-nav {
        padding: 10px 4%;
        gap: 8px;
    }

    .logo-mark {
        width: 35px;
        height: 35px;
        font-size: 17px;
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 11px;
    }

    .nav-status {
        font-size: 8px;
        white-space: nowrap;
    }

    .nav-links {
        gap: 18px;
    }

    .nav-link {
        font-size: 9px;
    }

    .section {
        padding: 70px 5%;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    .section-kicker {
        font-size: 9px;
    }

    .home-section {
        padding-top: 55px;
    }

    .home-name {
        font-size: clamp(45px, 12vw, 57px);
    }

    .home-title {
        font-size: 21px;
    }

    .home-label {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .home-tagline {
        font-size: 12px;
        line-height: 1.9;
    }

    .home-description {
        font-size: 12px;
    }

    .home-buttons {
        gap: 10px;
    }

    .btn {
        min-height: 44px;
        padding: 0 14px;
        font-size: 9px;
        gap: 8px;
        justify-content: center;
    }

    .home-tech {
        gap: 8px;
        font-size: 9px;
        flex-wrap: wrap;
    }

    .home-bottom {
        font-size: 8px;
    }

    .about-text,
    .about-data {
        padding: 21px;
    }

    .about-text h3 {
        font-size: 26px;
    }

    .about-text p,
    .goals-main p {
        font-size: 12px;
        line-height: 1.8;
    }

    .education-content {
        padding: 18px;
    }

    .education-content h3 {
        font-size: 15px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        min-height: 0;
        padding: 20px;
    }

    .skill-card p {
        min-height: 0;
    }

    .learning-list {
        grid-template-columns: 1fr;
    }

    .learning-item {
        padding: 13px;
    }

    .interest-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-info,
    .project-preview {
        padding: 18px;
    }

    .project-info h3 {
        font-size: clamp(27px, 8vw, 34px);
    }

    .project-preview {
        min-height: 280px;
    }

    .window-body {
        grid-template-columns: 66px minmax(0, 1fr);
        min-height: 245px;
    }

    .preview-main {
        padding: 12px 8px;
    }

    .preview-stats {
        gap: 4px;
    }

    .preview-stats div {
        min-width: 0;
        padding: 8px 4px;
    }

    .preview-stats small {
        font-size: 6px;
    }

    .preview-stats strong {
        font-size: 13px;
    }

    .chart-bars {
        height: 75px;
        gap: 5px;
    }

    .experience-card {
        padding: 23px;
    }

    .certificate-card {
        padding: 22px;
    }

    .goals-main {
        padding: 24px;
    }

    .goals-vision {
        padding: 13px;
        gap: 8px;
    }

    .vision-card {
        flex: 1 1 100%;
        min-height: 115px;
        padding: 13px;
    }

    .vision-card strong {
        font-size: 10px;
    }

    .long-term-goal {
        padding: 21px;
    }

    .contact-box {
        padding: 22px;
    }

    .contact-content h2 {
        font-size: 30px;
    }

    .terminal-body {
        padding: 14px;
        font-size: 10px;
        overflow-wrap: anywhere;
    }

    .contact-info > *,
    .contact-placeholder {
        padding: 15px;
        min-width: 0;
    }
}

/* ---------- EXTRA SMALL PHONES: 360px ---------- */

@media (max-width: 360px) {

    .main-nav {
        padding: 9px 3%;
    }

    .logo-mark {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .logo-text {
        font-size: 10px;
    }

    .nav-status {
        font-size: 7px;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-link {
        font-size: 8px;
    }

    .section {
        padding-left: 4%;
        padding-right: 4%;
    }

    .section-heading h2 {
        font-size: 26px;
    }

    .home-name {
        font-size: 43px;
    }

    .home-title {
        font-size: 19px;
    }

    .home-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        min-height: 44px;
    }

    .home-right {
        width: 90%;
    }

    .profile-location {
        right: -12px;
        max-width: 115px;
    }

    .profile-year {
        left: -12px;
    }

    .project-info h3 {
        font-size: 27px;
    }

    .window-body {
        grid-template-columns: 55px minmax(0, 1fr);
    }

    .preview-menu {
        font-size: 6px;
    }

    .contact-content h2 {
        font-size: 26px;
    }
}

/* ---------- ULTRA SMALL PHONES: 320px ---------- */

@media (max-width: 320px) {

    .home-name {
        font-size: 39px;
    }

    .home-title {
        font-size: 18px;
    }

    .section-heading h2 {
        font-size: 24px;
    }

    .nav-status {
        display: none;
    }

    .profile-location,
    .profile-year {
        font-size: 9px;
    }

    .contact-box {
        padding: 16px;
    }
}

/* ---------- LANDSCAPE MOBILE ---------- */

@media (max-height: 500px) and (orientation: landscape)
       and (max-width: 900px) {

    .home-section {
        min-height: auto;
        padding-top: 45px;
        padding-bottom: 35px;
    }

    .home-content {
        grid-template-columns: 1fr 0.7fr;
        gap: 25px;
    }

    .home-name {
        font-size: clamp(38px, 7vw, 55px);
    }

    .home-right {
        max-width: 250px;
    }

    .section {
        padding-top: 55px;
        padding-bottom: 55px;
    }
}

/* ---------- TOUCH SCREEN DEVICES ---------- */

@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav-link,
    .social-link {
        min-height: 44px;
    }

    .skill-card,
    .experience-card,
    .certificate-card,
    .education-content {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ---------- HOVER EFFECTS ---------- */

@media (hover: hover) and (pointer: fine) {

    .skill-card,
    .experience-card,
    .certificate-card,
    .education-content,
    .btn {
        transition:
            transform 0.3s ease,
            box-shadow 0.3s ease;
    }
}

/* ---------- BACKGROUND ON MOBILE ---------- */

@media (max-width: 650px) {

    body::before {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* ---------- REDUCED MOTION ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .home-bottom .scroll-arrow,
    .profile-scan {
        animation: none !important;
    }
}

/* ---------- PRINT RESPONSIVENESS ---------- */

@media print {

    .main-nav,
    .home-buttons,
    .home-bottom {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .section {
        padding: 20px 0;
        break-inside: avoid;
    }

    .project-card,
    .experience-card,
    .certificate-card {
        break-inside: avoid;
    }
}
